diff --git a/src/hello/backend/node_modules/.bin/acorn b/src/hello/backend/node_modules/.bin/acorn deleted file mode 100644 index 558ebb98..00000000 --- a/src/hello/backend/node_modules/.bin/acorn +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" - ret=$? -else - node "$basedir/../acorn/bin/acorn" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/acorn.cmd b/src/hello/backend/node_modules/.bin/acorn.cmd deleted file mode 100644 index 61e50de9..00000000 --- a/src/hello/backend/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\acorn\bin\acorn" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/bcrypt b/src/hello/backend/node_modules/.bin/bcrypt deleted file mode 100644 index 25154af5..00000000 --- a/src/hello/backend/node_modules/.bin/bcrypt +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../bcryptjs/bin/bcrypt" "$@" - ret=$? -else - node "$basedir/../bcryptjs/bin/bcrypt" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/bcrypt.cmd b/src/hello/backend/node_modules/.bin/bcrypt.cmd deleted file mode 100644 index 35210326..00000000 --- a/src/hello/backend/node_modules/.bin/bcrypt.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\bcryptjs\bin\bcrypt" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\bcryptjs\bin\bcrypt" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/crc32 b/src/hello/backend/node_modules/.bin/crc32 deleted file mode 100644 index 9011ae7e..00000000 --- a/src/hello/backend/node_modules/.bin/crc32 +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../crc-32/bin/crc32.njs" "$@" - ret=$? -else - node "$basedir/../crc-32/bin/crc32.njs" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/crc32.cmd b/src/hello/backend/node_modules/.bin/crc32.cmd deleted file mode 100644 index 1f0b0284..00000000 --- a/src/hello/backend/node_modules/.bin/crc32.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\crc-32\bin\crc32.njs" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\crc-32\bin\crc32.njs" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/eslint b/src/hello/backend/node_modules/.bin/eslint deleted file mode 100644 index 9f3ac314..00000000 --- a/src/hello/backend/node_modules/.bin/eslint +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@" - ret=$? -else - node "$basedir/../eslint/bin/eslint.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/eslint.cmd b/src/hello/backend/node_modules/.bin/eslint.cmd deleted file mode 100644 index 9d31668a..00000000 --- a/src/hello/backend/node_modules/.bin/eslint.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\eslint\bin\eslint.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\eslint\bin\eslint.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/js-yaml b/src/hello/backend/node_modules/.bin/js-yaml deleted file mode 100644 index 460d9df4..00000000 --- a/src/hello/backend/node_modules/.bin/js-yaml +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" - ret=$? -else - node "$basedir/../js-yaml/bin/js-yaml.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/js-yaml.cmd b/src/hello/backend/node_modules/.bin/js-yaml.cmd deleted file mode 100644 index 74091a9c..00000000 --- a/src/hello/backend/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\js-yaml\bin\js-yaml.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\js-yaml\bin\js-yaml.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/mime b/src/hello/backend/node_modules/.bin/mime deleted file mode 100644 index 0dbddf07..00000000 --- a/src/hello/backend/node_modules/.bin/mime +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../mime/cli.js" "$@" - ret=$? -else - node "$basedir/../mime/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/mime.cmd b/src/hello/backend/node_modules/.bin/mime.cmd deleted file mode 100644 index 546cb592..00000000 --- a/src/hello/backend/node_modules/.bin/mime.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\mime\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\mime\cli.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/node-which b/src/hello/backend/node_modules/.bin/node-which deleted file mode 100644 index 645ab6c6..00000000 --- a/src/hello/backend/node_modules/.bin/node-which +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../which/bin/node-which" "$@" - ret=$? -else - node "$basedir/../which/bin/node-which" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/node-which.cmd b/src/hello/backend/node_modules/.bin/node-which.cmd deleted file mode 100644 index fd9d0ed0..00000000 --- a/src/hello/backend/node_modules/.bin/node-which.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\which\bin\node-which" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\which\bin\node-which" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/nodemon b/src/hello/backend/node_modules/.bin/nodemon deleted file mode 100644 index 22d2f6aa..00000000 --- a/src/hello/backend/node_modules/.bin/nodemon +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@" - ret=$? -else - node "$basedir/../nodemon/bin/nodemon.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/nodemon.cmd b/src/hello/backend/node_modules/.bin/nodemon.cmd deleted file mode 100644 index 6596c49b..00000000 --- a/src/hello/backend/node_modules/.bin/nodemon.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\nodemon\bin\nodemon.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\nodemon\bin\nodemon.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/nodetouch b/src/hello/backend/node_modules/.bin/nodetouch deleted file mode 100644 index 479e4f65..00000000 --- a/src/hello/backend/node_modules/.bin/nodetouch +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../touch/bin/nodetouch.js" "$@" - ret=$? -else - node "$basedir/../touch/bin/nodetouch.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/nodetouch.cmd b/src/hello/backend/node_modules/.bin/nodetouch.cmd deleted file mode 100644 index c8a3d122..00000000 --- a/src/hello/backend/node_modules/.bin/nodetouch.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\touch\bin\nodetouch.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\touch\bin\nodetouch.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/rimraf b/src/hello/backend/node_modules/.bin/rimraf deleted file mode 100644 index 3cebd6e8..00000000 --- a/src/hello/backend/node_modules/.bin/rimraf +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../rimraf/bin.js" "$@" - ret=$? -else - node "$basedir/../rimraf/bin.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/rimraf.cmd b/src/hello/backend/node_modules/.bin/rimraf.cmd deleted file mode 100644 index 6e88bbfd..00000000 --- a/src/hello/backend/node_modules/.bin/rimraf.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\rimraf\bin.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/semver b/src/hello/backend/node_modules/.bin/semver deleted file mode 100644 index 6f6e6c7f..00000000 --- a/src/hello/backend/node_modules/.bin/semver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" - ret=$? -else - node "$basedir/../semver/bin/semver.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/semver.cmd b/src/hello/backend/node_modules/.bin/semver.cmd deleted file mode 100644 index 92447005..00000000 --- a/src/hello/backend/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\semver\bin\semver.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\semver\bin\semver.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/uuid b/src/hello/backend/node_modules/.bin/uuid deleted file mode 100644 index 5ca96b9e..00000000 --- a/src/hello/backend/node_modules/.bin/uuid +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../uuid/dist-node/bin/uuid" "$@" - ret=$? -else - node "$basedir/../uuid/dist-node/bin/uuid" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/uuid.cmd b/src/hello/backend/node_modules/.bin/uuid.cmd deleted file mode 100644 index 16caa04a..00000000 --- a/src/hello/backend/node_modules/.bin/uuid.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\uuid\dist-node\bin\uuid" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\uuid\dist-node\bin\uuid" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.bin/xlsx b/src/hello/backend/node_modules/.bin/xlsx deleted file mode 100644 index 6983332f..00000000 --- a/src/hello/backend/node_modules/.bin/xlsx +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../xlsx/bin/xlsx.njs" "$@" - ret=$? -else - node "$basedir/../xlsx/bin/xlsx.njs" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/.bin/xlsx.cmd b/src/hello/backend/node_modules/.bin/xlsx.cmd deleted file mode 100644 index 3f64a2ac..00000000 --- a/src/hello/backend/node_modules/.bin/xlsx.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\xlsx\bin\xlsx.njs" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\xlsx\bin\xlsx.njs" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/.yarn-integrity b/src/hello/backend/node_modules/.yarn-integrity deleted file mode 100644 index 0e61a1f2..00000000 --- a/src/hello/backend/node_modules/.yarn-integrity +++ /dev/null @@ -1,318 +0,0 @@ -{ - "systemParams": "win32-x64-137", - "modulesFolders": [ - "node_modules" - ], - "flags": [], - "linkedModules": [], - "topLevelPatterns": [ - "axios@^1.13.2", - "bcryptjs@^3.0.3", - "child_process@^1.0.2", - "dotenv@^16.3.1", - "eslint-config-google@^0.14.0", - "eslint@^8.45.0", - "express@^4.18.2", - "jsonwebtoken@^9.0.2", - "mysql2@^3.15.3", - "mysql@^2.18.1", - "nodemailer@^7.0.11", - "nodemon@^3.0.1", - "uuid@^13.0.0", - "xlsx@^0.18.5" - ], - "lockfileEntries": { - "@eslint-community/eslint-utils@^4.2.0": "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3", - "@eslint-community/regexpp@^4.6.1": "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b", - "@eslint/eslintrc@^2.1.4": "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad", - "@eslint/js@8.57.1": "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2", - "@humanwhocodes/config-array@^0.13.0": "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748", - "@humanwhocodes/module-importer@^1.0.1": "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c", - "@humanwhocodes/object-schema@^2.0.3": "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3", - "@nodelib/fs.scandir@2.1.5": "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5", - "@nodelib/fs.stat@2.0.5": "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b", - "@nodelib/fs.walk@^1.2.8": "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a", - "@ungap/structured-clone@^1.2.0": "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8", - "accepts@~1.3.8": "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e", - "acorn-jsx@^5.3.2": "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937", - "acorn@^8.9.0": "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816", - "adler-32@~1.3.0": "https://registry.yarnpkg.com/adler-32/-/adler-32-1.3.1.tgz#1dbf0b36dda0012189a32b3679061932df1821e2", - "ajv@^6.12.4": "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4", - "ansi-regex@^5.0.1": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304", - "ansi-styles@^4.1.0": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937", - "anymatch@~3.1.2": "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e", - "argparse@^2.0.1": "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38", - "array-flatten@1.1.1": "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2", - "asynckit@^0.4.0": "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", - "aws-ssl-profiles@^1.1.1": "https://registry.yarnpkg.com/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz#157dd77e9f19b1d123678e93f120e6f193022641", - "axios@^1.13.2": "https://registry.yarnpkg.com/axios/-/axios-1.13.2.tgz#9ada120b7b5ab24509553ec3e40123521117f687", - "balanced-match@^1.0.0": "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee", - "bcryptjs@^3.0.3": "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-3.0.3.tgz#4b93d6a398c48bfc9f32ee65d301174a8a8ea56f", - "bignumber.js@9.0.0": "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075", - "binary-extensions@^2.0.0": "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522", - "body-parser@~1.20.3": "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.4.tgz#f8e20f4d06ca8a50a71ed329c15dccad1cdc547f", - "brace-expansion@^1.1.7": "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843", - "braces@~3.0.2": "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789", - "buffer-equal-constant-time@^1.0.1": "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819", - "bytes@~3.1.2": "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5", - "call-bind-apply-helpers@^1.0.1": "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6", - "call-bind-apply-helpers@^1.0.2": "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6", - "call-bound@^1.0.2": "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a", - "callsites@^3.0.0": "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73", - "cfb@~1.2.1": "https://registry.yarnpkg.com/cfb/-/cfb-1.2.2.tgz#94e687628c700e5155436dac05f74e08df23bc44", - "chalk@^4.0.0": "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01", - "child_process@^1.0.2": "https://registry.yarnpkg.com/child_process/-/child_process-1.0.2.tgz#b1f7e7fc73d25e7fd1d455adc94e143830182b5a", - "chokidar@^3.5.2": "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b", - "codepage@~1.15.0": "https://registry.yarnpkg.com/codepage/-/codepage-1.15.0.tgz#2e00519024b39424ec66eeb3ec07227e692618ab", - "color-convert@^2.0.1": "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3", - "color-name@~1.1.4": "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2", - "combined-stream@^1.0.8": "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f", - "concat-map@0.0.1": "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "content-disposition@~0.5.4": "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe", - "content-type@~1.0.4": "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918", - "content-type@~1.0.5": "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918", - "cookie-signature@~1.0.6": "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.7.tgz#ab5dd7ab757c54e60f37ef6550f481c426d10454", - "cookie@~0.7.1": "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7", - "core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85", - "crc-32@~1.2.0": "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff", - "crc-32@~1.2.1": "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff", - "cross-spawn@^7.0.2": "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f", - "debug@2.6.9": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f", - "debug@^4": "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a", - "debug@^4.3.1": "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a", - "debug@^4.3.2": "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a", - "deep-is@^0.1.3": "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831", - "delayed-stream@~1.0.0": "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619", - "denque@^2.1.0": "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1", - "depd@2.0.0": "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df", - "depd@~2.0.0": "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df", - "destroy@1.2.0": "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015", - "destroy@~1.2.0": "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015", - "doctrine@^3.0.0": "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961", - "dotenv@^16.3.1": "https://registry.yarnpkg.com/dotenv/-/dotenv-16.6.1.tgz#773f0e69527a8315c7285d5ee73c4459d20a8020", - "dunder-proto@^1.0.1": "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a", - "ecdsa-sig-formatter@1.0.11": "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf", - "ee-first@1.1.1": "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d", - "encodeurl@~1.0.2": "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59", - "encodeurl@~2.0.0": "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58", - "es-define-property@^1.0.1": "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa", - "es-errors@^1.3.0": "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f", - "es-object-atoms@^1.0.0": "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1", - "es-object-atoms@^1.1.1": "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1", - "es-set-tostringtag@^2.1.0": "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d", - "escape-html@~1.0.3": "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988", - "escape-string-regexp@^4.0.0": "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34", - "eslint-config-google@^0.14.0": "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.14.0.tgz#4f5f8759ba6e11b424294a219dbfa18c508bcc1a", - "eslint-scope@^7.2.2": "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f", - "eslint-visitor-keys@^3.4.1": "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800", - "eslint-visitor-keys@^3.4.3": "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800", - "eslint@^8.45.0": "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9", - "espree@^9.6.0": "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f", - "espree@^9.6.1": "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f", - "esquery@^1.4.2": "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7", - "esrecurse@^4.3.0": "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921", - "estraverse@^5.1.0": "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123", - "estraverse@^5.2.0": "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123", - "esutils@^2.0.2": "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64", - "etag@~1.8.1": "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887", - "express@^4.18.2": "https://registry.yarnpkg.com/express/-/express-4.22.1.tgz#1de23a09745a4fffdb39247b344bb5eaff382069", - "fast-deep-equal@^3.1.1": "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525", - "fast-deep-equal@^3.1.3": "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525", - "fast-json-stable-stringify@^2.0.0": "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633", - "fast-levenshtein@^2.0.6": "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917", - "fastq@^1.6.0": "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5", - "file-entry-cache@^6.0.1": "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027", - "fill-range@^7.1.1": "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292", - "finalhandler@~1.3.1": "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.2.tgz#1ebc2228fc7673aac4a472c310cc05b77d852b88", - "find-up@^5.0.0": "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc", - "flat-cache@^3.0.4": "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee", - "flatted@^3.2.9": "https://registry.yarnpkg.com/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358", - "follow-redirects@^1.15.6": "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.11.tgz#777d73d72a92f8ec4d2e410eb47352a56b8e8340", - "form-data@^4.0.4": "https://registry.yarnpkg.com/form-data/-/form-data-4.0.5.tgz#b49e48858045ff4cbf6b03e1805cebcad3679053", - "forwarded@0.2.0": "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811", - "frac@~1.1.2": "https://registry.yarnpkg.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b", - "fresh@0.5.2": "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7", - "fresh@~0.5.2": "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7", - "fs.realpath@^1.0.0": "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f", - "fsevents@~2.3.2": "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6", - "function-bind@^1.1.2": "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c", - "generate-function@^2.3.1": "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f", - "get-intrinsic@^1.2.5": "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01", - "get-intrinsic@^1.2.6": "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01", - "get-intrinsic@^1.3.0": "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01", - "get-proto@^1.0.1": "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1", - "glob-parent@^6.0.2": "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3", - "glob-parent@~5.1.2": "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4", - "glob@^7.1.3": "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b", - "globals@^13.19.0": "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171", - "gopd@^1.2.0": "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1", - "graphemer@^1.4.0": "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6", - "has-flag@^3.0.0": "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd", - "has-flag@^4.0.0": "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b", - "has-symbols@^1.0.3": "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338", - "has-symbols@^1.1.0": "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338", - "has-tostringtag@^1.0.2": "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc", - "hasown@^2.0.2": "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003", - "http-errors@2.0.0": "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3", - "http-errors@~2.0.0": "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.1.tgz#36d2f65bc909c8790018dd36fb4d93da6caae06b", - "http-errors@~2.0.1": "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.1.tgz#36d2f65bc909c8790018dd36fb4d93da6caae06b", - "iconv-lite@^0.7.0": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.1.tgz#d4af1d2092f2bb05aab6296e5e7cd286d2f15432", - "iconv-lite@~0.4.24": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b", - "ignore-by-default@^1.0.1": "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09", - "ignore@^5.2.0": "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5", - "import-fresh@^3.2.1": "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf", - "imurmurhash@^0.1.4": "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea", - "inflight@^1.0.4": "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9", - "inherits@2": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c", - "inherits@2.0.4": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c", - "inherits@~2.0.3": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c", - "inherits@~2.0.4": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c", - "ipaddr.js@1.9.1": "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3", - "is-binary-path@~2.1.0": "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09", - "is-extglob@^2.1.1": "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2", - "is-glob@^4.0.0": "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084", - "is-glob@^4.0.1": "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084", - "is-glob@^4.0.3": "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084", - "is-glob@~4.0.1": "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084", - "is-number@^7.0.0": "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b", - "is-path-inside@^3.0.3": "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283", - "is-property@^1.0.2": "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84", - "isarray@~1.0.0": "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11", - "isexe@^2.0.0": "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10", - "js-yaml@^4.1.0": "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b", - "json-buffer@3.0.1": "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13", - "json-schema-traverse@^0.4.1": "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660", - "json-stable-stringify-without-jsonify@^1.0.1": "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651", - "jsonwebtoken@^9.0.2": "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz#6cd57ab01e9b0ac07cb847d53d3c9b6ee31f7ae2", - "jwa@^2.0.1": "https://registry.yarnpkg.com/jwa/-/jwa-2.0.1.tgz#bf8176d1ad0cd72e0f3f58338595a13e110bc804", - "jws@^4.0.1": "https://registry.yarnpkg.com/jws/-/jws-4.0.1.tgz#07edc1be8fac20e677b283ece261498bd38f0690", - "keyv@^4.5.3": "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93", - "levn@^0.4.1": "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade", - "locate-path@^6.0.0": "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286", - "lodash.includes@^4.3.0": "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f", - "lodash.isboolean@^3.0.3": "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6", - "lodash.isinteger@^4.0.4": "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343", - "lodash.isnumber@^3.0.3": "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc", - "lodash.isplainobject@^4.0.6": "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb", - "lodash.isstring@^4.0.1": "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451", - "lodash.merge@^4.6.2": "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a", - "lodash.once@^4.0.0": "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac", - "long@^5.2.1": "https://registry.yarnpkg.com/long/-/long-5.3.2.tgz#1d84463095999262d7d7b7f8bfd4a8cc55167f83", - "lru.min@^1.0.0": "https://registry.yarnpkg.com/lru.min/-/lru.min-1.1.3.tgz#c8c3d001dfb4cbe5b8d1f4bea207d4a320e5d76f", - "lru.min@^1.1.0": "https://registry.yarnpkg.com/lru.min/-/lru.min-1.1.3.tgz#c8c3d001dfb4cbe5b8d1f4bea207d4a320e5d76f", - "math-intrinsics@^1.1.0": "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9", - "media-typer@0.3.0": "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748", - "merge-descriptors@1.0.3": "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5", - "methods@~1.1.2": "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee", - "mime-db@1.52.0": "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70", - "mime-types@^2.1.12": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a", - "mime-types@~2.1.24": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a", - "mime-types@~2.1.34": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a", - "mime@1.6.0": "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1", - "minimatch@^3.0.5": "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b", - "minimatch@^3.1.1": "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b", - "minimatch@^3.1.2": "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b", - "ms@2.0.0": "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8", - "ms@2.1.3": "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2", - "ms@^2.1.1": "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2", - "ms@^2.1.3": "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2", - "mysql2@^3.15.3": "https://registry.yarnpkg.com/mysql2/-/mysql2-3.15.3.tgz#f0348d9c7401bb98cb1f45ffc5a773b109f70808", - "mysql@^2.18.1": "https://registry.yarnpkg.com/mysql/-/mysql-2.18.1.tgz#2254143855c5a8c73825e4522baf2ea021766717", - "named-placeholders@^1.1.3": "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.4.tgz#92882114525181077e21aab96889f25e857e233a", - "natural-compare@^1.4.0": "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7", - "negotiator@0.6.3": "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd", - "nodemailer@^7.0.11": "https://registry.yarnpkg.com/nodemailer/-/nodemailer-7.0.11.tgz#5f7b06afaec20073cff36bea92d1c7395cc3e512", - "nodemon@^3.0.1": "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.11.tgz#04a54d1e794fbec9d8f6ffd8bf1ba9ea93a756ed", - "normalize-path@^3.0.0": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65", - "normalize-path@~3.0.0": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65", - "object-inspect@^1.13.3": "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213", - "on-finished@2.4.1": "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f", - "on-finished@~2.4.1": "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f", - "once@^1.3.0": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "optionator@^0.9.3": "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734", - "p-limit@^3.0.2": "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b", - "p-locate@^5.0.0": "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834", - "parent-module@^1.0.0": "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2", - "parseurl@~1.3.3": "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4", - "path-exists@^4.0.0": "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3", - "path-is-absolute@^1.0.0": "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", - "path-key@^3.1.0": "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375", - "path-to-regexp@~0.1.12": "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7", - "picomatch@^2.0.4": "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42", - "picomatch@^2.2.1": "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42", - "prelude-ls@^1.2.1": "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396", - "process-nextick-args@~2.0.0": "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2", - "proxy-addr@~2.0.7": "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025", - "proxy-from-env@^1.1.0": "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2", - "pstree.remy@^1.1.8": "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a", - "punycode@^2.1.0": "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5", - "qs@~6.14.0": "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930", - "queue-microtask@^1.2.2": "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243", - "range-parser@~1.2.1": "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031", - "raw-body@~2.5.3": "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.3.tgz#11c6650ee770a7de1b494f197927de0c923822e2", - "readable-stream@2.3.7": "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57", - "readdirp@~3.6.0": "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7", - "resolve-from@^4.0.0": "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6", - "reusify@^1.0.4": "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f", - "rimraf@^3.0.2": "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a", - "run-parallel@^1.1.9": "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee", - "safe-buffer@5.1.2": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d", - "safe-buffer@5.2.1": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6", - "safe-buffer@^5.0.1": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6", - "safe-buffer@~5.1.0": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d", - "safe-buffer@~5.1.1": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d", - "safer-buffer@>= 2.1.2 < 3": "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a", - "safer-buffer@>= 2.1.2 < 3.0.0": "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a", - "semver@^7.5.3": "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946", - "semver@^7.5.4": "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946", - "send@0.19.0": "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8", - "send@~0.19.0": "https://registry.yarnpkg.com/send/-/send-0.19.1.tgz#1c2563b2ee4fe510b806b21ec46f355005a369f9", - "seq-queue@^0.0.5": "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e", - "serve-static@~1.16.2": "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296", - "setprototypeof@1.2.0": "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424", - "setprototypeof@~1.2.0": "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424", - "shebang-command@^2.0.0": "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea", - "shebang-regex@^3.0.0": "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172", - "side-channel-list@^1.0.0": "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad", - "side-channel-map@^1.0.1": "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42", - "side-channel-weakmap@^1.0.2": "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea", - "side-channel@^1.1.0": "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9", - "simple-update-notifier@^2.0.0": "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb", - "sqlstring@2.3.1": "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.1.tgz#475393ff9e91479aea62dcaf0ca3d14983a7fb40", - "sqlstring@^2.3.2": "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c", - "ssf@~0.11.2": "https://registry.yarnpkg.com/ssf/-/ssf-0.11.2.tgz#0b99698b237548d088fc43cdf2b70c1a7512c06c", - "statuses@2.0.1": "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63", - "statuses@~2.0.1": "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382", - "statuses@~2.0.2": "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382", - "string_decoder@~1.1.1": "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8", - "strip-ansi@^6.0.1": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9", - "strip-json-comments@^3.1.1": "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006", - "supports-color@^5.5.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f", - "supports-color@^7.1.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da", - "text-table@^0.2.0": "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4", - "to-regex-range@^5.0.1": "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4", - "toidentifier@1.0.1": "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35", - "toidentifier@~1.0.1": "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35", - "touch@^3.1.0": "https://registry.yarnpkg.com/touch/-/touch-3.1.1.tgz#097a23d7b161476435e5c1344a95c0f75b4a5694", - "type-check@^0.4.0": "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1", - "type-check@~0.4.0": "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1", - "type-fest@^0.20.2": "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4", - "type-is@~1.6.18": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131", - "undefsafe@^2.0.5": "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c", - "unpipe@~1.0.0": "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec", - "uri-js@^4.2.2": "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e", - "util-deprecate@~1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf", - "utils-merge@1.0.1": "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713", - "uuid@^13.0.0": "https://registry.yarnpkg.com/uuid/-/uuid-13.0.0.tgz#263dc341b19b4d755eb8fe36b78d95a6b65707e8", - "vary@~1.1.2": "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc", - "which@^2.0.1": "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1", - "wmf@~1.0.1": "https://registry.yarnpkg.com/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da", - "word-wrap@^1.2.5": "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34", - "word@~0.3.0": "https://registry.yarnpkg.com/word/-/word-0.3.0.tgz#8542157e4f8e849f4a363a288992d47612db9961", - "wrappy@1": "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "xlsx@^0.18.5": "https://registry.yarnpkg.com/xlsx/-/xlsx-0.18.5.tgz#16711b9113c848076b8a177022799ad356eba7d0", - "yocto-queue@^0.1.0": "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - }, - "files": [], - "artifacts": {} -} \ No newline at end of file diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.js.map b/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.js.map deleted file mode 100644 index 72dfccd7..00000000 --- a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n\n/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = /** @type {[number, number]} */ (node.range)[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = /** @type {[number, number]} */ (\n childScope.block.range\n )\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n /** @type {Scope|null} */\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Comment} Comment */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n/**\n * @template {string} Value\n * @typedef {import(\"./types.mjs\").PunctuatorToken} PunctuatorToken\n */\n\n/** @typedef {Comment | Token} CommentOrToken */\n\n/**\n * Creates the negate function of the given function.\n * @param {function(CommentOrToken):boolean} f - The function to negate.\n * @returns {function(CommentOrToken):boolean} Negated function.\n */\nfunction negate(f) {\n return (token) => !f(token)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @template {string} Value\n * @param {CommentOrToken} token - The token to check.\n * @param {Value} value - The value to check.\n * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ArrowToken} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is CommaToken} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is SemicolonToken} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ColonToken} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is Comment} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").SourceLocation} SourceLocation */\n/** @typedef {import(\"estree\").Position} Position */\n\n/**\n * Get the `(` token of the given function node.\n * @param {FunctionExpression | FunctionDeclaration} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? /** @type {Token} */ (\n sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n )\n : /** @type {Token} */ (\n sourceCode.getFirstToken(node, isOpeningParenToken)\n )\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {SourceLocation|null} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n /** @type {Position|null} */\n let start = null\n /** @type {Position|null} */\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = /** @type {Token} */ (\n sourceCode.getTokenBefore(node.body, isArrowToken)\n )\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = /** @type {SourceLocation} */ (parent.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = /** @type {SourceLocation} */ (node.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.MemberExpression} MemberExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Property} Property */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Literal} Literal */\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : // @ts-ignore\n typeof self !== \"undefined\"\n ? // @ts-ignore\n self\n : // @ts-ignore\n typeof window !== \"undefined\"\n ? // @ts-ignore\n window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n // @ts-ignore\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n .../** @type {(keyof typeof Math)[]} */ (\n Object.getOwnPropertyNames(Math)\n )\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values.\n * @param {Scope|undefined|null} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(.../** @type {Iterable} */ (argument.value))\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Checks if a variable is a built-in global.\n * @param {Variable|null} variable The variable to check.\n * @returns {variable is Variable & {defs:[]}}\n */\nfunction isBuiltinGlobal(variable) {\n return (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n )\n}\n\n/**\n * Checks if a variable can be considered as a constant.\n * @param {Variable} variable\n * @returns {variable is Variable & {defs: [import(\"eslint\").Scope.Definition & { type: \"Variable\" }]}} True if the variable can be considered as a constant.\n */\nfunction canBeConsideredConst(variable) {\n if (variable.defs.length !== 1) {\n return false\n }\n const def = variable.defs[0]\n return Boolean(\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" || isEffectivelyConst(variable)),\n )\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\n/**\n * Checks if a variable has mutation in its property.\n * @param {Variable} variable The variable to check.\n * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {boolean} True if the variable has mutation in its property.\n */\nfunction hasMutationInProperty(variable, initialScope) {\n for (const ref of variable.references) {\n let node = /** @type {TSESTreeNode} */ (ref.identifier)\n while (node && node.parent && node.parent.type === \"MemberExpression\") {\n node = node.parent\n }\n if (!node || !node.parent) {\n continue\n }\n if (\n (node.parent.type === \"AssignmentExpression\" &&\n node.parent.left === node) ||\n (node.parent.type === \"UpdateExpression\" &&\n node.parent.argument === node)\n ) {\n // This is a mutation.\n return true\n }\n if (\n node.parent.type === \"CallExpression\" &&\n node.parent.callee === node &&\n node.type === \"MemberExpression\"\n ) {\n const methodName = getStaticPropertyNameValue(node, initialScope)\n if (isNameOfMutationArrayMethod(methodName)) {\n // This is a mutation.\n return true\n }\n }\n }\n return false\n\n /**\n * Checks if a method name is one of the mutation array methods.\n * @param {StaticValue|null} methodName The method name to check.\n * @returns {boolean} True if the method name is a mutation array method.\n */\n function isNameOfMutationArrayMethod(methodName) {\n if (methodName == null || methodName.value == null) {\n return false\n }\n const name = methodName.value\n return (\n name === \"copyWithin\" ||\n name === \"fill\" ||\n name === \"pop\" ||\n name === \"push\" ||\n name === \"reverse\" ||\n name === \"shift\" ||\n name === \"sort\" ||\n name === \"splice\" ||\n name === \"unshift\"\n )\n }\n}\n\n/**\n * @template {TSESTreeNodeTypes} T\n * @callback VisitorCallback\n * @param {TSESTreeNode & { type: T }} node\n * @param {Scope|undefined|null} initialScope\n * @returns {StaticValue | null}\n */\n/**\n * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations\n */\n/**\n * @type {Operations}\n */\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return {\n value:\n /** @type {any} */ (left.value) <\n /** @type {any} */ (right.value),\n }\n case \"<=\":\n return {\n value:\n /** @type {any} */ (left.value) <=\n /** @type {any} */ (right.value),\n }\n case \">\":\n return {\n value:\n /** @type {any} */ (left.value) >\n /** @type {any} */ (right.value),\n }\n case \">=\":\n return {\n value:\n /** @type {any} */ (left.value) >=\n /** @type {any} */ (right.value),\n }\n case \"<<\":\n return {\n value:\n /** @type {any} */ (left.value) <<\n /** @type {any} */ (right.value),\n }\n case \">>\":\n return {\n value:\n /** @type {any} */ (left.value) >>\n /** @type {any} */ (right.value),\n }\n case \">>>\":\n return {\n value:\n /** @type {any} */ (left.value) >>>\n /** @type {any} */ (right.value),\n }\n case \"+\":\n return {\n value:\n /** @type {any} */ (left.value) +\n /** @type {any} */ (right.value),\n }\n case \"-\":\n return {\n value:\n /** @type {any} */ (left.value) -\n /** @type {any} */ (right.value),\n }\n case \"*\":\n return {\n value:\n /** @type {any} */ (left.value) *\n /** @type {any} */ (right.value),\n }\n case \"/\":\n return {\n value:\n /** @type {any} */ (left.value) /\n /** @type {any} */ (right.value),\n }\n case \"%\":\n return {\n value:\n /** @type {any} */ (left.value) %\n /** @type {any} */ (right.value),\n }\n case \"**\":\n return {\n value:\n /** @type {any} */ (left.value) **\n /** @type {any} */ (right.value),\n }\n case \"|\":\n return {\n value:\n /** @type {any} */ (left.value) |\n /** @type {any} */ (right.value),\n }\n case \"^\":\n return {\n value:\n /** @type {any} */ (left.value) ^\n /** @type {any} */ (right.value),\n }\n case \"&\":\n return {\n value:\n /** @type {any} */ (left.value) &\n /** @type {any} */ (right.value),\n }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver =\n /** @type {Record any>} */ (\n object.value\n )\n const methodName = /** @type {PropertyKey} */ (\n property.value\n )\n if (callAllowed.has(receiver[methodName])) {\n return {\n value: receiver[methodName](...args),\n }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = /** @type {(...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n if (variable != null) {\n // Built-in globals.\n if (isBuiltinGlobal(variable)) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (canBeConsideredConst(variable)) {\n const def = variable.defs[0]\n if (\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n const init = getStaticValueR(\n def.node.init,\n initialScope,\n )\n if (\n init &&\n typeof init.value === \"object\" &&\n init.value !== null\n ) {\n if (hasMutationInProperty(variable, initialScope)) {\n // This variable has mutation in its property.\n return null\n }\n }\n return init\n }\n }\n }\n }\n return null\n },\n\n Literal(node) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n //istanbul ignore if : this is implementation-specific behavior.\n if (\n (literal.regex != null || literal.bigint != null) &&\n literal.value == null\n ) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: literal.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (\n !isGetter(\n /** @type {object} */ (object.value),\n /** @type {PropertyKey} */ (property.value),\n )\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(/** @type {string} */ (property.value))\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = /** @type {new (...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n /** @type {Record} */\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[/** @type {PropertyKey} */ (key.value)] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n // @ts-expect-error -- Backward compatibility\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = /** @type {(...args: any[]) => any} */ (tag.value)\n /** @type {any[] & { raw?: string[] }} */\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += /** @type {string} */ (node.quasis[i + 1].value.cooked)\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -(/** @type {any} */ (arg.value)) }\n case \"+\":\n return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~(/** @type {any} */ (arg.value)) }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n TSAsExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSSatisfiesExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSTypeAssertion(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSNonNullExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSInstantiationExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node|TSESTreeNode|null|undefined} node The node to get.\n * @param {Scope|undefined|null} initialScope The scope to start finding variable.\n * @returns {StaticValue|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return /** @type {VisitorCallback} */ (operations[node.type])(\n /** @type {TSESTreeNode} */ (node),\n initialScope,\n )\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {MemberExpression|Property} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {StaticValue|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (/** @type {Partial} */ (nameNode).bigint) {\n return { value: /** @type {BigIntLiteral} */ (nameNode).bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {StaticValue | null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"estree\").BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"estree\").SimpleLiteral} SimpleLiteral */\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n if (literal.regex) {\n return `/${literal.regex.pattern}/${literal.regex.flags}`\n }\n if (literal.bigint) {\n return literal.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n\n if (evaluated) {\n // `String(Symbol.prototype)` throws error\n try {\n return String(evaluated.value)\n } catch {\n // No op\n }\n }\n\n return null\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null|undefined} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.property).name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.key).name\n\n default:\n break\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the name and kind of the given function node.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (hasId(node)) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n\n/**\n * @param {FunctionNode} node\n * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }}\n */\nfunction hasId(node) {\n return Boolean(\n /** @type {Partial} */ (node)\n .id,\n )\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"estree\").BinaryExpression} BinaryExpression */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").UnaryExpression} UnaryExpression */\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {x is Node} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof (/** @type {any} */ (this)[type]) === \"function\") {\n return /** @type {any} */ (this)[type](\n node,\n options,\n visitorKeys,\n )\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of /** @type {(keyof Node)[]} */ (\n visitorKeys[type] || getKeys(node)\n )) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n /**\n * @param {BinaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n /**\n * @param {MemberExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {MethodDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n /**\n * @param {Property} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {PropertyDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {UnaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {HasSideEffectOptions} [options] The option object.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(node, sourceCode, options = {}) {\n const { considerGetters = false, considerImplicitTypeConversion = false } =\n options\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.NewExpression} TSNewExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.CallExpression} TSCallExpression */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\n// eslint-disable-next-line complexity\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384\n parent.typeArguments ||\n /** @type {RuleNode} */ (\n /** @type {unknown} */ (\n /** @type {TSNewExpression | TSCallExpression} */ (\n parent\n ).typeParameters\n )\n ) ||\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node|number} timesOrNode The first parameter.\n * @param {Node|SourceCode} nodeOrSourceCode The second parameter.\n * @param {SourceCode} [optionalSourceCode] The third parameter.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n /** @type {number} */\n let times,\n /** @type {RuleNode} */\n node,\n /** @type {SourceCode} */\n sourceCode,\n maybeLeftParen,\n maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = /** @type {RuleNode} */ (nodeOrSourceCode)\n sourceCode = /** @type {SourceCode} */ (optionalSourceCode)\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = /** @type {RuleNode} */ (timesOrNode)\n sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode)\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /**\n * @param {string} key The placeholder.\n * @param {RegExpExecArray} match The matched information.\n * @returns {string} The replaced string.\n */\n function replacer(key, match) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[/** @type {any} */ (i)]\n }\n return key\n }\n }\n }\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n replacement.replace(placeholder, (key) => replacer(key, match)),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n String(\n replace(\n .../** @type {[string, ...string[]]} */ (\n /** @type {string[]} */ (match)\n ),\n match.index,\n match.input,\n ),\n ),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped?:boolean}} [options] The options.\n */\n constructor(pattern, options = {}) {\n const { escaped = false } = options\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } =\n /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this))\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").Expression} Expression */\n/** @typedef {import(\"estree\").Pattern} Pattern */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n/** @typedef {import(\"estree\").SimpleCallExpression} CallExpression */\n/** @typedef {import(\"estree\").Program} Program */\n/** @typedef {import(\"estree\").ImportDeclaration} ImportDeclaration */\n/** @typedef {import(\"estree\").ExportAllDeclaration} ExportAllDeclaration */\n/** @typedef {import(\"estree\").ExportDefaultDeclaration} ExportDefaultDeclaration */\n/** @typedef {import(\"estree\").ExportNamedDeclaration} ExportNamedDeclaration */\n/** @typedef {import(\"estree\").ImportSpecifier} ImportSpecifier */\n/** @typedef {import(\"estree\").ImportDefaultSpecifier} ImportDefaultSpecifier */\n/** @typedef {import(\"estree\").ImportNamespaceSpecifier} ImportNamespaceSpecifier */\n/** @typedef {import(\"estree\").ExportSpecifier} ExportSpecifier */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").AssignmentProperty} AssignmentProperty */\n/** @typedef {import(\"estree\").Literal} Literal */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMapObject} TraceMapObject\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\n\n/**\n * Check whether a given node is an import node or not.\n * @param {Node} node\n * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node.\n */\nfunction isHasSource(node) {\n return (\n IMPORT_TYPE.test(node.type) &&\n /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ (\n node\n ).source != null\n )\n}\nconst has =\n /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ (\n Function.call.bind(Object.hasOwnProperty)\n )\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable|undefined} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = /** @type {TSESTreeNode} */ (node).parent\n\n if (parent) {\n switch (parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return (\n parent.expressions[parent.expressions.length - 1] === node\n )\n case \"ChainExpression\":\n return true\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n case \"TSInstantiationExpression\":\n return true\n\n default:\n return false\n }\n }\n return false\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(globalScope, options = {}) {\n const {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = options\n /** @private @type {Variable[]} */\n this.variableStack = []\n /** @private */\n this.globalScope = globalScope\n /** @private */\n this.mode = mode\n /** @private */\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n /** @type {string[]} */\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(\n /** @type {CallExpression} */ (node).arguments[0],\n )\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n /** @type {CallExpression} */ (node),\n path,\n nextTraceMap,\n )\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = /** @type {Program} */ (this.globalScope.block)\n\n for (const node of programNode.body) {\n if (!isHasSource(node)) {\n continue\n }\n const moduleId = /** @type {string} */ (node.source.value)\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the property references for a given expression AST node.\n * @template T\n * @param {Expression} node The expression AST node to iterate property references.\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate property references.\n */\n *iteratePropertyReferences(node, traceMap) {\n yield* this._iteratePropertyReferences(node, [], traceMap)\n }\n\n /**\n * Iterate the references for a given variable.\n * @private\n * @template T\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = /** @type {RuleNode & Identifier} */ (\n reference.identifier\n )\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @private\n * @template T\n * @param {Expression} rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = /** @type {RuleNode} */ (node).parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @private\n * @template T\n * @param {Pattern} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(\n /** @type {AssignmentProperty} */ (property),\n )\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (property),\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n /** @type {AssignmentProperty} */ (property).value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @private\n * @template T\n * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key =\n specifierNode.local.type === \"Identifier\"\n ? specifierNode.local.name\n : specifierNode.local.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"./types.mjs\").StaticValueOptional} StaticValueOptional */\n/** @typedef {import(\"./types.mjs\").StaticValueProvided} StaticValueProvided */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n\nimport { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolon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B,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.mjs.map b/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.mjs.map deleted file mode 100644 index 58fb1a02..00000000 --- a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n\n/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = /** @type {[number, number]} */ (node.range)[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = /** @type {[number, number]} */ (\n childScope.block.range\n )\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n /** @type {Scope|null} */\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Comment} Comment */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n/**\n * @template {string} Value\n * @typedef {import(\"./types.mjs\").PunctuatorToken} PunctuatorToken\n */\n\n/** @typedef {Comment | Token} CommentOrToken */\n\n/**\n * Creates the negate function of the given function.\n * @param {function(CommentOrToken):boolean} f - The function to negate.\n * @returns {function(CommentOrToken):boolean} Negated function.\n */\nfunction negate(f) {\n return (token) => !f(token)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @template {string} Value\n * @param {CommentOrToken} token - The token to check.\n * @param {Value} value - The value to check.\n * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ArrowToken} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is CommaToken} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is SemicolonToken} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ColonToken} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is Comment} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").SourceLocation} SourceLocation */\n/** @typedef {import(\"estree\").Position} Position */\n\n/**\n * Get the `(` token of the given function node.\n * @param {FunctionExpression | FunctionDeclaration} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? /** @type {Token} */ (\n sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n )\n : /** @type {Token} */ (\n sourceCode.getFirstToken(node, isOpeningParenToken)\n )\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {SourceLocation|null} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n /** @type {Position|null} */\n let start = null\n /** @type {Position|null} */\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = /** @type {Token} */ (\n sourceCode.getTokenBefore(node.body, isArrowToken)\n )\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = /** @type {SourceLocation} */ (parent.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = /** @type {SourceLocation} */ (node.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.MemberExpression} MemberExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Property} Property */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Literal} Literal */\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : // @ts-ignore\n typeof self !== \"undefined\"\n ? // @ts-ignore\n self\n : // @ts-ignore\n typeof window !== \"undefined\"\n ? // @ts-ignore\n window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n // @ts-ignore\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n .../** @type {(keyof typeof Math)[]} */ (\n Object.getOwnPropertyNames(Math)\n )\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values.\n * @param {Scope|undefined|null} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(.../** @type {Iterable} */ (argument.value))\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Checks if a variable is a built-in global.\n * @param {Variable|null} variable The variable to check.\n * @returns {variable is Variable & {defs:[]}}\n */\nfunction isBuiltinGlobal(variable) {\n return (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n )\n}\n\n/**\n * Checks if a variable can be considered as a constant.\n * @param {Variable} variable\n * @returns {variable is Variable & {defs: [import(\"eslint\").Scope.Definition & { type: \"Variable\" }]}} True if the variable can be considered as a constant.\n */\nfunction canBeConsideredConst(variable) {\n if (variable.defs.length !== 1) {\n return false\n }\n const def = variable.defs[0]\n return Boolean(\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" || isEffectivelyConst(variable)),\n )\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\n/**\n * Checks if a variable has mutation in its property.\n * @param {Variable} variable The variable to check.\n * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {boolean} True if the variable has mutation in its property.\n */\nfunction hasMutationInProperty(variable, initialScope) {\n for (const ref of variable.references) {\n let node = /** @type {TSESTreeNode} */ (ref.identifier)\n while (node && node.parent && node.parent.type === \"MemberExpression\") {\n node = node.parent\n }\n if (!node || !node.parent) {\n continue\n }\n if (\n (node.parent.type === \"AssignmentExpression\" &&\n node.parent.left === node) ||\n (node.parent.type === \"UpdateExpression\" &&\n node.parent.argument === node)\n ) {\n // This is a mutation.\n return true\n }\n if (\n node.parent.type === \"CallExpression\" &&\n node.parent.callee === node &&\n node.type === \"MemberExpression\"\n ) {\n const methodName = getStaticPropertyNameValue(node, initialScope)\n if (isNameOfMutationArrayMethod(methodName)) {\n // This is a mutation.\n return true\n }\n }\n }\n return false\n\n /**\n * Checks if a method name is one of the mutation array methods.\n * @param {StaticValue|null} methodName The method name to check.\n * @returns {boolean} True if the method name is a mutation array method.\n */\n function isNameOfMutationArrayMethod(methodName) {\n if (methodName == null || methodName.value == null) {\n return false\n }\n const name = methodName.value\n return (\n name === \"copyWithin\" ||\n name === \"fill\" ||\n name === \"pop\" ||\n name === \"push\" ||\n name === \"reverse\" ||\n name === \"shift\" ||\n name === \"sort\" ||\n name === \"splice\" ||\n name === \"unshift\"\n )\n }\n}\n\n/**\n * @template {TSESTreeNodeTypes} T\n * @callback VisitorCallback\n * @param {TSESTreeNode & { type: T }} node\n * @param {Scope|undefined|null} initialScope\n * @returns {StaticValue | null}\n */\n/**\n * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations\n */\n/**\n * @type {Operations}\n */\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return {\n value:\n /** @type {any} */ (left.value) <\n /** @type {any} */ (right.value),\n }\n case \"<=\":\n return {\n value:\n /** @type {any} */ (left.value) <=\n /** @type {any} */ (right.value),\n }\n case \">\":\n return {\n value:\n /** @type {any} */ (left.value) >\n /** @type {any} */ (right.value),\n }\n case \">=\":\n return {\n value:\n /** @type {any} */ (left.value) >=\n /** @type {any} */ (right.value),\n }\n case \"<<\":\n return {\n value:\n /** @type {any} */ (left.value) <<\n /** @type {any} */ (right.value),\n }\n case \">>\":\n return {\n value:\n /** @type {any} */ (left.value) >>\n /** @type {any} */ (right.value),\n }\n case \">>>\":\n return {\n value:\n /** @type {any} */ (left.value) >>>\n /** @type {any} */ (right.value),\n }\n case \"+\":\n return {\n value:\n /** @type {any} */ (left.value) +\n /** @type {any} */ (right.value),\n }\n case \"-\":\n return {\n value:\n /** @type {any} */ (left.value) -\n /** @type {any} */ (right.value),\n }\n case \"*\":\n return {\n value:\n /** @type {any} */ (left.value) *\n /** @type {any} */ (right.value),\n }\n case \"/\":\n return {\n value:\n /** @type {any} */ (left.value) /\n /** @type {any} */ (right.value),\n }\n case \"%\":\n return {\n value:\n /** @type {any} */ (left.value) %\n /** @type {any} */ (right.value),\n }\n case \"**\":\n return {\n value:\n /** @type {any} */ (left.value) **\n /** @type {any} */ (right.value),\n }\n case \"|\":\n return {\n value:\n /** @type {any} */ (left.value) |\n /** @type {any} */ (right.value),\n }\n case \"^\":\n return {\n value:\n /** @type {any} */ (left.value) ^\n /** @type {any} */ (right.value),\n }\n case \"&\":\n return {\n value:\n /** @type {any} */ (left.value) &\n /** @type {any} */ (right.value),\n }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver =\n /** @type {Record any>} */ (\n object.value\n )\n const methodName = /** @type {PropertyKey} */ (\n property.value\n )\n if (callAllowed.has(receiver[methodName])) {\n return {\n value: receiver[methodName](...args),\n }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = /** @type {(...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n if (variable != null) {\n // Built-in globals.\n if (isBuiltinGlobal(variable)) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (canBeConsideredConst(variable)) {\n const def = variable.defs[0]\n if (\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n const init = getStaticValueR(\n def.node.init,\n initialScope,\n )\n if (\n init &&\n typeof init.value === \"object\" &&\n init.value !== null\n ) {\n if (hasMutationInProperty(variable, initialScope)) {\n // This variable has mutation in its property.\n return null\n }\n }\n return init\n }\n }\n }\n }\n return null\n },\n\n Literal(node) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n //istanbul ignore if : this is implementation-specific behavior.\n if (\n (literal.regex != null || literal.bigint != null) &&\n literal.value == null\n ) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: literal.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (\n !isGetter(\n /** @type {object} */ (object.value),\n /** @type {PropertyKey} */ (property.value),\n )\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(/** @type {string} */ (property.value))\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = /** @type {new (...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n /** @type {Record} */\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[/** @type {PropertyKey} */ (key.value)] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n // @ts-expect-error -- Backward compatibility\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = /** @type {(...args: any[]) => any} */ (tag.value)\n /** @type {any[] & { raw?: string[] }} */\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += /** @type {string} */ (node.quasis[i + 1].value.cooked)\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -(/** @type {any} */ (arg.value)) }\n case \"+\":\n return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~(/** @type {any} */ (arg.value)) }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n TSAsExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSSatisfiesExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSTypeAssertion(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSNonNullExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSInstantiationExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node|TSESTreeNode|null|undefined} node The node to get.\n * @param {Scope|undefined|null} initialScope The scope to start finding variable.\n * @returns {StaticValue|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return /** @type {VisitorCallback} */ (operations[node.type])(\n /** @type {TSESTreeNode} */ (node),\n initialScope,\n )\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {MemberExpression|Property} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {StaticValue|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (/** @type {Partial} */ (nameNode).bigint) {\n return { value: /** @type {BigIntLiteral} */ (nameNode).bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {StaticValue | null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"estree\").BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"estree\").SimpleLiteral} SimpleLiteral */\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n if (literal.regex) {\n return `/${literal.regex.pattern}/${literal.regex.flags}`\n }\n if (literal.bigint) {\n return literal.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n\n if (evaluated) {\n // `String(Symbol.prototype)` throws error\n try {\n return String(evaluated.value)\n } catch {\n // No op\n }\n }\n\n return null\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null|undefined} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.property).name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.key).name\n\n default:\n break\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the name and kind of the given function node.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (hasId(node)) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n\n/**\n * @param {FunctionNode} node\n * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }}\n */\nfunction hasId(node) {\n return Boolean(\n /** @type {Partial} */ (node)\n .id,\n )\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"estree\").BinaryExpression} BinaryExpression */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").UnaryExpression} UnaryExpression */\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {x is Node} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof (/** @type {any} */ (this)[type]) === \"function\") {\n return /** @type {any} */ (this)[type](\n node,\n options,\n visitorKeys,\n )\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of /** @type {(keyof Node)[]} */ (\n visitorKeys[type] || getKeys(node)\n )) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n /**\n * @param {BinaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n /**\n * @param {MemberExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {MethodDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n /**\n * @param {Property} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {PropertyDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {UnaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {HasSideEffectOptions} [options] The option object.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(node, sourceCode, options = {}) {\n const { considerGetters = false, considerImplicitTypeConversion = false } =\n options\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.NewExpression} TSNewExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.CallExpression} TSCallExpression */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\n// eslint-disable-next-line complexity\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384\n parent.typeArguments ||\n /** @type {RuleNode} */ (\n /** @type {unknown} */ (\n /** @type {TSNewExpression | TSCallExpression} */ (\n parent\n ).typeParameters\n )\n ) ||\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node|number} timesOrNode The first parameter.\n * @param {Node|SourceCode} nodeOrSourceCode The second parameter.\n * @param {SourceCode} [optionalSourceCode] The third parameter.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n /** @type {number} */\n let times,\n /** @type {RuleNode} */\n node,\n /** @type {SourceCode} */\n sourceCode,\n maybeLeftParen,\n maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = /** @type {RuleNode} */ (nodeOrSourceCode)\n sourceCode = /** @type {SourceCode} */ (optionalSourceCode)\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = /** @type {RuleNode} */ (timesOrNode)\n sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode)\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /**\n * @param {string} key The placeholder.\n * @param {RegExpExecArray} match The matched information.\n * @returns {string} The replaced string.\n */\n function replacer(key, match) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[/** @type {any} */ (i)]\n }\n return key\n }\n }\n }\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n replacement.replace(placeholder, (key) => replacer(key, match)),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n String(\n replace(\n .../** @type {[string, ...string[]]} */ (\n /** @type {string[]} */ (match)\n ),\n match.index,\n match.input,\n ),\n ),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped?:boolean}} [options] The options.\n */\n constructor(pattern, options = {}) {\n const { escaped = false } = options\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } =\n /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this))\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").Expression} Expression */\n/** @typedef {import(\"estree\").Pattern} Pattern */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n/** @typedef {import(\"estree\").SimpleCallExpression} CallExpression */\n/** @typedef {import(\"estree\").Program} Program */\n/** @typedef {import(\"estree\").ImportDeclaration} ImportDeclaration */\n/** @typedef {import(\"estree\").ExportAllDeclaration} ExportAllDeclaration */\n/** @typedef {import(\"estree\").ExportDefaultDeclaration} ExportDefaultDeclaration */\n/** @typedef {import(\"estree\").ExportNamedDeclaration} ExportNamedDeclaration */\n/** @typedef {import(\"estree\").ImportSpecifier} ImportSpecifier */\n/** @typedef {import(\"estree\").ImportDefaultSpecifier} ImportDefaultSpecifier */\n/** @typedef {import(\"estree\").ImportNamespaceSpecifier} ImportNamespaceSpecifier */\n/** @typedef {import(\"estree\").ExportSpecifier} ExportSpecifier */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").AssignmentProperty} AssignmentProperty */\n/** @typedef {import(\"estree\").Literal} Literal */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMapObject} TraceMapObject\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\n\n/**\n * Check whether a given node is an import node or not.\n * @param {Node} node\n * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node.\n */\nfunction isHasSource(node) {\n return (\n IMPORT_TYPE.test(node.type) &&\n /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ (\n node\n ).source != null\n )\n}\nconst has =\n /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ (\n Function.call.bind(Object.hasOwnProperty)\n )\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable|undefined} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = /** @type {TSESTreeNode} */ (node).parent\n\n if (parent) {\n switch (parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return (\n parent.expressions[parent.expressions.length - 1] === node\n )\n case \"ChainExpression\":\n return true\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n case \"TSInstantiationExpression\":\n return true\n\n default:\n return false\n }\n }\n return false\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(globalScope, options = {}) {\n const {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = options\n /** @private @type {Variable[]} */\n this.variableStack = []\n /** @private */\n this.globalScope = globalScope\n /** @private */\n this.mode = mode\n /** @private */\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n /** @type {string[]} */\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(\n /** @type {CallExpression} */ (node).arguments[0],\n )\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n /** @type {CallExpression} */ (node),\n path,\n nextTraceMap,\n )\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = /** @type {Program} */ (this.globalScope.block)\n\n for (const node of programNode.body) {\n if (!isHasSource(node)) {\n continue\n }\n const moduleId = /** @type {string} */ (node.source.value)\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the property references for a given expression AST node.\n * @template T\n * @param {Expression} node The expression AST node to iterate property references.\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate property references.\n */\n *iteratePropertyReferences(node, traceMap) {\n yield* this._iteratePropertyReferences(node, [], traceMap)\n }\n\n /**\n * Iterate the references for a given variable.\n * @private\n * @template T\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = /** @type {RuleNode & Identifier} */ (\n reference.identifier\n )\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @private\n * @template T\n * @param {Expression} rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = /** @type {RuleNode} */ (node).parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @private\n * @template T\n * @param {Pattern} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(\n /** @type {AssignmentProperty} */ (property),\n )\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (property),\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n /** @type {AssignmentProperty} */ (property).value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @private\n * @template T\n * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key =\n specifierNode.local.type === \"Identifier\"\n ? specifierNode.local.name\n : specifierNode.local.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"./types.mjs\").StaticValueOptional} StaticValueOptional */\n/** @typedef {import(\"./types.mjs\").StaticValueProvided} StaticValueProvided */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n\nimport { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,mCAAmC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAC;AACpE;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAAK,GAAG,MAAK;AACrB,IAAI,GAAG;AACP,QAAQ,KAAK,GAAG,MAAK;AACrB,QAAQ,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;AACpD,YAAY,MAAM,KAAK;AACvB,gBAAgB,UAAU,CAAC,KAAK,CAAC,KAAK;AACtC,cAAa;AACb;AACA,YAAY,IAAI,KAA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S,CAAC;AAC/C;;ACljBA;AAiEA;AACA,YAAe;AACf,IAAI,IAAI;AACR,IAAI,SAAS;AACb,IAAI,GAAG;AACP,IAAI,YAAY;AAChB,IAAI,uBAAuB;AAC3B,IAAI,uBAAuB;AAC3B,IAAI,iBAAiB;AACrB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,mBAAmB;AACvB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint b/src/hello/backend/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint deleted file mode 100644 index a75cba07..00000000 --- a/src/hello/backend/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../../eslint/bin/eslint.js" "$@" - ret=$? -else - node "$basedir/../../../../eslint/bin/eslint.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint.cmd b/src/hello/backend/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint.cmd deleted file mode 100644 index 1f84ed2f..00000000 --- a/src/hello/backend/node_modules/@eslint-community/eslint-utils/node_modules/.bin/eslint.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\..\eslint\bin\eslint.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\..\eslint\bin\eslint.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml b/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml deleted file mode 100644 index eb62a80c..00000000 --- a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../../js-yaml/bin/js-yaml.js" "$@" - ret=$? -else - node "$basedir/../../../../js-yaml/bin/js-yaml.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.cmd b/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.cmd deleted file mode 100644 index d7d4352c..00000000 --- a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\..\js-yaml\bin\js-yaml.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\..\js-yaml\bin\js-yaml.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/package.json b/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/package.json deleted file mode 100644 index ee8abb52..00000000 --- a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "debug", - "version": "4.4.3", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon (https://github.com/qix-)", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "mocha test.js test.node.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "sinon": "^14.0.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - }, - "xo": { - "rules": { - "import/extensions": "off" - } - } -} diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/browser.js b/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/browser.js deleted file mode 100644 index 5993451b..00000000 --- a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/browser.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/common.js b/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/common.js deleted file mode 100644 index 141cb578..00000000 --- a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/common.js +++ /dev/null @@ -1,292 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/index.js b/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f2..00000000 --- a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/node.js b/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/node.js deleted file mode 100644 index 715560a4..00000000 --- a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/src/hello/backend/node_modules/acorn-jsx/node_modules/.bin/acorn b/src/hello/backend/node_modules/acorn-jsx/node_modules/.bin/acorn deleted file mode 100644 index 9daed845..00000000 --- a/src/hello/backend/node_modules/acorn-jsx/node_modules/.bin/acorn +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../acorn/bin/acorn" "$@" - ret=$? -else - node "$basedir/../../../acorn/bin/acorn" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/acorn-jsx/node_modules/.bin/acorn.cmd b/src/hello/backend/node_modules/acorn-jsx/node_modules/.bin/acorn.cmd deleted file mode 100644 index 412201d7..00000000 --- a/src/hello/backend/node_modules/acorn-jsx/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\acorn\bin\acorn" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\acorn\bin\acorn" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/cfb/node_modules/.bin/crc32 b/src/hello/backend/node_modules/cfb/node_modules/.bin/crc32 deleted file mode 100644 index 4b2bc431..00000000 --- a/src/hello/backend/node_modules/cfb/node_modules/.bin/crc32 +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../crc-32/bin/crc32.njs" "$@" - ret=$? -else - node "$basedir/../../../crc-32/bin/crc32.njs" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/cfb/node_modules/.bin/crc32.cmd b/src/hello/backend/node_modules/cfb/node_modules/.bin/crc32.cmd deleted file mode 100644 index 9b51c67c..00000000 --- a/src/hello/backend/node_modules/cfb/node_modules/.bin/crc32.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\crc-32\bin\crc32.njs" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\crc-32\bin\crc32.njs" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/cross-spawn/node_modules/.bin/node-which b/src/hello/backend/node_modules/cross-spawn/node_modules/.bin/node-which deleted file mode 100644 index 325adf0c..00000000 --- a/src/hello/backend/node_modules/cross-spawn/node_modules/.bin/node-which +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../which/bin/node-which" "$@" - ret=$? -else - node "$basedir/../../../which/bin/node-which" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/cross-spawn/node_modules/.bin/node-which.cmd b/src/hello/backend/node_modules/cross-spawn/node_modules/.bin/node-which.cmd deleted file mode 100644 index 953c71e3..00000000 --- a/src/hello/backend/node_modules/cross-spawn/node_modules/.bin/node-which.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\which\bin\node-which" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\which\bin\node-which" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/eslint-config-google/node_modules/.bin/eslint b/src/hello/backend/node_modules/eslint-config-google/node_modules/.bin/eslint deleted file mode 100644 index 7beec733..00000000 --- a/src/hello/backend/node_modules/eslint-config-google/node_modules/.bin/eslint +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../eslint/bin/eslint.js" "$@" - ret=$? -else - node "$basedir/../../../eslint/bin/eslint.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/eslint-config-google/node_modules/.bin/eslint.cmd b/src/hello/backend/node_modules/eslint-config-google/node_modules/.bin/eslint.cmd deleted file mode 100644 index 80a27553..00000000 --- a/src/hello/backend/node_modules/eslint-config-google/node_modules/.bin/eslint.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\eslint\bin\eslint.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\eslint\bin\eslint.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/eslint/node_modules/.bin/js-yaml b/src/hello/backend/node_modules/eslint/node_modules/.bin/js-yaml deleted file mode 100644 index e6339431..00000000 --- a/src/hello/backend/node_modules/eslint/node_modules/.bin/js-yaml +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" - ret=$? -else - node "$basedir/../../../js-yaml/bin/js-yaml.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/eslint/node_modules/.bin/js-yaml.cmd b/src/hello/backend/node_modules/eslint/node_modules/.bin/js-yaml.cmd deleted file mode 100644 index a1bd793f..00000000 --- a/src/hello/backend/node_modules/eslint/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\js-yaml\bin\js-yaml.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/eslint/node_modules/debug/package.json b/src/hello/backend/node_modules/eslint/node_modules/debug/package.json deleted file mode 100644 index ee8abb52..00000000 --- a/src/hello/backend/node_modules/eslint/node_modules/debug/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "debug", - "version": "4.4.3", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon (https://github.com/qix-)", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "mocha test.js test.node.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "sinon": "^14.0.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - }, - "xo": { - "rules": { - "import/extensions": "off" - } - } -} diff --git a/src/hello/backend/node_modules/eslint/node_modules/debug/src/browser.js b/src/hello/backend/node_modules/eslint/node_modules/debug/src/browser.js deleted file mode 100644 index 5993451b..00000000 --- a/src/hello/backend/node_modules/eslint/node_modules/debug/src/browser.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/src/hello/backend/node_modules/eslint/node_modules/debug/src/common.js b/src/hello/backend/node_modules/eslint/node_modules/debug/src/common.js deleted file mode 100644 index 141cb578..00000000 --- a/src/hello/backend/node_modules/eslint/node_modules/debug/src/common.js +++ /dev/null @@ -1,292 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/src/hello/backend/node_modules/eslint/node_modules/debug/src/index.js b/src/hello/backend/node_modules/eslint/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f2..00000000 --- a/src/hello/backend/node_modules/eslint/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/src/hello/backend/node_modules/eslint/node_modules/debug/src/node.js b/src/hello/backend/node_modules/eslint/node_modules/debug/src/node.js deleted file mode 100644 index 715560a4..00000000 --- a/src/hello/backend/node_modules/eslint/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/src/hello/backend/node_modules/espree/node_modules/.bin/acorn b/src/hello/backend/node_modules/espree/node_modules/.bin/acorn deleted file mode 100644 index 9daed845..00000000 --- a/src/hello/backend/node_modules/espree/node_modules/.bin/acorn +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../acorn/bin/acorn" "$@" - ret=$? -else - node "$basedir/../../../acorn/bin/acorn" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/espree/node_modules/.bin/acorn.cmd b/src/hello/backend/node_modules/espree/node_modules/.bin/acorn.cmd deleted file mode 100644 index 412201d7..00000000 --- a/src/hello/backend/node_modules/espree/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\acorn\bin\acorn" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\acorn\bin\acorn" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/esquery/dist/esquery.esm.min.js b/src/hello/backend/node_modules/esquery/dist/esquery.esm.min.js deleted file mode 100644 index ca723b80..00000000 --- a/src/hello/backend/node_modules/esquery/dist/esquery.esm.min.js +++ /dev/null @@ -1,2 +0,0 @@ -function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--r)if(e[r].node===t)return!0;return!1}function d(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,o,a;for(n=e.length,o=0;n;)t(e[a=o+(r=n>>>1)])?n=r:(o=a+1,n-=r+1);return o}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},o={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:a={},Skip:i={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,o;function a(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!y(n,v[m])){if(h(u,x[d]))o=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;o=new c(v[m],[f,m],null,null)}r.push(o)}}else if(p(v)){if(y(n,v))continue;r.push(new c(v,f,null,null))}}}else if(o=n.pop(),l=this.__execute(t.leave,o),this.__state===a||l===a)return},f.prototype.replace=function(e,t){var r,n,o,u,f,y,d,m,x,v,g,A,E;function b(e){var t,n,o,a;if(e.ref.remove())for(n=e.ref.key,a=e.ref.parent,t=r.length;t--;)if((o=r[t]).ref&&o.ref.parent===a){if(o.ref.key=0;)if(v=o[E=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(u,x[d]))y=new c(v[m],[E,m],"Property",new l(v,m));else{if(!p(v[m]))continue;y=new c(v[m],[E,m],null,new l(v,m))}r.push(y)}}else p(v)&&r.push(new c(v,E,null,new l(o,E)))}}else if(y=n.pop(),void 0!==(f=this.__execute(t.leave,y))&&f!==a&&f!==i&&f!==s&&y.ref.replace(f),this.__state!==s&&f!==s||b(y),this.__state===a||f===a)return A.root;return A.root},t.Syntax=r,t.traverse=d,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var o,a,i,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,a=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?n.Break:l[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=o,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),s=a((function(e){e.exports&&(e.exports=function(){function e(t,r,n,o){this.message=t,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=pe([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=fe(">",!1),y=fe("~",!1),d=fe("+",!1),m=fe(",",!1),x=function(e,t){return[e].concat(t.map((function(e){return e[3]})))},v=fe("!",!1),g=fe("*",!1),A=fe("#",!1),E=fe("[",!1),b=fe("]",!1),S=/^[>","<","!"],!1,!1),C=fe("=",!1),w=function(e){return(e||"")+"="},P=/^[><]/,k=pe([">","<"],!1,!1),D=fe(".",!1),I=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},j=fe('"',!1),T=/^[^\\"]/,F=pe(["\\",'"'],!0,!1),R=fe("\\",!1),O={type:"any"},L=function(e,t){return e+t},M=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},B=fe("'",!1),U=/^[^\\']/,K=pe(["\\","'"],!0,!1),N=/^[0-9]/,W=pe([["0","9"]],!1,!1),V=fe("type(",!1),q=/^[^ )]/,G=pe([" ",")"],!0,!1),z=fe(")",!1),H=/^[imsu]/,Y=pe(["i","m","s","u"],!1,!1),$=fe("/",!1),J=/^[^\/]/,Q=pe(["/"],!0,!1),X=fe(":not(",!1),Z=fe(":matches(",!1),ee=fe(":has(",!1),te=fe(":first-child",!1),re=fe(":last-child",!1),ne=fe(":nth-child(",!1),oe=fe(":nth-last-child(",!1),ae=fe(":",!1),ie=0,se=[{line:1,column:1}],ue=0,le=[],ce={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');l=u[r.startRule]}function fe(e,t){return{type:"literal",text:e,ignoreCase:t}}function pe(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function he(e){var r,n=se[e];if(n)return n;for(r=e-1;!se[r];)r--;for(n={line:(n=se[r]).line,column:n.column};rue&&(ue=ie,le=[]),le.push(e))}function me(){var e,t,r,n,o=32*ie+0,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,(t=xe())!==s&&(r=Ae())!==s&&xe()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ie=e,e=s),e===s&&(e=ie,(t=xe())!==s&&(t=void 0),e=t),ce[o]={nextPos:ie,result:e},e)}function xe(){var e,r,n=32*ie+1,o=ce[n];if(o)return ie=o.nextPos,o.result;for(e=[],32===t.charCodeAt(ie)?(r=" ",ie++):(r=s,de(c));r!==s;)e.push(r),32===t.charCodeAt(ie)?(r=" ",ie++):(r=s,de(c));return ce[n]={nextPos:ie,result:e},e}function ve(){var e,r,n,o=32*ie+2,a=ce[o];if(a)return ie=a.nextPos,a.result;if(r=[],f.test(t.charAt(ie))?(n=t.charAt(ie),ie++):(n=s,de(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(ie))?(n=t.charAt(ie),ie++):(n=s,de(p));else r=s;return r!==s&&(r=r.join("")),e=r,ce[o]={nextPos:ie,result:e},e}function ge(){var e,r,n,o=32*ie+3,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,(r=xe())!==s?(62===t.charCodeAt(ie)?(n=">",ie++):(n=s,de(h)),n!==s&&xe()!==s?e=r="child":(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=xe())!==s?(126===t.charCodeAt(ie)?(n="~",ie++):(n=s,de(y)),n!==s&&xe()!==s?e=r="sibling":(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=xe())!==s?(43===t.charCodeAt(ie)?(n="+",ie++):(n=s,de(d)),n!==s&&xe()!==s?e=r="adjacent":(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,32===t.charCodeAt(ie)?(r=" ",ie++):(r=s,de(c)),r!==s&&(n=xe())!==s?e=r="descendant":(ie=e,e=s)))),ce[o]={nextPos:ie,result:e},e)}function Ae(){var e,r,n,o,a,i,u,l,c=32*ie+5,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,(r=be())!==s){for(n=[],o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=be())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);o!==s;)n.push(o),o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=be())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);n!==s?e=r=x(r,n):(ie=e,e=s)}else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}function Ee(){var e,t,r,n,o,a=32*ie+6,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,(t=ge())===s&&(t=null),t!==s&&(r=be())!==s?(o=r,e=t=(n=t)?{type:n,left:{type:"exactNode"},right:o}:o):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}function be(){var e,t,r,n,o,a,i,u=32*ie+7,l=ce[u];if(l)return ie=l.nextPos,l.result;if(e=ie,(t=Se())!==s){for(r=[],n=ie,(o=ge())!==s&&(a=Se())!==s?n=o=[o,a]:(ie=n,n=s);n!==s;)r.push(n),n=ie,(o=ge())!==s&&(a=Se())!==s?n=o=[o,a]:(ie=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(ie=e,e=s)}else ie=e,e=s;return ce[u]={nextPos:ie,result:e},e}function Se(){var e,r,n,o,a,i,u,l=32*ie+8,c=ce[l];if(c)return ie=c.nextPos,c.result;if(e=ie,33===t.charCodeAt(ie)?(r="!",ie++):(r=s,de(v)),r===s&&(r=null),r!==s){if(n=[],(o=_e())!==s)for(;o!==s;)n.push(o),o=_e();else n=s;n!==s?(a=r,u=1===(i=n).length?i[0]:{type:"compound",selectors:i},a&&(u.subject=!0),e=r=u):(ie=e,e=s)}else ie=e,e=s;return ce[l]={nextPos:ie,result:e},e}function _e(){var e,r=32*ie+9,n=ce[r];return n?(ie=n.nextPos,n.result):((e=function(){var e,r,n=32*ie+10,o=ce[n];return o?(ie=o.nextPos,o.result):(42===t.charCodeAt(ie)?(r="*",ie++):(r=s,de(g)),r!==s&&(r={type:"wildcard",value:r}),e=r,ce[n]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o=32*ie+11,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,35===t.charCodeAt(ie)?(r="#",ie++):(r=s,de(A)),r===s&&(r=null),r!==s&&(n=ve())!==s?e=r={type:"identifier",value:n}:(ie=e,e=s),ce[o]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=32*ie+12,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,91===t.charCodeAt(ie)?(r="[",ie++):(r=s,de(E)),r!==s&&xe()!==s&&(n=function(){var e,r,n,o,a=32*ie+16,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,(r=Ce())!==s&&xe()!==s&&(n=function(){var e,r,n,o=32*ie+14,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,33===t.charCodeAt(ie)?(r="!",ie++):(r=s,de(v)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ie)?(n="=",ie++):(n=s,de(C)),n!==s?(r=w(r),e=r):(ie=e,e=s)):(ie=e,e=s),ce[o]={nextPos:ie,result:e},e)}())!==s&&xe()!==s?((o=function(){var e,r,n,o,a,i=32*ie+20,u=ce[i];if(u)return ie=u.nextPos,u.result;if(e=ie,"type("===t.substr(ie,5)?(r="type(",ie+=5):(r=s,de(V)),r!==s)if(xe()!==s){if(n=[],q.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(G)),o!==s)for(;o!==s;)n.push(o),q.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(G));else n=s;n!==s&&(o=xe())!==s?(41===t.charCodeAt(ie)?(a=")",ie++):(a=s,de(z)),a!==s?(r={type:"type",value:n.join("")},e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[i]={nextPos:ie,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u=32*ie+22,l=ce[u];if(l)return ie=l.nextPos,l.result;if(e=ie,47===t.charCodeAt(ie)?(r="/",ie++):(r=s,de($)),r!==s){if(n=[],J.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(Q)),o!==s)for(;o!==s;)n.push(o),J.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(Q));else n=s;n!==s?(47===t.charCodeAt(ie)?(o="/",ie++):(o=s,de($)),o!==s?((a=function(){var e,r,n=32*ie+21,o=ce[n];if(o)return ie=o.nextPos,o.result;if(e=[],H.test(t.charAt(ie))?(r=t.charAt(ie),ie++):(r=s,de(Y)),r!==s)for(;r!==s;)e.push(r),H.test(t.charAt(ie))?(r=t.charAt(ie),ie++):(r=s,de(Y));else e=s;return ce[n]={nextPos:ie,result:e},e}())===s&&(a=null),a!==s?(i=a,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(ie=e,e=s)):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;return ce[u]={nextPos:ie,result:e},e}()),o!==s?(r=I(r,n,o),e=r):(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=Ce())!==s&&xe()!==s&&(n=function(){var e,r,n,o=32*ie+13,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,S.test(t.charAt(ie))?(r=t.charAt(ie),ie++):(r=s,de(_)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ie)?(n="=",ie++):(n=s,de(C)),n!==s?(r=w(r),e=r):(ie=e,e=s)):(ie=e,e=s),e===s&&(P.test(t.charAt(ie))?(e=t.charAt(ie),ie++):(e=s,de(k))),ce[o]={nextPos:ie,result:e},e)}())!==s&&xe()!==s?((o=function(){var e,r,n,o,a,i,u=32*ie+17,l=ce[u];if(l)return ie=l.nextPos,l.result;if(e=ie,34===t.charCodeAt(ie)?(r='"',ie++):(r=s,de(j)),r!==s){for(n=[],T.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(F)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));o!==s;)n.push(o),T.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(F)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));n!==s?(34===t.charCodeAt(ie)?(o='"',ie++):(o=s,de(j)),o!==s?(r=M(n),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;if(e===s)if(e=ie,39===t.charCodeAt(ie)?(r="'",ie++):(r=s,de(B)),r!==s){for(n=[],U.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(K)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));o!==s;)n.push(o),U.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(K)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));n!==s?(39===t.charCodeAt(ie)?(o="'",ie++):(o=s,de(B)),o!==s?(r=M(n),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;return ce[u]={nextPos:ie,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u,l=32*ie+18,c=ce[l];if(c)return ie=c.nextPos,c.result;for(e=ie,r=ie,n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));if(n!==s?(46===t.charCodeAt(ie)?(o=".",ie++):(o=s,de(D)),o!==s?r=n=[n,o]:(ie=r,r=s)):(ie=r,r=s),r===s&&(r=null),r!==s){if(n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));else n=s;n!==s?(i=n,u=(a=r)?[].concat.apply([],a).join(""):"",r={type:"literal",value:parseFloat(u+i.join(""))},e=r):(ie=e,e=s)}else ie=e,e=s;return ce[l]={nextPos:ie,result:e},e}())===s&&(o=function(){var e,t,r=32*ie+19,n=ce[r];return n?(ie=n.nextPos,n.result):((t=ve())!==s&&(t={type:"literal",value:t}),e=t,ce[r]={nextPos:ie,result:e},e)}()),o!==s?(r=I(r,n,o),e=r):(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=Ce())!==s&&(r={type:"attribute",name:r}),e=r)),ce[a]={nextPos:ie,result:e},e)}())!==s&&xe()!==s?(93===t.charCodeAt(ie)?(o="]",ie++):(o=s,de(b)),o!==s?e=r=n:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i,u,l,c=32*ie+23,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,46===t.charCodeAt(ie)?(r=".",ie++):(r=s,de(D)),r!==s)if((n=ve())!==s){for(o=[],a=ie,46===t.charCodeAt(ie)?(i=".",ie++):(i=s,de(D)),i!==s&&(u=ve())!==s?a=i=[i,u]:(ie=a,a=s);a!==s;)o.push(a),a=ie,46===t.charCodeAt(ie)?(i=".",ie++):(i=s,de(D)),i!==s&&(u=ve())!==s?a=i=[i,u]:(ie=a,a=s);o!==s?(l=n,r={type:"field",name:o.reduce((function(e,t){return e+t[0]+t[1]}),l)},e=r):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}())===s&&(e=function(){var e,r,n,o,a=32*ie+24,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,":not("===t.substr(ie,5)?(r=":not(",ie+=5):(r=s,de(X)),r!==s&&xe()!==s&&(n=Ae())!==s&&xe()!==s?(41===t.charCodeAt(ie)?(o=")",ie++):(o=s,de(z)),o!==s?e=r={type:"not",selectors:n}:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=32*ie+25,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,":matches("===t.substr(ie,9)?(r=":matches(",ie+=9):(r=s,de(Z)),r!==s&&xe()!==s&&(n=Ae())!==s&&xe()!==s?(41===t.charCodeAt(ie)?(o=")",ie++):(o=s,de(z)),o!==s?e=r={type:"matches",selectors:n}:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=32*ie+26,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,":has("===t.substr(ie,5)?(r=":has(",ie+=5):(r=s,de(ee)),r!==s&&xe()!==s&&(n=function(){var e,r,n,o,a,i,u,l,c=32*ie+4,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,(r=Ee())!==s){for(n=[],o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=Ee())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);o!==s;)n.push(o),o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=Ee())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);n!==s?e=r=x(r,n):(ie=e,e=s)}else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}())!==s&&xe()!==s?(41===t.charCodeAt(ie)?(o=")",ie++):(o=s,de(z)),o!==s?e=r={type:"has",selectors:n}:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n=32*ie+27,o=ce[n];return o?(ie=o.nextPos,o.result):(":first-child"===t.substr(ie,12)?(r=":first-child",ie+=12):(r=s,de(te)),r!==s&&(r=we(1)),e=r,ce[n]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n=32*ie+28,o=ce[n];return o?(ie=o.nextPos,o.result):(":last-child"===t.substr(ie,11)?(r=":last-child",ie+=11):(r=s,de(re)),r!==s&&(r=Pe(1)),e=r,ce[n]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i=32*ie+29,u=ce[i];if(u)return ie=u.nextPos,u.result;if(e=ie,":nth-child("===t.substr(ie,11)?(r=":nth-child(",ie+=11):(r=s,de(ne)),r!==s)if(xe()!==s){if(n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));else n=s;n!==s&&(o=xe())!==s?(41===t.charCodeAt(ie)?(a=")",ie++):(a=s,de(z)),a!==s?(r=we(parseInt(n.join(""),10)),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[i]={nextPos:ie,result:e},e}())===s&&(e=function(){var e,r,n,o,a,i=32*ie+30,u=ce[i];if(u)return ie=u.nextPos,u.result;if(e=ie,":nth-last-child("===t.substr(ie,16)?(r=":nth-last-child(",ie+=16):(r=s,de(oe)),r!==s)if(xe()!==s){if(n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));else n=s;n!==s&&(o=xe())!==s?(41===t.charCodeAt(ie)?(a=")",ie++):(a=s,de(z)),a!==s?(r=Pe(parseInt(n.join(""),10)),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[i]={nextPos:ie,result:e},e}())===s&&(e=function(){var e,r,n,o=32*ie+31,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,58===t.charCodeAt(ie)?(r=":",ie++):(r=s,de(ae)),r!==s&&(n=ve())!==s?e=r={type:"class",name:n}:(ie=e,e=s),ce[o]={nextPos:ie,result:e},e)}()),ce[r]={nextPos:ie,result:e},e)}function Ce(){var e,r,n,o,a,i,u,l,c=32*ie+15,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,(r=ve())!==s){for(n=[],o=ie,46===t.charCodeAt(ie)?(a=".",ie++):(a=s,de(D)),a!==s&&(i=ve())!==s?o=a=[a,i]:(ie=o,o=s);o!==s;)n.push(o),o=ie,46===t.charCodeAt(ie)?(a=".",ie++):(a=s,de(D)),a!==s&&(i=ve())!==s?o=a=[a,i]:(ie=o,o=s);n!==s?(u=r,l=n,e=r=[].concat.apply([u],l).join("")):(ie=e,e=s)}else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}function we(e){return{type:"nth-child",index:{type:"literal",value:e}}}function Pe(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=l())!==s&&ie===t.length)return n;throw n!==s&&ie0&&p(e,t,r))&&f(t[0],t.slice(1),r)};case"descendant":var h=c(t.left),x=c(t.right);return function(e,t,r){if(x(e,t,r))for(var n=0,o=t.length;n":return function(e){return u(e,v)>t.value.value};case">=":return function(e){return u(e,v)>=t.value.value}}throw new Error("Unknown operator: ".concat(t.operator));case"sibling":var E=c(t.left),b=c(t.right);return function(e,r,n){return b(e,r,n)&&y(e,E,r,"LEFT_SIDE",n)||t.left.subject&&E(e,r,n)&&y(e,b,r,"RIGHT_SIDE",n)};case"adjacent":var S=c(t.left),_=c(t.right);return function(e,r,n){return _(e,r,n)&&d(e,S,r,"LEFT_SIDE",n)||t.right.subject&&S(e,r,n)&&d(e,_,r,"RIGHT_SIDE",n)};case"nth-child":var C=t.index.value,w=c(t.right);return function(e,t,r){return w(e,t,r)&&m(e,t,C,r)};case"nth-last-child":var P=-t.index.value,k=c(t.right);return function(e,t,r){return k(e,t,r)&&m(e,t,P,r)};case"class":var D=t.name.toLowerCase();return function(e,r,n){if(n&&n.matchClass)return n.matchClass(t.name,e,r);if(n&&n.nodeTypeKey)return!1;switch(D){case"statement":if("Statement"===e.type.slice(-9))return!0;case"declaration":return"Declaration"===e.type.slice(-11);case"pattern":if("Pattern"===e.type.slice(-7))return!0;case"expression":return"Expression"===e.type.slice(-10)||"Literal"===e.type.slice(-7)||"Identifier"===e.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===e.type;case"function":return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}throw new Error("Unknown class name: ".concat(t.name))}}throw new Error("Unknown selector type: ".concat(t.type))}function p(e,t){var r=t&&t.nodeTypeKey||"type",n=e[r];return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:i.VisitorKeys[n]?i.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return e!==r}))}function h(t,r){var n=r&&r.nodeTypeKey||"type";return null!==t&&"object"===e(t)&&"string"==typeof t[n]}function y(e,r,n,o,a){var i=t(n,1)[0];if(!i)return!1;for(var s=p(i,a),u=0;u0&&h(l[c-1],a)&&r(l[c-1],n,a))return!0;if("RIGHT_SIDE"===o&&c=0&&l\n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n PrivateIdentifier: 'PrivateIdentifier',\n Program: 'Program',\n Property: 'Property',\n PropertyDefinition: 'PropertyDefinition',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n PrivateIdentifier: [],\n Program: ['body'],\n Property: ['key', 'value'],\n PropertyDefinition: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(op, s) {\n if (!op) return s;\n return { type: op, left: { type: 'exactNode' }, right: s };\n },\n peg$c21 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c22 = \"!\",\n peg$c23 = peg$literalExpectation(\"!\", false),\n peg$c24 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c25 = \"*\",\n peg$c26 = peg$literalExpectation(\"*\", false),\n peg$c27 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c28 = \"#\",\n peg$c29 = peg$literalExpectation(\"#\", false),\n peg$c30 = function(i) { return { type: 'identifier', value: i }; },\n peg$c31 = \"[\",\n peg$c32 = peg$literalExpectation(\"[\", false),\n peg$c33 = \"]\",\n peg$c34 = peg$literalExpectation(\"]\", false),\n peg$c35 = function(v) { return v; },\n peg$c36 = /^[>\", \"<\", \"!\"], false, false),\n peg$c38 = \"=\",\n peg$c39 = peg$literalExpectation(\"=\", false),\n peg$c40 = function(a) { return (a || '') + '='; },\n peg$c41 = /^[><]/,\n peg$c42 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c43 = \".\",\n peg$c44 = peg$literalExpectation(\".\", false),\n peg$c45 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c46 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c47 = function(name) { return { type: 'attribute', name: name }; },\n peg$c48 = \"\\\"\",\n peg$c49 = peg$literalExpectation(\"\\\"\", false),\n peg$c50 = /^[^\\\\\"]/,\n peg$c51 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c52 = \"\\\\\",\n peg$c53 = peg$literalExpectation(\"\\\\\", false),\n peg$c54 = peg$anyExpectation(),\n peg$c55 = function(a, b) { return a + b; },\n peg$c56 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c57 = \"'\",\n peg$c58 = peg$literalExpectation(\"'\", false),\n peg$c59 = /^[^\\\\']/,\n peg$c60 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c61 = /^[0-9]/,\n peg$c62 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c63 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c64 = function(i) { return { type: 'literal', value: i }; },\n peg$c65 = \"type(\",\n peg$c66 = peg$literalExpectation(\"type(\", false),\n peg$c67 = /^[^ )]/,\n peg$c68 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c69 = \")\",\n peg$c70 = peg$literalExpectation(\")\", false),\n peg$c71 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c72 = /^[imsu]/,\n peg$c73 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c74 = \"/\",\n peg$c75 = peg$literalExpectation(\"/\", false),\n peg$c76 = /^[^\\/]/,\n peg$c77 = peg$classExpectation([\"/\"], true, false),\n peg$c78 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c79 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c80 = \":not(\",\n peg$c81 = peg$literalExpectation(\":not(\", false),\n peg$c82 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c83 = \":matches(\",\n peg$c84 = peg$literalExpectation(\":matches(\", false),\n peg$c85 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c86 = \":has(\",\n peg$c87 = peg$literalExpectation(\":has(\", false),\n peg$c88 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c89 = \":first-child\",\n peg$c90 = peg$literalExpectation(\":first-child\", false),\n peg$c91 = function() { return nth(1); },\n peg$c92 = \":last-child\",\n peg$c93 = peg$literalExpectation(\":last-child\", false),\n peg$c94 = function() { return nthLast(1); },\n peg$c95 = \":nth-child(\",\n peg$c96 = peg$literalExpectation(\":nth-child(\", false),\n peg$c97 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c98 = \":nth-last-child(\",\n peg$c99 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c100 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c101 = \":\",\n peg$c102 = peg$literalExpectation(\":\", false),\n peg$c103 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 32 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsehasSelector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 32 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelector() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsebinaryOp();\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 32 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c25;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c27(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c28;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c33;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c35(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c48;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c48;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c57;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c57;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c43;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c64(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c71(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 32 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c74;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c76.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c76.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c74;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 32 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c43;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c79(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c80) {\n s1 = peg$c80;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c81); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c82(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c83) {\n s1 = peg$c83;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c84); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c85(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c86) {\n s1 = peg$c86;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c87); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsehasSelectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c88(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c89) {\n s1 = peg$c89;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c90); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c91();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c92) {\n s1 = peg$c92;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c93); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c94();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c95) {\n s1 = peg$c95;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c96); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c97(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 30,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c98) {\n s1 = peg$c98;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c99); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c100(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 31,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c101;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c102); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c103(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @callback SelectorMatcher\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @returns {void}\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'exactNode':\n return (node, ancestry) => {\n return ancestry.length === 0;\n };\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n \n const name = selector.name.toLowerCase();\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false; \n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","this","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c19","ss","concat","map","peg$c23","peg$c26","peg$c29","peg$c32","peg$c34","peg$c36","peg$c37","peg$c39","peg$c40","a","peg$c41","peg$c42","peg$c44","peg$c46","op","value","operator","peg$c49","peg$c50","peg$c51","peg$c53","peg$c54","peg$c55","b","peg$c56","d","match","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c66","peg$c67","peg$c68","peg$c70","peg$c72","peg$c73","peg$c75","peg$c76","peg$c77","peg$c81","peg$c84","peg$c87","peg$c90","peg$c93","peg$c96","peg$c99","peg$c102","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","peg$parsehasSelector","left","right","peg$parsesequence","reduce","memo","rhs","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehasSelectors","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","ancestry","nodeTypeKey","split","inPath","ancestor","fromPathIndex","field","k","matchers","estraverse","unshift","shift","visitorKeys","l","sibling","adjacent","nthChild","matchClass","getVisitorKeys","filter","_typeof","side","listProp","startIndex","indexOf","lowerBound","idx","ast","altSubjects","subjects","results","sel","m","succeedingAncestry","parser","query","matches"],"mappings":"u0DA2BC,SAASA,EAAMC,GAGZ,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,EAASC,GACd,IAAcC,EAAKC,EAAfC,EAAM,GACV,IAAKF,KAAOD,EACJA,EAAII,eAAeH,KACnBC,EAAMF,EAAIC,GAENE,EAAIF,GADW,iBAARC,GAA4B,OAARA,EAChBH,EAASG,GAETA,GAIvB,OAAOC,EAgMX,SAASE,EAAUC,EAAQL,GACvBM,KAAKD,OAASA,EACdC,KAAKN,IAAMA,EAiBf,SAASO,EAAQC,EAAMC,EAAMC,EAAMC,GAC/BL,KAAKE,KAAOA,EACZF,KAAKG,KAAOA,EACZH,KAAKI,KAAOA,EACZJ,KAAKK,IAAMA,EAGf,SAASC,KAuHT,SAASC,EAAOL,GACZ,OAAY,MAARA,IAGmB,iBAATA,GAA0C,iBAAdA,EAAKM,MAGnD,SAASC,EAAWC,EAAUhB,GAC1B,OAAQgB,IAAaxB,EAAOyB,kBAAoBD,IAAaxB,EAAO0B,gBAAkB,eAAiBlB,EAG3G,SAASmB,EAA2BC,EAAWC,GAC3C,IAAK,IAAIC,EAAIF,EAAUG,OAAS,EAAGD,GAAK,IAAKA,EACzC,GAAIF,EA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1N,iBAAW0N,EAASW,SACpBhP,KAAMiE,GAAWA,EAAQgL,YACzBnP,SAAUmE,GAAWA,EAAQnE,UAAY,eAajD,SAASiH,EAAMiJ,EAAKjC,EAAU9J,GAC1B,IAAMkM,EAAU,GAIhB,OAHA7X,EAAS0X,EAAKjC,GAAU,SAAUzW,GAC9B6Y,EAAQtR,KAAKvH,KACd2M,GACIkM,EAQX,SAASpM,EAAMgK,GACX,OAAOwC,EAAOxM,MAAMgK,GAUxB,SAASyC,EAAMR,EAAKjC,EAAU9J,GAC1B,OAAO8C,EAAMiJ,EAAKjM,EAAMgK,GAAW9J,GAGvCuM,EAAMzM,MAAQA,EACdyM,EAAMzJ,MAAQA,EACdyJ,EAAMlY,SAAWA,EACjBkY,EAAMC,QAvPN,SAAiBnZ,EAAMyW,EAAUM,EAAUpK,GACvC,OAAK8J,KACAzW,IACA+W,IAAYA,EAAW,IAErBP,EAAWC,EAAXD,CAAqBxW,EAAM+W,EAAUpK,KAmPhDuM,EAAMA,MAAQA"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/esquery/dist/esquery.lite.min.js b/src/hello/backend/node_modules/esquery/dist/esquery.lite.min.js deleted file mode 100644 index 80dd64ee..00000000 --- a/src/hello/backend/node_modules/esquery/dist/esquery.lite.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("estraverse")):"function"==typeof define&&define.amd?define(["estraverse"],e):(t=t||self).esquery=e(t.estraverse)}(this,(function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,u,o,a,s=[],c=!0,i=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){i=!0,u=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(i)throw u}}return s}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0){for(e=1,n=1;e<~+.]/,h=ht([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),p=ft(">",!1),v=ft("~",!1),y=ft("+",!1),d=ft(",",!1),A=function(t,e){return[t].concat(e.map((function(t){return t[3]})))},x=ft("!",!1),g=ft("*",!1),m=ft("#",!1),P=ft("[",!1),b=ft("]",!1),C=/^[>","<","!"],!1,!1),j=ft("=",!1),E=function(t){return(t||"")+"="},S=/^[><]/,k=ht([">","<"],!1,!1),I=ft(".",!1),T=function(t,e,r){return{type:"attribute",name:t,operator:e,value:r}},F=ft('"',!1),K=/^[^\\"]/,O=ht(["\\",'"'],!0,!1),D=ft("\\",!1),L={type:"any"},R=function(t,e){return t+e},M=function(t){return{type:"literal",value:(e=t.join(""),e.replace(/\\(.)/g,(function(t,e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return e}})))};var e},U=ft("'",!1),_=/^[^\\']/,q=ht(["\\","'"],!0,!1),G=/^[0-9]/,H=ht([["0","9"]],!1,!1),N=ft("type(",!1),V=/^[^ )]/,W=ht([" ",")"],!0,!1),$=ft(")",!1),z=/^[imsu]/,B=ht(["i","m","s","u"],!1,!1),J=ft("/",!1),Q=/^[^\/]/,X=ht(["/"],!0,!1),Y=ft(":not(",!1),Z=ft(":matches(",!1),tt=ft(":has(",!1),et=ft(":first-child",!1),rt=ft(":last-child",!1),nt=ft(":nth-child(",!1),ut=ft(":nth-last-child(",!1),ot=ft(":",!1),at=0,st=[{line:1,column:1}],ct=0,it=[],lt={};if("startRule"in r){if(!(r.startRule in c))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=c[r.startRule]}function ft(t,e){return{type:"literal",text:t,ignoreCase:e}}function ht(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function pt(t){var r,n=st[t];if(n)return n;for(r=t-1;!st[r];)r--;for(n={line:(n=st[r]).line,column:n.column};rct&&(ct=at,it=[]),it.push(t))}function dt(){var t,e,r,n,u=32*at+0,o=lt[u];return o?(at=o.nextPos,o.result):(t=at,(e=At())!==s&&(r=mt())!==s&&At()!==s?t=e=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(at=t,t=s),t===s&&(t=at,(e=At())!==s&&(e=void 0),t=e),lt[u]={nextPos:at,result:t},t)}function At(){var t,r,n=32*at+1,u=lt[n];if(u)return at=u.nextPos,u.result;for(t=[],32===e.charCodeAt(at)?(r=" ",at++):(r=s,yt(l));r!==s;)t.push(r),32===e.charCodeAt(at)?(r=" ",at++):(r=s,yt(l));return lt[n]={nextPos:at,result:t},t}function xt(){var t,r,n,u=32*at+2,o=lt[u];if(o)return at=o.nextPos,o.result;if(r=[],f.test(e.charAt(at))?(n=e.charAt(at),at++):(n=s,yt(h)),n!==s)for(;n!==s;)r.push(n),f.test(e.charAt(at))?(n=e.charAt(at),at++):(n=s,yt(h));else r=s;return r!==s&&(r=r.join("")),t=r,lt[u]={nextPos:at,result:t},t}function gt(){var t,r,n,u=32*at+3,o=lt[u];return o?(at=o.nextPos,o.result):(t=at,(r=At())!==s?(62===e.charCodeAt(at)?(n=">",at++):(n=s,yt(p)),n!==s&&At()!==s?t=r="child":(at=t,t=s)):(at=t,t=s),t===s&&(t=at,(r=At())!==s?(126===e.charCodeAt(at)?(n="~",at++):(n=s,yt(v)),n!==s&&At()!==s?t=r="sibling":(at=t,t=s)):(at=t,t=s),t===s&&(t=at,(r=At())!==s?(43===e.charCodeAt(at)?(n="+",at++):(n=s,yt(y)),n!==s&&At()!==s?t=r="adjacent":(at=t,t=s)):(at=t,t=s),t===s&&(t=at,32===e.charCodeAt(at)?(r=" ",at++):(r=s,yt(l)),r!==s&&(n=At())!==s?t=r="descendant":(at=t,t=s)))),lt[u]={nextPos:at,result:t},t)}function mt(){var t,r,n,u,o,a,c,i,l=32*at+5,f=lt[l];if(f)return at=f.nextPos,f.result;if(t=at,(r=bt())!==s){for(n=[],u=at,(o=At())!==s?(44===e.charCodeAt(at)?(a=",",at++):(a=s,yt(d)),a!==s&&(c=At())!==s&&(i=bt())!==s?u=o=[o,a,c,i]:(at=u,u=s)):(at=u,u=s);u!==s;)n.push(u),u=at,(o=At())!==s?(44===e.charCodeAt(at)?(a=",",at++):(a=s,yt(d)),a!==s&&(c=At())!==s&&(i=bt())!==s?u=o=[o,a,c,i]:(at=u,u=s)):(at=u,u=s);n!==s?t=r=A(r,n):(at=t,t=s)}else at=t,t=s;return lt[l]={nextPos:at,result:t},t}function Pt(){var t,e,r,n,u,o=32*at+6,a=lt[o];return a?(at=a.nextPos,a.result):(t=at,(e=gt())===s&&(e=null),e!==s&&(r=bt())!==s?(u=r,t=e=(n=e)?{type:n,left:{type:"exactNode"},right:u}:u):(at=t,t=s),lt[o]={nextPos:at,result:t},t)}function bt(){var t,e,r,n,u,o,a,c=32*at+7,i=lt[c];if(i)return at=i.nextPos,i.result;if(t=at,(e=Ct())!==s){for(r=[],n=at,(u=gt())!==s&&(o=Ct())!==s?n=u=[u,o]:(at=n,n=s);n!==s;)r.push(n),n=at,(u=gt())!==s&&(o=Ct())!==s?n=u=[u,o]:(at=n,n=s);r!==s?(a=e,t=e=r.reduce((function(t,e){return{type:e[0],left:t,right:e[1]}}),a)):(at=t,t=s)}else at=t,t=s;return lt[c]={nextPos:at,result:t},t}function Ct(){var t,r,n,u,o,a,c,i=32*at+8,l=lt[i];if(l)return at=l.nextPos,l.result;if(t=at,33===e.charCodeAt(at)?(r="!",at++):(r=s,yt(x)),r===s&&(r=null),r!==s){if(n=[],(u=wt())!==s)for(;u!==s;)n.push(u),u=wt();else n=s;n!==s?(o=r,c=1===(a=n).length?a[0]:{type:"compound",selectors:a},o&&(c.subject=!0),t=r=c):(at=t,t=s)}else at=t,t=s;return lt[i]={nextPos:at,result:t},t}function wt(){var t,r=32*at+9,n=lt[r];return n?(at=n.nextPos,n.result):((t=function(){var t,r,n=32*at+10,u=lt[n];return u?(at=u.nextPos,u.result):(42===e.charCodeAt(at)?(r="*",at++):(r=s,yt(g)),r!==s&&(r={type:"wildcard",value:r}),t=r,lt[n]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n,u=32*at+11,o=lt[u];return o?(at=o.nextPos,o.result):(t=at,35===e.charCodeAt(at)?(r="#",at++):(r=s,yt(m)),r===s&&(r=null),r!==s&&(n=xt())!==s?t=r={type:"identifier",value:n}:(at=t,t=s),lt[u]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=32*at+12,a=lt[o];return a?(at=a.nextPos,a.result):(t=at,91===e.charCodeAt(at)?(r="[",at++):(r=s,yt(P)),r!==s&&At()!==s&&(n=function(){var t,r,n,u,o=32*at+16,a=lt[o];return a?(at=a.nextPos,a.result):(t=at,(r=jt())!==s&&At()!==s&&(n=function(){var t,r,n,u=32*at+14,o=lt[u];return o?(at=o.nextPos,o.result):(t=at,33===e.charCodeAt(at)?(r="!",at++):(r=s,yt(x)),r===s&&(r=null),r!==s?(61===e.charCodeAt(at)?(n="=",at++):(n=s,yt(j)),n!==s?(r=E(r),t=r):(at=t,t=s)):(at=t,t=s),lt[u]={nextPos:at,result:t},t)}())!==s&&At()!==s?((u=function(){var t,r,n,u,o,a=32*at+20,c=lt[a];if(c)return at=c.nextPos,c.result;if(t=at,"type("===e.substr(at,5)?(r="type(",at+=5):(r=s,yt(N)),r!==s)if(At()!==s){if(n=[],V.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(W)),u!==s)for(;u!==s;)n.push(u),V.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(W));else n=s;n!==s&&(u=At())!==s?(41===e.charCodeAt(at)?(o=")",at++):(o=s,yt($)),o!==s?(r={type:"type",value:n.join("")},t=r):(at=t,t=s)):(at=t,t=s)}else at=t,t=s;else at=t,t=s;return lt[a]={nextPos:at,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c=32*at+22,i=lt[c];if(i)return at=i.nextPos,i.result;if(t=at,47===e.charCodeAt(at)?(r="/",at++):(r=s,yt(J)),r!==s){if(n=[],Q.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(X)),u!==s)for(;u!==s;)n.push(u),Q.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(X));else n=s;n!==s?(47===e.charCodeAt(at)?(u="/",at++):(u=s,yt(J)),u!==s?((o=function(){var t,r,n=32*at+21,u=lt[n];if(u)return at=u.nextPos,u.result;if(t=[],z.test(e.charAt(at))?(r=e.charAt(at),at++):(r=s,yt(B)),r!==s)for(;r!==s;)t.push(r),z.test(e.charAt(at))?(r=e.charAt(at),at++):(r=s,yt(B));else t=s;return lt[n]={nextPos:at,result:t},t}())===s&&(o=null),o!==s?(a=o,r={type:"regexp",value:new RegExp(n.join(""),a?a.join(""):"")},t=r):(at=t,t=s)):(at=t,t=s)):(at=t,t=s)}else at=t,t=s;return lt[c]={nextPos:at,result:t},t}()),u!==s?(r=T(r,n,u),t=r):(at=t,t=s)):(at=t,t=s),t===s&&(t=at,(r=jt())!==s&&At()!==s&&(n=function(){var t,r,n,u=32*at+13,o=lt[u];return o?(at=o.nextPos,o.result):(t=at,C.test(e.charAt(at))?(r=e.charAt(at),at++):(r=s,yt(w)),r===s&&(r=null),r!==s?(61===e.charCodeAt(at)?(n="=",at++):(n=s,yt(j)),n!==s?(r=E(r),t=r):(at=t,t=s)):(at=t,t=s),t===s&&(S.test(e.charAt(at))?(t=e.charAt(at),at++):(t=s,yt(k))),lt[u]={nextPos:at,result:t},t)}())!==s&&At()!==s?((u=function(){var t,r,n,u,o,a,c=32*at+17,i=lt[c];if(i)return at=i.nextPos,i.result;if(t=at,34===e.charCodeAt(at)?(r='"',at++):(r=s,yt(F)),r!==s){for(n=[],K.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(O)),u===s&&(u=at,92===e.charCodeAt(at)?(o="\\",at++):(o=s,yt(D)),o!==s?(e.length>at?(a=e.charAt(at),at++):(a=s,yt(L)),a!==s?(o=R(o,a),u=o):(at=u,u=s)):(at=u,u=s));u!==s;)n.push(u),K.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(O)),u===s&&(u=at,92===e.charCodeAt(at)?(o="\\",at++):(o=s,yt(D)),o!==s?(e.length>at?(a=e.charAt(at),at++):(a=s,yt(L)),a!==s?(o=R(o,a),u=o):(at=u,u=s)):(at=u,u=s));n!==s?(34===e.charCodeAt(at)?(u='"',at++):(u=s,yt(F)),u!==s?(r=M(n),t=r):(at=t,t=s)):(at=t,t=s)}else at=t,t=s;if(t===s)if(t=at,39===e.charCodeAt(at)?(r="'",at++):(r=s,yt(U)),r!==s){for(n=[],_.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(q)),u===s&&(u=at,92===e.charCodeAt(at)?(o="\\",at++):(o=s,yt(D)),o!==s?(e.length>at?(a=e.charAt(at),at++):(a=s,yt(L)),a!==s?(o=R(o,a),u=o):(at=u,u=s)):(at=u,u=s));u!==s;)n.push(u),_.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(q)),u===s&&(u=at,92===e.charCodeAt(at)?(o="\\",at++):(o=s,yt(D)),o!==s?(e.length>at?(a=e.charAt(at),at++):(a=s,yt(L)),a!==s?(o=R(o,a),u=o):(at=u,u=s)):(at=u,u=s));n!==s?(39===e.charCodeAt(at)?(u="'",at++):(u=s,yt(U)),u!==s?(r=M(n),t=r):(at=t,t=s)):(at=t,t=s)}else at=t,t=s;return lt[c]={nextPos:at,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c,i=32*at+18,l=lt[i];if(l)return at=l.nextPos,l.result;for(t=at,r=at,n=[],G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H));u!==s;)n.push(u),G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H));if(n!==s?(46===e.charCodeAt(at)?(u=".",at++):(u=s,yt(I)),u!==s?r=n=[n,u]:(at=r,r=s)):(at=r,r=s),r===s&&(r=null),r!==s){if(n=[],G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H)),u!==s)for(;u!==s;)n.push(u),G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H));else n=s;n!==s?(a=n,c=(o=r)?[].concat.apply([],o).join(""):"",r={type:"literal",value:parseFloat(c+a.join(""))},t=r):(at=t,t=s)}else at=t,t=s;return lt[i]={nextPos:at,result:t},t}())===s&&(u=function(){var t,e,r=32*at+19,n=lt[r];return n?(at=n.nextPos,n.result):((e=xt())!==s&&(e={type:"literal",value:e}),t=e,lt[r]={nextPos:at,result:t},t)}()),u!==s?(r=T(r,n,u),t=r):(at=t,t=s)):(at=t,t=s),t===s&&(t=at,(r=jt())!==s&&(r={type:"attribute",name:r}),t=r)),lt[o]={nextPos:at,result:t},t)}())!==s&&At()!==s?(93===e.charCodeAt(at)?(u="]",at++):(u=s,yt(b)),u!==s?t=r=n:(at=t,t=s)):(at=t,t=s),lt[o]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a,c,i,l=32*at+23,f=lt[l];if(f)return at=f.nextPos,f.result;if(t=at,46===e.charCodeAt(at)?(r=".",at++):(r=s,yt(I)),r!==s)if((n=xt())!==s){for(u=[],o=at,46===e.charCodeAt(at)?(a=".",at++):(a=s,yt(I)),a!==s&&(c=xt())!==s?o=a=[a,c]:(at=o,o=s);o!==s;)u.push(o),o=at,46===e.charCodeAt(at)?(a=".",at++):(a=s,yt(I)),a!==s&&(c=xt())!==s?o=a=[a,c]:(at=o,o=s);u!==s?(i=n,r={type:"field",name:u.reduce((function(t,e){return t+e[0]+e[1]}),i)},t=r):(at=t,t=s)}else at=t,t=s;else at=t,t=s;return lt[l]={nextPos:at,result:t},t}())===s&&(t=function(){var t,r,n,u,o=32*at+24,a=lt[o];return a?(at=a.nextPos,a.result):(t=at,":not("===e.substr(at,5)?(r=":not(",at+=5):(r=s,yt(Y)),r!==s&&At()!==s&&(n=mt())!==s&&At()!==s?(41===e.charCodeAt(at)?(u=")",at++):(u=s,yt($)),u!==s?t=r={type:"not",selectors:n}:(at=t,t=s)):(at=t,t=s),lt[o]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=32*at+25,a=lt[o];return a?(at=a.nextPos,a.result):(t=at,":matches("===e.substr(at,9)?(r=":matches(",at+=9):(r=s,yt(Z)),r!==s&&At()!==s&&(n=mt())!==s&&At()!==s?(41===e.charCodeAt(at)?(u=")",at++):(u=s,yt($)),u!==s?t=r={type:"matches",selectors:n}:(at=t,t=s)):(at=t,t=s),lt[o]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=32*at+26,a=lt[o];return a?(at=a.nextPos,a.result):(t=at,":has("===e.substr(at,5)?(r=":has(",at+=5):(r=s,yt(tt)),r!==s&&At()!==s&&(n=function(){var t,r,n,u,o,a,c,i,l=32*at+4,f=lt[l];if(f)return at=f.nextPos,f.result;if(t=at,(r=Pt())!==s){for(n=[],u=at,(o=At())!==s?(44===e.charCodeAt(at)?(a=",",at++):(a=s,yt(d)),a!==s&&(c=At())!==s&&(i=Pt())!==s?u=o=[o,a,c,i]:(at=u,u=s)):(at=u,u=s);u!==s;)n.push(u),u=at,(o=At())!==s?(44===e.charCodeAt(at)?(a=",",at++):(a=s,yt(d)),a!==s&&(c=At())!==s&&(i=Pt())!==s?u=o=[o,a,c,i]:(at=u,u=s)):(at=u,u=s);n!==s?t=r=A(r,n):(at=t,t=s)}else at=t,t=s;return lt[l]={nextPos:at,result:t},t}())!==s&&At()!==s?(41===e.charCodeAt(at)?(u=")",at++):(u=s,yt($)),u!==s?t=r={type:"has",selectors:n}:(at=t,t=s)):(at=t,t=s),lt[o]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n=32*at+27,u=lt[n];return u?(at=u.nextPos,u.result):(":first-child"===e.substr(at,12)?(r=":first-child",at+=12):(r=s,yt(et)),r!==s&&(r=Et(1)),t=r,lt[n]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n=32*at+28,u=lt[n];return u?(at=u.nextPos,u.result):(":last-child"===e.substr(at,11)?(r=":last-child",at+=11):(r=s,yt(rt)),r!==s&&(r=St(1)),t=r,lt[n]={nextPos:at,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a=32*at+29,c=lt[a];if(c)return at=c.nextPos,c.result;if(t=at,":nth-child("===e.substr(at,11)?(r=":nth-child(",at+=11):(r=s,yt(nt)),r!==s)if(At()!==s){if(n=[],G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H)),u!==s)for(;u!==s;)n.push(u),G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H));else n=s;n!==s&&(u=At())!==s?(41===e.charCodeAt(at)?(o=")",at++):(o=s,yt($)),o!==s?(r=Et(parseInt(n.join(""),10)),t=r):(at=t,t=s)):(at=t,t=s)}else at=t,t=s;else at=t,t=s;return lt[a]={nextPos:at,result:t},t}())===s&&(t=function(){var t,r,n,u,o,a=32*at+30,c=lt[a];if(c)return at=c.nextPos,c.result;if(t=at,":nth-last-child("===e.substr(at,16)?(r=":nth-last-child(",at+=16):(r=s,yt(ut)),r!==s)if(At()!==s){if(n=[],G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H)),u!==s)for(;u!==s;)n.push(u),G.test(e.charAt(at))?(u=e.charAt(at),at++):(u=s,yt(H));else n=s;n!==s&&(u=At())!==s?(41===e.charCodeAt(at)?(o=")",at++):(o=s,yt($)),o!==s?(r=St(parseInt(n.join(""),10)),t=r):(at=t,t=s)):(at=t,t=s)}else at=t,t=s;else at=t,t=s;return lt[a]={nextPos:at,result:t},t}())===s&&(t=function(){var t,r,n,u=32*at+31,o=lt[u];return o?(at=o.nextPos,o.result):(t=at,58===e.charCodeAt(at)?(r=":",at++):(r=s,yt(ot)),r!==s&&(n=xt())!==s?t=r={type:"class",name:n}:(at=t,t=s),lt[u]={nextPos:at,result:t},t)}()),lt[r]={nextPos:at,result:t},t)}function jt(){var t,r,n,u,o,a,c,i,l=32*at+15,f=lt[l];if(f)return at=f.nextPos,f.result;if(t=at,(r=xt())!==s){for(n=[],u=at,46===e.charCodeAt(at)?(o=".",at++):(o=s,yt(I)),o!==s&&(a=xt())!==s?u=o=[o,a]:(at=u,u=s);u!==s;)n.push(u),u=at,46===e.charCodeAt(at)?(o=".",at++):(o=s,yt(I)),o!==s&&(a=xt())!==s?u=o=[o,a]:(at=u,u=s);n!==s?(c=r,i=n,t=r=[].concat.apply([c],i).join("")):(at=t,t=s)}else at=t,t=s;return lt[l]={nextPos:at,result:t},t}function Et(t){return{type:"nth-child",index:{type:"literal",value:t}}}function St(t){return{type:"nth-last-child",index:{type:"literal",value:t}}}if((n=i())!==s&&at===e.length)return n;throw n!==s&&at0&&h(t,e,r))&&f(e[0],e.slice(1),r)};case"descendant":var d=i(r.left),A=i(r.right);return function(t,e,r){if(A(t,e,r))for(var n=0,u=e.length;n":return function(t){return s(t,x)>r.value.value};case">=":return function(t){return s(t,x)>=r.value.value}}throw new Error("Unknown operator: ".concat(r.operator));case"sibling":var P=i(r.left),b=i(r.right);return function(t,e,n){return b(t,e,n)&&p(t,P,e,"LEFT_SIDE",n)||r.left.subject&&P(t,e,n)&&p(t,b,e,"RIGHT_SIDE",n)};case"adjacent":var C=i(r.left),w=i(r.right);return function(t,e,n){return w(t,e,n)&&v(t,C,e,"LEFT_SIDE",n)||r.right.subject&&C(t,e,n)&&v(t,w,e,"RIGHT_SIDE",n)};case"nth-child":var j=r.index.value,E=i(r.right);return function(t,e,r){return E(t,e,r)&&y(t,e,j,r)};case"nth-last-child":var S=-r.index.value,k=i(r.right);return function(t,e,r){return k(t,e,r)&&y(t,e,S,r)};case"class":var I=r.name.toLowerCase();return function(t,e,n){if(n&&n.matchClass)return n.matchClass(r.name,t,e);if(n&&n.nodeTypeKey)return!1;switch(I){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===e.length||"MetaProperty"!==e[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(r.name))}}throw new Error("Unknown selector type: ".concat(r.type))}function f(e,r){var n=r&&r.nodeTypeKey||"type",u=e[n];return r&&r.visitorKeys&&r.visitorKeys[u]?r.visitorKeys[u]:t.VisitorKeys[u]?t.VisitorKeys[u]:r&&"function"==typeof r.fallback?r.fallback(e):Object.keys(e).filter((function(t){return t!==n}))}function h(t,r){var n=r&&r.nodeTypeKey||"type";return null!==t&&"object"===e(t)&&"string"==typeof t[n]}function p(t,e,n,u,o){var a=r(n,1)[0];if(!a)return!1;for(var s=f(a,o),c=0;c0&&h(i[l-1],o)&&e(i[l-1],n,o))return!0;if("RIGHT_SIDE"===u&&l=0&&i 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(op, s) {\n if (!op) return s;\n return { type: op, left: { type: 'exactNode' }, right: s };\n },\n peg$c21 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c22 = \"!\",\n peg$c23 = peg$literalExpectation(\"!\", false),\n peg$c24 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c25 = \"*\",\n peg$c26 = peg$literalExpectation(\"*\", false),\n peg$c27 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c28 = \"#\",\n peg$c29 = peg$literalExpectation(\"#\", false),\n peg$c30 = function(i) { return { type: 'identifier', value: i }; },\n peg$c31 = \"[\",\n peg$c32 = peg$literalExpectation(\"[\", false),\n peg$c33 = \"]\",\n peg$c34 = peg$literalExpectation(\"]\", false),\n peg$c35 = function(v) { return v; },\n peg$c36 = /^[>\", \"<\", \"!\"], false, false),\n peg$c38 = \"=\",\n peg$c39 = peg$literalExpectation(\"=\", false),\n peg$c40 = function(a) { return (a || '') + '='; },\n peg$c41 = /^[><]/,\n peg$c42 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c43 = \".\",\n peg$c44 = peg$literalExpectation(\".\", false),\n peg$c45 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c46 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c47 = function(name) { return { type: 'attribute', name: name }; },\n peg$c48 = \"\\\"\",\n peg$c49 = peg$literalExpectation(\"\\\"\", false),\n peg$c50 = /^[^\\\\\"]/,\n peg$c51 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c52 = \"\\\\\",\n peg$c53 = peg$literalExpectation(\"\\\\\", false),\n peg$c54 = peg$anyExpectation(),\n peg$c55 = function(a, b) { return a + b; },\n peg$c56 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c57 = \"'\",\n peg$c58 = peg$literalExpectation(\"'\", false),\n peg$c59 = /^[^\\\\']/,\n peg$c60 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c61 = /^[0-9]/,\n peg$c62 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c63 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c64 = function(i) { return { type: 'literal', value: i }; },\n peg$c65 = \"type(\",\n peg$c66 = peg$literalExpectation(\"type(\", false),\n peg$c67 = /^[^ )]/,\n peg$c68 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c69 = \")\",\n peg$c70 = peg$literalExpectation(\")\", false),\n peg$c71 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c72 = /^[imsu]/,\n peg$c73 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c74 = \"/\",\n peg$c75 = peg$literalExpectation(\"/\", false),\n peg$c76 = /^[^\\/]/,\n peg$c77 = peg$classExpectation([\"/\"], true, false),\n peg$c78 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c79 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c80 = \":not(\",\n peg$c81 = peg$literalExpectation(\":not(\", false),\n peg$c82 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c83 = \":matches(\",\n peg$c84 = peg$literalExpectation(\":matches(\", false),\n peg$c85 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c86 = \":has(\",\n peg$c87 = peg$literalExpectation(\":has(\", false),\n peg$c88 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c89 = \":first-child\",\n peg$c90 = peg$literalExpectation(\":first-child\", false),\n peg$c91 = function() { return nth(1); },\n peg$c92 = \":last-child\",\n peg$c93 = peg$literalExpectation(\":last-child\", false),\n peg$c94 = function() { return nthLast(1); },\n peg$c95 = \":nth-child(\",\n peg$c96 = peg$literalExpectation(\":nth-child(\", false),\n peg$c97 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c98 = \":nth-last-child(\",\n peg$c99 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c100 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c101 = \":\",\n peg$c102 = peg$literalExpectation(\":\", false),\n peg$c103 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 32 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsehasSelector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 32 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelector() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsebinaryOp();\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 32 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c25;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c27(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c28;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c33;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c35(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c48;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c48;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c57;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c57;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c43;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c64(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c71(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 32 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c74;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c76.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c76.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c74;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 32 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c43;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c79(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c80) {\n s1 = peg$c80;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c81); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c82(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c83) {\n s1 = peg$c83;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c84); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c85(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c86) {\n s1 = peg$c86;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c87); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsehasSelectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c88(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c89) {\n s1 = peg$c89;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c90); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c91();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c92) {\n s1 = peg$c92;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c93); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c94();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c95) {\n s1 = peg$c95;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c96); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c97(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 30,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c98) {\n s1 = peg$c98;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c99); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c100(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 31,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c101;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c102); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c103(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @callback SelectorMatcher\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @returns {void}\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'exactNode':\n return (node, ancestry) => {\n return ancestry.length === 0;\n };\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n \n const name = selector.name.toLowerCase();\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false; \n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["module","exports","peg$SyntaxError","message","expected","found","location","this","name","Error","captureStackTrace","child","parent","ctor","constructor","prototype","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","i","escapedParts","parts","length","Array","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","replace","j","descriptions","type","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c19","ss","concat","map","peg$c23","peg$c26","peg$c29","peg$c32","peg$c34","peg$c36","peg$c37","peg$c39","peg$c40","a","peg$c41","peg$c42","peg$c44","peg$c46","op","value","operator","peg$c49","peg$c50","peg$c51","peg$c53","peg$c54","peg$c55","b","peg$c56","d","match","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c66","peg$c67","peg$c68","peg$c70","peg$c72","peg$c73","peg$c75","peg$c76","peg$c77","peg$c81","peg$c84","peg$c87","peg$c90","peg$c93","peg$c96","peg$c99","peg$c102","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$resultsCache","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","push","s0","s1","s2","key","cached","nextPos","result","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","peg$parsehasSelector","left","right","peg$parsesequence","reduce","memo","rhs","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehasSelectors","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","obj","keys","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","node","ancestry","nodeTypeKey","path","split","inPath","ancestor","fromPathIndex","current","field","isArray","k","matchers","estraverse","traverse","enter","unshift","leave","shift","visitorKeys","fallback","l","sibling","adjacent","nthChild","matchClass","getVisitorKeys","nodeType","VisitorKeys","Object","filter","isNode","_typeof","side","listProp","startIndex","indexOf","lowerBound","upperBound","idx","ast","visitor","altSubjects","subjects","results","sel","m","succeedingAncestry","parser","query","matches"],"mappings":"mnEAQ2CA,EAAOC,UAC9CD,UAEK,WASP,SAASE,EAAgBC,EAASC,EAAUC,EAAOC,GACjDC,KAAKJ,QAAWA,EAChBI,KAAKH,SAAWA,EAChBG,KAAKF,MAAWA,EAChBE,KAAKD,SAAWA,EAChBC,KAAKC,KAAW,cAEuB,mBAA5BC,MAAMC,mBACfD,MAAMC,kBAAkBH,KAAML,GAqmFlC,OAnnFA,SAAsBS,EAAOC,GAC3B,SAASC,IAASN,KAAKO,YAAcH,EACrCE,EAAKE,UAAYH,EAAOG,UACxBJ,EAAMI,UAAY,IAAIF,EAexBG,CAAad,EAAiBO,OAE9BP,EAAgBe,aAAe,SAASb,EAAUC,GAChD,IAAIa,EAA2B,CACzBC,QAAS,SAASC,GAChB,MAAO,IAAOC,EAAcD,EAAYE,MAAQ,KAGlDC,MAAS,SAASH,GAChB,IACII,EADAC,EAAe,GAGnB,IAAKD,EAAI,EAA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EAQX,SAAStN,EAAMoK,GACX,OAAOsD,EAAO1N,MAAMoK,GAUxB,SAASuD,EAAMT,EAAK9C,EAAUlK,GAC1B,OAAO8C,EAAMkK,EAAKlN,EAAMoK,GAAWlK,UAGvCyN,EAAM3N,MAAQA,EACd2N,EAAM3K,MAAQA,EACd2K,EAAMnC,SAAWA,EACjBmC,EAAMC,QAvPN,SAAiBlD,EAAMN,EAAUO,EAAUzK,GACvC,OAAKkK,KACAM,IACAC,IAAYA,EAAW,IAErBR,EAAWC,EAAXD,CAAqBO,EAAMC,EAAUzK,KAmPhDyN,EAAMA,MAAQA"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/esquery/dist/esquery.min.js b/src/hello/backend/node_modules/esquery/dist/esquery.min.js deleted file mode 100644 index 6ec6c9b9..00000000 --- a/src/hello/backend/node_modules/esquery/dist/esquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).esquery=t()}(this,(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return s}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--r)if(e[r].node===t)return!0;return!1}function d(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,o,a;for(n=e.length,o=0;n;)t(e[a=o+(r=n>>>1)])?n=r:(o=a+1,n-=r+1);return o}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},o={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:a={},Skip:i={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,o;function a(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!y(n,v[m])){if(h(u,x[d]))o=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;o=new c(v[m],[f,m],null,null)}r.push(o)}}else if(p(v)){if(y(n,v))continue;r.push(new c(v,f,null,null))}}}else if(o=n.pop(),l=this.__execute(t.leave,o),this.__state===a||l===a)return},f.prototype.replace=function(e,t){var r,n,o,u,f,y,d,m,x,v,g,A,E;function b(e){var t,n,o,a;if(e.ref.remove())for(n=e.ref.key,a=e.ref.parent,t=r.length;t--;)if((o=r[t]).ref&&o.ref.parent===a){if(o.ref.key=0;)if(v=o[E=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(u,x[d]))y=new c(v[m],[E,m],"Property",new l(v,m));else{if(!p(v[m]))continue;y=new c(v[m],[E,m],null,new l(v,m))}r.push(y)}}else p(v)&&r.push(new c(v,E,null,new l(o,E)))}}else if(y=n.pop(),void 0!==(f=this.__execute(t.leave,y))&&f!==a&&f!==i&&f!==s&&y.ref.replace(f),this.__state!==s&&f!==s||b(y),this.__state===a||f===a)return A.root;return A.root},t.Syntax=r,t.traverse=d,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var o,a,i,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,a=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?n.Break:l[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=o,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),s=a((function(e){e.exports&&(e.exports=function(){function e(t,r,n,o){this.message=t,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=pe([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=fe(">",!1),y=fe("~",!1),d=fe("+",!1),m=fe(",",!1),x=function(e,t){return[e].concat(t.map((function(e){return e[3]})))},v=fe("!",!1),g=fe("*",!1),A=fe("#",!1),E=fe("[",!1),b=fe("]",!1),S=/^[>","<","!"],!1,!1),C=fe("=",!1),w=function(e){return(e||"")+"="},P=/^[><]/,k=pe([">","<"],!1,!1),D=fe(".",!1),I=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},j=fe('"',!1),T=/^[^\\"]/,F=pe(["\\",'"'],!0,!1),R=fe("\\",!1),O={type:"any"},L=function(e,t){return e+t},M=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},B=fe("'",!1),U=/^[^\\']/,K=pe(["\\","'"],!0,!1),N=/^[0-9]/,W=pe([["0","9"]],!1,!1),q=fe("type(",!1),V=/^[^ )]/,G=pe([" ",")"],!0,!1),z=fe(")",!1),H=/^[imsu]/,Y=pe(["i","m","s","u"],!1,!1),$=fe("/",!1),J=/^[^\/]/,Q=pe(["/"],!0,!1),X=fe(":not(",!1),Z=fe(":matches(",!1),ee=fe(":has(",!1),te=fe(":first-child",!1),re=fe(":last-child",!1),ne=fe(":nth-child(",!1),oe=fe(":nth-last-child(",!1),ae=fe(":",!1),ie=0,se=[{line:1,column:1}],ue=0,le=[],ce={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');l=u[r.startRule]}function fe(e,t){return{type:"literal",text:e,ignoreCase:t}}function pe(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function he(e){var r,n=se[e];if(n)return n;for(r=e-1;!se[r];)r--;for(n={line:(n=se[r]).line,column:n.column};rue&&(ue=ie,le=[]),le.push(e))}function me(){var e,t,r,n,o=32*ie+0,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,(t=xe())!==s&&(r=Ae())!==s&&xe()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ie=e,e=s),e===s&&(e=ie,(t=xe())!==s&&(t=void 0),e=t),ce[o]={nextPos:ie,result:e},e)}function xe(){var e,r,n=32*ie+1,o=ce[n];if(o)return ie=o.nextPos,o.result;for(e=[],32===t.charCodeAt(ie)?(r=" ",ie++):(r=s,de(c));r!==s;)e.push(r),32===t.charCodeAt(ie)?(r=" ",ie++):(r=s,de(c));return ce[n]={nextPos:ie,result:e},e}function ve(){var e,r,n,o=32*ie+2,a=ce[o];if(a)return ie=a.nextPos,a.result;if(r=[],f.test(t.charAt(ie))?(n=t.charAt(ie),ie++):(n=s,de(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(ie))?(n=t.charAt(ie),ie++):(n=s,de(p));else r=s;return r!==s&&(r=r.join("")),e=r,ce[o]={nextPos:ie,result:e},e}function ge(){var e,r,n,o=32*ie+3,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,(r=xe())!==s?(62===t.charCodeAt(ie)?(n=">",ie++):(n=s,de(h)),n!==s&&xe()!==s?e=r="child":(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=xe())!==s?(126===t.charCodeAt(ie)?(n="~",ie++):(n=s,de(y)),n!==s&&xe()!==s?e=r="sibling":(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=xe())!==s?(43===t.charCodeAt(ie)?(n="+",ie++):(n=s,de(d)),n!==s&&xe()!==s?e=r="adjacent":(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,32===t.charCodeAt(ie)?(r=" ",ie++):(r=s,de(c)),r!==s&&(n=xe())!==s?e=r="descendant":(ie=e,e=s)))),ce[o]={nextPos:ie,result:e},e)}function Ae(){var e,r,n,o,a,i,u,l,c=32*ie+5,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,(r=be())!==s){for(n=[],o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=be())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);o!==s;)n.push(o),o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=be())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);n!==s?e=r=x(r,n):(ie=e,e=s)}else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}function Ee(){var e,t,r,n,o,a=32*ie+6,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,(t=ge())===s&&(t=null),t!==s&&(r=be())!==s?(o=r,e=t=(n=t)?{type:n,left:{type:"exactNode"},right:o}:o):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}function be(){var e,t,r,n,o,a,i,u=32*ie+7,l=ce[u];if(l)return ie=l.nextPos,l.result;if(e=ie,(t=Se())!==s){for(r=[],n=ie,(o=ge())!==s&&(a=Se())!==s?n=o=[o,a]:(ie=n,n=s);n!==s;)r.push(n),n=ie,(o=ge())!==s&&(a=Se())!==s?n=o=[o,a]:(ie=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(ie=e,e=s)}else ie=e,e=s;return ce[u]={nextPos:ie,result:e},e}function Se(){var e,r,n,o,a,i,u,l=32*ie+8,c=ce[l];if(c)return ie=c.nextPos,c.result;if(e=ie,33===t.charCodeAt(ie)?(r="!",ie++):(r=s,de(v)),r===s&&(r=null),r!==s){if(n=[],(o=_e())!==s)for(;o!==s;)n.push(o),o=_e();else n=s;n!==s?(a=r,u=1===(i=n).length?i[0]:{type:"compound",selectors:i},a&&(u.subject=!0),e=r=u):(ie=e,e=s)}else ie=e,e=s;return ce[l]={nextPos:ie,result:e},e}function _e(){var e,r=32*ie+9,n=ce[r];return n?(ie=n.nextPos,n.result):((e=function(){var e,r,n=32*ie+10,o=ce[n];return o?(ie=o.nextPos,o.result):(42===t.charCodeAt(ie)?(r="*",ie++):(r=s,de(g)),r!==s&&(r={type:"wildcard",value:r}),e=r,ce[n]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o=32*ie+11,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,35===t.charCodeAt(ie)?(r="#",ie++):(r=s,de(A)),r===s&&(r=null),r!==s&&(n=ve())!==s?e=r={type:"identifier",value:n}:(ie=e,e=s),ce[o]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=32*ie+12,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,91===t.charCodeAt(ie)?(r="[",ie++):(r=s,de(E)),r!==s&&xe()!==s&&(n=function(){var e,r,n,o,a=32*ie+16,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,(r=Ce())!==s&&xe()!==s&&(n=function(){var e,r,n,o=32*ie+14,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,33===t.charCodeAt(ie)?(r="!",ie++):(r=s,de(v)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ie)?(n="=",ie++):(n=s,de(C)),n!==s?(r=w(r),e=r):(ie=e,e=s)):(ie=e,e=s),ce[o]={nextPos:ie,result:e},e)}())!==s&&xe()!==s?((o=function(){var e,r,n,o,a,i=32*ie+20,u=ce[i];if(u)return ie=u.nextPos,u.result;if(e=ie,"type("===t.substr(ie,5)?(r="type(",ie+=5):(r=s,de(q)),r!==s)if(xe()!==s){if(n=[],V.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(G)),o!==s)for(;o!==s;)n.push(o),V.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(G));else n=s;n!==s&&(o=xe())!==s?(41===t.charCodeAt(ie)?(a=")",ie++):(a=s,de(z)),a!==s?(r={type:"type",value:n.join("")},e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[i]={nextPos:ie,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u=32*ie+22,l=ce[u];if(l)return ie=l.nextPos,l.result;if(e=ie,47===t.charCodeAt(ie)?(r="/",ie++):(r=s,de($)),r!==s){if(n=[],J.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(Q)),o!==s)for(;o!==s;)n.push(o),J.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(Q));else n=s;n!==s?(47===t.charCodeAt(ie)?(o="/",ie++):(o=s,de($)),o!==s?((a=function(){var e,r,n=32*ie+21,o=ce[n];if(o)return ie=o.nextPos,o.result;if(e=[],H.test(t.charAt(ie))?(r=t.charAt(ie),ie++):(r=s,de(Y)),r!==s)for(;r!==s;)e.push(r),H.test(t.charAt(ie))?(r=t.charAt(ie),ie++):(r=s,de(Y));else e=s;return ce[n]={nextPos:ie,result:e},e}())===s&&(a=null),a!==s?(i=a,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(ie=e,e=s)):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;return ce[u]={nextPos:ie,result:e},e}()),o!==s?(r=I(r,n,o),e=r):(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=Ce())!==s&&xe()!==s&&(n=function(){var e,r,n,o=32*ie+13,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,S.test(t.charAt(ie))?(r=t.charAt(ie),ie++):(r=s,de(_)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ie)?(n="=",ie++):(n=s,de(C)),n!==s?(r=w(r),e=r):(ie=e,e=s)):(ie=e,e=s),e===s&&(P.test(t.charAt(ie))?(e=t.charAt(ie),ie++):(e=s,de(k))),ce[o]={nextPos:ie,result:e},e)}())!==s&&xe()!==s?((o=function(){var e,r,n,o,a,i,u=32*ie+17,l=ce[u];if(l)return ie=l.nextPos,l.result;if(e=ie,34===t.charCodeAt(ie)?(r='"',ie++):(r=s,de(j)),r!==s){for(n=[],T.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(F)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));o!==s;)n.push(o),T.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(F)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));n!==s?(34===t.charCodeAt(ie)?(o='"',ie++):(o=s,de(j)),o!==s?(r=M(n),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;if(e===s)if(e=ie,39===t.charCodeAt(ie)?(r="'",ie++):(r=s,de(B)),r!==s){for(n=[],U.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(K)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));o!==s;)n.push(o),U.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(K)),o===s&&(o=ie,92===t.charCodeAt(ie)?(a="\\",ie++):(a=s,de(R)),a!==s?(t.length>ie?(i=t.charAt(ie),ie++):(i=s,de(O)),i!==s?(a=L(a,i),o=a):(ie=o,o=s)):(ie=o,o=s));n!==s?(39===t.charCodeAt(ie)?(o="'",ie++):(o=s,de(B)),o!==s?(r=M(n),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;return ce[u]={nextPos:ie,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u,l=32*ie+18,c=ce[l];if(c)return ie=c.nextPos,c.result;for(e=ie,r=ie,n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));if(n!==s?(46===t.charCodeAt(ie)?(o=".",ie++):(o=s,de(D)),o!==s?r=n=[n,o]:(ie=r,r=s)):(ie=r,r=s),r===s&&(r=null),r!==s){if(n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));else n=s;n!==s?(i=n,u=(a=r)?[].concat.apply([],a).join(""):"",r={type:"literal",value:parseFloat(u+i.join(""))},e=r):(ie=e,e=s)}else ie=e,e=s;return ce[l]={nextPos:ie,result:e},e}())===s&&(o=function(){var e,t,r=32*ie+19,n=ce[r];return n?(ie=n.nextPos,n.result):((t=ve())!==s&&(t={type:"literal",value:t}),e=t,ce[r]={nextPos:ie,result:e},e)}()),o!==s?(r=I(r,n,o),e=r):(ie=e,e=s)):(ie=e,e=s),e===s&&(e=ie,(r=Ce())!==s&&(r={type:"attribute",name:r}),e=r)),ce[a]={nextPos:ie,result:e},e)}())!==s&&xe()!==s?(93===t.charCodeAt(ie)?(o="]",ie++):(o=s,de(b)),o!==s?e=r=n:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i,u,l,c=32*ie+23,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,46===t.charCodeAt(ie)?(r=".",ie++):(r=s,de(D)),r!==s)if((n=ve())!==s){for(o=[],a=ie,46===t.charCodeAt(ie)?(i=".",ie++):(i=s,de(D)),i!==s&&(u=ve())!==s?a=i=[i,u]:(ie=a,a=s);a!==s;)o.push(a),a=ie,46===t.charCodeAt(ie)?(i=".",ie++):(i=s,de(D)),i!==s&&(u=ve())!==s?a=i=[i,u]:(ie=a,a=s);o!==s?(l=n,r={type:"field",name:o.reduce((function(e,t){return e+t[0]+t[1]}),l)},e=r):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}())===s&&(e=function(){var e,r,n,o,a=32*ie+24,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,":not("===t.substr(ie,5)?(r=":not(",ie+=5):(r=s,de(X)),r!==s&&xe()!==s&&(n=Ae())!==s&&xe()!==s?(41===t.charCodeAt(ie)?(o=")",ie++):(o=s,de(z)),o!==s?e=r={type:"not",selectors:n}:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=32*ie+25,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,":matches("===t.substr(ie,9)?(r=":matches(",ie+=9):(r=s,de(Z)),r!==s&&xe()!==s&&(n=Ae())!==s&&xe()!==s?(41===t.charCodeAt(ie)?(o=")",ie++):(o=s,de(z)),o!==s?e=r={type:"matches",selectors:n}:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=32*ie+26,i=ce[a];return i?(ie=i.nextPos,i.result):(e=ie,":has("===t.substr(ie,5)?(r=":has(",ie+=5):(r=s,de(ee)),r!==s&&xe()!==s&&(n=function(){var e,r,n,o,a,i,u,l,c=32*ie+4,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,(r=Ee())!==s){for(n=[],o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=Ee())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);o!==s;)n.push(o),o=ie,(a=xe())!==s?(44===t.charCodeAt(ie)?(i=",",ie++):(i=s,de(m)),i!==s&&(u=xe())!==s&&(l=Ee())!==s?o=a=[a,i,u,l]:(ie=o,o=s)):(ie=o,o=s);n!==s?e=r=x(r,n):(ie=e,e=s)}else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}())!==s&&xe()!==s?(41===t.charCodeAt(ie)?(o=")",ie++):(o=s,de(z)),o!==s?e=r={type:"has",selectors:n}:(ie=e,e=s)):(ie=e,e=s),ce[a]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n=32*ie+27,o=ce[n];return o?(ie=o.nextPos,o.result):(":first-child"===t.substr(ie,12)?(r=":first-child",ie+=12):(r=s,de(te)),r!==s&&(r=we(1)),e=r,ce[n]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n=32*ie+28,o=ce[n];return o?(ie=o.nextPos,o.result):(":last-child"===t.substr(ie,11)?(r=":last-child",ie+=11):(r=s,de(re)),r!==s&&(r=Pe(1)),e=r,ce[n]={nextPos:ie,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i=32*ie+29,u=ce[i];if(u)return ie=u.nextPos,u.result;if(e=ie,":nth-child("===t.substr(ie,11)?(r=":nth-child(",ie+=11):(r=s,de(ne)),r!==s)if(xe()!==s){if(n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));else n=s;n!==s&&(o=xe())!==s?(41===t.charCodeAt(ie)?(a=")",ie++):(a=s,de(z)),a!==s?(r=we(parseInt(n.join(""),10)),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[i]={nextPos:ie,result:e},e}())===s&&(e=function(){var e,r,n,o,a,i=32*ie+30,u=ce[i];if(u)return ie=u.nextPos,u.result;if(e=ie,":nth-last-child("===t.substr(ie,16)?(r=":nth-last-child(",ie+=16):(r=s,de(oe)),r!==s)if(xe()!==s){if(n=[],N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ie))?(o=t.charAt(ie),ie++):(o=s,de(W));else n=s;n!==s&&(o=xe())!==s?(41===t.charCodeAt(ie)?(a=")",ie++):(a=s,de(z)),a!==s?(r=Pe(parseInt(n.join(""),10)),e=r):(ie=e,e=s)):(ie=e,e=s)}else ie=e,e=s;else ie=e,e=s;return ce[i]={nextPos:ie,result:e},e}())===s&&(e=function(){var e,r,n,o=32*ie+31,a=ce[o];return a?(ie=a.nextPos,a.result):(e=ie,58===t.charCodeAt(ie)?(r=":",ie++):(r=s,de(ae)),r!==s&&(n=ve())!==s?e=r={type:"class",name:n}:(ie=e,e=s),ce[o]={nextPos:ie,result:e},e)}()),ce[r]={nextPos:ie,result:e},e)}function Ce(){var e,r,n,o,a,i,u,l,c=32*ie+15,f=ce[c];if(f)return ie=f.nextPos,f.result;if(e=ie,(r=ve())!==s){for(n=[],o=ie,46===t.charCodeAt(ie)?(a=".",ie++):(a=s,de(D)),a!==s&&(i=ve())!==s?o=a=[a,i]:(ie=o,o=s);o!==s;)n.push(o),o=ie,46===t.charCodeAt(ie)?(a=".",ie++):(a=s,de(D)),a!==s&&(i=ve())!==s?o=a=[a,i]:(ie=o,o=s);n!==s?(u=r,l=n,e=r=[].concat.apply([u],l).join("")):(ie=e,e=s)}else ie=e,e=s;return ce[c]={nextPos:ie,result:e},e}function we(e){return{type:"nth-child",index:{type:"literal",value:e}}}function Pe(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=l())!==s&&ie===t.length)return n;throw n!==s&&ie0&&p(e,t,r))&&f(t[0],t.slice(1),r)};case"descendant":var h=c(t.left),x=c(t.right);return function(e,t,r){if(x(e,t,r))for(var n=0,o=t.length;n":return function(e){return u(e,v)>t.value.value};case">=":return function(e){return u(e,v)>=t.value.value}}throw new Error("Unknown operator: ".concat(t.operator));case"sibling":var E=c(t.left),b=c(t.right);return function(e,r,n){return b(e,r,n)&&y(e,E,r,"LEFT_SIDE",n)||t.left.subject&&E(e,r,n)&&y(e,b,r,"RIGHT_SIDE",n)};case"adjacent":var S=c(t.left),_=c(t.right);return function(e,r,n){return _(e,r,n)&&d(e,S,r,"LEFT_SIDE",n)||t.right.subject&&S(e,r,n)&&d(e,_,r,"RIGHT_SIDE",n)};case"nth-child":var C=t.index.value,w=c(t.right);return function(e,t,r){return w(e,t,r)&&m(e,t,C,r)};case"nth-last-child":var P=-t.index.value,k=c(t.right);return function(e,t,r){return k(e,t,r)&&m(e,t,P,r)};case"class":var D=t.name.toLowerCase();return function(e,r,n){if(n&&n.matchClass)return n.matchClass(t.name,e,r);if(n&&n.nodeTypeKey)return!1;switch(D){case"statement":if("Statement"===e.type.slice(-9))return!0;case"declaration":return"Declaration"===e.type.slice(-11);case"pattern":if("Pattern"===e.type.slice(-7))return!0;case"expression":return"Expression"===e.type.slice(-10)||"Literal"===e.type.slice(-7)||"Identifier"===e.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===e.type;case"function":return"FunctionDeclaration"===e.type||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type}throw new Error("Unknown class name: ".concat(t.name))}}throw new Error("Unknown selector type: ".concat(t.type))}function p(e,t){var r=t&&t.nodeTypeKey||"type",n=e[r];return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:i.VisitorKeys[n]?i.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return e!==r}))}function h(t,r){var n=r&&r.nodeTypeKey||"type";return null!==t&&"object"===e(t)&&"string"==typeof t[n]}function y(e,r,n,o,a){var i=t(n,1)[0];if(!i)return!1;for(var s=p(i,a),u=0;u0&&h(l[c-1],a)&&r(l[c-1],n,a))return!0;if("RIGHT_SIDE"===o&&c=0&&l\n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n PrivateIdentifier: 'PrivateIdentifier',\n Program: 'Program',\n Property: 'Property',\n PropertyDefinition: 'PropertyDefinition',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n PrivateIdentifier: [],\n Program: ['body'],\n Property: ['key', 'value'],\n PropertyDefinition: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(op, s) {\n if (!op) return s;\n return { type: op, left: { type: 'exactNode' }, right: s };\n },\n peg$c21 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c22 = \"!\",\n peg$c23 = peg$literalExpectation(\"!\", false),\n peg$c24 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c25 = \"*\",\n peg$c26 = peg$literalExpectation(\"*\", false),\n peg$c27 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c28 = \"#\",\n peg$c29 = peg$literalExpectation(\"#\", false),\n peg$c30 = function(i) { return { type: 'identifier', value: i }; },\n peg$c31 = \"[\",\n peg$c32 = peg$literalExpectation(\"[\", false),\n peg$c33 = \"]\",\n peg$c34 = peg$literalExpectation(\"]\", false),\n peg$c35 = function(v) { return v; },\n peg$c36 = /^[>\", \"<\", \"!\"], false, false),\n peg$c38 = \"=\",\n peg$c39 = peg$literalExpectation(\"=\", false),\n peg$c40 = function(a) { return (a || '') + '='; },\n peg$c41 = /^[><]/,\n peg$c42 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c43 = \".\",\n peg$c44 = peg$literalExpectation(\".\", false),\n peg$c45 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c46 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c47 = function(name) { return { type: 'attribute', name: name }; },\n peg$c48 = \"\\\"\",\n peg$c49 = peg$literalExpectation(\"\\\"\", false),\n peg$c50 = /^[^\\\\\"]/,\n peg$c51 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c52 = \"\\\\\",\n peg$c53 = peg$literalExpectation(\"\\\\\", false),\n peg$c54 = peg$anyExpectation(),\n peg$c55 = function(a, b) { return a + b; },\n peg$c56 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c57 = \"'\",\n peg$c58 = peg$literalExpectation(\"'\", false),\n peg$c59 = /^[^\\\\']/,\n peg$c60 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c61 = /^[0-9]/,\n peg$c62 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c63 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c64 = function(i) { return { type: 'literal', value: i }; },\n peg$c65 = \"type(\",\n peg$c66 = peg$literalExpectation(\"type(\", false),\n peg$c67 = /^[^ )]/,\n peg$c68 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c69 = \")\",\n peg$c70 = peg$literalExpectation(\")\", false),\n peg$c71 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c72 = /^[imsu]/,\n peg$c73 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c74 = \"/\",\n peg$c75 = peg$literalExpectation(\"/\", false),\n peg$c76 = /^[^\\/]/,\n peg$c77 = peg$classExpectation([\"/\"], true, false),\n peg$c78 = function(d, flgs) { return {\n type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') };\n },\n peg$c79 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c80 = \":not(\",\n peg$c81 = peg$literalExpectation(\":not(\", false),\n peg$c82 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c83 = \":matches(\",\n peg$c84 = peg$literalExpectation(\":matches(\", false),\n peg$c85 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c86 = \":has(\",\n peg$c87 = peg$literalExpectation(\":has(\", false),\n peg$c88 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c89 = \":first-child\",\n peg$c90 = peg$literalExpectation(\":first-child\", false),\n peg$c91 = function() { return nth(1); },\n peg$c92 = \":last-child\",\n peg$c93 = peg$literalExpectation(\":last-child\", false),\n peg$c94 = function() { return nthLast(1); },\n peg$c95 = \":nth-child(\",\n peg$c96 = peg$literalExpectation(\":nth-child(\", false),\n peg$c97 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c98 = \":nth-last-child(\",\n peg$c99 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c100 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c101 = \":\",\n peg$c102 = peg$literalExpectation(\":\", false),\n peg$c103 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 32 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsehasSelector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 32 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelector() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsebinaryOp();\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 32 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c25;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c27(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c28;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c33;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c35(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c48;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c48;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c57;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c57;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 32 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c43;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c64(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c71(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 32 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c74;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c76.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c76.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c77); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c74;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c78(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 32 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c43;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c79(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c80) {\n s1 = peg$c80;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c81); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c82(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c83) {\n s1 = peg$c83;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c84); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c85(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c86) {\n s1 = peg$c86;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c87); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsehasSelectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c88(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c89) {\n s1 = peg$c89;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c90); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c91();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 32 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c92) {\n s1 = peg$c92;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c93); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c94();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c95) {\n s1 = peg$c95;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c96); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c97(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 32 + 30,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c98) {\n s1 = peg$c98;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c99); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c100(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 32 + 31,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c101;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c102); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c103(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @callback SelectorMatcher\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @returns {void}\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'exactNode':\n return (node, ancestry) => {\n return ancestry.length === 0;\n };\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n \n const name = selector.name.toLowerCase();\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false; \n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","this","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c19","ss","concat","map","peg$c23","peg$c26","peg$c29","peg$c32","peg$c34","peg$c36","peg$c37","peg$c39","peg$c40","a","peg$c41","peg$c42","peg$c44","peg$c46","op","value","operator","peg$c49","peg$c50","peg$c51","peg$c53","peg$c54","peg$c55","b","peg$c56","d","match","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c66","peg$c67","peg$c68","peg$c70","peg$c72","peg$c73","peg$c75","peg$c76","peg$c77","peg$c81","peg$c84","peg$c87","peg$c90","peg$c93","peg$c96","peg$c99","peg$c102","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","selectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","peg$parsehasSelector","left","right","peg$parsesequence","reduce","memo","rhs","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parsehasSelectors","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","ancestry","nodeTypeKey","split","inPath","ancestor","fromPathIndex","field","k","matchers","estraverse","unshift","shift","visitorKeys","l","sibling","adjacent","nthChild","matchClass","getVisitorKeys","filter","_typeof","side","listProp","startIndex","indexOf","lowerBound","idx","ast","altSubjects","subjects","results","sel","m","succeedingAncestry","parser","query","matches"],"mappings":"qgEA2BC,SAASA,EAAMC,GAGZ,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,EAASC,GACd,IAAcC,EAAKC,EAAfC,EAAM,GACV,IAAKF,KAAOD,EACJA,EAAII,eAAeH,KACnBC,EAAMF,EAAIC,GAENE,EAAIF,GADW,iBAARC,GAA4B,OAARA,EAChBH,EAASG,GAETA,GAIvB,OAAOC,EAgMX,SAASE,EAAUC,EAAQL,GACvBM,KAAKD,OAASA,EACdC,KAAKN,IAAMA,EAiBf,SAASO,EAAQC,EAAMC,EAAMC,EAAMC,GAC/BL,KAAKE,KAAOA,EACZF,KAAKG,KAAOA,EACZH,KAAKI,KAAOA,EACZJ,KAAKK,IAAMA,EAGf,SAASC,KAuHT,SAASC,EAAOL,GACZ,OAAY,MAARA,IAGmB,iBAATA,GAA0C,iBAAdA,EAAKM,MAGnD,SAASC,EAAWC,EAAUhB,GAC1B,OAAQgB,IAAaxB,EAAOyB,kBAAoBD,IAAaxB,EAAO0B,gBAAkB,eAAiBlB,EAG3G,SAASmB,EAA2BC,EAAWC,GAC3C,IAAK,IAAIC,EAAIF,EAAUG,OAAS,EAAGD,GAAK,IAAKA,EACzC,GAAIF,EAAUE,GAAGd,OAASa,EACtB,OAAO,EAGf,OAAO,EAwQX,SAASG,EAASC,EAAMC,GAEpB,OADiB,IAAId,GACHY,SAASC,EAAMC,GAQrC,SAASC,EAAmBC,EAASC,GACjC,IAAIC,EAiBJ,OAfAA,EAjnBJ,SAAoBC,EAAOC,GACvB,IAAIC,EAAMC,EAAKZ,EAAGa,EAKlB,IAHAD,EAAMH,EAAMR,OACZD,EAAI,EAEGY,GAGCF,EAAKD,EADTI,EAAUb,GADVW,EAAOC,IAAQ,KA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AAU9J,GAC1B,OAAO8C,EAAMiJ,EAAKjM,EAAMgK,GAAW9J,UAGvCuM,EAAMzM,MAAQA,EACdyM,EAAMzJ,MAAQA,EACdyJ,EAAMlY,SAAWA,EACjBkY,EAAMC,QAvPN,SAAiBnZ,EAAMyW,EAAUM,EAAUpK,GACvC,OAAK8J,KACAzW,IACA+W,IAAYA,EAAW,IAErBP,EAAWC,EAAXD,CAAqBxW,EAAM+W,EAAUpK,KAmPhDuM,EAAMA,MAAQA"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/fastq/.github/dependabot.yml b/src/hello/backend/node_modules/fastq/.github/dependabot.yml deleted file mode 100644 index 7e7cbe1b..00000000 --- a/src/hello/backend/node_modules/fastq/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 - ignore: - - dependency-name: standard - versions: - - 16.0.3 diff --git a/src/hello/backend/node_modules/fastq/.github/workflows/ci.yml b/src/hello/backend/node_modules/fastq/.github/workflows/ci.yml deleted file mode 100644 index 09dc7a3d..00000000 --- a/src/hello/backend/node_modules/fastq/.github/workflows/ci.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: ci - -on: [push, pull_request] - -jobs: - legacy: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: ['0.10', '0.12', 4.x, 6.x, 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x] - - steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false - - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: Install - run: | - npm install --production && npm install tape - - - name: Run tests - run: | - npm run legacy - - test: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] - - steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false - - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install - run: | - npm install - - - name: Run tests - run: | - npm run test - - types: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false - - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Install - run: | - npm install - - - name: Run types tests - run: | - npm run typescript diff --git a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/HISTORY.md b/src/hello/backend/node_modules/finalhandler/node_modules/statuses/HISTORY.md deleted file mode 100644 index dc549b82..00000000 --- a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/HISTORY.md +++ /dev/null @@ -1,87 +0,0 @@ -2.0.2 / 2025-06-06 -================== - - * Migrate to `String.prototype.slice()` - -2.0.1 / 2021-01-03 -================== - - * Fix returning values from `Object.prototype` - -2.0.0 / 2020-04-19 -================== - - * Drop support for Node.js 0.6 - * Fix messaging casing of `418 I'm a Teapot` - * Remove code 306 - * Remove `status[code]` exports; use `status.message[code]` - * Remove `status[msg]` exports; use `status.code[msg]` - * Rename `425 Unordered Collection` to standard `425 Too Early` - * Rename `STATUS_CODES` export to `message` - * Return status message for `statuses(code)` when given code - -1.5.0 / 2018-03-27 -================== - - * Add `103 Early Hints` - -1.4.0 / 2017-10-20 -================== - - * Add `STATUS_CODES` export - -1.3.1 / 2016-11-11 -================== - - * Fix return type in JSDoc - -1.3.0 / 2016-05-17 -================== - - * Add `421 Misdirected Request` - * perf: enable strict mode - -1.2.1 / 2015-02-01 -================== - - * Fix message for status 451 - - `451 Unavailable For Legal Reasons` - -1.2.0 / 2014-09-28 -================== - - * Add `208 Already Repored` - * Add `226 IM Used` - * Add `306 (Unused)` - * Add `415 Unable For Legal Reasons` - * Add `508 Loop Detected` - -1.1.1 / 2014-09-24 -================== - - * Add missing 308 to `codes.json` - -1.1.0 / 2014-09-21 -================== - - * Add `codes.json` for universal support - -1.0.4 / 2014-08-20 -================== - - * Package cleanup - -1.0.3 / 2014-06-08 -================== - - * Add 308 to `.redirect` category - -1.0.2 / 2014-03-13 -================== - - * Add `.retry` category - -1.0.1 / 2014-03-12 -================== - - * Initial release diff --git a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/README.md b/src/hello/backend/node_modules/finalhandler/node_modules/statuses/README.md deleted file mode 100644 index 89d542f6..00000000 --- a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# statuses - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - -HTTP status utility for node. - -This module provides a list of status codes and messages sourced from -a few different projects: - - * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) - * The [Node.js project](https://nodejs.org/) - * The [NGINX project](https://www.nginx.com/) - * The [Apache HTTP Server project](https://httpd.apache.org/) - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install statuses -``` - -## API - - - -```js -var status = require('statuses') -``` - -### status(code) - -Returns the status message string for a known HTTP status code. The code -may be a number or a string. An error is thrown for an unknown status code. - - - -```js -status(403) // => 'Forbidden' -status('403') // => 'Forbidden' -status(306) // throws -``` - -### status(msg) - -Returns the numeric status code for a known HTTP status message. The message -is case-insensitive. An error is thrown for an unknown status message. - - - -```js -status('forbidden') // => 403 -status('Forbidden') // => 403 -status('foo') // throws -``` - -### status.codes - -Returns an array of all the status codes as `Integer`s. - -### status.code[msg] - -Returns the numeric status code for a known status message (in lower-case), -otherwise `undefined`. - - - -```js -status['not found'] // => 404 -``` - -### status.empty[code] - -Returns `true` if a status code expects an empty body. - - - -```js -status.empty[200] // => undefined -status.empty[204] // => true -status.empty[304] // => true -``` - -### status.message[code] - -Returns the string message for a known numeric status code, otherwise -`undefined`. This object is the same format as the -[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). - - - -```js -status.message[404] // => 'Not Found' -``` - -### status.redirect[code] - -Returns `true` if a status code is a valid redirect status. - - - -```js -status.redirect[200] // => undefined -status.redirect[301] // => true -``` - -### status.retry[code] - -Returns `true` if you should retry the rest. - - - -```js -status.retry[501] // => undefined -status.retry[503] // => true -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci -[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master -[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master -[node-version-image]: https://badgen.net/npm/node/statuses -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/statuses -[npm-url]: https://npmjs.org/package/statuses -[npm-version-image]: https://badgen.net/npm/v/statuses -[ossf-scorecard-badge]: https://api.securityscorecards.dev/projects/github.com/jshttp/statuses/badge -[ossf-scorecard-visualizer]: https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/jshttp/statuses diff --git a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/codes.json b/src/hello/backend/node_modules/finalhandler/node_modules/statuses/codes.json deleted file mode 100644 index 1333ed10..00000000 --- a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/codes.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "100": "Continue", - "101": "Switching Protocols", - "102": "Processing", - "103": "Early Hints", - "200": "OK", - "201": "Created", - "202": "Accepted", - "203": "Non-Authoritative Information", - "204": "No Content", - "205": "Reset Content", - "206": "Partial Content", - "207": "Multi-Status", - "208": "Already Reported", - "226": "IM Used", - "300": "Multiple Choices", - "301": "Moved Permanently", - "302": "Found", - "303": "See Other", - "304": "Not Modified", - "305": "Use Proxy", - "307": "Temporary Redirect", - "308": "Permanent Redirect", - "400": "Bad Request", - "401": "Unauthorized", - "402": "Payment Required", - "403": "Forbidden", - "404": "Not Found", - "405": "Method Not Allowed", - "406": "Not Acceptable", - "407": "Proxy Authentication Required", - "408": "Request Timeout", - "409": "Conflict", - "410": "Gone", - "411": "Length Required", - "412": "Precondition Failed", - "413": "Payload Too Large", - "414": "URI Too Long", - "415": "Unsupported Media Type", - "416": "Range Not Satisfiable", - "417": "Expectation Failed", - "418": "I'm a Teapot", - "421": "Misdirected Request", - "422": "Unprocessable Entity", - "423": "Locked", - "424": "Failed Dependency", - "425": "Too Early", - "426": "Upgrade Required", - "428": "Precondition Required", - "429": "Too Many Requests", - "431": "Request Header Fields Too Large", - "451": "Unavailable For Legal Reasons", - "500": "Internal Server Error", - "501": "Not Implemented", - "502": "Bad Gateway", - "503": "Service Unavailable", - "504": "Gateway Timeout", - "505": "HTTP Version Not Supported", - "506": "Variant Also Negotiates", - "507": "Insufficient Storage", - "508": "Loop Detected", - "509": "Bandwidth Limit Exceeded", - "510": "Not Extended", - "511": "Network Authentication Required" -} diff --git a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/index.js b/src/hello/backend/node_modules/finalhandler/node_modules/statuses/index.js deleted file mode 100644 index ea351c55..00000000 --- a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/index.js +++ /dev/null @@ -1,146 +0,0 @@ -/*! - * statuses - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var codes = require('./codes.json') - -/** - * Module exports. - * @public - */ - -module.exports = status - -// status code to message map -status.message = codes - -// status message (lower-case) to code map -status.code = createMessageToStatusCodeMap(codes) - -// array of status codes -status.codes = createStatusCodeList(codes) - -// status codes for redirects -status.redirect = { - 300: true, - 301: true, - 302: true, - 303: true, - 305: true, - 307: true, - 308: true -} - -// status codes for empty bodies -status.empty = { - 204: true, - 205: true, - 304: true -} - -// status codes for when you should retry the request -status.retry = { - 502: true, - 503: true, - 504: true -} - -/** - * Create a map of message to status code. - * @private - */ - -function createMessageToStatusCodeMap (codes) { - var map = {} - - Object.keys(codes).forEach(function forEachCode (code) { - var message = codes[code] - var status = Number(code) - - // populate map - map[message.toLowerCase()] = status - }) - - return map -} - -/** - * Create a list of all status codes. - * @private - */ - -function createStatusCodeList (codes) { - return Object.keys(codes).map(function mapCode (code) { - return Number(code) - }) -} - -/** - * Get the status code for given message. - * @private - */ - -function getStatusCode (message) { - var msg = message.toLowerCase() - - if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { - throw new Error('invalid status message: "' + message + '"') - } - - return status.code[msg] -} - -/** - * Get the status message for given code. - * @private - */ - -function getStatusMessage (code) { - if (!Object.prototype.hasOwnProperty.call(status.message, code)) { - throw new Error('invalid status code: ' + code) - } - - return status.message[code] -} - -/** - * Get the status code. - * - * Given a number, this will throw if it is not a known status - * code, otherwise the code will be returned. Given a string, - * the string will be parsed for a number and return the code - * if valid, otherwise will lookup the code assuming this is - * the status message. - * - * @param {string|number} code - * @returns {number} - * @public - */ - -function status (code) { - if (typeof code === 'number') { - return getStatusMessage(code) - } - - if (typeof code !== 'string') { - throw new TypeError('code must be a number or string') - } - - // '403' - var n = parseInt(code, 10) - if (!isNaN(n)) { - return getStatusMessage(n) - } - - return getStatusCode(code) -} diff --git a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/package.json b/src/hello/backend/node_modules/finalhandler/node_modules/statuses/package.json deleted file mode 100644 index b5d016ed..00000000 --- a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "statuses", - "description": "HTTP status utility", - "version": "2.0.2", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "repository": "jshttp/statuses", - "license": "MIT", - "keywords": [ - "http", - "status", - "code" - ], - "files": [ - "HISTORY.md", - "index.js", - "codes.json", - "LICENSE" - ], - "devDependencies": { - "csv-parse": "4.16.3", - "eslint": "7.19.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.31.0", - "eslint-plugin-markdown": "1.0.2", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.4.0", - "nyc": "15.1.0", - "raw-body": "2.5.2", - "stream-to-array": "2.3.0" - }, - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "build": "node scripts/build.js", - "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/src/hello/backend/node_modules/flat-cache/node_modules/.bin/rimraf b/src/hello/backend/node_modules/flat-cache/node_modules/.bin/rimraf deleted file mode 100644 index 96e5c25b..00000000 --- a/src/hello/backend/node_modules/flat-cache/node_modules/.bin/rimraf +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../rimraf/bin.js" "$@" - ret=$? -else - node "$basedir/../../../rimraf/bin.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/flat-cache/node_modules/.bin/rimraf.cmd b/src/hello/backend/node_modules/flat-cache/node_modules/.bin/rimraf.cmd deleted file mode 100644 index 2e965d7a..00000000 --- a/src/hello/backend/node_modules/flat-cache/node_modules/.bin/rimraf.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\rimraf\bin.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\rimraf\bin.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/http-errors/node_modules/statuses/HISTORY.md b/src/hello/backend/node_modules/http-errors/node_modules/statuses/HISTORY.md deleted file mode 100644 index dc549b82..00000000 --- a/src/hello/backend/node_modules/http-errors/node_modules/statuses/HISTORY.md +++ /dev/null @@ -1,87 +0,0 @@ -2.0.2 / 2025-06-06 -================== - - * Migrate to `String.prototype.slice()` - -2.0.1 / 2021-01-03 -================== - - * Fix returning values from `Object.prototype` - -2.0.0 / 2020-04-19 -================== - - * Drop support for Node.js 0.6 - * Fix messaging casing of `418 I'm a Teapot` - * Remove code 306 - * Remove `status[code]` exports; use `status.message[code]` - * Remove `status[msg]` exports; use `status.code[msg]` - * Rename `425 Unordered Collection` to standard `425 Too Early` - * Rename `STATUS_CODES` export to `message` - * Return status message for `statuses(code)` when given code - -1.5.0 / 2018-03-27 -================== - - * Add `103 Early Hints` - -1.4.0 / 2017-10-20 -================== - - * Add `STATUS_CODES` export - -1.3.1 / 2016-11-11 -================== - - * Fix return type in JSDoc - -1.3.0 / 2016-05-17 -================== - - * Add `421 Misdirected Request` - * perf: enable strict mode - -1.2.1 / 2015-02-01 -================== - - * Fix message for status 451 - - `451 Unavailable For Legal Reasons` - -1.2.0 / 2014-09-28 -================== - - * Add `208 Already Repored` - * Add `226 IM Used` - * Add `306 (Unused)` - * Add `415 Unable For Legal Reasons` - * Add `508 Loop Detected` - -1.1.1 / 2014-09-24 -================== - - * Add missing 308 to `codes.json` - -1.1.0 / 2014-09-21 -================== - - * Add `codes.json` for universal support - -1.0.4 / 2014-08-20 -================== - - * Package cleanup - -1.0.3 / 2014-06-08 -================== - - * Add 308 to `.redirect` category - -1.0.2 / 2014-03-13 -================== - - * Add `.retry` category - -1.0.1 / 2014-03-12 -================== - - * Initial release diff --git a/src/hello/backend/node_modules/http-errors/node_modules/statuses/README.md b/src/hello/backend/node_modules/http-errors/node_modules/statuses/README.md deleted file mode 100644 index 89d542f6..00000000 --- a/src/hello/backend/node_modules/http-errors/node_modules/statuses/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# statuses - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - -HTTP status utility for node. - -This module provides a list of status codes and messages sourced from -a few different projects: - - * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) - * The [Node.js project](https://nodejs.org/) - * The [NGINX project](https://www.nginx.com/) - * The [Apache HTTP Server project](https://httpd.apache.org/) - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install statuses -``` - -## API - - - -```js -var status = require('statuses') -``` - -### status(code) - -Returns the status message string for a known HTTP status code. The code -may be a number or a string. An error is thrown for an unknown status code. - - - -```js -status(403) // => 'Forbidden' -status('403') // => 'Forbidden' -status(306) // throws -``` - -### status(msg) - -Returns the numeric status code for a known HTTP status message. The message -is case-insensitive. An error is thrown for an unknown status message. - - - -```js -status('forbidden') // => 403 -status('Forbidden') // => 403 -status('foo') // throws -``` - -### status.codes - -Returns an array of all the status codes as `Integer`s. - -### status.code[msg] - -Returns the numeric status code for a known status message (in lower-case), -otherwise `undefined`. - - - -```js -status['not found'] // => 404 -``` - -### status.empty[code] - -Returns `true` if a status code expects an empty body. - - - -```js -status.empty[200] // => undefined -status.empty[204] // => true -status.empty[304] // => true -``` - -### status.message[code] - -Returns the string message for a known numeric status code, otherwise -`undefined`. This object is the same format as the -[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). - - - -```js -status.message[404] // => 'Not Found' -``` - -### status.redirect[code] - -Returns `true` if a status code is a valid redirect status. - - - -```js -status.redirect[200] // => undefined -status.redirect[301] // => true -``` - -### status.retry[code] - -Returns `true` if you should retry the rest. - - - -```js -status.retry[501] // => undefined -status.retry[503] // => true -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci -[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master -[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master -[node-version-image]: https://badgen.net/npm/node/statuses -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/statuses -[npm-url]: https://npmjs.org/package/statuses -[npm-version-image]: https://badgen.net/npm/v/statuses -[ossf-scorecard-badge]: https://api.securityscorecards.dev/projects/github.com/jshttp/statuses/badge -[ossf-scorecard-visualizer]: https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/jshttp/statuses diff --git a/src/hello/backend/node_modules/http-errors/node_modules/statuses/codes.json b/src/hello/backend/node_modules/http-errors/node_modules/statuses/codes.json deleted file mode 100644 index 1333ed10..00000000 --- a/src/hello/backend/node_modules/http-errors/node_modules/statuses/codes.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "100": "Continue", - "101": "Switching Protocols", - "102": "Processing", - "103": "Early Hints", - "200": "OK", - "201": "Created", - "202": "Accepted", - "203": "Non-Authoritative Information", - "204": "No Content", - "205": "Reset Content", - "206": "Partial Content", - "207": "Multi-Status", - "208": "Already Reported", - "226": "IM Used", - "300": "Multiple Choices", - "301": "Moved Permanently", - "302": "Found", - "303": "See Other", - "304": "Not Modified", - "305": "Use Proxy", - "307": "Temporary Redirect", - "308": "Permanent Redirect", - "400": "Bad Request", - "401": "Unauthorized", - "402": "Payment Required", - "403": "Forbidden", - "404": "Not Found", - "405": "Method Not Allowed", - "406": "Not Acceptable", - "407": "Proxy Authentication Required", - "408": "Request Timeout", - "409": "Conflict", - "410": "Gone", - "411": "Length Required", - "412": "Precondition Failed", - "413": "Payload Too Large", - "414": "URI Too Long", - "415": "Unsupported Media Type", - "416": "Range Not Satisfiable", - "417": "Expectation Failed", - "418": "I'm a Teapot", - "421": "Misdirected Request", - "422": "Unprocessable Entity", - "423": "Locked", - "424": "Failed Dependency", - "425": "Too Early", - "426": "Upgrade Required", - "428": "Precondition Required", - "429": "Too Many Requests", - "431": "Request Header Fields Too Large", - "451": "Unavailable For Legal Reasons", - "500": "Internal Server Error", - "501": "Not Implemented", - "502": "Bad Gateway", - "503": "Service Unavailable", - "504": "Gateway Timeout", - "505": "HTTP Version Not Supported", - "506": "Variant Also Negotiates", - "507": "Insufficient Storage", - "508": "Loop Detected", - "509": "Bandwidth Limit Exceeded", - "510": "Not Extended", - "511": "Network Authentication Required" -} diff --git a/src/hello/backend/node_modules/http-errors/node_modules/statuses/index.js b/src/hello/backend/node_modules/http-errors/node_modules/statuses/index.js deleted file mode 100644 index ea351c55..00000000 --- a/src/hello/backend/node_modules/http-errors/node_modules/statuses/index.js +++ /dev/null @@ -1,146 +0,0 @@ -/*! - * statuses - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var codes = require('./codes.json') - -/** - * Module exports. - * @public - */ - -module.exports = status - -// status code to message map -status.message = codes - -// status message (lower-case) to code map -status.code = createMessageToStatusCodeMap(codes) - -// array of status codes -status.codes = createStatusCodeList(codes) - -// status codes for redirects -status.redirect = { - 300: true, - 301: true, - 302: true, - 303: true, - 305: true, - 307: true, - 308: true -} - -// status codes for empty bodies -status.empty = { - 204: true, - 205: true, - 304: true -} - -// status codes for when you should retry the request -status.retry = { - 502: true, - 503: true, - 504: true -} - -/** - * Create a map of message to status code. - * @private - */ - -function createMessageToStatusCodeMap (codes) { - var map = {} - - Object.keys(codes).forEach(function forEachCode (code) { - var message = codes[code] - var status = Number(code) - - // populate map - map[message.toLowerCase()] = status - }) - - return map -} - -/** - * Create a list of all status codes. - * @private - */ - -function createStatusCodeList (codes) { - return Object.keys(codes).map(function mapCode (code) { - return Number(code) - }) -} - -/** - * Get the status code for given message. - * @private - */ - -function getStatusCode (message) { - var msg = message.toLowerCase() - - if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { - throw new Error('invalid status message: "' + message + '"') - } - - return status.code[msg] -} - -/** - * Get the status message for given code. - * @private - */ - -function getStatusMessage (code) { - if (!Object.prototype.hasOwnProperty.call(status.message, code)) { - throw new Error('invalid status code: ' + code) - } - - return status.message[code] -} - -/** - * Get the status code. - * - * Given a number, this will throw if it is not a known status - * code, otherwise the code will be returned. Given a string, - * the string will be parsed for a number and return the code - * if valid, otherwise will lookup the code assuming this is - * the status message. - * - * @param {string|number} code - * @returns {number} - * @public - */ - -function status (code) { - if (typeof code === 'number') { - return getStatusMessage(code) - } - - if (typeof code !== 'string') { - throw new TypeError('code must be a number or string') - } - - // '403' - var n = parseInt(code, 10) - if (!isNaN(n)) { - return getStatusMessage(n) - } - - return getStatusCode(code) -} diff --git a/src/hello/backend/node_modules/http-errors/node_modules/statuses/package.json b/src/hello/backend/node_modules/http-errors/node_modules/statuses/package.json deleted file mode 100644 index b5d016ed..00000000 --- a/src/hello/backend/node_modules/http-errors/node_modules/statuses/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "statuses", - "description": "HTTP status utility", - "version": "2.0.2", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "repository": "jshttp/statuses", - "license": "MIT", - "keywords": [ - "http", - "status", - "code" - ], - "files": [ - "HISTORY.md", - "index.js", - "codes.json", - "LICENSE" - ], - "devDependencies": { - "csv-parse": "4.16.3", - "eslint": "7.19.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.31.0", - "eslint-plugin-markdown": "1.0.2", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.4.0", - "nyc": "15.1.0", - "raw-body": "2.5.2", - "stream-to-array": "2.3.0" - }, - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "build": "node scripts/build.js", - "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/src/hello/backend/node_modules/jsonwebtoken/node_modules/.bin/semver b/src/hello/backend/node_modules/jsonwebtoken/node_modules/.bin/semver deleted file mode 100644 index 62e29689..00000000 --- a/src/hello/backend/node_modules/jsonwebtoken/node_modules/.bin/semver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../semver/bin/semver.js" "$@" - ret=$? -else - node "$basedir/../../../semver/bin/semver.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/jsonwebtoken/node_modules/.bin/semver.cmd b/src/hello/backend/node_modules/jsonwebtoken/node_modules/.bin/semver.cmd deleted file mode 100644 index 4b34fbaa..00000000 --- a/src/hello/backend/node_modules/jsonwebtoken/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\semver\bin\semver.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\semver\bin\semver.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/nodemon/node_modules/.bin/nodetouch b/src/hello/backend/node_modules/nodemon/node_modules/.bin/nodetouch deleted file mode 100644 index 99d1bf68..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/.bin/nodetouch +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../touch/bin/nodetouch.js" "$@" - ret=$? -else - node "$basedir/../../../touch/bin/nodetouch.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/nodemon/node_modules/.bin/nodetouch.cmd b/src/hello/backend/node_modules/nodemon/node_modules/.bin/nodetouch.cmd deleted file mode 100644 index 3847d3a2..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/.bin/nodetouch.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\touch\bin\nodetouch.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\touch\bin\nodetouch.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/nodemon/node_modules/.bin/semver b/src/hello/backend/node_modules/nodemon/node_modules/.bin/semver deleted file mode 100644 index 62e29689..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/.bin/semver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../semver/bin/semver.js" "$@" - ret=$? -else - node "$basedir/../../../semver/bin/semver.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/nodemon/node_modules/.bin/semver.cmd b/src/hello/backend/node_modules/nodemon/node_modules/.bin/semver.cmd deleted file mode 100644 index 4b34fbaa..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\semver\bin\semver.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\semver\bin\semver.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/nodemon/node_modules/debug/package.json b/src/hello/backend/node_modules/nodemon/node_modules/debug/package.json deleted file mode 100644 index ee8abb52..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/debug/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "debug", - "version": "4.4.3", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon (https://github.com/qix-)", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "mocha test.js test.node.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "sinon": "^14.0.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - }, - "xo": { - "rules": { - "import/extensions": "off" - } - } -} diff --git a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/browser.js b/src/hello/backend/node_modules/nodemon/node_modules/debug/src/browser.js deleted file mode 100644 index 5993451b..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/browser.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/common.js b/src/hello/backend/node_modules/nodemon/node_modules/debug/src/common.js deleted file mode 100644 index 141cb578..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/common.js +++ /dev/null @@ -1,292 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/index.js b/src/hello/backend/node_modules/nodemon/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f2..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/node.js b/src/hello/backend/node_modules/nodemon/node_modules/debug/src/node.js deleted file mode 100644 index 715560a4..00000000 --- a/src/hello/backend/node_modules/nodemon/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/src/hello/backend/node_modules/qs/.eslintrc b/src/hello/backend/node_modules/qs/.eslintrc deleted file mode 100644 index a89f60e6..00000000 --- a/src/hello/backend/node_modules/qs/.eslintrc +++ /dev/null @@ -1,39 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "ignorePatterns": [ - "dist/", - ], - - "rules": { - "complexity": 0, - "consistent-return": 1, - "func-name-matching": 0, - "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], - "indent": [2, 4], - "max-lines": 0, - "max-lines-per-function": [2, { "max": 150 }], - "max-params": [2, 18], - "max-statements": [2, 100], - "multiline-comment-style": 0, - "no-continue": 1, - "no-magic-numbers": 0, - "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "function-paren-newline": 0, - "max-lines-per-function": 0, - "max-statements": 0, - "no-buffer-constructor": 0, - "no-extend-native": 0, - "no-throw-literal": 0, - }, - }, - ], -} diff --git a/src/hello/backend/node_modules/qs/dist/qs.js b/src/hello/backend/node_modules/qs/dist/qs.js deleted file mode 100644 index f37989a5..00000000 --- a/src/hello/backend/node_modules/qs/dist/qs.js +++ /dev/null @@ -1,141 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){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-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(p=isArray(p)?[p]:p);var f=has.call(r,d);f&&"combine"===t.duplicates?r[d]=utils.combine(r[d],p):f&&"last"!==t.duplicates||(r[d]=p)}return r},parseObject=function(e,t,r,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");a=Array.isArray(t)&&t[o]?t[o].length:0}for(var l=i?t:parseArrayValue(t,r,a),n=e.length-1;n>=0;--n){var s,d=e[n];if("[]"===d&&r.parseArrays)s=r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:utils.combine([],l);else{s=r.plainObjects?{__proto__:null}:{};var p="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,c=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&d!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(s=[])[u]=l:"__proto__"!==c&&(s[c]=l):s={0:l}}l=s}return l},parseKeys=function parseQueryStringKeys(e,t,r,i){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(a),n=l?a.slice(0,l.index):a,s=[];if(n){if(!r.plainObjects&&has.call(Object.prototype,n)&&!r.allowPrototypes)return;s.push(n)}for(var d=0;r.depth>0&&null!==(l=o.exec(a))&&d0?g.join(",")||null:void 0}];else if(isArray(f))S=f;else{var N=Object.keys(g);S=u?N.sort(u):N}var T=l?String(r).replace(/\./g,"%2E"):String(r),O=o&&isArray(g)&&1===g.length?T+"[]":T;if(a&&isArray(g)&&0===g.length)return O+"[]";for(var k=0;k0?c+y:""}; - -},{"1":1,"46":46,"5":5}],5:[function(require,module,exports){ -"use strict";var formats=require(1),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,hexTable=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),compactQueue=function compactQueue(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(isArray(t)){for(var o=[],n=0;n=limit?a.slice(i,i+limit):a,p=[],f=0;f=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||n===formats.RFC1738&&(40===s||41===s)?p[p.length]=u.charAt(f):s<128?p[p.length]=hexTable[s]:s<2048?p[p.length]=hexTable[192|s>>6]+hexTable[128|63&s]:s<55296||s>=57344?p[p.length]=hexTable[224|s>>12]+hexTable[128|s>>6&63]+hexTable[128|63&s]:(f+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(f)),p[p.length]=hexTable[240|s>>18]+hexTable[128|s>>12&63]+hexTable[128|s>>6&63]+hexTable[128|63&s])}c+=p.join("")}return c},compact=function compact(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o-1?callBindBasic([t]):t}; - -},{"10":10,"25":25}],25:[function(require,module,exports){ -"use strict";var undefined,$Object=require(22),$Error=require(16),$EvalError=require(15),$RangeError=require(17),$ReferenceError=require(18),$SyntaxError=require(19),$TypeError=require(20),$URIError=require(21),abs=require(34),floor=require(35),max=require(37),min=require(38),pow=require(39),round=require(40),sign=require(41),$Function=Function,getEvalledConstructor=function(r){try{return $Function('"use strict"; return ('+r+").constructor;")()}catch(r){}},$gOPD=require(30),$defineProperty=require(14),throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(r){try{return $gOPD(arguments,"callee").get}catch(r){return throwTypeError}}}():throwTypeError,hasSymbols=require(31)(),getProto=require(28),$ObjectGPO=require(26),$ReflectGPO=require(27),$apply=require(8),$call=require(9),needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto)try{null.error}catch(r){var errorProto=getProto(getProto(r));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function doEval(r){var e;if("%AsyncFunction%"===r)e=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===r)e=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===r)e=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===r){var t=doEval("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if("%AsyncIteratorPrototype%"===r){var o=doEval("%AsyncGenerator%");o&&getProto&&(e=getProto(o.prototype))}return INTRINSICS[r]=e,e},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require(24),hasOwn=require(33),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function stringToPath(r){var e=$strSlice(r,0,1),t=$strSlice(r,-1);if("%"===e&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o=[];return $replace(r,rePropName,(function(r,e,t,n){o[o.length]=t?$replace(n,reEscapeChar,"$1"):e||r})),o},getBaseIntrinsic=function getBaseIntrinsic(r,e){var t,o=r;if(hasOwn(LEGACY_ALIASES,o)&&(o="%"+(t=LEGACY_ALIASES[o])[0]+"%"),hasOwn(INTRINSICS,o)){var n=INTRINSICS[o];if(n===needsEval&&(n=doEval(o)),void 0===n&&!e)throw new $TypeError("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new $SyntaxError("intrinsic "+r+" does not exist!")};module.exports=function GetIntrinsic(r,e){if("string"!=typeof r||0===r.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,r))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=stringToPath(r),o=t.length>0?t[0]:"",n=getBaseIntrinsic("%"+o+"%",e),a=n.name,i=n.value,y=!1,p=n.alias;p&&(o=p[0],$spliceApply(t,$concat([0,1],p)));for(var s=1,d=!0;s=t.length){var c=$gOPD(i,f);i=(d=!!c)&&"get"in c&&!("originalValue"in c.get)?c.get:i[f]}else d=hasOwn(i,f),i=i[f];d&&!y&&(INTRINSICS[a]=i)}}return i}; - -},{"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"24":24,"26":26,"27":27,"28":28,"30":30,"31":31,"33":33,"34":34,"35":35,"37":37,"38":38,"39":39,"40":40,"41":41,"8":8,"9":9}],13:[function(require,module,exports){ -"use strict";var hasProtoAccessor,callBind=require(10),gOPD=require(30);try{hasProtoAccessor=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var desc=!!hasProtoAccessor&&gOPD&&gOPD(Object.prototype,"__proto__"),$Object=Object,$getPrototypeOf=$Object.getPrototypeOf;module.exports=desc&&"function"==typeof desc.get?callBind([desc.get]):"function"==typeof $getPrototypeOf&&function getDunder(t){return $getPrototypeOf(null==t?t:$Object(t))}; - -},{"10":10,"30":30}],30:[function(require,module,exports){ -"use strict";var $gOPD=require(29);if($gOPD)try{$gOPD([],"length")}catch(g){$gOPD=null}module.exports=$gOPD; - -},{"29":29}],14:[function(require,module,exports){ -"use strict";var $defineProperty=Object.defineProperty||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=!1}module.exports=$defineProperty; - -},{}],15:[function(require,module,exports){ -"use strict";module.exports=EvalError; - -},{}],16:[function(require,module,exports){ -"use strict";module.exports=Error; - -},{}],17:[function(require,module,exports){ -"use strict";module.exports=RangeError; - -},{}],18:[function(require,module,exports){ -"use strict";module.exports=ReferenceError; - -},{}],19:[function(require,module,exports){ -"use strict";module.exports=SyntaxError; - -},{}],21:[function(require,module,exports){ -"use strict";module.exports=URIError; - -},{}],22:[function(require,module,exports){ -"use strict";module.exports=Object; - -},{}],23:[function(require,module,exports){ -"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function concatty(t,n){for(var r=[],o=0;o-1e3&&t<1e3||$test.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-$floor(-t):$floor(t);if(n!==t){var o=String(n),i=$slice.call(e,o.length+1);return $replace.call(o,r,"$&_")+"."+$replace.call($replace.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,r,"$&_")}var utilInspect=require(6),inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,quotes={__proto__:null,double:'"',single:"'"},quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(t,e,r){var n=r.quoteStyle||e,o=quotes[n];return o+t+o}function quote(t){return $replace.call(String(t),/"/g,""")}function isArray(t){return!("[object Array]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isDate(t){return!("[object Date]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isRegExp(t){return!("[object RegExp]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isError(t){return!("[object Error]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isString(t){return!("[object String]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isNumber(t){return!("[object Number]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isBoolean(t){return!("[object Boolean]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isSymbol(t){if(hasShammedSymbols)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!symToString)return!1;try{return symToString.call(t),!0}catch(t){}return!1}function isBigInt(t){if(!t||"object"!=typeof t||!bigIntValueOf)return!1;try{return bigIntValueOf.call(t),!0}catch(t){}return!1}module.exports=function inspect_(t,e,r,n){var o=e||{};if(has(o,"quoteStyle")&&!has(quotes,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return inspectString(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return a?addNumericSeparator(t,c):c}if("bigint"==typeof t){var l=String(t)+"n";return a?addNumericSeparator(t,l):l}var p=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=p&&p>0&&"object"==typeof t)return isArray(t)?"[Array]":"[Object]";var u=getIndent(o,r);if(void 0===n)n=[];else if(indexOf(n,t)>=0)return"[Circular]";function inspect(t,e,i){if(e&&(n=$arrSlice.call(n)).push(e),i){var a={depth:o.depth};return has(o,"quoteStyle")&&(a.quoteStyle=o.quoteStyle),inspect_(t,a,r+1,n)}return inspect_(t,o,r+1,n)}if("function"==typeof t&&!isRegExp(t)){var s=nameOf(t),f=arrObjKeys(t,inspect);return"[Function"+(s?": "+s:" (anonymous)")+"]"+(f.length>0?" { "+$join.call(f,", ")+" }":"")}if(isSymbol(t)){var y=hasShammedSymbols?$replace.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(t);return"object"!=typeof t||hasShammedSymbols?y:markBoxed(y)}if(isElement(t)){for(var S="<"+$toLowerCase.call(String(t.nodeName)),g=t.attributes||[],b=0;b"}if(isArray(t)){if(0===t.length)return"[]";var m=arrObjKeys(t,inspect);return u&&!singleLineValues(m)?"["+indentedJoin(m,u)+"]":"[ "+$join.call(m,", ")+" ]"}if(isError(t)){var h=arrObjKeys(t,inspect);return"cause"in Error.prototype||!("cause"in t)||isEnumerable.call(t,"cause")?0===h.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$join.call(h,", ")+" }":"{ ["+String(t)+"] "+$join.call($concat.call("[cause]: "+inspect(t.cause),h),", ")+" }"}if("object"==typeof t&&i){if(inspectSymbol&&"function"==typeof t[inspectSymbol]&&utilInspect)return utilInspect(t,{depth:p-r});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(isMap(t)){var d=[];return mapForEach&&mapForEach.call(t,(function(e,r){d.push(inspect(r,t,!0)+" => "+inspect(e,t))})),collectionOf("Map",mapSize.call(t),d,u)}if(isSet(t)){var j=[];return setForEach&&setForEach.call(t,(function(e){j.push(inspect(e,t))})),collectionOf("Set",setSize.call(t),j,u)}if(isWeakMap(t))return weakCollectionOf("WeakMap");if(isWeakSet(t))return weakCollectionOf("WeakSet");if(isWeakRef(t))return weakCollectionOf("WeakRef");if(isNumber(t))return markBoxed(inspect(Number(t)));if(isBigInt(t))return markBoxed(inspect(bigIntValueOf.call(t)));if(isBoolean(t))return markBoxed(booleanValueOf.call(t));if(isString(t))return markBoxed(inspect(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||"undefined"!=typeof global&&t===global)return"{ [object globalThis] }";if(!isDate(t)&&!isRegExp(t)){var O=arrObjKeys(t,inspect),w=gPO?gPO(t)===Object.prototype:t instanceof Object||t.constructor===Object,$=t instanceof Object?"":"null prototype",k=!w&&toStringTag&&Object(t)===t&&toStringTag in t?$slice.call(toStr(t),8,-1):$?"Object":"",v=(w||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(k||$?"["+$join.call($concat.call([],k||[],$||[]),": ")+"] ":"");return 0===O.length?v+"{}":u?v+"{"+indentedJoin(O,u)+"}":v+"{ "+$join.call(O,", ")+" }"}return String(t)};var hasOwn=Object.prototype.hasOwnProperty||function(t){return t in this};function has(t,e){return hasOwn.call(t,e)}function toStr(t){return objectToString.call(t)}function nameOf(t){if(t.name)return t.name;var e=$match.call(functionToString.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function indexOf(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString($slice.call(t,0,e.maxStringLength),e)+n}var o=quoteREs[e.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes($replace.call($replace.call(t,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",e)}function lowbyte(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(t){return"Object("+t+")"}function weakCollectionOf(t){return t+" { ? }"}function collectionOf(t,e,r,n){return t+" ("+e+") {"+(n?indentedJoin(r,n):$join.call(r,", "))+"}"}function singleLineValues(t){for(var e=0;e=0)return!1;return!0}function getIndent(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=$join.call(Array(t.indent+1)," ")}return{base:r,prev:$join.call(Array(e+1),r)}}function indentedJoin(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+$join.call(t,","+r)+"\n"+e.prev}function arrObjKeys(t,e){var r=isArray(t),n=[];if(r){n.length=t.length;for(var o=0;o= 1.5.0 < 2' - -2018-03-29 / 1.6.3 -================== - - * deps: depd@~1.1.2 - - perf: remove argument reassignment - * deps: setprototypeof@1.1.0 - * deps: statuses@'>= 1.4.0 < 2' - -2017-08-04 / 1.6.2 -================== - - * deps: depd@1.1.1 - - Remove unnecessary `Buffer` loading - -2017-02-20 / 1.6.1 -================== - - * deps: setprototypeof@1.0.3 - - Fix shim for old browsers - -2017-02-14 / 1.6.0 -================== - - * Accept custom 4xx and 5xx status codes in factory - * Add deprecation message to `"I'mateapot"` export - * Deprecate passing status code as anything except first argument in factory - * Deprecate using non-error status codes - * Make `message` property enumerable for `HttpError`s - -2016-11-16 / 1.5.1 -================== - - * deps: inherits@2.0.3 - - Fix issue loading in browser - * deps: setprototypeof@1.0.2 - * deps: statuses@'>= 1.3.1 < 2' - -2016-05-18 / 1.5.0 -================== - - * Support new code `421 Misdirected Request` - * Use `setprototypeof` module to replace `__proto__` setting - * deps: statuses@'>= 1.3.0 < 2' - - Add `421 Misdirected Request` - - perf: enable strict mode - * perf: enable strict mode - -2016-01-28 / 1.4.0 -================== - - * Add `HttpError` export, for `err instanceof createError.HttpError` - * deps: inherits@2.0.1 - * deps: statuses@'>= 1.2.1 < 2' - - Fix message for status 451 - - Remove incorrect nginx status code - -2015-02-02 / 1.3.1 -================== - - * Fix regression where status can be overwritten in `createError` `props` - -2015-02-01 / 1.3.0 -================== - - * Construct errors using defined constructors from `createError` - * Fix error names that are not identifiers - - `createError["I'mateapot"]` is now `createError.ImATeapot` - * Set a meaningful `name` property on constructed errors - -2014-12-09 / 1.2.8 -================== - - * Fix stack trace from exported function - * Remove `arguments.callee` usage - -2014-10-14 / 1.2.7 -================== - - * Remove duplicate line - -2014-10-02 / 1.2.6 -================== - - * Fix `expose` to be `true` for `ClientError` constructor - -2014-09-28 / 1.2.5 -================== - - * deps: statuses@1 - -2014-09-21 / 1.2.4 -================== - - * Fix dependency version to work with old `npm`s - -2014-09-21 / 1.2.3 -================== - - * deps: statuses@~1.1.0 - -2014-09-21 / 1.2.2 -================== - - * Fix publish error - -2014-09-21 / 1.2.1 -================== - - * Support Node.js 0.6 - * Use `inherits` instead of `util` - -2014-09-09 / 1.2.0 -================== - - * Fix the way inheriting functions - * Support `expose` being provided in properties argument - -2014-09-08 / 1.1.0 -================== - - * Default status to 500 - * Support provided `error` to extend - -2014-09-08 / 1.0.1 -================== - - * Fix accepting string message - -2014-09-08 / 1.0.0 -================== - - * Initial release diff --git a/src/hello/backend/node_modules/send/node_modules/http-errors/README.md b/src/hello/backend/node_modules/send/node_modules/http-errors/README.md deleted file mode 100644 index a8b7330b..00000000 --- a/src/hello/backend/node_modules/send/node_modules/http-errors/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# http-errors - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][node-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create HTTP errors for Express, Koa, Connect, etc. with ease. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```console -$ npm install http-errors -``` - -## Example - -```js -var createError = require('http-errors') -var express = require('express') -var app = express() - -app.use(function (req, res, next) { - if (!req.user) return next(createError(401, 'Please login to view this page.')) - next() -}) -``` - -## API - -This is the current API, currently extracted from Koa and subject to change. - -### Error Properties - -- `expose` - can be used to signal if `message` should be sent to the client, - defaulting to `false` when `status` >= 500 -- `headers` - can be an object of header names to values to be sent to the - client, defaulting to `undefined`. When defined, the key names should all - be lower-cased -- `message` - the traditional error message, which should be kept short and all - single line -- `status` - the status code of the error, mirroring `statusCode` for general - compatibility -- `statusCode` - the status code of the error, defaulting to `500` - -### createError([status], [message], [properties]) - -Create a new error object with the given message `msg`. -The error object inherits from `createError.HttpError`. - -```js -var err = createError(404, 'This video does not exist!') -``` - -- `status: 500` - the status code as a number -- `message` - the message of the error, defaulting to node's text for that status code. -- `properties` - custom properties to attach to the object - -### createError([status], [error], [properties]) - -Extend the given `error` object with `createError.HttpError` -properties. This will not alter the inheritance of the given -`error` object, and the modified `error` object is the -return value. - - - -```js -fs.readFile('foo.txt', function (err, buf) { - if (err) { - if (err.code === 'ENOENT') { - var httpError = createError(404, err, { expose: false }) - } else { - var httpError = createError(500, err) - } - } -}) -``` - -- `status` - the status code as a number -- `error` - the error object to extend -- `properties` - custom properties to attach to the object - -### createError.isHttpError(val) - -Determine if the provided `val` is an `HttpError`. This will return `true` -if the error inherits from the `HttpError` constructor of this module or -matches the "duck type" for an error this module creates. All outputs from -the `createError` factory will return `true` for this function, including -if an non-`HttpError` was passed into the factory. - -### new createError\[code || name\](\[msg]\)) - -Create a new error object with the given message `msg`. -The error object inherits from `createError.HttpError`. - -```js -var err = new createError.NotFound() -``` - -- `code` - the status code as a number -- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. - -#### List of all constructors - -|Status Code|Constructor Name | -|-----------|-----------------------------| -|400 |BadRequest | -|401 |Unauthorized | -|402 |PaymentRequired | -|403 |Forbidden | -|404 |NotFound | -|405 |MethodNotAllowed | -|406 |NotAcceptable | -|407 |ProxyAuthenticationRequired | -|408 |RequestTimeout | -|409 |Conflict | -|410 |Gone | -|411 |LengthRequired | -|412 |PreconditionFailed | -|413 |PayloadTooLarge | -|414 |URITooLong | -|415 |UnsupportedMediaType | -|416 |RangeNotSatisfiable | -|417 |ExpectationFailed | -|418 |ImATeapot | -|421 |MisdirectedRequest | -|422 |UnprocessableEntity | -|423 |Locked | -|424 |FailedDependency | -|425 |TooEarly | -|426 |UpgradeRequired | -|428 |PreconditionRequired | -|429 |TooManyRequests | -|431 |RequestHeaderFieldsTooLarge | -|451 |UnavailableForLegalReasons | -|500 |InternalServerError | -|501 |NotImplemented | -|502 |BadGateway | -|503 |ServiceUnavailable | -|504 |GatewayTimeout | -|505 |HTTPVersionNotSupported | -|506 |VariantAlsoNegotiates | -|507 |InsufficientStorage | -|508 |LoopDetected | -|509 |BandwidthLimitExceeded | -|510 |NotExtended | -|511 |NetworkAuthenticationRequired| - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/http-errors/master?label=ci -[ci-url]: https://github.com/jshttp/http-errors/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/http-errors/master -[coveralls-url]: https://coveralls.io/r/jshttp/http-errors?branch=master -[node-image]: https://badgen.net/npm/node/http-errors -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/http-errors -[npm-url]: https://npmjs.org/package/http-errors -[npm-version-image]: https://badgen.net/npm/v/http-errors -[travis-image]: https://badgen.net/travis/jshttp/http-errors/master -[travis-url]: https://travis-ci.org/jshttp/http-errors diff --git a/src/hello/backend/node_modules/send/node_modules/http-errors/index.js b/src/hello/backend/node_modules/send/node_modules/http-errors/index.js deleted file mode 100644 index c425f1ee..00000000 --- a/src/hello/backend/node_modules/send/node_modules/http-errors/index.js +++ /dev/null @@ -1,289 +0,0 @@ -/*! - * http-errors - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var deprecate = require('depd')('http-errors') -var setPrototypeOf = require('setprototypeof') -var statuses = require('statuses') -var inherits = require('inherits') -var toIdentifier = require('toidentifier') - -/** - * Module exports. - * @public - */ - -module.exports = createError -module.exports.HttpError = createHttpErrorConstructor() -module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError) - -// Populate exports for all constructors -populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) - -/** - * Get the code class of a status code. - * @private - */ - -function codeClass (status) { - return Number(String(status).charAt(0) + '00') -} - -/** - * Create a new HTTP Error. - * - * @returns {Error} - * @public - */ - -function createError () { - // so much arity going on ~_~ - var err - var msg - var status = 500 - var props = {} - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i] - var type = typeof arg - if (type === 'object' && arg instanceof Error) { - err = arg - status = err.status || err.statusCode || status - } else if (type === 'number' && i === 0) { - status = arg - } else if (type === 'string') { - msg = arg - } else if (type === 'object') { - props = arg - } else { - throw new TypeError('argument #' + (i + 1) + ' unsupported type ' + type) - } - } - - if (typeof status === 'number' && (status < 400 || status >= 600)) { - deprecate('non-error status code; use only 4xx or 5xx status codes') - } - - if (typeof status !== 'number' || - (!statuses.message[status] && (status < 400 || status >= 600))) { - status = 500 - } - - // constructor - var HttpError = createError[status] || createError[codeClass(status)] - - if (!err) { - // create error - err = HttpError - ? new HttpError(msg) - : new Error(msg || statuses.message[status]) - Error.captureStackTrace(err, createError) - } - - if (!HttpError || !(err instanceof HttpError) || err.status !== status) { - // add properties to generic error - err.expose = status < 500 - err.status = err.statusCode = status - } - - for (var key in props) { - if (key !== 'status' && key !== 'statusCode') { - err[key] = props[key] - } - } - - return err -} - -/** - * Create HTTP error abstract base class. - * @private - */ - -function createHttpErrorConstructor () { - function HttpError () { - throw new TypeError('cannot construct abstract class') - } - - inherits(HttpError, Error) - - return HttpError -} - -/** - * Create a constructor for a client error. - * @private - */ - -function createClientErrorConstructor (HttpError, name, code) { - var className = toClassName(name) - - function ClientError (message) { - // create the error object - var msg = message != null ? message : statuses.message[code] - var err = new Error(msg) - - // capture a stack trace to the construction point - Error.captureStackTrace(err, ClientError) - - // adjust the [[Prototype]] - setPrototypeOf(err, ClientError.prototype) - - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) - - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true - }) - - return err - } - - inherits(ClientError, HttpError) - nameFunc(ClientError, className) - - ClientError.prototype.status = code - ClientError.prototype.statusCode = code - ClientError.prototype.expose = true - - return ClientError -} - -/** - * Create function to test is a value is a HttpError. - * @private - */ - -function createIsHttpErrorFunction (HttpError) { - return function isHttpError (val) { - if (!val || typeof val !== 'object') { - return false - } - - if (val instanceof HttpError) { - return true - } - - return val instanceof Error && - typeof val.expose === 'boolean' && - typeof val.statusCode === 'number' && val.status === val.statusCode - } -} - -/** - * Create a constructor for a server error. - * @private - */ - -function createServerErrorConstructor (HttpError, name, code) { - var className = toClassName(name) - - function ServerError (message) { - // create the error object - var msg = message != null ? message : statuses.message[code] - var err = new Error(msg) - - // capture a stack trace to the construction point - Error.captureStackTrace(err, ServerError) - - // adjust the [[Prototype]] - setPrototypeOf(err, ServerError.prototype) - - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) - - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true - }) - - return err - } - - inherits(ServerError, HttpError) - nameFunc(ServerError, className) - - ServerError.prototype.status = code - ServerError.prototype.statusCode = code - ServerError.prototype.expose = false - - return ServerError -} - -/** - * Set the name of a function, if possible. - * @private - */ - -function nameFunc (func, name) { - var desc = Object.getOwnPropertyDescriptor(func, 'name') - - if (desc && desc.configurable) { - desc.value = name - Object.defineProperty(func, 'name', desc) - } -} - -/** - * Populate the exports object with constructors for every error class. - * @private - */ - -function populateConstructorExports (exports, codes, HttpError) { - codes.forEach(function forEachCode (code) { - var CodeError - var name = toIdentifier(statuses.message[code]) - - switch (codeClass(code)) { - case 400: - CodeError = createClientErrorConstructor(HttpError, name, code) - break - case 500: - CodeError = createServerErrorConstructor(HttpError, name, code) - break - } - - if (CodeError) { - // export the constructor - exports[code] = CodeError - exports[name] = CodeError - } - }) -} - -/** - * Get a class name from a name identifier. - * @private - */ - -function toClassName (name) { - return name.substr(-5) !== 'Error' - ? name + 'Error' - : name -} diff --git a/src/hello/backend/node_modules/send/node_modules/http-errors/package.json b/src/hello/backend/node_modules/send/node_modules/http-errors/package.json deleted file mode 100644 index 4cb6d7ed..00000000 --- a/src/hello/backend/node_modules/send/node_modules/http-errors/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "http-errors", - "description": "Create HTTP error objects", - "version": "2.0.0", - "author": "Jonathan Ong (http://jongleberry.com)", - "contributors": [ - "Alan Plum ", - "Douglas Christopher Wilson " - ], - "license": "MIT", - "repository": "jshttp/http-errors", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.3", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.1.3", - "nyc": "15.1.0" - }, - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint . && node ./scripts/lint-readme-list.js", - "test": "mocha --reporter spec --bail", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - }, - "keywords": [ - "http", - "error" - ], - "files": [ - "index.js", - "HISTORY.md", - "LICENSE", - "README.md" - ] -} diff --git a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/HISTORY.md b/src/hello/backend/node_modules/serve-static/node_modules/http-errors/HISTORY.md deleted file mode 100644 index 72286842..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/HISTORY.md +++ /dev/null @@ -1,180 +0,0 @@ -2.0.0 / 2021-12-17 -================== - - * Drop support for Node.js 0.6 - * Remove `I'mateapot` export; use `ImATeapot` instead - * Remove support for status being non-first argument - * Rename `UnorderedCollection` constructor to `TooEarly` - * deps: depd@2.0.0 - - Replace internal `eval` usage with `Function` constructor - - Use instance methods on `process` to check for listeners - * deps: statuses@2.0.1 - - Fix messaging casing of `418 I'm a Teapot` - - Remove code 306 - - Rename `425 Unordered Collection` to standard `425 Too Early` - -2021-11-14 / 1.8.1 -================== - - * deps: toidentifier@1.0.1 - -2020-06-29 / 1.8.0 -================== - - * Add `isHttpError` export to determine if value is an HTTP error - * deps: setprototypeof@1.2.0 - -2019-06-24 / 1.7.3 -================== - - * deps: inherits@2.0.4 - -2019-02-18 / 1.7.2 -================== - - * deps: setprototypeof@1.1.1 - -2018-09-08 / 1.7.1 -================== - - * Fix error creating objects in some environments - -2018-07-30 / 1.7.0 -================== - - * Set constructor name when possible - * Use `toidentifier` module to make class names - * deps: statuses@'>= 1.5.0 < 2' - -2018-03-29 / 1.6.3 -================== - - * deps: depd@~1.1.2 - - perf: remove argument reassignment - * deps: setprototypeof@1.1.0 - * deps: statuses@'>= 1.4.0 < 2' - -2017-08-04 / 1.6.2 -================== - - * deps: depd@1.1.1 - - Remove unnecessary `Buffer` loading - -2017-02-20 / 1.6.1 -================== - - * deps: setprototypeof@1.0.3 - - Fix shim for old browsers - -2017-02-14 / 1.6.0 -================== - - * Accept custom 4xx and 5xx status codes in factory - * Add deprecation message to `"I'mateapot"` export - * Deprecate passing status code as anything except first argument in factory - * Deprecate using non-error status codes - * Make `message` property enumerable for `HttpError`s - -2016-11-16 / 1.5.1 -================== - - * deps: inherits@2.0.3 - - Fix issue loading in browser - * deps: setprototypeof@1.0.2 - * deps: statuses@'>= 1.3.1 < 2' - -2016-05-18 / 1.5.0 -================== - - * Support new code `421 Misdirected Request` - * Use `setprototypeof` module to replace `__proto__` setting - * deps: statuses@'>= 1.3.0 < 2' - - Add `421 Misdirected Request` - - perf: enable strict mode - * perf: enable strict mode - -2016-01-28 / 1.4.0 -================== - - * Add `HttpError` export, for `err instanceof createError.HttpError` - * deps: inherits@2.0.1 - * deps: statuses@'>= 1.2.1 < 2' - - Fix message for status 451 - - Remove incorrect nginx status code - -2015-02-02 / 1.3.1 -================== - - * Fix regression where status can be overwritten in `createError` `props` - -2015-02-01 / 1.3.0 -================== - - * Construct errors using defined constructors from `createError` - * Fix error names that are not identifiers - - `createError["I'mateapot"]` is now `createError.ImATeapot` - * Set a meaningful `name` property on constructed errors - -2014-12-09 / 1.2.8 -================== - - * Fix stack trace from exported function - * Remove `arguments.callee` usage - -2014-10-14 / 1.2.7 -================== - - * Remove duplicate line - -2014-10-02 / 1.2.6 -================== - - * Fix `expose` to be `true` for `ClientError` constructor - -2014-09-28 / 1.2.5 -================== - - * deps: statuses@1 - -2014-09-21 / 1.2.4 -================== - - * Fix dependency version to work with old `npm`s - -2014-09-21 / 1.2.3 -================== - - * deps: statuses@~1.1.0 - -2014-09-21 / 1.2.2 -================== - - * Fix publish error - -2014-09-21 / 1.2.1 -================== - - * Support Node.js 0.6 - * Use `inherits` instead of `util` - -2014-09-09 / 1.2.0 -================== - - * Fix the way inheriting functions - * Support `expose` being provided in properties argument - -2014-09-08 / 1.1.0 -================== - - * Default status to 500 - * Support provided `error` to extend - -2014-09-08 / 1.0.1 -================== - - * Fix accepting string message - -2014-09-08 / 1.0.0 -================== - - * Initial release diff --git a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/README.md b/src/hello/backend/node_modules/serve-static/node_modules/http-errors/README.md deleted file mode 100644 index a8b7330b..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# http-errors - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][node-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create HTTP errors for Express, Koa, Connect, etc. with ease. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```console -$ npm install http-errors -``` - -## Example - -```js -var createError = require('http-errors') -var express = require('express') -var app = express() - -app.use(function (req, res, next) { - if (!req.user) return next(createError(401, 'Please login to view this page.')) - next() -}) -``` - -## API - -This is the current API, currently extracted from Koa and subject to change. - -### Error Properties - -- `expose` - can be used to signal if `message` should be sent to the client, - defaulting to `false` when `status` >= 500 -- `headers` - can be an object of header names to values to be sent to the - client, defaulting to `undefined`. When defined, the key names should all - be lower-cased -- `message` - the traditional error message, which should be kept short and all - single line -- `status` - the status code of the error, mirroring `statusCode` for general - compatibility -- `statusCode` - the status code of the error, defaulting to `500` - -### createError([status], [message], [properties]) - -Create a new error object with the given message `msg`. -The error object inherits from `createError.HttpError`. - -```js -var err = createError(404, 'This video does not exist!') -``` - -- `status: 500` - the status code as a number -- `message` - the message of the error, defaulting to node's text for that status code. -- `properties` - custom properties to attach to the object - -### createError([status], [error], [properties]) - -Extend the given `error` object with `createError.HttpError` -properties. This will not alter the inheritance of the given -`error` object, and the modified `error` object is the -return value. - - - -```js -fs.readFile('foo.txt', function (err, buf) { - if (err) { - if (err.code === 'ENOENT') { - var httpError = createError(404, err, { expose: false }) - } else { - var httpError = createError(500, err) - } - } -}) -``` - -- `status` - the status code as a number -- `error` - the error object to extend -- `properties` - custom properties to attach to the object - -### createError.isHttpError(val) - -Determine if the provided `val` is an `HttpError`. This will return `true` -if the error inherits from the `HttpError` constructor of this module or -matches the "duck type" for an error this module creates. All outputs from -the `createError` factory will return `true` for this function, including -if an non-`HttpError` was passed into the factory. - -### new createError\[code || name\](\[msg]\)) - -Create a new error object with the given message `msg`. -The error object inherits from `createError.HttpError`. - -```js -var err = new createError.NotFound() -``` - -- `code` - the status code as a number -- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. - -#### List of all constructors - -|Status Code|Constructor Name | -|-----------|-----------------------------| -|400 |BadRequest | -|401 |Unauthorized | -|402 |PaymentRequired | -|403 |Forbidden | -|404 |NotFound | -|405 |MethodNotAllowed | -|406 |NotAcceptable | -|407 |ProxyAuthenticationRequired | -|408 |RequestTimeout | -|409 |Conflict | -|410 |Gone | -|411 |LengthRequired | -|412 |PreconditionFailed | -|413 |PayloadTooLarge | -|414 |URITooLong | -|415 |UnsupportedMediaType | -|416 |RangeNotSatisfiable | -|417 |ExpectationFailed | -|418 |ImATeapot | -|421 |MisdirectedRequest | -|422 |UnprocessableEntity | -|423 |Locked | -|424 |FailedDependency | -|425 |TooEarly | -|426 |UpgradeRequired | -|428 |PreconditionRequired | -|429 |TooManyRequests | -|431 |RequestHeaderFieldsTooLarge | -|451 |UnavailableForLegalReasons | -|500 |InternalServerError | -|501 |NotImplemented | -|502 |BadGateway | -|503 |ServiceUnavailable | -|504 |GatewayTimeout | -|505 |HTTPVersionNotSupported | -|506 |VariantAlsoNegotiates | -|507 |InsufficientStorage | -|508 |LoopDetected | -|509 |BandwidthLimitExceeded | -|510 |NotExtended | -|511 |NetworkAuthenticationRequired| - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/http-errors/master?label=ci -[ci-url]: https://github.com/jshttp/http-errors/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/http-errors/master -[coveralls-url]: https://coveralls.io/r/jshttp/http-errors?branch=master -[node-image]: https://badgen.net/npm/node/http-errors -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/http-errors -[npm-url]: https://npmjs.org/package/http-errors -[npm-version-image]: https://badgen.net/npm/v/http-errors -[travis-image]: https://badgen.net/travis/jshttp/http-errors/master -[travis-url]: https://travis-ci.org/jshttp/http-errors diff --git a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/index.js b/src/hello/backend/node_modules/serve-static/node_modules/http-errors/index.js deleted file mode 100644 index c425f1ee..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/index.js +++ /dev/null @@ -1,289 +0,0 @@ -/*! - * http-errors - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var deprecate = require('depd')('http-errors') -var setPrototypeOf = require('setprototypeof') -var statuses = require('statuses') -var inherits = require('inherits') -var toIdentifier = require('toidentifier') - -/** - * Module exports. - * @public - */ - -module.exports = createError -module.exports.HttpError = createHttpErrorConstructor() -module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError) - -// Populate exports for all constructors -populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) - -/** - * Get the code class of a status code. - * @private - */ - -function codeClass (status) { - return Number(String(status).charAt(0) + '00') -} - -/** - * Create a new HTTP Error. - * - * @returns {Error} - * @public - */ - -function createError () { - // so much arity going on ~_~ - var err - var msg - var status = 500 - var props = {} - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i] - var type = typeof arg - if (type === 'object' && arg instanceof Error) { - err = arg - status = err.status || err.statusCode || status - } else if (type === 'number' && i === 0) { - status = arg - } else if (type === 'string') { - msg = arg - } else if (type === 'object') { - props = arg - } else { - throw new TypeError('argument #' + (i + 1) + ' unsupported type ' + type) - } - } - - if (typeof status === 'number' && (status < 400 || status >= 600)) { - deprecate('non-error status code; use only 4xx or 5xx status codes') - } - - if (typeof status !== 'number' || - (!statuses.message[status] && (status < 400 || status >= 600))) { - status = 500 - } - - // constructor - var HttpError = createError[status] || createError[codeClass(status)] - - if (!err) { - // create error - err = HttpError - ? new HttpError(msg) - : new Error(msg || statuses.message[status]) - Error.captureStackTrace(err, createError) - } - - if (!HttpError || !(err instanceof HttpError) || err.status !== status) { - // add properties to generic error - err.expose = status < 500 - err.status = err.statusCode = status - } - - for (var key in props) { - if (key !== 'status' && key !== 'statusCode') { - err[key] = props[key] - } - } - - return err -} - -/** - * Create HTTP error abstract base class. - * @private - */ - -function createHttpErrorConstructor () { - function HttpError () { - throw new TypeError('cannot construct abstract class') - } - - inherits(HttpError, Error) - - return HttpError -} - -/** - * Create a constructor for a client error. - * @private - */ - -function createClientErrorConstructor (HttpError, name, code) { - var className = toClassName(name) - - function ClientError (message) { - // create the error object - var msg = message != null ? message : statuses.message[code] - var err = new Error(msg) - - // capture a stack trace to the construction point - Error.captureStackTrace(err, ClientError) - - // adjust the [[Prototype]] - setPrototypeOf(err, ClientError.prototype) - - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) - - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true - }) - - return err - } - - inherits(ClientError, HttpError) - nameFunc(ClientError, className) - - ClientError.prototype.status = code - ClientError.prototype.statusCode = code - ClientError.prototype.expose = true - - return ClientError -} - -/** - * Create function to test is a value is a HttpError. - * @private - */ - -function createIsHttpErrorFunction (HttpError) { - return function isHttpError (val) { - if (!val || typeof val !== 'object') { - return false - } - - if (val instanceof HttpError) { - return true - } - - return val instanceof Error && - typeof val.expose === 'boolean' && - typeof val.statusCode === 'number' && val.status === val.statusCode - } -} - -/** - * Create a constructor for a server error. - * @private - */ - -function createServerErrorConstructor (HttpError, name, code) { - var className = toClassName(name) - - function ServerError (message) { - // create the error object - var msg = message != null ? message : statuses.message[code] - var err = new Error(msg) - - // capture a stack trace to the construction point - Error.captureStackTrace(err, ServerError) - - // adjust the [[Prototype]] - setPrototypeOf(err, ServerError.prototype) - - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) - - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true - }) - - return err - } - - inherits(ServerError, HttpError) - nameFunc(ServerError, className) - - ServerError.prototype.status = code - ServerError.prototype.statusCode = code - ServerError.prototype.expose = false - - return ServerError -} - -/** - * Set the name of a function, if possible. - * @private - */ - -function nameFunc (func, name) { - var desc = Object.getOwnPropertyDescriptor(func, 'name') - - if (desc && desc.configurable) { - desc.value = name - Object.defineProperty(func, 'name', desc) - } -} - -/** - * Populate the exports object with constructors for every error class. - * @private - */ - -function populateConstructorExports (exports, codes, HttpError) { - codes.forEach(function forEachCode (code) { - var CodeError - var name = toIdentifier(statuses.message[code]) - - switch (codeClass(code)) { - case 400: - CodeError = createClientErrorConstructor(HttpError, name, code) - break - case 500: - CodeError = createServerErrorConstructor(HttpError, name, code) - break - } - - if (CodeError) { - // export the constructor - exports[code] = CodeError - exports[name] = CodeError - } - }) -} - -/** - * Get a class name from a name identifier. - * @private - */ - -function toClassName (name) { - return name.substr(-5) !== 'Error' - ? name + 'Error' - : name -} diff --git a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/package.json b/src/hello/backend/node_modules/serve-static/node_modules/http-errors/package.json deleted file mode 100644 index 4cb6d7ed..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/http-errors/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "http-errors", - "description": "Create HTTP error objects", - "version": "2.0.0", - "author": "Jonathan Ong (http://jongleberry.com)", - "contributors": [ - "Alan Plum ", - "Douglas Christopher Wilson " - ], - "license": "MIT", - "repository": "jshttp/http-errors", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.3", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.1.3", - "nyc": "15.1.0" - }, - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint . && node ./scripts/lint-readme-list.js", - "test": "mocha --reporter spec --bail", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - }, - "keywords": [ - "http", - "error" - ], - "files": [ - "index.js", - "HISTORY.md", - "LICENSE", - "README.md" - ] -} diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/HISTORY.md b/src/hello/backend/node_modules/serve-static/node_modules/send/HISTORY.md deleted file mode 100644 index 0dd29d0f..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/HISTORY.md +++ /dev/null @@ -1,526 +0,0 @@ -0.19.0 / 2024-09-10 -=================== - -* Remove link renderization in html while redirecting - -0.18.0 / 2022-03-23 -=================== - - * Fix emitted 416 error missing headers property - * Limit the headers removed for 304 response - * deps: depd@2.0.0 - - Replace internal `eval` usage with `Function` constructor - - Use instance methods on `process` to check for listeners - * deps: destroy@1.2.0 - * deps: http-errors@2.0.0 - - deps: depd@2.0.0 - - deps: statuses@2.0.1 - * deps: on-finished@2.4.1 - * deps: statuses@2.0.1 - -0.17.2 / 2021-12-11 -=================== - - * pref: ignore empty http tokens - * deps: http-errors@1.8.1 - - deps: inherits@2.0.4 - - deps: toidentifier@1.0.1 - - deps: setprototypeof@1.2.0 - * deps: ms@2.1.3 - -0.17.1 / 2019-05-10 -=================== - - * Set stricter CSP header in redirect & error responses - * deps: range-parser@~1.2.1 - -0.17.0 / 2019-05-03 -=================== - - * deps: http-errors@~1.7.2 - - Set constructor name when possible - - Use `toidentifier` module to make class names - - deps: depd@~1.1.2 - - deps: setprototypeof@1.1.1 - - deps: statuses@'>= 1.5.0 < 2' - * deps: mime@1.6.0 - - Add extensions for JPEG-2000 images - - Add new `font/*` types from IANA - - Add WASM mapping - - Update `.bdoc` to `application/bdoc` - - Update `.bmp` to `image/bmp` - - Update `.m4a` to `audio/mp4` - - Update `.rtf` to `application/rtf` - - Update `.wav` to `audio/wav` - - Update `.xml` to `application/xml` - - Update generic extensions to `application/octet-stream`: - `.deb`, `.dll`, `.dmg`, `.exe`, `.iso`, `.msi` - - Use mime-score module to resolve extension conflicts - * deps: ms@2.1.1 - - Add `week`/`w` support - - Fix negative number handling - * deps: statuses@~1.5.0 - * perf: remove redundant `path.normalize` call - -0.16.2 / 2018-02-07 -=================== - - * Fix incorrect end tag in default error & redirects - * deps: depd@~1.1.2 - - perf: remove argument reassignment - * deps: encodeurl@~1.0.2 - - Fix encoding `%` as last character - * deps: statuses@~1.4.0 - -0.16.1 / 2017-09-29 -=================== - - * Fix regression in edge-case behavior for empty `path` - -0.16.0 / 2017-09-27 -=================== - - * Add `immutable` option - * Fix missing `` in default error & redirects - * Use instance methods on steam to check for listeners - * deps: mime@1.4.1 - - Add 70 new types for file extensions - - Set charset as "UTF-8" for .js and .json - * perf: improve path validation speed - -0.15.6 / 2017-09-22 -=================== - - * deps: debug@2.6.9 - * perf: improve `If-Match` token parsing - -0.15.5 / 2017-09-20 -=================== - - * deps: etag@~1.8.1 - - perf: replace regular expression with substring - * deps: fresh@0.5.2 - - Fix handling of modified headers with invalid dates - - perf: improve ETag match loop - - perf: improve `If-None-Match` token parsing - -0.15.4 / 2017-08-05 -=================== - - * deps: debug@2.6.8 - * deps: depd@~1.1.1 - - Remove unnecessary `Buffer` loading - * deps: http-errors@~1.6.2 - - deps: depd@1.1.1 - -0.15.3 / 2017-05-16 -=================== - - * deps: debug@2.6.7 - - deps: ms@2.0.0 - * deps: ms@2.0.0 - -0.15.2 / 2017-04-26 -=================== - - * deps: debug@2.6.4 - - Fix `DEBUG_MAX_ARRAY_LENGTH` - - deps: ms@0.7.3 - * deps: ms@1.0.0 - -0.15.1 / 2017-03-04 -=================== - - * Fix issue when `Date.parse` does not return `NaN` on invalid date - * Fix strict violation in broken environments - -0.15.0 / 2017-02-25 -=================== - - * Support `If-Match` and `If-Unmodified-Since` headers - * Add `res` and `path` arguments to `directory` event - * Remove usage of `res._headers` private field - - Improves compatibility with Node.js 8 nightly - * Send complete HTML document in redirect & error responses - * Set default CSP header in redirect & error responses - * Use `res.getHeaderNames()` when available - * Use `res.headersSent` when available - * deps: debug@2.6.1 - - Allow colors in workers - - Deprecated `DEBUG_FD` environment variable set to `3` or higher - - Fix error when running under React Native - - Use same color for same namespace - - deps: ms@0.7.2 - * deps: etag@~1.8.0 - * deps: fresh@0.5.0 - - Fix false detection of `no-cache` request directive - - Fix incorrect result when `If-None-Match` has both `*` and ETags - - Fix weak `ETag` matching to match spec - - perf: delay reading header values until needed - - perf: enable strict mode - - perf: hoist regular expressions - - perf: remove duplicate conditional - - perf: remove unnecessary boolean coercions - - perf: skip checking modified time if ETag check failed - - perf: skip parsing `If-None-Match` when no `ETag` header - - perf: use `Date.parse` instead of `new Date` - * deps: http-errors@~1.6.1 - - Make `message` property enumerable for `HttpError`s - - deps: setprototypeof@1.0.3 - -0.14.2 / 2017-01-23 -=================== - - * deps: http-errors@~1.5.1 - - deps: inherits@2.0.3 - - deps: setprototypeof@1.0.2 - - deps: statuses@'>= 1.3.1 < 2' - * deps: ms@0.7.2 - * deps: statuses@~1.3.1 - -0.14.1 / 2016-06-09 -=================== - - * Fix redirect error when `path` contains raw non-URL characters - * Fix redirect when `path` starts with multiple forward slashes - -0.14.0 / 2016-06-06 -=================== - - * Add `acceptRanges` option - * Add `cacheControl` option - * Attempt to combine multiple ranges into single range - * Correctly inherit from `Stream` class - * Fix `Content-Range` header in 416 responses when using `start`/`end` options - * Fix `Content-Range` header missing from default 416 responses - * Ignore non-byte `Range` headers - * deps: http-errors@~1.5.0 - - Add `HttpError` export, for `err instanceof createError.HttpError` - - Support new code `421 Misdirected Request` - - Use `setprototypeof` module to replace `__proto__` setting - - deps: inherits@2.0.1 - - deps: statuses@'>= 1.3.0 < 2' - - perf: enable strict mode - * deps: range-parser@~1.2.0 - - Fix incorrectly returning -1 when there is at least one valid range - - perf: remove internal function - * deps: statuses@~1.3.0 - - Add `421 Misdirected Request` - - perf: enable strict mode - * perf: remove argument reassignment - -0.13.2 / 2016-03-05 -=================== - - * Fix invalid `Content-Type` header when `send.mime.default_type` unset - -0.13.1 / 2016-01-16 -=================== - - * deps: depd@~1.1.0 - - Support web browser loading - - perf: enable strict mode - * deps: destroy@~1.0.4 - - perf: enable strict mode - * deps: escape-html@~1.0.3 - - perf: enable strict mode - - perf: optimize string replacement - - perf: use faster string coercion - * deps: range-parser@~1.0.3 - - perf: enable strict mode - -0.13.0 / 2015-06-16 -=================== - - * Allow Node.js HTTP server to set `Date` response header - * Fix incorrectly removing `Content-Location` on 304 response - * Improve the default redirect response headers - * Send appropriate headers on default error response - * Use `http-errors` for standard emitted errors - * Use `statuses` instead of `http` module for status messages - * deps: escape-html@1.0.2 - * deps: etag@~1.7.0 - - Improve stat performance by removing hashing - * deps: fresh@0.3.0 - - Add weak `ETag` matching support - * deps: on-finished@~2.3.0 - - Add defined behavior for HTTP `CONNECT` requests - - Add defined behavior for HTTP `Upgrade` requests - - deps: ee-first@1.1.1 - * perf: enable strict mode - * perf: remove unnecessary array allocations - -0.12.3 / 2015-05-13 -=================== - - * deps: debug@~2.2.0 - - deps: ms@0.7.1 - * deps: depd@~1.0.1 - * deps: etag@~1.6.0 - - Improve support for JXcore - - Support "fake" stats objects in environments without `fs` - * deps: ms@0.7.1 - - Prevent extraordinarily long inputs - * deps: on-finished@~2.2.1 - -0.12.2 / 2015-03-13 -=================== - - * Throw errors early for invalid `extensions` or `index` options - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - -0.12.1 / 2015-02-17 -=================== - - * Fix regression sending zero-length files - -0.12.0 / 2015-02-16 -=================== - - * Always read the stat size from the file - * Fix mutating passed-in `options` - * deps: mime@1.3.4 - -0.11.1 / 2015-01-20 -=================== - - * Fix `root` path disclosure - -0.11.0 / 2015-01-05 -=================== - - * deps: debug@~2.1.1 - * deps: etag@~1.5.1 - - deps: crc@3.2.1 - * deps: ms@0.7.0 - - Add `milliseconds` - - Add `msecs` - - Add `secs` - - Add `mins` - - Add `hrs` - - Add `yrs` - * deps: on-finished@~2.2.0 - -0.10.1 / 2014-10-22 -=================== - - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - -0.10.0 / 2014-10-15 -=================== - - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - * deps: depd@~1.0.0 - * deps: etag@~1.5.0 - - Improve string performance - - Slightly improve speed for weak ETags over 1KB - -0.9.3 / 2014-09-24 -================== - - * deps: etag@~1.4.0 - - Support "fake" stats objects - -0.9.2 / 2014-09-15 -================== - - * deps: depd@0.4.5 - * deps: etag@~1.3.1 - * deps: range-parser@~1.0.2 - -0.9.1 / 2014-09-07 -================== - - * deps: fresh@0.2.4 - -0.9.0 / 2014-09-07 -================== - - * Add `lastModified` option - * Use `etag` to generate `ETag` header - * deps: debug@~2.0.0 - -0.8.5 / 2014-09-04 -================== - - * Fix malicious path detection for empty string path - -0.8.4 / 2014-09-04 -================== - - * Fix a path traversal issue when using `root` - -0.8.3 / 2014-08-16 -================== - - * deps: destroy@1.0.3 - - renamed from dethroy - * deps: on-finished@2.1.0 - -0.8.2 / 2014-08-14 -================== - - * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - * deps: dethroy@1.0.2 - -0.8.1 / 2014-08-05 -================== - - * Fix `extensions` behavior when file already has extension - -0.8.0 / 2014-08-05 -================== - - * Add `extensions` option - -0.7.4 / 2014-08-04 -================== - - * Fix serving index files without root dir - -0.7.3 / 2014-07-29 -================== - - * Fix incorrect 403 on Windows and Node.js 0.11 - -0.7.2 / 2014-07-27 -================== - - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - -0.7.1 / 2014-07-26 -================== - - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - -0.7.0 / 2014-07-20 -================== - - * Deprecate `hidden` option; use `dotfiles` option - * Add `dotfiles` option - * deps: debug@1.0.4 - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - -0.6.0 / 2014-07-11 -================== - - * Deprecate `from` option; use `root` option - * Deprecate `send.etag()` -- use `etag` in `options` - * Deprecate `send.hidden()` -- use `hidden` in `options` - * Deprecate `send.index()` -- use `index` in `options` - * Deprecate `send.maxage()` -- use `maxAge` in `options` - * Deprecate `send.root()` -- use `root` in `options` - * Cap `maxAge` value to 1 year - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - -0.5.0 / 2014-06-28 -================== - - * Accept string for `maxAge` (converted by `ms`) - * Add `headers` event - * Include link in default redirect response - * Use `EventEmitter.listenerCount` to count listeners - -0.4.3 / 2014-06-11 -================== - - * Do not throw un-catchable error on file open race condition - * Use `escape-html` for HTML escaping - * deps: debug@1.0.2 - - fix some debugging output colors on node.js 0.8 - * deps: finished@1.2.2 - * deps: fresh@0.2.2 - -0.4.2 / 2014-06-09 -================== - - * fix "event emitter leak" warnings - * deps: debug@1.0.1 - * deps: finished@1.2.1 - -0.4.1 / 2014-06-02 -================== - - * Send `max-age` in `Cache-Control` in correct format - -0.4.0 / 2014-05-27 -================== - - * Calculate ETag with md5 for reduced collisions - * Fix wrong behavior when index file matches directory - * Ignore stream errors after request ends - - Goodbye `EBADF, read` - * Skip directories in index file search - * deps: debug@0.8.1 - -0.3.0 / 2014-04-24 -================== - - * Fix sending files with dots without root set - * Coerce option types - * Accept API options in options object - * Set etags to "weak" - * Include file path in etag - * Make "Can't set headers after they are sent." catchable - * Send full entity-body for multi range requests - * Default directory access to 403 when index disabled - * Support multiple index paths - * Support "If-Range" header - * Control whether to generate etags - * deps: mime@1.2.11 - -0.2.0 / 2014-01-29 -================== - - * update range-parser and fresh - -0.1.4 / 2013-08-11 -================== - - * update fresh - -0.1.3 / 2013-07-08 -================== - - * Revert "Fix fd leak" - -0.1.2 / 2013-07-03 -================== - - * Fix fd leak - -0.1.0 / 2012-08-25 -================== - - * add options parameter to send() that is passed to fs.createReadStream() [kanongil] - -0.0.4 / 2012-08-16 -================== - - * allow custom "Accept-Ranges" definition - -0.0.3 / 2012-07-16 -================== - - * fix normalization of the root directory. Closes #3 - -0.0.2 / 2012-07-09 -================== - - * add passing of req explicitly for now (YUCK) - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/README.md b/src/hello/backend/node_modules/serve-static/node_modules/send/README.md deleted file mode 100644 index fadf8383..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/README.md +++ /dev/null @@ -1,327 +0,0 @@ -# send - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Linux Build][github-actions-ci-image]][github-actions-ci-url] -[![Windows Build][appveyor-image]][appveyor-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Send is a library for streaming files from the file system as a http response -supporting partial responses (Ranges), conditional-GET negotiation (If-Match, -If-Unmodified-Since, If-None-Match, If-Modified-Since), high test coverage, -and granular events which may be leveraged to take appropriate actions in your -application or framework. - -Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static). - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```bash -$ npm install send -``` - -## API - -```js -var send = require('send') -``` - -### send(req, path, [options]) - -Create a new `SendStream` for the given path to send to a `res`. The `req` is -the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded, -not the actual file-system path). - -#### Options - -##### acceptRanges - -Enable or disable accepting ranged requests, defaults to true. -Disabling this will not send `Accept-Ranges` and ignore the contents -of the `Range` request header. - -##### cacheControl - -Enable or disable setting `Cache-Control` response header, defaults to -true. Disabling this will ignore the `immutable` and `maxAge` options. - -##### dotfiles - -Set how "dotfiles" are treated when encountered. A dotfile is a file -or directory that begins with a dot ("."). Note this check is done on -the path itself without checking if the path actually exists on the -disk. If `root` is specified, only the dotfiles above the root are -checked (i.e. the root itself can be within a dotfile when when set -to "deny"). - - - `'allow'` No special treatment for dotfiles. - - `'deny'` Send a 403 for any request for a dotfile. - - `'ignore'` Pretend like the dotfile does not exist and 404. - -The default value is _similar_ to `'ignore'`, with the exception that -this default will not ignore the files within a directory that begins -with a dot, for backward-compatibility. - -##### end - -Byte offset at which the stream ends, defaults to the length of the file -minus 1. The end is inclusive in the stream, meaning `end: 3` will include -the 4th byte in the stream. - -##### etag - -Enable or disable etag generation, defaults to true. - -##### extensions - -If a given file doesn't exist, try appending one of the given extensions, -in the given order. By default, this is disabled (set to `false`). An -example value that will serve extension-less HTML files: `['html', 'htm']`. -This is skipped if the requested file already has an extension. - -##### immutable - -Enable or disable the `immutable` directive in the `Cache-Control` response -header, defaults to `false`. If set to `true`, the `maxAge` option should -also be specified to enable caching. The `immutable` directive will prevent -supported clients from making conditional requests during the life of the -`maxAge` option to check if the file has changed. - -##### index - -By default send supports "index.html" files, to disable this -set `false` or to supply a new index pass a string or an array -in preferred order. - -##### lastModified - -Enable or disable `Last-Modified` header, defaults to true. Uses the file -system's last modified value. - -##### maxAge - -Provide a max-age in milliseconds for http caching, defaults to 0. -This can also be a string accepted by the -[ms](https://www.npmjs.org/package/ms#readme) module. - -##### root - -Serve files relative to `path`. - -##### start - -Byte offset at which the stream starts, defaults to 0. The start is inclusive, -meaning `start: 2` will include the 3rd byte in the stream. - -#### Events - -The `SendStream` is an event emitter and will emit the following events: - - - `error` an error occurred `(err)` - - `directory` a directory was requested `(res, path)` - - `file` a file was requested `(path, stat)` - - `headers` the headers are about to be set on a file `(res, path, stat)` - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -#### .pipe - -The `pipe` method is used to pipe the response into the Node.js HTTP response -object, typically `send(req, path, options).pipe(res)`. - -### .mime - -The `mime` export is the global instance of of the -[`mime` npm module](https://www.npmjs.com/package/mime). - -This is used to configure the MIME types that are associated with file extensions -as well as other options for how to resolve the MIME type of a file (like the -default type to use for an unknown file extension). - -## Error-handling - -By default when no `error` listeners are present an automatic response will be -made, otherwise you have full control over the response, aka you may show a 5xx -page etc. - -## Caching - -It does _not_ perform internal caching, you should use a reverse proxy cache -such as Varnish for this, or those fancy things called CDNs. If your -application is small enough that it would benefit from single-node memory -caching, it's small enough that it does not need caching at all ;). - -## Debugging - -To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ npm test -``` - -## Examples - -### Serve a specific file - -This simple example will send a specific file to all requests. - -```js -var http = require('http') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - send(req, '/path/to/index.html') - .pipe(res) -}) - -server.listen(3000) -``` - -### Serve all files from a directory - -This simple example will just serve up all the files in a -given directory as the top-level. For example, a request -`GET /foo.txt` will send back `/www/public/foo.txt`. - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .pipe(res) -}) - -server.listen(3000) -``` - -### Custom file types - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -// Default unknown types to text/plain -send.mime.default_type = 'text/plain' - -// Add a custom type -send.mime.define({ - 'application/x-my-type': ['x-mt', 'x-mtt'] -}) - -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .pipe(res) -}) - -server.listen(3000) -``` - -### Custom directory index view - -This is a example of serving up a structure of directories with a -custom function to render a listing of a directory. - -```js -var http = require('http') -var fs = require('fs') -var parseUrl = require('parseurl') -var send = require('send') - -// Transfer arbitrary files from within /www/example.com/public/* -// with a custom handler for directory listing -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { index: false, root: '/www/public' }) - .once('directory', directory) - .pipe(res) -}) - -server.listen(3000) - -// Custom directory handler -function directory (res, path) { - var stream = this - - // redirect to trailing slash for consistent url - if (!stream.hasTrailingSlash()) { - return stream.redirect(path) - } - - // get directory list - fs.readdir(path, function onReaddir (err, list) { - if (err) return stream.error(err) - - // render an index for the directory - res.setHeader('Content-Type', 'text/plain; charset=UTF-8') - res.end(list.join('\n') + '\n') - }) -} -``` - -### Serving from a root directory with custom error-handling - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - // your custom error-handling logic: - function error (err) { - res.statusCode = err.status || 500 - res.end(err.message) - } - - // your custom headers - function headers (res, path, stat) { - // serve all files for download - res.setHeader('Content-Disposition', 'attachment') - } - - // your custom directory handling logic: - function redirect () { - res.statusCode = 301 - res.setHeader('Location', req.url + '/') - res.end('Redirecting to ' + req.url + '/') - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .on('error', error) - .on('directory', redirect) - .on('headers', headers) - .pipe(res) -}) - -server.listen(3000) -``` - -## License - -[MIT](LICENSE) - -[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/send/master?label=windows -[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send -[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/send/master -[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master -[github-actions-ci-image]: https://badgen.net/github/checks/pillarjs/send/master?label=linux -[github-actions-ci-url]: https://github.com/pillarjs/send/actions/workflows/ci.yml -[node-image]: https://badgen.net/npm/node/send -[node-url]: https://nodejs.org/en/download/ -[npm-downloads-image]: https://badgen.net/npm/dm/send -[npm-url]: https://npmjs.org/package/send -[npm-version-image]: https://badgen.net/npm/v/send diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/SECURITY.md b/src/hello/backend/node_modules/serve-static/node_modules/send/SECURITY.md deleted file mode 100644 index 46b48f7b..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/SECURITY.md +++ /dev/null @@ -1,24 +0,0 @@ -# Security Policies and Procedures - -## Reporting a Bug - -The `send` team and community take all security bugs seriously. Thank you -for improving the security of Express. We appreciate your efforts and -responsible disclosure and will make every effort to acknowledge your -contributions. - -Report security bugs by emailing the current owner(s) of `send`. This information -can be found in the npm registry using the command `npm owner ls send`. -If unsure or unable to get the information from the above, open an issue -in the [project issue tracker](https://github.com/pillarjs/send/issues) -asking for the current contact information. - -To ensure the timely response to your report, please ensure that the entirety -of the report is contained within the email body and not solely behind a web -link or an attachment. - -At least one owner will acknowledge your email within 48 hours, and will send a -more detailed response within 48 hours indicating the next steps in handling -your report. After the initial reply to your report, the owners will -endeavor to keep you informed of the progress towards a fix and full -announcement, and may ask for additional information or guidance. diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/index.js b/src/hello/backend/node_modules/serve-static/node_modules/send/index.js deleted file mode 100644 index 768f8ca6..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/index.js +++ /dev/null @@ -1,1142 +0,0 @@ -/*! - * send - * Copyright(c) 2012 TJ Holowaychuk - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var createError = require('http-errors') -var debug = require('debug')('send') -var deprecate = require('depd')('send') -var destroy = require('destroy') -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var etag = require('etag') -var fresh = require('fresh') -var fs = require('fs') -var mime = require('mime') -var ms = require('ms') -var onFinished = require('on-finished') -var parseRange = require('range-parser') -var path = require('path') -var statuses = require('statuses') -var Stream = require('stream') -var util = require('util') - -/** - * Path function references. - * @private - */ - -var extname = path.extname -var join = path.join -var normalize = path.normalize -var resolve = path.resolve -var sep = path.sep - -/** - * Regular expression for identifying a bytes Range header. - * @private - */ - -var BYTES_RANGE_REGEXP = /^ *bytes=/ - -/** - * Maximum value allowed for the max age. - * @private - */ - -var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year - -/** - * Regular expression to match a path with a directory up component. - * @private - */ - -var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/ - -/** - * Module exports. - * @public - */ - -module.exports = send -module.exports.mime = mime - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {object} req - * @param {string} path - * @param {object} [options] - * @return {SendStream} - * @public - */ - -function send (req, path, options) { - return new SendStream(req, path, options) -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * @param {Request} req - * @param {String} path - * @param {object} [options] - * @private - */ - -function SendStream (req, path, options) { - Stream.call(this) - - var opts = options || {} - - this.options = opts - this.path = path - this.req = req - - this._acceptRanges = opts.acceptRanges !== undefined - ? Boolean(opts.acceptRanges) - : true - - this._cacheControl = opts.cacheControl !== undefined - ? Boolean(opts.cacheControl) - : true - - this._etag = opts.etag !== undefined - ? Boolean(opts.etag) - : true - - this._dotfiles = opts.dotfiles !== undefined - ? opts.dotfiles - : 'ignore' - - if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') { - throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') - } - - this._hidden = Boolean(opts.hidden) - - if (opts.hidden !== undefined) { - deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead') - } - - // legacy support - if (opts.dotfiles === undefined) { - this._dotfiles = undefined - } - - this._extensions = opts.extensions !== undefined - ? normalizeList(opts.extensions, 'extensions option') - : [] - - this._immutable = opts.immutable !== undefined - ? Boolean(opts.immutable) - : false - - this._index = opts.index !== undefined - ? normalizeList(opts.index, 'index option') - : ['index.html'] - - this._lastModified = opts.lastModified !== undefined - ? Boolean(opts.lastModified) - : true - - this._maxage = opts.maxAge || opts.maxage - this._maxage = typeof this._maxage === 'string' - ? ms(this._maxage) - : Number(this._maxage) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - - this._root = opts.root - ? resolve(opts.root) - : null - - if (!this._root && opts.from) { - this.from(opts.from) - } -} - -/** - * Inherits from `Stream`. - */ - -util.inherits(SendStream, Stream) - -/** - * Enable or disable etag generation. - * - * @param {Boolean} val - * @return {SendStream} - * @api public - */ - -SendStream.prototype.etag = deprecate.function(function etag (val) { - this._etag = Boolean(val) - debug('etag %s', this._etag) - return this -}, 'send.etag: pass etag as option') - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = deprecate.function(function hidden (val) { - this._hidden = Boolean(val) - this._dotfiles = undefined - debug('hidden %s', this._hidden) - return this -}, 'send.hidden: use dotfiles option') - -/** - * Set index `paths`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean|Array} paths - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = deprecate.function(function index (paths) { - var index = !paths ? [] : normalizeList(paths, 'paths argument') - debug('index %o', paths) - this._index = index - return this -}, 'send.index: pass index as option') - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = function root (path) { - this._root = resolve(String(path)) - debug('root %s', this._root) - return this -} - -SendStream.prototype.from = deprecate.function(SendStream.prototype.root, - 'send.from: pass root as option') - -SendStream.prototype.root = deprecate.function(SendStream.prototype.root, - 'send.root: pass root as option') - -/** - * Set max-age to `maxAge`. - * - * @param {Number} maxAge - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = deprecate.function(function maxage (maxAge) { - this._maxage = typeof maxAge === 'string' - ? ms(maxAge) - : Number(maxAge) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - debug('max-age %d', this._maxage) - return this -}, 'send.maxage: pass maxAge as option') - -/** - * Emit error with `status`. - * - * @param {number} status - * @param {Error} [err] - * @private - */ - -SendStream.prototype.error = function error (status, err) { - // emit if listeners instead of responding - if (hasListeners(this, 'error')) { - return this.emit('error', createHttpError(status, err)) - } - - var res = this.res - var msg = statuses.message[status] || String(status) - var doc = createHtmlDocument('Error', escapeHtml(msg)) - - // clear existing headers - clearHeaders(res) - - // add error headers - if (err && err.headers) { - setHeaders(res, err.headers) - } - - // send basic response - res.statusCode = status - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.end(doc) -} - -/** - * Check if the pathname ends with "/". - * - * @return {boolean} - * @private - */ - -SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () { - return this.path[this.path.length - 1] === '/' -} - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function isConditionalGET () { - return this.req.headers['if-match'] || - this.req.headers['if-unmodified-since'] || - this.req.headers['if-none-match'] || - this.req.headers['if-modified-since'] -} - -/** - * Check if the request preconditions failed. - * - * @return {boolean} - * @private - */ - -SendStream.prototype.isPreconditionFailure = function isPreconditionFailure () { - var req = this.req - var res = this.res - - // if-match - var match = req.headers['if-match'] - if (match) { - var etag = res.getHeader('ETag') - return !etag || (match !== '*' && parseTokenList(match).every(function (match) { - return match !== etag && match !== 'W/' + etag && 'W/' + match !== etag - })) - } - - // if-unmodified-since - var unmodifiedSince = parseHttpDate(req.headers['if-unmodified-since']) - if (!isNaN(unmodifiedSince)) { - var lastModified = parseHttpDate(res.getHeader('Last-Modified')) - return isNaN(lastModified) || lastModified > unmodifiedSince - } - - return false -} - -/** - * Strip various content header fields for a change in entity. - * - * @private - */ - -SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () { - var res = this.res - - res.removeHeader('Content-Encoding') - res.removeHeader('Content-Language') - res.removeHeader('Content-Length') - res.removeHeader('Content-Range') - res.removeHeader('Content-Type') -} - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function notModified () { - var res = this.res - debug('not modified') - this.removeContentHeaderFields() - res.statusCode = 304 - res.end() -} - -/** - * Raise error that headers already sent. - * - * @api private - */ - -SendStream.prototype.headersAlreadySent = function headersAlreadySent () { - var err = new Error('Can\'t set headers after they are sent.') - debug('headers already sent') - this.error(500, err) -} - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function isCachable () { - var statusCode = this.res.statusCode - return (statusCode >= 200 && statusCode < 300) || - statusCode === 304 -} - -/** - * Handle stat() error. - * - * @param {Error} error - * @private - */ - -SendStream.prototype.onStatError = function onStatError (error) { - switch (error.code) { - case 'ENAMETOOLONG': - case 'ENOENT': - case 'ENOTDIR': - this.error(404, error) - break - default: - this.error(500, error) - break - } -} - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function isFresh () { - return fresh(this.req.headers, { - etag: this.res.getHeader('ETag'), - 'last-modified': this.res.getHeader('Last-Modified') - }) -} - -/** - * Check if the range is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isRangeFresh = function isRangeFresh () { - var ifRange = this.req.headers['if-range'] - - if (!ifRange) { - return true - } - - // if-range as etag - if (ifRange.indexOf('"') !== -1) { - var etag = this.res.getHeader('ETag') - return Boolean(etag && ifRange.indexOf(etag) !== -1) - } - - // if-range as modified date - var lastModified = this.res.getHeader('Last-Modified') - return parseHttpDate(lastModified) <= parseHttpDate(ifRange) -} - -/** - * Redirect to path. - * - * @param {string} path - * @private - */ - -SendStream.prototype.redirect = function redirect (path) { - var res = this.res - - if (hasListeners(this, 'directory')) { - this.emit('directory', res, path) - return - } - - if (this.hasTrailingSlash()) { - this.error(403) - return - } - - var loc = encodeUrl(collapseLeadingSlashes(this.path + '/')) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) - - // redirect - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.setHeader('Location', loc) - res.end(doc) -} - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function pipe (res) { - // root path - var root = this._root - - // references - this.res = res - - // decode the path - var path = decode(this.path) - if (path === -1) { - this.error(400) - return res - } - - // null byte(s) - if (~path.indexOf('\0')) { - this.error(400) - return res - } - - var parts - if (root !== null) { - // normalize - if (path) { - path = normalize('.' + sep + path) - } - - // malicious path - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = path.split(sep) - - // join / normalize from optional root dir - path = normalize(join(root, path)) - } else { - // ".." is malicious without "root" - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = normalize(path).split(sep) - - // resolve the path - path = resolve(path) - } - - // dotfile handling - if (containsDotFile(parts)) { - var access = this._dotfiles - - // legacy support - if (access === undefined) { - access = parts[parts.length - 1][0] === '.' - ? (this._hidden ? 'allow' : 'ignore') - : 'allow' - } - - debug('%s dotfile "%s"', access, path) - switch (access) { - case 'allow': - break - case 'deny': - this.error(403) - return res - case 'ignore': - default: - this.error(404) - return res - } - } - - // index file support - if (this._index.length && this.hasTrailingSlash()) { - this.sendIndex(path) - return res - } - - this.sendFile(path) - return res -} - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function send (path, stat) { - var len = stat.size - var options = this.options - var opts = {} - var res = this.res - var req = this.req - var ranges = req.headers.range - var offset = options.start || 0 - - if (headersSent(res)) { - // impossible to send now - this.headersAlreadySent() - return - } - - debug('pipe "%s"', path) - - // set header fields - this.setHeader(path, stat) - - // set content-type - this.type(path) - - // conditional GET support - if (this.isConditionalGET()) { - if (this.isPreconditionFailure()) { - this.error(412) - return - } - - if (this.isCachable() && this.isFresh()) { - this.notModified() - return - } - } - - // adjust len to start/end options - len = Math.max(0, len - offset) - if (options.end !== undefined) { - var bytes = options.end - offset + 1 - if (len > bytes) len = bytes - } - - // Range support - if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { - // parse - ranges = parseRange(len, ranges, { - combine: true - }) - - // If-Range support - if (!this.isRangeFresh()) { - debug('range stale') - ranges = -2 - } - - // unsatisfiable - if (ranges === -1) { - debug('range unsatisfiable') - - // Content-Range - res.setHeader('Content-Range', contentRange('bytes', len)) - - // 416 Requested Range Not Satisfiable - return this.error(416, { - headers: { 'Content-Range': res.getHeader('Content-Range') } - }) - } - - // valid (syntactically invalid/multiple ranges are treated as a regular response) - if (ranges !== -2 && ranges.length === 1) { - debug('range %j', ranges) - - // Content-Range - res.statusCode = 206 - res.setHeader('Content-Range', contentRange('bytes', len, ranges[0])) - - // adjust for requested range - offset += ranges[0].start - len = ranges[0].end - ranges[0].start + 1 - } - } - - // clone options - for (var prop in options) { - opts[prop] = options[prop] - } - - // set read options - opts.start = offset - opts.end = Math.max(offset, offset + len - 1) - - // content-length - res.setHeader('Content-Length', len) - - // HEAD support - if (req.method === 'HEAD') { - res.end() - return - } - - this.stream(path, opts) -} - -/** - * Transfer file for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendFile = function sendFile (path) { - var i = 0 - var self = this - - debug('stat "%s"', path) - fs.stat(path, function onstat (err, stat) { - if (err && err.code === 'ENOENT' && !extname(path) && path[path.length - 1] !== sep) { - // not found, check extensions - return next(err) - } - if (err) return self.onStatError(err) - if (stat.isDirectory()) return self.redirect(path) - self.emit('file', path, stat) - self.send(path, stat) - }) - - function next (err) { - if (self._extensions.length <= i) { - return err - ? self.onStatError(err) - : self.error(404) - } - - var p = path + '.' + self._extensions[i++] - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } -} - -/** - * Transfer index for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendIndex = function sendIndex (path) { - var i = -1 - var self = this - - function next (err) { - if (++i >= self._index.length) { - if (err) return self.onStatError(err) - return self.error(404) - } - - var p = join(path, self._index[i]) - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } - - next() -} - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function stream (path, options) { - var self = this - var res = this.res - - // pipe - var stream = fs.createReadStream(path, options) - this.emit('stream', stream) - stream.pipe(res) - - // cleanup - function cleanup () { - destroy(stream, true) - } - - // response finished, cleanup - onFinished(res, cleanup) - - // error handling - stream.on('error', function onerror (err) { - // clean up stream early - cleanup() - - // error - self.onStatError(err) - }) - - // end - stream.on('end', function onend () { - self.emit('end') - }) -} - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function type (path) { - var res = this.res - - if (res.getHeader('Content-Type')) return - - var type = mime.lookup(path) - - if (!type) { - debug('no content-type') - return - } - - var charset = mime.charsets.lookup(type) - - debug('content-type %s', type) - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')) -} - -/** - * Set response header fields, most - * fields may be pre-defined. - * - * @param {String} path - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function setHeader (path, stat) { - var res = this.res - - this.emit('headers', res, path, stat) - - if (this._acceptRanges && !res.getHeader('Accept-Ranges')) { - debug('accept ranges') - res.setHeader('Accept-Ranges', 'bytes') - } - - if (this._cacheControl && !res.getHeader('Cache-Control')) { - var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000) - - if (this._immutable) { - cacheControl += ', immutable' - } - - debug('cache-control %s', cacheControl) - res.setHeader('Cache-Control', cacheControl) - } - - if (this._lastModified && !res.getHeader('Last-Modified')) { - var modified = stat.mtime.toUTCString() - debug('modified %s', modified) - res.setHeader('Last-Modified', modified) - } - - if (this._etag && !res.getHeader('ETag')) { - var val = etag(stat) - debug('etag %s', val) - res.setHeader('ETag', val) - } -} - -/** - * Clear all headers from a response. - * - * @param {object} res - * @private - */ - -function clearHeaders (res) { - var headers = getHeaderNames(res) - - for (var i = 0; i < headers.length; i++) { - res.removeHeader(headers[i]) - } -} - -/** - * Collapse all leading slashes into a single slash - * - * @param {string} str - * @private - */ -function collapseLeadingSlashes (str) { - for (var i = 0; i < str.length; i++) { - if (str[i] !== '/') { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} - -/** - * Determine if path parts contain a dotfile. - * - * @api private - */ - -function containsDotFile (parts) { - for (var i = 0; i < parts.length; i++) { - var part = parts[i] - if (part.length > 1 && part[0] === '.') { - return true - } - } - - return false -} - -/** - * Create a Content-Range header. - * - * @param {string} type - * @param {number} size - * @param {array} [range] - */ - -function contentRange (type, size, range) { - return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size -} - -/** - * Create a minimal HTML document. - * - * @param {string} title - * @param {string} body - * @private - */ - -function createHtmlDocument (title, body) { - return '\n' + - '\n' + - '\n' + - '\n' + - '' + title + '\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Create a HttpError object from simple arguments. - * - * @param {number} status - * @param {Error|object} err - * @private - */ - -function createHttpError (status, err) { - if (!err) { - return createError(status) - } - - return err instanceof Error - ? createError(status, err, { expose: false }) - : createError(status, err) -} - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -function decode (path) { - try { - return decodeURIComponent(path) - } catch (err) { - return -1 - } -} - -/** - * Get the header names on a respnse. - * - * @param {object} res - * @returns {array[string]} - * @private - */ - -function getHeaderNames (res) { - return typeof res.getHeaderNames !== 'function' - ? Object.keys(res._headers || {}) - : res.getHeaderNames() -} - -/** - * Determine if emitter has listeners of a given type. - * - * The way to do this check is done three different ways in Node.js >= 0.8 - * so this consolidates them into a minimal set using instance methods. - * - * @param {EventEmitter} emitter - * @param {string} type - * @returns {boolean} - * @private - */ - -function hasListeners (emitter, type) { - var count = typeof emitter.listenerCount !== 'function' - ? emitter.listeners(type).length - : emitter.listenerCount(type) - - return count > 0 -} - -/** - * Determine if the response headers have been sent. - * - * @param {object} res - * @returns {boolean} - * @private - */ - -function headersSent (res) { - return typeof res.headersSent !== 'boolean' - ? Boolean(res._header) - : res.headersSent -} - -/** - * Normalize the index option into an array. - * - * @param {boolean|string|array} val - * @param {string} name - * @private - */ - -function normalizeList (val, name) { - var list = [].concat(val || []) - - for (var i = 0; i < list.length; i++) { - if (typeof list[i] !== 'string') { - throw new TypeError(name + ' must be array of strings or false') - } - } - - return list -} - -/** - * Parse an HTTP Date into a number. - * - * @param {string} date - * @private - */ - -function parseHttpDate (date) { - var timestamp = date && Date.parse(date) - - return typeof timestamp === 'number' - ? timestamp - : NaN -} - -/** - * Parse a HTTP token list. - * - * @param {string} str - * @private - */ - -function parseTokenList (str) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = str.length; i < len; i++) { - switch (str.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 - } - break - case 0x2c: /* , */ - if (start !== end) { - list.push(str.substring(start, end)) - } - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - if (start !== end) { - list.push(str.substring(start, end)) - } - - return list -} - -/** - * Set an object of headers on a response. - * - * @param {object} res - * @param {object} headers - * @private - */ - -function setHeaders (res, headers) { - var keys = Object.keys(headers) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - res.setHeader(key, headers[key]) - } -} diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/.bin/mime b/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/.bin/mime deleted file mode 100644 index 289675d2..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/.bin/mime +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../../../mime/cli.js" "$@" - ret=$? -else - node "$basedir/../../../../../mime/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/.bin/mime.cmd b/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/.bin/mime.cmd deleted file mode 100644 index cfadf42b..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/.bin/mime.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\..\..\mime\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\..\..\mime\cli.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/HISTORY.md b/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/HISTORY.md deleted file mode 100644 index 41313b2b..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/HISTORY.md +++ /dev/null @@ -1,14 +0,0 @@ -1.0.2 / 2018-01-21 -================== - - * Fix encoding `%` as last character - -1.0.1 / 2016-06-09 -================== - - * Fix encoding unpaired surrogates at start/end of string - -1.0.0 / 2016-06-08 -================== - - * Initial release diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/README.md b/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/README.md deleted file mode 100644 index 127c5a0d..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# encodeurl - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Encode a URL to a percent-encoded form, excluding already-encoded sequences - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install encodeurl -``` - -## API - -```js -var encodeUrl = require('encodeurl') -``` - -### encodeUrl(url) - -Encode a URL to a percent-encoded form, excluding already-encoded sequences. - -This function will take an already-encoded URL and encode all the non-URL -code points (as UTF-8 byte sequences). This function will not encode the -"%" character unless it is not part of a valid sequence (`%20` will be -left as-is, but `%foo` will be encoded as `%25foo`). - -This encode is meant to be "safe" and does not throw errors. It will try as -hard as it can to properly encode the given URL, including replacing any raw, -unpaired surrogate pairs with the Unicode replacement character prior to -encoding. - -This function is _similar_ to the intrinsic function `encodeURI`, except it -will not encode the `%` character if that is part of a valid sequence, will -not encode `[` and `]` (for IPv6 hostnames) and will replace raw, unpaired -surrogate pairs with the Unicode replacement character (instead of throwing). - -## Examples - -### Encode a URL containing user-controled data - -```js -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') - -http.createServer(function onRequest (req, res) { - // get encoded form of inbound url - var url = encodeUrl(req.url) - - // create html message - var body = '

Location ' + escapeHtml(url) + ' not found

' - - // send a 404 - res.statusCode = 404 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) - res.end(body, 'utf-8') -}) -``` - -### Encode a URL for use in a header field - -```js -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var url = require('url') - -http.createServer(function onRequest (req, res) { - // parse inbound url - var href = url.parse(req) - - // set new host for redirect - href.host = 'localhost' - href.protocol = 'https:' - href.slashes = true - - // create location header - var location = encodeUrl(url.format(href)) - - // create html message - var body = '

Redirecting to new site: ' + escapeHtml(location) + '

' - - // send a 301 - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) - res.setHeader('Location', location) - res.end(body, 'utf-8') -}) -``` - -## Testing - -```sh -$ npm test -$ npm run lint -``` - -## References - -- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986] -- [WHATWG URL Living Standard][whatwg-url] - -[rfc-3986]: https://tools.ietf.org/html/rfc3986 -[whatwg-url]: https://url.spec.whatwg.org/ - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/encodeurl.svg -[npm-url]: https://npmjs.org/package/encodeurl -[node-version-image]: https://img.shields.io/node/v/encodeurl.svg -[node-version-url]: https://nodejs.org/en/download -[travis-image]: https://img.shields.io/travis/pillarjs/encodeurl.svg -[travis-url]: https://travis-ci.org/pillarjs/encodeurl -[coveralls-image]: https://img.shields.io/coveralls/pillarjs/encodeurl.svg -[coveralls-url]: https://coveralls.io/r/pillarjs/encodeurl?branch=master -[downloads-image]: https://img.shields.io/npm/dm/encodeurl.svg -[downloads-url]: https://npmjs.org/package/encodeurl diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/index.js b/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/index.js deleted file mode 100644 index fc4906c6..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * encodeurl - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = encodeUrl - -/** - * RegExp to match non-URL code points, *after* encoding (i.e. not including "%") - * and including invalid escape sequences. - * @private - */ - -var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g - -/** - * RegExp to match unmatched surrogate pair. - * @private - */ - -var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g - -/** - * String to replace unmatched surrogate pair with. - * @private - */ - -var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' - -/** - * Encode a URL to a percent-encoded form, excluding already-encoded sequences. - * - * This function will take an already-encoded URL and encode all the non-URL - * code points. This function will not encode the "%" character unless it is - * not part of a valid sequence (`%20` will be left as-is, but `%foo` will - * be encoded as `%25foo`). - * - * This encode is meant to be "safe" and does not throw errors. It will try as - * hard as it can to properly encode the given URL, including replacing any raw, - * unpaired surrogate pairs with the Unicode replacement character prior to - * encoding. - * - * @param {string} url - * @return {string} - * @public - */ - -function encodeUrl (url) { - return String(url) - .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) - .replace(ENCODE_CHARS_REGEXP, encodeURI) -} diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/package.json b/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/package.json deleted file mode 100644 index b9f25ef1..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "encodeurl", - "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences", - "version": "1.0.2", - "contributors": [ - "Douglas Christopher Wilson " - ], - "license": "MIT", - "keywords": [ - "encode", - "encodeurl", - "url" - ], - "repository": "pillarjs/encodeurl", - "devDependencies": { - "eslint": "3.19.0", - "eslint-config-standard": "10.2.1", - "eslint-plugin-import": "2.8.0", - "eslint-plugin-node": "5.2.1", - "eslint-plugin-promise": "3.6.0", - "eslint-plugin-standard": "3.0.1", - "istanbul": "0.4.5", - "mocha": "2.5.3" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/package.json b/src/hello/backend/node_modules/serve-static/node_modules/send/package.json deleted file mode 100644 index a3233e00..00000000 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "send", - "description": "Better streaming static file server with Range and conditional-GET support", - "version": "0.19.0", - "author": "TJ Holowaychuk ", - "contributors": [ - "Douglas Christopher Wilson ", - "James Wyatt Cready ", - "Jesús Leganés Combarro " - ], - "license": "MIT", - "repository": "pillarjs/send", - "keywords": [ - "static", - "file", - "server" - ], - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "devDependencies": { - "after": "0.8.2", - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.2", - "nyc": "15.1.0", - "supertest": "6.2.2" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "SECURITY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --check-leaks --reporter spec --bail", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/src/hello/backend/node_modules/simple-update-notifier/node_modules/.bin/semver b/src/hello/backend/node_modules/simple-update-notifier/node_modules/.bin/semver deleted file mode 100644 index 62e29689..00000000 --- a/src/hello/backend/node_modules/simple-update-notifier/node_modules/.bin/semver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../semver/bin/semver.js" "$@" - ret=$? -else - node "$basedir/../../../semver/bin/semver.js" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/simple-update-notifier/node_modules/.bin/semver.cmd b/src/hello/backend/node_modules/simple-update-notifier/node_modules/.bin/semver.cmd deleted file mode 100644 index 4b34fbaa..00000000 --- a/src/hello/backend/node_modules/simple-update-notifier/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\semver\bin\semver.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\semver\bin\semver.js" %* -) \ No newline at end of file diff --git a/src/hello/backend/node_modules/statuses/HISTORY.md b/src/hello/backend/node_modules/statuses/HISTORY.md deleted file mode 100644 index fa4556ef..00000000 --- a/src/hello/backend/node_modules/statuses/HISTORY.md +++ /dev/null @@ -1,82 +0,0 @@ -2.0.1 / 2021-01-03 -================== - - * Fix returning values from `Object.prototype` - -2.0.0 / 2020-04-19 -================== - - * Drop support for Node.js 0.6 - * Fix messaging casing of `418 I'm a Teapot` - * Remove code 306 - * Remove `status[code]` exports; use `status.message[code]` - * Remove `status[msg]` exports; use `status.code[msg]` - * Rename `425 Unordered Collection` to standard `425 Too Early` - * Rename `STATUS_CODES` export to `message` - * Return status message for `statuses(code)` when given code - -1.5.0 / 2018-03-27 -================== - - * Add `103 Early Hints` - -1.4.0 / 2017-10-20 -================== - - * Add `STATUS_CODES` export - -1.3.1 / 2016-11-11 -================== - - * Fix return type in JSDoc - -1.3.0 / 2016-05-17 -================== - - * Add `421 Misdirected Request` - * perf: enable strict mode - -1.2.1 / 2015-02-01 -================== - - * Fix message for status 451 - - `451 Unavailable For Legal Reasons` - -1.2.0 / 2014-09-28 -================== - - * Add `208 Already Repored` - * Add `226 IM Used` - * Add `306 (Unused)` - * Add `415 Unable For Legal Reasons` - * Add `508 Loop Detected` - -1.1.1 / 2014-09-24 -================== - - * Add missing 308 to `codes.json` - -1.1.0 / 2014-09-21 -================== - - * Add `codes.json` for universal support - -1.0.4 / 2014-08-20 -================== - - * Package cleanup - -1.0.3 / 2014-06-08 -================== - - * Add 308 to `.redirect` category - -1.0.2 / 2014-03-13 -================== - - * Add `.retry` category - -1.0.1 / 2014-03-12 -================== - - * Initial release diff --git a/src/hello/backend/node_modules/statuses/LICENSE b/src/hello/backend/node_modules/statuses/LICENSE deleted file mode 100644 index 28a31618..00000000 --- a/src/hello/backend/node_modules/statuses/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2016 Douglas Christopher Wilson - -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/src/hello/backend/node_modules/statuses/README.md b/src/hello/backend/node_modules/statuses/README.md deleted file mode 100644 index 57967e6e..00000000 --- a/src/hello/backend/node_modules/statuses/README.md +++ /dev/null @@ -1,136 +0,0 @@ -# statuses - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -HTTP status utility for node. - -This module provides a list of status codes and messages sourced from -a few different projects: - - * The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) - * The [Node.js project](https://nodejs.org/) - * The [NGINX project](https://www.nginx.com/) - * The [Apache HTTP Server project](https://httpd.apache.org/) - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install statuses -``` - -## API - - - -```js -var status = require('statuses') -``` - -### status(code) - -Returns the status message string for a known HTTP status code. The code -may be a number or a string. An error is thrown for an unknown status code. - - - -```js -status(403) // => 'Forbidden' -status('403') // => 'Forbidden' -status(306) // throws -``` - -### status(msg) - -Returns the numeric status code for a known HTTP status message. The message -is case-insensitive. An error is thrown for an unknown status message. - - - -```js -status('forbidden') // => 403 -status('Forbidden') // => 403 -status('foo') // throws -``` - -### status.codes - -Returns an array of all the status codes as `Integer`s. - -### status.code[msg] - -Returns the numeric status code for a known status message (in lower-case), -otherwise `undefined`. - - - -```js -status['not found'] // => 404 -``` - -### status.empty[code] - -Returns `true` if a status code expects an empty body. - - - -```js -status.empty[200] // => undefined -status.empty[204] // => true -status.empty[304] // => true -``` - -### status.message[code] - -Returns the string message for a known numeric status code, otherwise -`undefined`. This object is the same format as the -[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes). - - - -```js -status.message[404] // => 'Not Found' -``` - -### status.redirect[code] - -Returns `true` if a status code is a valid redirect status. - - - -```js -status.redirect[200] // => undefined -status.redirect[301] // => true -``` - -### status.retry[code] - -Returns `true` if you should retry the rest. - - - -```js -status.retry[501] // => undefined -status.retry[503] // => true -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci -[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master -[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master -[node-version-image]: https://badgen.net/npm/node/statuses -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/statuses -[npm-url]: https://npmjs.org/package/statuses -[npm-version-image]: https://badgen.net/npm/v/statuses diff --git a/src/hello/backend/node_modules/statuses/codes.json b/src/hello/backend/node_modules/statuses/codes.json deleted file mode 100644 index 1333ed10..00000000 --- a/src/hello/backend/node_modules/statuses/codes.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "100": "Continue", - "101": "Switching Protocols", - "102": "Processing", - "103": "Early Hints", - "200": "OK", - "201": "Created", - "202": "Accepted", - "203": "Non-Authoritative Information", - "204": "No Content", - "205": "Reset Content", - "206": "Partial Content", - "207": "Multi-Status", - "208": "Already Reported", - "226": "IM Used", - "300": "Multiple Choices", - "301": "Moved Permanently", - "302": "Found", - "303": "See Other", - "304": "Not Modified", - "305": "Use Proxy", - "307": "Temporary Redirect", - "308": "Permanent Redirect", - "400": "Bad Request", - "401": "Unauthorized", - "402": "Payment Required", - "403": "Forbidden", - "404": "Not Found", - "405": "Method Not Allowed", - "406": "Not Acceptable", - "407": "Proxy Authentication Required", - "408": "Request Timeout", - "409": "Conflict", - "410": "Gone", - "411": "Length Required", - "412": "Precondition Failed", - "413": "Payload Too Large", - "414": "URI Too Long", - "415": "Unsupported Media Type", - "416": "Range Not Satisfiable", - "417": "Expectation Failed", - "418": "I'm a Teapot", - "421": "Misdirected Request", - "422": "Unprocessable Entity", - "423": "Locked", - "424": "Failed Dependency", - "425": "Too Early", - "426": "Upgrade Required", - "428": "Precondition Required", - "429": "Too Many Requests", - "431": "Request Header Fields Too Large", - "451": "Unavailable For Legal Reasons", - "500": "Internal Server Error", - "501": "Not Implemented", - "502": "Bad Gateway", - "503": "Service Unavailable", - "504": "Gateway Timeout", - "505": "HTTP Version Not Supported", - "506": "Variant Also Negotiates", - "507": "Insufficient Storage", - "508": "Loop Detected", - "509": "Bandwidth Limit Exceeded", - "510": "Not Extended", - "511": "Network Authentication Required" -} diff --git a/src/hello/backend/node_modules/statuses/index.js b/src/hello/backend/node_modules/statuses/index.js deleted file mode 100644 index ea351c55..00000000 --- a/src/hello/backend/node_modules/statuses/index.js +++ /dev/null @@ -1,146 +0,0 @@ -/*! - * statuses - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var codes = require('./codes.json') - -/** - * Module exports. - * @public - */ - -module.exports = status - -// status code to message map -status.message = codes - -// status message (lower-case) to code map -status.code = createMessageToStatusCodeMap(codes) - -// array of status codes -status.codes = createStatusCodeList(codes) - -// status codes for redirects -status.redirect = { - 300: true, - 301: true, - 302: true, - 303: true, - 305: true, - 307: true, - 308: true -} - -// status codes for empty bodies -status.empty = { - 204: true, - 205: true, - 304: true -} - -// status codes for when you should retry the request -status.retry = { - 502: true, - 503: true, - 504: true -} - -/** - * Create a map of message to status code. - * @private - */ - -function createMessageToStatusCodeMap (codes) { - var map = {} - - Object.keys(codes).forEach(function forEachCode (code) { - var message = codes[code] - var status = Number(code) - - // populate map - map[message.toLowerCase()] = status - }) - - return map -} - -/** - * Create a list of all status codes. - * @private - */ - -function createStatusCodeList (codes) { - return Object.keys(codes).map(function mapCode (code) { - return Number(code) - }) -} - -/** - * Get the status code for given message. - * @private - */ - -function getStatusCode (message) { - var msg = message.toLowerCase() - - if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { - throw new Error('invalid status message: "' + message + '"') - } - - return status.code[msg] -} - -/** - * Get the status message for given code. - * @private - */ - -function getStatusMessage (code) { - if (!Object.prototype.hasOwnProperty.call(status.message, code)) { - throw new Error('invalid status code: ' + code) - } - - return status.message[code] -} - -/** - * Get the status code. - * - * Given a number, this will throw if it is not a known status - * code, otherwise the code will be returned. Given a string, - * the string will be parsed for a number and return the code - * if valid, otherwise will lookup the code assuming this is - * the status message. - * - * @param {string|number} code - * @returns {number} - * @public - */ - -function status (code) { - if (typeof code === 'number') { - return getStatusMessage(code) - } - - if (typeof code !== 'string') { - throw new TypeError('code must be a number or string') - } - - // '403' - var n = parseInt(code, 10) - if (!isNaN(n)) { - return getStatusMessage(n) - } - - return getStatusCode(code) -} diff --git a/src/hello/backend/node_modules/statuses/package.json b/src/hello/backend/node_modules/statuses/package.json deleted file mode 100644 index 8c3e719b..00000000 --- a/src/hello/backend/node_modules/statuses/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "statuses", - "description": "HTTP status utility", - "version": "2.0.1", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "repository": "jshttp/statuses", - "license": "MIT", - "keywords": [ - "http", - "status", - "code" - ], - "files": [ - "HISTORY.md", - "index.js", - "codes.json", - "LICENSE" - ], - "devDependencies": { - "csv-parse": "4.14.2", - "eslint": "7.17.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-markdown": "1.0.2", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.2.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.2.1", - "nyc": "15.1.0", - "raw-body": "2.4.1", - "stream-to-array": "2.3.0" - }, - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "build": "node scripts/build.js", - "fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/src/hello/backend/node_modules/xlsx/node_modules/.bin/crc32 b/src/hello/backend/node_modules/xlsx/node_modules/.bin/crc32 deleted file mode 100644 index 4b2bc431..00000000 --- a/src/hello/backend/node_modules/xlsx/node_modules/.bin/crc32 +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../../../crc-32/bin/crc32.njs" "$@" - ret=$? -else - node "$basedir/../../../crc-32/bin/crc32.njs" "$@" - ret=$? -fi -exit $ret diff --git a/src/hello/backend/node_modules/xlsx/node_modules/.bin/crc32.cmd b/src/hello/backend/node_modules/xlsx/node_modules/.bin/crc32.cmd deleted file mode 100644 index 9b51c67c..00000000 --- a/src/hello/backend/node_modules/xlsx/node_modules/.bin/crc32.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\..\..\crc-32\bin\crc32.njs" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\..\..\crc-32\bin\crc32.njs" %* -) \ No newline at end of file diff --git a/src/hello/backend/routes/compile.js b/src/hello/backend/routes/compile.js deleted file mode 100644 index c2362674..00000000 --- a/src/hello/backend/routes/compile.js +++ /dev/null @@ -1,316 +0,0 @@ -// routes/compile.js -const express = require('express'); -const router = express.Router(); -const dbModule = require('../db'); -const db = dbModule.promisePool; -const { authenticateToken } = require('../middleware/auth'); -const fs = require('fs'); -const path = require('path'); -const { exec } = require('child_process'); -const util = require('util'); -const execPromise = util.promisify(exec); - -// 获取PDF URL接口 这里构建的URL跟generation_path保持部分一致 -router.get('/:history_id/pdf-url', authenticateToken, async (req, res) => { - try { - const { history_id } = req.params; - const user_id = req.user.user_id; - - // 查询历史记录 - const query = ` - SELECT generation_path - FROM generation_history - WHERE history_id = ? AND user_id = ? - `; - - const [records] = await db.query(query, [history_id, user_id]); - - if (records.length === 0) { - return res.status(404).json({ - success: false, - message: '历史记录不存在' - }); - } - - const record = records[0]; - - if (!record.generation_path) { - return res.status(404).json({ - success: false, - message: '该记录尚未生成PDF' - }); - } - - // 构建完整的PDF URL - const pdfUrl = `/storage/generated_charts/user${user_id}/hist${history_id}.pdf`; - - res.json({ - success: true, - data: { - pdf_url: pdfUrl, - exists: fs.existsSync(path.join(__dirname, '..', '..', record.generation_path)) - } - }); - - } catch (error) { - console.error('获取PDF URL失败:', error); - res.status(500).json({ - success: false, - message: error.message - }); - } -}); - -// LaTeX编译接口 - 只保留核心功能 -router.post('/:history_id', authenticateToken, async (req, res) => { - let tempDir = null; - - try { - const { history_id } = req.params; - const user_id = req.user.user_id; - - // 验证history_id - if (!history_id || isNaN(parseInt(history_id))) { - return res.status(400).json({ - success: false, - message: '无效的历史记录ID' - }); - } - - // 查询历史记录 - const query = ` - SELECT - h.history_id, - h.user_id, - h.generation_code, - h.generation_path - FROM generation_history h - WHERE h.history_id = ? AND h.user_id = ? - `; - - const [records] = await db.query(query, [history_id, user_id]); - - if (records.length === 0) { - return res.status(404).json({ - success: false, - message: '历史记录不存在或无权访问' - }); - } - - const historyRecord = records[0]; - - // 检查是否有图表代码 - if (!historyRecord.generation_code || historyRecord.generation_code.trim() === '') { - return res.status(400).json({ - success: false, - message: '该历史记录没有可编译的图表代码' - }); - } - - // 创建用户存储目录 - const userStorageDir = path.join(__dirname, '..', 'storage', 'generated_charts', `user${user_id}`); - const finalDir = path.join(userStorageDir); - - // 确保目录存在 - if (!fs.existsSync(userStorageDir)) { - fs.mkdirSync(userStorageDir, { recursive: true }); - } - - if (!fs.existsSync(finalDir)) { - fs.mkdirSync(finalDir, { recursive: true }); - } - - // 创建临时工作目录 - tempDir = path.join(userStorageDir, `temp_${Date.now()}`); - if (!fs.existsSync(tempDir)) { - fs.mkdirSync(tempDir, { recursive: true }); - } - - // 预处理LaTeX代码 - 提取图表内容 - const processedLatexCode = preprocessLatexCode(historyRecord.generation_code); - - // 创建支持中文的LaTeX文档 - const latexDocument = createChineseLatexDocument(processedLatexCode); - const texFileName = `hist${history_id}.tex`; // 修改为hist前缀 - const texFilePath = path.join(tempDir, texFileName); - - // 写入tex文件 - fs.writeFileSync(texFilePath, latexDocument, 'utf8'); - - // 使用XeLaTeX编译(支持中文) - const compileResult = await compileLatexWithXeLaTeX(texFilePath, tempDir); - - // 检查是否生成了PDF - const tempPdfPath = path.join(tempDir, `hist${history_id}.pdf`); // 修改为hist前缀 - const pdfExists = fs.existsSync(tempPdfPath); - - // 在编译错误处理部分修改 - if (!pdfExists) { - await safeCleanup(tempDir); - return res.status(500).json({ - success: false, - message: compileResult.stdout + compileResult.stderr - }); - } - - // 将PDF文件移动到最终位置 - const finalPdfPath = path.join(finalDir, `hist${history_id}.pdf`); // 修改为hist前缀 - - if (fs.existsSync(finalPdfPath)) { - fs.unlinkSync(finalPdfPath); - } - - fs.renameSync(tempPdfPath, finalPdfPath); - - // 清理临时目录 - await safeCleanup(tempDir); - - // 更新数据库中的生成路径 - const updateQuery = ` - UPDATE generation_history - SET generation_path = ? - WHERE history_id = ? AND user_id = ? - `; - - const relativePath = path.relative(path.join(__dirname, '..', '..'), finalPdfPath); - await db.query(updateQuery, [relativePath, history_id, user_id]); - - // 返回成功响应 - res.json({ - success: true, - message: '编译成功', - data: { - history_id: parseInt(history_id), - pdf_path: relativePath, - pdf_url: `/storage/generated_charts/user${user_id}/hist${history_id}.pdf`, // 添加访问URL - file_size: fs.statSync(finalPdfPath).size - } - }); - - } catch (error) { - // 在catch错误处理部分修改 - if (tempDir && fs.existsSync(tempDir)) { - await safeCleanup(tempDir); - } - - console.error('编译错误:', error); - res.status(500).json({ - success: false, - message: error.message - }); - } -}); - -// 预处理LaTeX代码 - 提取图表内容 -function preprocessLatexCode(originalCode) { - try { - // 如果代码包含完整的文档结构,提取begin{document}和end{document}之间的内容 - if (originalCode.includes('\\begin{document}') && originalCode.includes('\\end{document}')) { - const start = originalCode.indexOf('\\begin{document}') + '\\begin{document}'.length; - const end = originalCode.indexOf('\\end{document}'); - const content = originalCode.substring(start, end).trim(); - - // 清理可能的多余文档结构 - let cleanedContent = content - .replace(/\\documentclass\{.*?\}/g, '') - .replace(/\\usepackage.*?\{.*?\}/g, '') - .replace(/\\begin\{document\}/g, '') - .replace(/\\end\{document\}/g, '') - .trim(); - - if (cleanedContent) { - return cleanedContent; - } - } - - return originalCode; - } catch (error) { - return originalCode; - } -} - -// 创建支持中文的LaTeX文档 -function createChineseLatexDocument(chartCode) { - return `\\documentclass[border=5pt]{standalone} -\\usepackage{pgfplots} -\\pgfplotsset{compat=1.18} -\\usepackage{amsmath} -\\usepackage{amssymb} -\\usepackage{xcolor} - -% 支持中文 -\\usepackage{fontspec} -\\usepackage{xeCJK} -\\setCJKmainfont{SimSun} -\\setmainfont{Times New Roman} - -\\begin{document} - -${chartCode} - -\\end{document}`; -} - -// 使用XeLaTeX编译(支持中文) -async function compileLatexWithXeLaTeX(texFilePath, outputDir) { - try { - const fileName = path.basename(texFilePath, '.tex'); - const dirName = path.dirname(texFilePath); - - const command = `cd "${dirName}" && xelatex -interaction=nonstopmode -output-directory="${outputDir}" "${texFilePath}"`; - - const { stdout, stderr } = await execPromise(command, { - timeout: 30000 - }); - - const pdfPath = path.join(outputDir, `${fileName}.pdf`); - const success = fs.existsSync(pdfPath); - - return { - success: success, - stdout: stdout, - stderr: stderr - }; - - } catch (error) { - const fileName = path.basename(texFilePath, '.tex'); - const pdfPath = path.join(outputDir, `${fileName}.pdf`); - const pdfExists = fs.existsSync(pdfPath); - - return { - success: pdfExists, - stdout: error.stdout || '', - stderr: error.stderr || '' - }; - } -} - -// 安全清理函数 -async function safeCleanup(dirPath) { - try { - if (!fs.existsSync(dirPath)) return; - - const files = fs.readdirSync(dirPath); - - for (const file of files) { - const filePath = path.join(dirPath, file); - if (fs.statSync(filePath).isFile()) { - try { - fs.unlinkSync(filePath); - } catch (error) { - // 忽略删除错误 - } - } - } - - try { - fs.rmdirSync(dirPath); - } catch (error) { - // 忽略目录删除错误 - } - } catch (error) { - // 忽略清理错误 - } -} - -module.exports = router; \ No newline at end of file diff --git a/src/hello/backend/storage/generated_charts/user1/hist1.pdf b/src/hello/backend/storage/generated_charts/user1/hist1.pdf deleted file mode 100644 index a75afaf4..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist1.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist11.pdf b/src/hello/backend/storage/generated_charts/user1/hist11.pdf deleted file mode 100644 index 0baf645f..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist11.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist15.pdf b/src/hello/backend/storage/generated_charts/user1/hist15.pdf deleted file mode 100644 index 306c96a3..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist15.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist2.pdf b/src/hello/backend/storage/generated_charts/user1/hist2.pdf deleted file mode 100644 index 22554ea1..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist2.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist3.pdf b/src/hello/backend/storage/generated_charts/user1/hist3.pdf deleted file mode 100644 index 11cd9b43..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist3.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist4.pdf b/src/hello/backend/storage/generated_charts/user1/hist4.pdf deleted file mode 100644 index 8b7b5e65..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist4.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist5.pdf b/src/hello/backend/storage/generated_charts/user1/hist5.pdf deleted file mode 100644 index fc7bf7c5..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist5.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist6.pdf b/src/hello/backend/storage/generated_charts/user1/hist6.pdf deleted file mode 100644 index 34ea490a..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist6.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist7.pdf b/src/hello/backend/storage/generated_charts/user1/hist7.pdf deleted file mode 100644 index 92fa16a2..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist7.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist8.pdf b/src/hello/backend/storage/generated_charts/user1/hist8.pdf deleted file mode 100644 index 7c2842a1..00000000 Binary files a/src/hello/backend/storage/generated_charts/user1/hist8.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user2/hist22.pdf b/src/hello/backend/storage/generated_charts/user2/hist22.pdf deleted file mode 100644 index 43beab8b..00000000 Binary files a/src/hello/backend/storage/generated_charts/user2/hist22.pdf and /dev/null differ diff --git a/src/hello/backend/storage/generated_charts/user2/hist25.pdf b/src/hello/backend/storage/generated_charts/user2/hist25.pdf deleted file mode 100644 index d8705995..00000000 Binary files a/src/hello/backend/storage/generated_charts/user2/hist25.pdf and /dev/null differ diff --git a/src/hello/backend/storage/history/1/1.json b/src/hello/backend/storage/history/1/1.json deleted file mode 100644 index f9da45d2..00000000 --- a/src/hello/backend/storage/history/1/1.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "history_id": 1, - "user_id": 1, - "data_id": 1, - "file_name": "1.txt", - "dataset_name": "1", - "user_input": "折线图", - "ai_response": "根据您提供的数据集内容,我注意到这是一个关于Vue.js项目创建和运行的步骤说明,而不是典型的数值数据。不过,我可以为您创建一个展示项目创建流程的示意图或时间线图。\n\n由于没有具体的数值数据,我将创建一个展示Vue.js项目创建步骤的流程图式折线图:\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\\usetikzlibrary{arrows.meta, positioning}\n\n\\begin{document}\n\\begin{tikzpicture}[\n node distance=1.5cm,\n step/.style={rectangle, draw=blue!60, fill=blue!5, thick, minimum width=3cm, minimum height=1cm, align=center, rounded corners},\n arrow/.style={-Stealth, thick, blue!50}\n]\n\n% 定义步骤节点\n\\node[step] (step1) {1. 参考CSDN文章\\\\安装Node.js};\n\\node[step, below=of step1] (step2) {2. 创建Vue项目\\\\vue create xx};\n\\node[step, below=of step2] (step3) {3. 进入项目目录\\\\cd xx};\n\\node[step, below=of step3] (step4) {4. 运行开发服务器\\\\npm run serve};\n\\node[step, below=of step4] (step5) {5. 实时更新\\\\保存文件自动刷新};\n\n% 连接箭头\n\\draw[arrow] (step1) -- (step2);\n\\draw[arrow] (step2) -- (step3);\n\\draw[arrow] (step3) -- (step4);\n\\draw[arrow] (step4) -- (step5);\n\n% 添加标题\n\\node[above=0.5cm of step1, font=\\large\\bfseries] {Vue.js项目创建流程};\n\n\\end{tikzpicture}\n\\end{document}\n```\n\n如果您有具体的数值数据想要绘制折线图(比如项目创建时间、文件大小变化、性能指标等),请提供相应的数据格式,我可以为您生成标准的数值折线图。\n\n**使用说明:**\n1. 这是一个流程图,展示了Vue.js项目创建的5个主要步骤\n2. 每个步骤用蓝色方框表示,箭头表示流程方向\n3. 如果您有实际的数值数据,请提供类似以下格式的数据:\n ```\n x值, y值\n 1, 10\n 2, 15\n 3, 8\n 4, 20\n ```\n\n这样我就能为您生成真正的数值折线图了。", - "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\\usetikzlibrary{arrows.meta, positioning}\n\n\\begin{document}\n\\begin{tikzpicture}[\n node distance=1.5cm,\n step/.style={rectangle, draw=blue!60, fill=blue!5, thick, minimum width=3cm, minimum height=1cm, align=center, rounded corners},\n arrow/.style={-Stealth, thick, blue!50}\n]\n\n% 定义步骤节点\n\\node[step] (step1) {1. 参考CSDN文章\\\\安装Node.js};\n\\node[step, below=of step1] (step2) {2. 创建Vue项目\\\\vue create xx};\n\\node[step, below=of step2] (step3) {3. 进入项目目录\\\\cd xx};\n\\node[step, below=of step3] (step4) {4. 运行开发服务器\\\\npm run serve};\n\\node[step, below=of step4] (step5) {5. 实时更新\\\\保存文件自动刷新};\n\n% 连接箭头\n\\draw[arrow] (step1) -- (step2);\n\\draw[arrow] (step2) -- (step3);\n\\draw[arrow] (step3) -- (step4);\n\\draw[arrow] (step4) -- (step5);\n\n% 添加标题\n\\node[above=0.5cm of step1, font=\\large\\bfseries] {Vue.js项目创建流程};\n\n\\end{tikzpicture}\n\\end{document}", - "generation_description": "用户查询: 折线图", - "created_at": "2025-12-12T08:46:38.209Z", - "metadata": { - "data_ids": [ - 1 - ], - "has_chart_code": true, - "code_length": 936 - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/10.json b/src/hello/backend/storage/history/1/10.json deleted file mode 100644 index f0cd6e52..00000000 --- a/src/hello/backend/storage/history/1/10.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 10, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "生成折线图", - "ai_response": "由于您没有提供具体的数据集,我将为您生成一个通用的折线图LaTeX PGFPlots 代码模板。您可以根据需要修改数据、标签和样式。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{data.csv}\nMonth,Value1,Value2,Value3\nJan,10,15,12\nFeb,12,18,14\nMar,14,22,18\nApr,16,25,22\nMay,18,28,25\nJun,20,30,28\nJul,22,32,30\nAug,24,35,32\nSep,26,38,35\nOct,28,40,38\nNov,30,42,40\nDec,32,45,42\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图},\n xlabel={月份},\n ylabel={数值},\n xmin=0, xmax=13,\n ymin=0, ymax=50,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1,10) (2,12) (3,14) (4,16) (5,18) (6,20)\n (7,22) (8,24) (9,26) (10,28) (11,30) (12,32)\n };\n \\addlegendentry{系列1}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1,15) (2,18) (3,22) (4,25) (5,28) (6,30)\n (7,32) (8,35) (9,38) (10,40) (11,42) (12,45)\n };\n \\addlegendentry{系列2}\n\n% 第三条折线\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (1,12) (2,14) (3,18) (4,22) (5,25) (6,28)\n (7,30) (8,32) (9,35) (10,38) (11,40) (12,42)\n };\n \\addlegendentry{系列3}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{这是一个包含三条折线的示例图表,展示了不同系列随时间的变化趋势。}\n\\label{fig:linechart}\n\\end{figure}\n\n\\end{document}\n```\n\n如果您有具体的数据文件(如CSV、Excel等),请提供数据文件,我可以为您生成包含实际数据的定制化图表代码。您需要告诉我:\n\n1. 数据文件的内容或结构\n2. 想要展示哪些数据系列\n3. 图表的标题和坐标轴标签\n4. 任何特定的样式要求(颜色、标记样式等)", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{data.csv}\nMonth,Value1,Value2,Value3\nJan,10,15,12\nFeb,12,18,14\nMar,14,22,18\nApr,16,25,22\nMay,18,28,25\nJun,20,30,28\nJul,22,32,30\nAug,24,35,32\nSep,26,38,35\nOct,28,40,38\nNov,30,42,40\nDec,32,45,42\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图},\n xlabel={月份},\n ylabel={数值},\n xmin=0, xmax=13,\n ymin=0, ymax=50,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1,10) (2,12) (3,14) (4,16) (5,18) (6,20)\n (7,22) (8,24) (9,26) (10,28) (11,30) (12,32)\n };\n \\addlegendentry{系列1}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1,15) (2,18) (3,22) (4,25) (5,28) (6,30)\n (7,32) (8,35) (9,38) (10,40) (11,42) (12,45)\n };\n \\addlegendentry{系列2}\n\n% 第三条折线\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (1,12) (2,14) (3,18) (4,22) (5,25) (6,28)\n (7,30) (8,32) (9,35) (10,38) (11,40) (12,42)\n };\n \\addlegendentry{系列3}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{这是一个包含三条折线的示例图表,展示了不同系列随时间的变化趋势。}\n\\label{fig:linechart}\n\\end{figure}\n\n\\end{document}", - "generation_description": "用户查询: 生成折线图", - "created_at": "2025-12-12T12:18:51.002Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 1479, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/11.json b/src/hello/backend/storage/history/1/11.json deleted file mode 100644 index 74f6dec8..00000000 --- a/src/hello/backend/storage/history/1/11.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 11, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "你是谁", - "ai_response": "我是一个专业的图表生成助手,专门根据用户的需求和数据集生成LaTeX PGFPlots代码。如果你有数据文件(如Excel文件)和图表需求,我可以帮你生成相应的LaTeX代码,包括分析数据结构、选择合适的图表类型,并设置坐标轴标签、标题和图例等。请提供你的数据和具体要求,我会为你生成完整的代码。", - "chart_code": "我是一个专业的图表生成助手,专门根据用户的需求和数据集生成LaTeX PGFPlots代码。如果你有数据文件(如Excel文件)和图表需求,我可以帮你生成相应的LaTeX代码,包括分析数据结构、选择合适的图表类型,并设置坐标轴标签、标题和图例等。请提供你的数据和具体要求,我会为你生成完整的代码。", - "generation_description": "用户查询: 你是谁", - "created_at": "2025-12-12T12:29:15.949Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 148, - "code_source": "extracted_from_response" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/12.json b/src/hello/backend/storage/history/1/12.json deleted file mode 100644 index b078671c..00000000 --- a/src/hello/backend/storage/history/1/12.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 12, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "现在多少点,生成柱状图", - "ai_response": "我目前无法获取实时时间,但可以为您生成一个示例柱状图。请提供您的数据集或描述您想要展示的数据,我将为您生成相应的LaTeX PGFPlots代码。\n\n如果您没有具体数据,这里是一个使用示例数据的柱状图代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例柱状图},\n xlabel={类别},\n ylabel={数值},\n ymin=0,\n symbolic x coords={A,B,C,D,E},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n bar width=20pt,\n ybar,\n enlarge x limits=0.15,\n legend style={at={(0.5,-0.15)}, anchor=north,legend columns=-1},\n]\n\n\\addplot coordinates {(A,42) (B,37) (C,58) (D,29) (E,46)};\n\\addplot coordinates {(A,35) (B,45) (C,32) (D,51) (E,38)};\n\n\\legend{数据集1, 数据集2}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个代码会生成一个包含两组数据的柱状图,横坐标为A到E的类别,纵坐标为数值。\n\n如果您有具体的数据文件,请上传,我可以根据您的实际数据生成定制化的图表代码。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例柱状图},\n xlabel={类别},\n ylabel={数值},\n ymin=0,\n symbolic x coords={A,B,C,D,E},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n bar width=20pt,\n ybar,\n enlarge x limits=0.15,\n legend style={at={(0.5,-0.15)}, anchor=north,legend columns=-1},\n]\n\n\\addplot coordinates {(A,42) (B,37) (C,58) (D,29) (E,46)};\n\\addplot coordinates {(A,35) (B,45) (C,32) (D,51) (E,38)};\n\n\\legend{数据集1, 数据集2}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 现在多少点,生成柱状图", - "created_at": "2025-12-12T12:58:04.687Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 655, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/13.json b/src/hello/backend/storage/history/1/13.json deleted file mode 100644 index 3b5a102f..00000000 --- a/src/hello/backend/storage/history/1/13.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 13, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "你是谁", - "ai_response": "我是你的LaTeX PGFPlots图表生成助手!我可以根据你提供的数据集和需求,生成专业的、可直接使用的LaTeX PGFPlots代码。\n\n如果你有Excel或其他格式的数据文件,可以上传给我,我会:\n1. 解析数据内容\n2. 分析数据结构\n3. 生成适合的图表类型(折线图、柱状图、散点图等)\n4. 提供完整的LaTeX代码,包括坐标轴设置、图例、标题等\n\n请告诉我你的具体需求或上传数据文件,我会为你生成相应的图表代码!", - "chart_code": "我是你的LaTeX PGFPlots图表生成助手!我可以根据你提供的数据集和需求,生成专业的、可直接使用的LaTeX PGFPlots代码。\n\n如果你有Excel或其他格式的数据文件,可以上传给我,我会:\n1. 解析数据内容\n2. 分析数据结构\n3. 生成适合的图表类型(折线图、柱状图、散点图等)\n4. 提供完整的LaTeX代码,包括坐标轴设置、图例、标题等\n\n请告诉我你的具体需求或上传数据文件,我会为你生成相应的图表代码!", - "generation_description": "用户查询: 你是谁", - "created_at": "2025-12-12T13:03:14.864Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 214, - "code_source": "extracted_from_response" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/14.json b/src/hello/backend/storage/history/1/14.json deleted file mode 100644 index 8fe052d7..00000000 --- a/src/hello/backend/storage/history/1/14.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 14, - "user_id": 1, - "data_id": 3, - "file_name": "test.xlsx", - "dataset_name": "test", - "user_input": "条形图", - "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据的条形图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK} % 如果使用中文标签\n\\setCJKmainfont{SimSun} % 设置中文字体\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n /pgf/number format/fixed,\n /pgf/number format/precision=0\n },\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 添加数据\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数量}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据变化趋势}\n\\end{figure}\n\n\\end{document}\n```\n\n**代码说明:**\n\n1. **数据转换**:将原始数据中的\"万\"字去除,只保留数值部分(377, 457, 474, 438, 388, 343)\n\n2. **图表特性**:\n - 使用`ybar`创建垂直条形图\n - 条形宽度设置为20pt\n - 添加了y轴网格线(`ymajorgrids=true`)\n - 在每个条形上方显示具体数值(`nodes near coords`)\n - 设置了合适的y轴范围(0-500)\n - 添加了标题和坐标轴标签\n\n3. **中文支持**:\n - 使用了`xeCJK`包支持中文\n - 需要设置中文字体(如SimSun)\n - 如果不需要中文,可以移除`xeCJK`相关代码,并将中文标签改为英文\n\n4. **自定义选项**:\n - 可以修改`fill=blue!50`来改变条形颜色\n - 调整`bar width`改变条形宽度\n - 修改`width`和`height`调整图表尺寸\n\n**使用说明:**\n1. 将代码保存为`.tex`文件\n2. 使用XeLaTeX编译(因为包含中文)\n3. 确保系统安装了相应的中文字体\n\n如果您需要其他类型的图表(如折线图、堆叠条形图等)或有其他特殊要求,请告诉我!", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK} % 如果使用中文标签\n\\setCJKmainfont{SimSun} % 设置中文字体\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n /pgf/number format/fixed,\n /pgf/number format/precision=0\n },\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 添加数据\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数量}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据变化趋势}\n\\end{figure}\n\n\\end{document}", - "generation_description": "用户查询: 条形图", - "created_at": "2025-12-12T13:04:27.387Z", - "metadata": { - "data_ids": [ - 3 - ], - "has_chart_code": true, - "code_length": 1067, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/15.json b/src/hello/backend/storage/history/1/15.json deleted file mode 100644 index 5d9582ae..00000000 --- a/src/hello/backend/storage/history/1/15.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 15, - "user_id": 1, - "data_id": 1, - "file_name": "1.txt", - "dataset_name": "1", - "user_input": "柱状图", - "ai_response": "根据您提供的数据内容,我注意到这实际上是一系列Vue.js开发环境的搭建步骤说明,而不是适合绘制柱状图的数值数据。柱状图通常需要数值型数据来展示不同类别之间的比较。\n\n不过,我可以为您创建一个示例柱状图,展示Vue.js开发中不同步骤的\"重要性\"或\"时间消耗\"的示意数据。如果您有实际的数值数据,请提供给我,我可以为您生成相应的图表。\n\n以下是基于您提到的Vue.js开发步骤创建的示意柱状图:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={Vue.js开发环境搭建步骤示意},\n xlabel={开发步骤},\n ylabel={相对重要性/时间消耗},\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n symbolic x coords={安装Node.js,创建Vue项目,进入项目目录,运行开发服务器,保存实时更新},\n xtick=data,\n xticklabel style={rotate=45, anchor=east},\n ymin=0,\n ymax=10,\n width=12cm,\n height=8cm,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={font=\\small},\n legend style={at={(0.5,-0.2)}, anchor=north, legend columns=-1}\n]\n\n% 示意数据 - 假设的相对重要性或时间消耗\n\\addplot[fill=blue!50] coordinates {\n (安装Node.js, 8)\n (创建Vue项目, 6)\n (进入项目目录, 2)\n (运行开发服务器, 7)\n (保存实时更新, 9)\n};\n\n\\addplot[fill=red!50] coordinates {\n (安装Node.js, 7)\n (创建Vue项目, 5)\n (进入项目目录, 3)\n (运行开发服务器, 6)\n (保存实时更新, 8)\n};\n\n\\legend{重要性评分, 时间消耗评分}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{Vue.js开发环境搭建步骤的示意柱状图。此图展示了不同步骤的相对重要性(蓝色)和假设的时间消耗(红色)。实际数据应根据具体测量结果进行调整。}\n\\label{fig:vue-dev-steps}\n\\end{figure}\n\n\\end{document}\n```\n\n这个柱状图展示了:\n1. **X轴**:Vue.js开发环境搭建的五个主要步骤\n2. **Y轴**:相对重要性或时间消耗的评分(0-10分)\n3. **蓝色柱**:表示每个步骤的相对重要性\n4. **红色柱**:表示每个步骤的假设时间消耗\n5. **图表特点**:\n - 每个柱子上方显示具体数值\n - 包含网格线便于阅读\n - X轴标签旋转45度避免重叠\n - 图例位于图表下方\n\n**注意**:这只是一个示意图表,使用了假设的数据。如果您有实际的数值数据(如每个步骤的实际耗时、重要性评分等),请提供给我,我可以为您生成基于真实数据的柱状图。\n\n如果您需要不同类型的图表(如折线图、饼图等)或有特定的数据格式要求,请告诉我,我可以为您调整。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={Vue.js开发环境搭建步骤示意},\n xlabel={开发步骤},\n ylabel={相对重要性/时间消耗},\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n symbolic x coords={安装Node.js,创建Vue项目,进入项目目录,运行开发服务器,保存实时更新},\n xtick=data,\n xticklabel style={rotate=45, anchor=east},\n ymin=0,\n ymax=10,\n width=12cm,\n height=8cm,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={font=\\small},\n legend style={at={(0.5,-0.2)}, anchor=north, legend columns=-1}\n]\n\n% 示意数据 - 假设的相对重要性或时间消耗\n\\addplot[fill=blue!50] coordinates {\n (安装Node.js, 8)\n (创建Vue项目, 6)\n (进入项目目录, 2)\n (运行开发服务器, 7)\n (保存实时更新, 9)\n};\n\n\\addplot[fill=red!50] coordinates {\n (安装Node.js, 7)\n (创建Vue项目, 5)\n (进入项目目录, 3)\n (运行开发服务器, 6)\n (保存实时更新, 8)\n};\n\n\\legend{重要性评分, 时间消耗评分}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{Vue.js开发环境搭建步骤的示意柱状图。此图展示了不同步骤的相对重要性(蓝色)和假设的时间消耗(红色)。实际数据应根据具体测量结果进行调整。}\n\\label{fig:vue-dev-steps}\n\\end{figure}\n\n\\end{document}", - "generation_description": "用户查询: 柱状图", - "created_at": "2025-12-12T13:34:19.906Z", - "metadata": { - "data_ids": [ - 1 - ], - "has_chart_code": true, - "code_length": 1189, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/16.json b/src/hello/backend/storage/history/1/16.json deleted file mode 100644 index 36a9cf64..00000000 --- a/src/hello/backend/storage/history/1/16.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 16, - "user_id": 1, - "data_id": 4, - "file_name": "test.txt", - "dataset_name": "test", - "user_input": "柱状图", - "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据的柱状图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 请根据您的系统选择合适的字体,如 Noto Serif CJK SC\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n**代码说明:**\n\n1. **数据表示**:将\"万\"单位的数据转换为数值(如\"377万\"转换为377)\n2. **图表类型**:使用`ybar`创建垂直柱状图\n3. **坐标轴**:\n - X轴:年份标签(2021年-2026年)\n - Y轴:数量(万),范围0-500\n4. **视觉效果**:\n - 蓝色填充的柱状图\n - 每个柱子上方显示具体数值\n - 添加网格线便于读数\n - 图例位于图表下方\n5. **中文字体**:使用xeCJK包支持中文,需要根据您的系统安装合适的字体\n\n**使用说明:**\n1. 如果您没有安装中文字体,可以:\n - 移除`\\usepackage{xeCJK}`和`\\setCJKmainfont`行\n - 将中文标签改为英文(如将\"年份\"改为\"Year\",\"数量(万)\"改为\"Quantity (10k)\")\n2. 编译时需要使用XeLaTeX或LuaLaTeX以支持中文\n\n您可以根据需要调整颜色、柱宽、图表尺寸等参数。", - "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 请根据您的系统选择合适的字体,如 Noto Serif CJK SC\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 柱状图", - "created_at": "2025-12-12T13:44:25.346Z", - "metadata": { - "data_ids": [ - 4 - ], - "has_chart_code": true, - "code_length": 902, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/2.json b/src/hello/backend/storage/history/1/2.json deleted file mode 100644 index 929652f3..00000000 --- a/src/hello/backend/storage/history/1/2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 2, - "user_id": 1, - "data_id": 2, - "file_name": "test.xlsx", - "dataset_name": "test", - "user_input": "折线图", - "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。数据中的\"万\"单位需要转换为数值以便绘图。\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2020.5, xmax=2026.5,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north east,\n legend cell align={left},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线图\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n mark options={fill=white}\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 在每个数据点上添加数值标签\n\\node[above, font=\\small] at (axis cs:2021,377) {377};\n\\node[above, font=\\small] at (axis cs:2022,457) {457};\n\\node[above, font=\\small] at (axis cs:2023,474) {474};\n\\node[above, font=\\small] at (axis cs:2024,438) {438};\n\\node[above, font=\\small] at (axis cs:2025,388) {388};\n\\node[below, font=\\small] at (axis cs:2026,343) {343};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n**图表说明:**\n\n1. **数据转换**:已将\"377万\"等文本数据转换为数值377,并在Y轴标签中注明单位为\"万\"\n\n2. **图表特点**:\n - 蓝色折线连接各数据点\n - 白色填充的圆形标记点\n - 每个数据点上方显示具体数值\n - Y轴网格线便于读数\n - 中文标题和标签(需要XeLaTeX编译)\n\n3. **趋势分析**:从图表可以看出:\n - 2021-2023年呈上升趋势,2023年达到峰值474万\n - 2023年后开始下降,2026年降至343万\n\n4. **使用说明**:\n - 使用XeLaTeX编译以支持中文\n - 如需更改字体,请修改`\\setCJKmainfont`命令\n - 如需调整图表尺寸,修改`width`和`height`参数\n\n这个折线图清晰地展示了数据的年度变化趋势,便于观察和分析数据波动情况。", - "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2020.5, xmax=2026.5,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north east,\n legend cell align={left},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线图\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n mark options={fill=white}\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 在每个数据点上添加数值标签\n\\node[above, font=\\small] at (axis cs:2021,377) {377};\n\\node[above, font=\\small] at (axis cs:2022,457) {457};\n\\node[above, font=\\small] at (axis cs:2023,474) {474};\n\\node[above, font=\\small] at (axis cs:2024,438) {438};\n\\node[above, font=\\small] at (axis cs:2025,388) {388};\n\\node[below, font=\\small] at (axis cs:2026,343) {343};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", - "generation_description": "用户查询: 折线图", - "created_at": "2025-12-12T09:13:03.650Z", - "metadata": { - "data_ids": [ - 2 - ], - "has_chart_code": true, - "code_length": 1299, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/3.json b/src/hello/backend/storage/history/1/3.json deleted file mode 100644 index 9d28c5d5..00000000 --- a/src/hello/backend/storage/history/1/3.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 3, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "添加两列数据,2019年200万,2020年300万", - "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={数据统计},\n xlabel={年份},\n ylabel={数值(百万)},\n xmin=2018, xmax=2021,\n ymin=0, ymax=350,\n xtick={2019,2020},\n ytick={0,100,200,300},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n]\n\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2019,200)(2020,300)\n };\n \\legend{数据}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={数据统计},\n xlabel={年份},\n ylabel={数值(百万)},\n xmin=2018, xmax=2021,\n ymin=0, ymax=350,\n xtick={2019,2020},\n ytick={0,100,200,300},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n]\n\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2019,200)(2020,300)\n };\n \\legend{数据}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 添加两列数据,2019年200万,2020年300万", - "created_at": "2025-12-12T09:22:57.290Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 541, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/4.json b/src/hello/backend/storage/history/1/4.json deleted file mode 100644 index f6002609..00000000 --- a/src/hello/backend/storage/history/1/4.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 4, - "user_id": 1, - "data_id": 2, - "file_name": "test.xlsx", - "dataset_name": "test", - "user_input": "折线图\n", - "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。数据中的\"万\"单位将在图表中明确标注。\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2020.5, xmax=2026.5,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n grid=both,\n grid style={line width=.1pt, draw=gray!30},\n major grid style={line width=.2pt, draw=gray!50},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n every axis plot/.append style={thick},\n nodes near coords,\n nodes near coords align={vertical},\n point meta=explicit symbolic\n]\n\n% 绘制折线图\n\\addplot[\n color=blue,\n mark=*,\n mark size=3pt,\n line width=1.5pt\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n% 添加数据点标签\n\\addplot[\n only marks,\n mark=*,\n mark size=3pt,\n color=blue,\n nodes near coords,\n point meta=explicit symbolic\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个折线图具有以下特点:\n\n1. **数据展示**:使用您提供的实际数据(2021-2026年对应的数值)\n2. **坐标轴设置**:\n - X轴:年份标签(2021年-2026年)\n - Y轴:数值范围300-500,单位为\"万\"\n3. **可视化元素**:\n - 蓝色粗线显示趋势变化\n - 每个数据点用蓝色圆点标记\n - 每个数据点上方显示具体数值(如\"377万\")\n - 添加网格线便于读数\n4. **图表信息**:\n - 标题:2021-2026年数据变化趋势\n - 图例:数据趋势\n\n图表清晰地显示了数据在2023年达到峰值(474万),随后呈下降趋势,到2026年降至343万。", - "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2020.5, xmax=2026.5,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n grid=both,\n grid style={line width=.1pt, draw=gray!30},\n major grid style={line width=.2pt, draw=gray!50},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n every axis plot/.append style={thick},\n nodes near coords,\n nodes near coords align={vertical},\n point meta=explicit symbolic\n]\n\n% 绘制折线图\n\\addplot[\n color=blue,\n mark=*,\n mark size=3pt,\n line width=1.5pt\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n% 添加数据点标签\n\\addplot[\n only marks,\n mark=*,\n mark size=3pt,\n color=blue,\n nodes near coords,\n point meta=explicit symbolic\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 折线图\n", - "created_at": "2025-12-12T09:24:03.413Z", - "metadata": { - "data_ids": [ - 2 - ], - "has_chart_code": true, - "code_length": 1363, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/5.json b/src/hello/backend/storage/history/1/5.json deleted file mode 100644 index 2567736b..00000000 --- a/src/hello/backend/storage/history/1/5.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 5, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "在上述图表中,添加两列数据,2019年200万,2020年300万", - "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\\usepackage{booktabs}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={年度数据统计},\n xlabel={年份},\n ylabel={数值(百万)},\n xmin=2018, xmax=2021,\n ymin=0, ymax=350,\n xtick={2018,2019,2020,2021},\n ytick={0,50,100,150,200,250,300,350},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n width=12cm,\n height=8cm,\n]\n\n% 原始数据\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2018, 100)\n (2019, 150)\n (2020, 180)\n (2021, 220)\n };\n \\addlegendentry{原始数据}\n\n% 新增第一列数据:2019年200万,2020年300万\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (2019, 200)\n (2020, 300)\n };\n \\addlegendentry{新增数据列1}\n\n% 新增第二列数据(如果需要第二列不同样式的数据)\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (2019, 200)\n (2020, 300)\n };\n \\addlegendentry{新增数据列2}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{包含新增数据的年度统计图表。新增了两列数据:2019年200万,2020年300万。}\n\\end{figure}\n\n% 数据表格展示\n\\begin{table}[htbp]\n\\centering\n\\caption{图表数据表}\n\\begin{tabular}{cccc}\n\\toprule\n年份 & 原始数据(百万) & 新增数据列1(百万) & 新增数据列2(百万) \\\\\n\\midrule\n2018 & 100 & -- & -- \\\\\n2019 & 150 & 200 & 200 \\\\\n2020 & 180 & 300 & 300 \\\\\n2021 & 220 & -- & -- \\\\\n\\bottomrule\n\\end{tabular}\n\\end{table}\n\n\\end{document}\n```\n\n**代码说明:**\n\n1. **新增数据列**:在原有图表基础上添加了两列新数据,均包含2019年200万和2020年300万的数据点\n2. **视觉区分**:\n - 第一列新增数据用红色三角形标记\n - 第二列新增数据用绿色圆点标记\n - 原始数据保持蓝色正方形标记\n3. **坐标轴调整**:Y轴范围扩展到0-350以容纳300万的数据点\n4. **图例**:为每列数据添加了清晰的图例说明\n5. **数据表格**:添加了对应的数据表格,清晰展示所有数据值\n6. **缺失数据处理**:2018和2021年新增数据列显示为\"--\"表示无数据\n\n您可以根据需要:\n- 修改颜色、标记样式\n- 调整坐标轴范围\n- 更改图例位置\n- 添加数据标签等\n\n如果需要将两列新增数据合并为一列,或者需要其他调整,请告诉我。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\\usepackage{booktabs}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={年度数据统计},\n xlabel={年份},\n ylabel={数值(百万)},\n xmin=2018, xmax=2021,\n ymin=0, ymax=350,\n xtick={2018,2019,2020,2021},\n ytick={0,50,100,150,200,250,300,350},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n width=12cm,\n height=8cm,\n]\n\n% 原始数据\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2018, 100)\n (2019, 150)\n (2020, 180)\n (2021, 220)\n };\n \\addlegendentry{原始数据}\n\n% 新增第一列数据:2019年200万,2020年300万\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (2019, 200)\n (2020, 300)\n };\n \\addlegendentry{新增数据列1}\n\n% 新增第二列数据(如果需要第二列不同样式的数据)\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (2019, 200)\n (2020, 300)\n };\n \\addlegendentry{新增数据列2}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{包含新增数据的年度统计图表。新增了两列数据:2019年200万,2020年300万。}\n\\end{figure}\n\n% 数据表格展示\n\\begin{table}[htbp]\n\\centering\n\\caption{图表数据表}\n\\begin{tabular}{cccc}\n\\toprule\n年份 & 原始数据(百万) & 新增数据列1(百万) & 新增数据列2(百万) \\\\\n\\midrule\n2018 & 100 & -- & -- \\\\\n2019 & 150 & 200 & 200 \\\\\n2020 & 180 & 300 & 300 \\\\\n2021 & 220 & -- & -- \\\\\n\\bottomrule\n\\end{tabular}\n\\end{table}\n\n\\end{document}", - "generation_description": "用户查询: 在上述图表中,添加两列数据,2019年200万,2020年300万", - "created_at": "2025-12-12T09:25:13.690Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 1377, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/6.json b/src/hello/backend/storage/history/1/6.json deleted file mode 100644 index 0707aa46..00000000 --- a/src/hello/backend/storage/history/1/6.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 6, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "将折线调整为红色", - "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图},\n xlabel={X轴},\n ylabel={Y轴},\n legend pos=north west,\n grid=major,\n width=12cm,\n height=8cm,\n]\n\n% 红色折线\n\\addplot[\n color=red,\n mark=*,\n line width=1.5pt,\n mark size=3pt,\n] coordinates {\n (1, 2)\n (2, 3.5)\n (3, 2.8)\n (4, 4.2)\n (5, 3.9)\n (6, 5.1)\n (7, 4.5)\n (8, 6.2)\n (9, 5.8)\n (10, 7.1)\n};\n\\addlegendentry{红色折线}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n**说明:**\n1. 将折线颜色设置为红色:`color=red`\n2. 保持其他样式不变(标记点、线宽、标记大小等)\n3. 图例相应更新为“红色折线”\n\n如果您有特定的数据集需要可视化,请提供数据文件或数据表格,我可以为您生成包含实际数据的完整图表代码。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图},\n xlabel={X轴},\n ylabel={Y轴},\n legend pos=north west,\n grid=major,\n width=12cm,\n height=8cm,\n]\n\n% 红色折线\n\\addplot[\n color=red,\n mark=*,\n line width=1.5pt,\n mark size=3pt,\n] coordinates {\n (1, 2)\n (2, 3.5)\n (3, 2.8)\n (4, 4.2)\n (5, 3.9)\n (6, 5.1)\n (7, 4.5)\n (8, 6.2)\n (9, 5.8)\n (10, 7.1)\n};\n\\addlegendentry{红色折线}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 将折线调整为红色", - "created_at": "2025-12-12T09:26:56.080Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 556, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/7.json b/src/hello/backend/storage/history/1/7.json deleted file mode 100644 index a4468711..00000000 --- a/src/hello/backend/storage/history/1/7.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 7, - "user_id": 1, - "data_id": 3, - "file_name": "test.xlsx", - "dataset_name": "test", - "user_input": "柱状图", - "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据的柱状图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据柱状图}\n\\end{figure}\n\n\\end{document}\n```\n\n**代码说明:**\n\n1. **数据转换**:将原始数据中的\"万\"字去除,只保留数值部分(377万 → 377)\n\n2. **图表特性**:\n - 使用蓝色填充的柱状图\n - 每个柱子上方显示具体数值\n - 添加了垂直网格线便于读数\n - 设置了合适的Y轴范围(0-500)\n - 图例位于图表下方居中位置\n\n3. **中文支持**:\n - 使用xeCJK包支持中文\n - 设置宋体为默认中文字体(可根据需要修改)\n\n4. **坐标轴**:\n - X轴:年份标签(2021年-2026年)\n - Y轴:数量(万)\n\n**使用说明:**\n1. 需要安装XeLaTeX编译器\n2. 需要系统中安装有SimSun字体(或替换为其他中文字体)\n3. 可以直接编译生成PDF文件\n\n如果您需要调整颜色、柱宽、字体大小或其他样式,请告诉我,我可以为您修改代码。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据柱状图}\n\\end{figure}\n\n\\end{document}", - "generation_description": "用户查询: 柱状图", - "created_at": "2025-12-12T11:41:20.790Z", - "metadata": { - "data_ids": [ - 3 - ], - "has_chart_code": true, - "code_length": 878, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/8.json b/src/hello/backend/storage/history/1/8.json deleted file mode 100644 index e9046d27..00000000 --- a/src/hello/backend/storage/history/1/8.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 8, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "近五年考研人数变化折线图", - "ai_response": "由于您没有提供具体的数据文件,我将基于近五年(2019-2023年)考研报名人数的公开数据,为您生成一个折线图的LaTeX PGFPlots代码。以下是代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={近五年全国考研报名人数变化},\n xlabel={年份},\n ylabel={报名人数(万人)},\n xmin=2018.5, xmax=2023.5,\n ymin=250, ymax=500,\n xtick={2019,2020,2021,2022,2023},\n ytick={250,300,350,400,450,500},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n width=12cm,\n height=8cm,\n]\n\n% 实际数据点\n\\addplot[\n color=blue,\n mark=square,\n mark size=2pt,\n thick\n] coordinates {\n (2019, 290) % 2019年:290万人\n (2020, 341) % 2020年:341万人\n (2021, 377) % 2021年:377万人\n (2022, 457) % 2022年:457万人\n (2023, 474) % 2023年:474万人\n};\n\n% 在每个数据点上添加数值标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic\n] coordinates {\n (2019, 290) [290]\n (2020, 341) [341]\n (2021, 377) [377]\n (2022, 457) [457]\n (2023, 474) [474]\n};\n\n\\legend{考研报名人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n如果您有具体的Excel数据文件,请上传文件,我可以:\n1. 解析您的实际数据\n2. 根据数据调整坐标轴范围\n3. 使用实际数据替换代码中的示例数据\n4. 根据需要添加更多定制化设置\n\n这个折线图的特点包括:\n- 清晰的坐标轴标签和标题\n- 网格线便于读数\n- 每个数据点都有明确的数值标签\n- 合适的颜色和标记样式\n- 图例说明\n\n您可以直接将此代码复制到LaTeX文档中编译使用。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={近五年全国考研报名人数变化},\n xlabel={年份},\n ylabel={报名人数(万人)},\n xmin=2018.5, xmax=2023.5,\n ymin=250, ymax=500,\n xtick={2019,2020,2021,2022,2023},\n ytick={250,300,350,400,450,500},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n width=12cm,\n height=8cm,\n]\n\n% 实际数据点\n\\addplot[\n color=blue,\n mark=square,\n mark size=2pt,\n thick\n] coordinates {\n (2019, 290) % 2019年:290万人\n (2020, 341) % 2020年:341万人\n (2021, 377) % 2021年:377万人\n (2022, 457) % 2022年:457万人\n (2023, 474) % 2023年:474万人\n};\n\n% 在每个数据点上添加数值标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic\n] coordinates {\n (2019, 290) [290]\n (2020, 341) [341]\n (2021, 377) [377]\n (2022, 457) [457]\n (2023, 474) [474]\n};\n\n\\legend{考研报名人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 近五年考研人数变化折线图", - "created_at": "2025-12-12T12:15:10.839Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 1019, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/9.json b/src/hello/backend/storage/history/1/9.json deleted file mode 100644 index f12a9dd1..00000000 --- a/src/hello/backend/storage/history/1/9.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 9, - "user_id": 1, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "你是谁", - "ai_response": "我是你的LaTeX PGFPlots图表生成助手!我可以根据你提供的数据集和需求,生成专业的LaTeX PGFPlots代码来创建各种图表(如折线图、柱状图、散点图等)。\n\n如果你有Excel或其他格式的数据文件,可以上传给我,我会:\n1. 分析数据结构\n2. 根据数据特点推荐合适的图表类型\n3. 生成包含实际数据的完整LaTeX代码\n4. 提供坐标轴标签、标题、图例等完整配置\n\n请告诉我你的具体需求或上传数据文件,我会为你生成相应的图表代码!", - "chart_code": "我是你的LaTeX PGFPlots图表生成助手!我可以根据你提供的数据集和需求,生成专业的LaTeX PGFPlots代码来创建各种图表(如折线图、柱状图、散点图等)。\n\n如果你有Excel或其他格式的数据文件,可以上传给我,我会:\n1. 分析数据结构\n2. 根据数据特点推荐合适的图表类型\n3. 生成包含实际数据的完整LaTeX代码\n4. 提供坐标轴标签、标题、图例等完整配置\n\n请告诉我你的具体需求或上传数据文件,我会为你生成相应的图表代码!", - "generation_description": "用户查询: 你是谁", - "created_at": "2025-12-12T12:16:16.833Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 224, - "code_source": "extracted_from_response" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/1.json b/src/hello/backend/storage/history/2/1.json deleted file mode 100644 index 38363acd..00000000 --- a/src/hello/backend/storage/history/2/1.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 1, - "user_id": 2, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "生成近五年考研人数折线图", - "ai_response": "由于我无法直接访问您上传的数据文件,我将提供一个通用的LaTeX PGFPlots代码模板,用于生成近五年考研人数的折线图。您可以根据实际数据修改年份和人数。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={近五年考研人数折线图},\n xlabel={年份},\n ylabel={人数(万)},\n xmin=2019, xmax=2023,\n ymin=200, ymax=500,\n xtick={2019,2020,2021,2022,2023},\n ytick={200,250,300,350,400,450,500},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n]\n\n% 请根据实际数据修改以下坐标点\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2019, 290)(2020, 341)(2021, 377)(2022, 457)(2023, 474)\n };\n \\legend{考研人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n**使用说明:**\n1. 将上述代码保存为`.tex`文件\n2. 用LaTeX编辑器(如Overleaf、TeXShop等)编译\n3. 如需修改数据,请更新`coordinates`部分中的数值\n\n**注意事项:**\n- 当前示例数据为估算值(单位:万人),请替换为实际数据\n- 可根据需要调整图表尺寸、颜色、标记样式等参数\n- 如需添加数据标签,可在`\\addplot`后添加`node[pos=0.5] {数据}`等标注\n\n如果您能提供具体数据,我可以为您生成更精确的图表代码。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={近五年考研人数折线图},\n xlabel={年份},\n ylabel={人数(万)},\n xmin=2019, xmax=2023,\n ymin=200, ymax=500,\n xtick={2019,2020,2021,2022,2023},\n ytick={200,250,300,350,400,450,500},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n]\n\n% 请根据实际数据修改以下坐标点\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2019, 290)(2020, 341)(2021, 377)(2022, 457)(2023, 474)\n };\n \\legend{考研人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 生成近五年考研人数折线图", - "created_at": "2025-12-09T15:38:37.808Z", - "metadata": { - "chart_type": "line", - "data_ids": [], - "has_chart_code": true, - "code_length": 642 - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/2.json b/src/hello/backend/storage/history/2/2.json deleted file mode 100644 index 923ee819..00000000 --- a/src/hello/backend/storage/history/2/2.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 2, - "user_id": 2, - "data_id": 1, - "file_name": "test.txt", - "dataset_name": "测试", - "user_input": "生成", - "ai_response": "根据您提供的数据,我将生成一个柱状图来展示2021年至2026年的数据变化。以下是相应的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n ybar,\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021,2022,2023,2024,2025,2026},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据变化趋势},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot[fill=blue!50] coordinates {\n (2021,377)\n (2022,457)\n (2023,474)\n (2024,438)\n (2025,388)\n (2026,343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化情况}\n\\end{figure}\n\n\\end{document}\n```\n\n这个代码将生成一个包含以下特点的柱状图:\n\n1. **数据展示**:显示2021-2026年每年的数值(单位:万)\n2. **视觉特征**:\n - 蓝色柱状图\n - 每个柱子上方显示具体数值\n - 包含网格线便于读数\n - 自动调整Y轴范围(0-500万)\n\n3. **图表元素**:\n - 标题:2021-2026年数据变化趋势\n - X轴标签:年份\n - Y轴标签:数值(万)\n - 图例说明\n\n如果您需要调整颜色、柱宽、图表尺寸或其他样式,请告诉我,我可以为您修改代码。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n ybar,\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021,2022,2023,2024,2025,2026},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据变化趋势},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot[fill=blue!50] coordinates {\n (2021,377)\n (2022,457)\n (2023,474)\n (2024,438)\n (2025,388)\n (2026,343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化情况}\n\\end{figure}\n\n\\end{document}", - "generation_description": "用户查询: 生成", - "created_at": "2025-12-09T15:48:01.231Z", - "metadata": { - "chart_type": "bar", - "data_ids": [ - 1 - ], - "has_chart_code": true, - "code_length": 868 - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/22.json b/src/hello/backend/storage/history/2/22.json deleted file mode 100644 index a268bbec..00000000 --- a/src/hello/backend/storage/history/2/22.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 22, - "user_id": 2, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "基于近五年考研人数变化趋势,生成折线图", - "ai_response": "由于您没有提供具体的考研人数数据,我将基于公开的常见数据趋势(2019-2023年)生成一个示例折线图。您可以根据实际数据修改以下代码中的数值。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={近五年全国考研报名人数变化趋势(2019-2023)},\n xlabel={年份},\n ylabel={报名人数(万人)},\n xmin=2018.5, xmax=2023.5,\n ymin=250, ymax=500,\n xtick={2019,2020,2021,2022,2023},\n ytick={250,300,350,400,450,500},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n width=12cm,\n height=8cm,\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 实际数据点(示例数据,请根据实际情况修改)\n\\addplot[\n color=blue,\n mark=square*,\n mark size=2pt,\n thick\n] coordinates {\n (2019, 290)\n (2020, 341)\n (2021, 377)\n (2022, 457)\n (2023, 474)\n};\n\n% 添加数据标签\n\\node[above] at (axis cs:2019,290) {290};\n\\node[above] at (axis cs:2020,341) {341};\n\\node[above] at (axis cs:2021,377) {377};\n\\node[above] at (axis cs:2022,457) {457};\n\\node[above] at (axis cs:2023,474) {474};\n\n\\legend{考研报名人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n如果您有具体的Excel数据文件,请提供数据,我可以为您生成完全匹配的代码。常见的数据格式要求:\n- 年份列(如:2019, 2020, 2021, 2022, 2023)\n- 人数列(单位:万人)\n\n您可以将数据以以下格式提供给我:\n```\n年份,人数\n2019,290\n2020,341\n2021,377\n2022,457\n2023,474\n```\n\n我会根据您的实际数据调整坐标轴范围和样式设置。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={近五年全国考研报名人数变化趋势(2019-2023)},\n xlabel={年份},\n ylabel={报名人数(万人)},\n xmin=2018.5, xmax=2023.5,\n ymin=250, ymax=500,\n xtick={2019,2020,2021,2022,2023},\n ytick={250,300,350,400,450,500},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n width=12cm,\n height=8cm,\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 实际数据点(示例数据,请根据实际情况修改)\n\\addplot[\n color=blue,\n mark=square*,\n mark size=2pt,\n thick\n] coordinates {\n (2019, 290)\n (2020, 341)\n (2021, 377)\n (2022, 457)\n (2023, 474)\n};\n\n% 添加数据标签\n\\node[above] at (axis cs:2019,290) {290};\n\\node[above] at (axis cs:2020,341) {341};\n\\node[above] at (axis cs:2021,377) {377};\n\\node[above] at (axis cs:2022,457) {457};\n\\node[above] at (axis cs:2023,474) {474};\n\n\\legend{考研报名人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 基于近五年考研人数变化趋势,生成折线图", - "created_at": "2025-12-15T06:16:48.329Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 1067, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/23.json b/src/hello/backend/storage/history/2/23.json deleted file mode 100644 index 99b41c23..00000000 --- a/src/hello/backend/storage/history/2/23.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 23, - "user_id": 2, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "你是谁", - "ai_response": "我是一个专业的图表生成助手,专门根据用户的需求和数据集生成LaTeX PGFPlots代码。如果你有数据文件(比如Excel文件)和图表需求,我可以帮你生成相应的LaTeX代码,包括设置坐标轴、标题、图例等。请提供你的数据和具体要求,我会为你生成完整的代码!", - "chart_code": "我是一个专业的图表生成助手,专门根据用户的需求和数据集生成LaTeX PGFPlots代码。如果你有数据文件(比如Excel文件)和图表需求,我可以帮你生成相应的LaTeX代码,包括设置坐标轴、标题、图例等。请提供你的数据和具体要求,我会为你生成完整的代码!", - "generation_description": "用户查询: 你是谁", - "created_at": "2025-12-15T06:36:57.363Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 129, - "code_source": "extracted_from_response" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/24.json b/src/hello/backend/storage/history/2/24.json deleted file mode 100644 index 3420dcb4..00000000 --- a/src/hello/backend/storage/history/2/24.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 24, - "user_id": 2, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "哈哈哈", - "ai_response": "您好!看起来您可能想生成一个图表,但还没有提供具体的需求或数据。😊\n\n为了帮您生成合适的LaTeX PGFPlots代码,我需要了解:\n\n1. **图表类型**:您想要什么类型的图表?\n - 折线图\n - 柱状图\n - 散点图\n - 饼图\n - 其他类型\n\n2. **数据内容**:如果您有数据文件(如Excel、CSV等),请上传,我会帮您分析数据结构并生成相应的图表代码。\n\n3. **图表要求**:\n - 坐标轴标签\n - 图表标题\n - 图例位置\n - 颜色风格偏好\n - 其他特殊要求\n\n请告诉我您的具体需求,或者上传您的数据文件,我会为您生成专业的LaTeX PGFPlots代码!✨", - "chart_code": "您好!看起来您可能想生成一个图表,但还没有提供具体的需求或数据。😊\n\n为了帮您生成合适的LaTeX PGFPlots代码,我需要了解:\n\n1. **图表类型**:您想要什么类型的图表?\n - 折线图\n - 柱状图\n - 散点图\n - 饼图\n - 其他类型\n\n2. **数据内容**:如果您有数据文件(如Excel、CSV等),请上传,我会帮您分析数据结构并生成相应的图表代码。\n\n3. **图表要求**:\n - 坐标轴标签\n - 图表标题\n - 图例位置\n - 颜色风格偏好\n - 其他特殊要求\n\n请告诉我您的具体需求,或者上传您的数据文件,我会为您生成专业的LaTeX PGFPlots代码!✨", - "generation_description": "用户查询: 哈哈哈", - "created_at": "2025-12-15T06:40:59.947Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 319, - "code_source": "extracted_from_response" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/25.json b/src/hello/backend/storage/history/2/25.json deleted file mode 100644 index 19d5b6a8..00000000 --- a/src/hello/backend/storage/history/2/25.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 25, - "user_id": 2, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "基于2021-2026年我国结婚率变化趋势,生成折线图", - "ai_response": "由于您没有提供具体的数据文件,我将基于常见的趋势假设生成一个示例折线图。假设2021-2026年我国结婚率变化趋势如下:\n\n- 2021年:6.0‰\n- 2022年:5.8‰\n- 2023年:5.5‰\n- 2024年:5.3‰\n- 2025年:5.2‰\n- 2026年:5.1‰\n\n以下是相应的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n title={2021-2026年我国结婚率变化趋势},\n xlabel={年份},\n ylabel={结婚率(‰)},\n xmin=2020.5, xmax=2026.5,\n ymin=4.5, ymax=6.5,\n xtick={2021,2022,2023,2024,2025,2026},\n ytick={4.5,5.0,5.5,6.0,6.5},\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!25},\n legend pos=north east,\n legend style={cells={anchor=west}},\n]\n\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1pt,\n] coordinates {\n (2021,6.0)\n (2022,5.8)\n (2023,5.5)\n (2024,5.3)\n (2025,5.2)\n (2026,5.1)\n};\n\n\\addlegendentry{结婚率}\n\n% 添加数据标签\n\\foreach \\x/\\y in {2021/6.0,2022/5.8,2023/5.5,2024/5.3,2025/5.2,2026/5.1} {\n \\node[above, font=\\small] at (\\x,\\y) {\\y};\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n**说明:**\n1. 使用`xeCJK`包支持中文字体,需要设置合适的CJK字体(如SimSun)\n2. 图表展示了2021-2026年结婚率的下降趋势\n3. 每个数据点都有明确的数值标注\n4. 添加了网格线便于读数\n5. 坐标轴范围根据数据范围适当设置\n\n**注意事项:**\n- 如果您有实际数据,请提供Excel或CSV文件,我可以生成基于实际数据的准确图表\n- 您可以根据需要调整颜色、线宽、标记样式等参数\n- 如果编译时遇到字体问题,可以移除CJK相关设置或安装相应字体\n\n如果您能提供具体的数据文件,我可以生成更准确的图表。", - "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n title={2021-2026年我国结婚率变化趋势},\n xlabel={年份},\n ylabel={结婚率(‰)},\n xmin=2020.5, xmax=2026.5,\n ymin=4.5, ymax=6.5,\n xtick={2021,2022,2023,2024,2025,2026},\n ytick={4.5,5.0,5.5,6.0,6.5},\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!25},\n legend pos=north east,\n legend style={cells={anchor=west}},\n]\n\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1pt,\n] coordinates {\n (2021,6.0)\n (2022,5.8)\n (2023,5.5)\n (2024,5.3)\n (2025,5.2)\n (2026,5.1)\n};\n\n\\addlegendentry{结婚率}\n\n% 添加数据标签\n\\foreach \\x/\\y in {2021/6.0,2022/5.8,2023/5.5,2024/5.3,2025/5.2,2026/5.1} {\n \\node[above, font=\\small] at (\\x,\\y) {\\y};\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", - "generation_description": "用户查询: 基于2021-2026年我国结婚率变化趋势,生成折线图", - "created_at": "2025-12-15T06:43:40.434Z", - "metadata": { - "data_ids": [], - "has_chart_code": true, - "code_length": 988, - "code_source": "from_request" - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/3.json b/src/hello/backend/storage/history/2/3.json deleted file mode 100644 index 6f6993de..00000000 --- a/src/hello/backend/storage/history/2/3.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 3, - "user_id": 2, - "data_id": 1, - "file_name": "test.txt", - "dataset_name": "测试", - "user_input": "哈哈哈,你是谁", - "ai_response": "哈哈,我是你的图表生成助手!😊 我可以帮你用LaTeX PGFPlots创建各种漂亮的图表。\n\n我看到你上传了一个数据文件(test.txt),里面包含了一些年份和对应的数值数据。如果你需要的话,我可以帮你:\n\n1. **分析数据**:帮你理解数据的内容和结构\n2. **生成图表**:根据你的需求创建折线图、柱状图、散点图等各种图表\n3. **定制样式**:调整颜色、标签、网格线等视觉效果\n4. **导出代码**:提供可以直接在LaTeX文档中使用的PGFPlots代码\n\n你想用这些数据做什么样的图表呢?或者有其他图表需求吗?", - "chart_code": "哈哈,我是你的图表生成助手!😊 我可以帮你用LaTeX PGFPlots创建各种漂亮的图表。\n\n我看到你上传了一个数据文件(test.txt),里面包含了一些年份和对应的数值数据。如果你需要的话,我可以帮你:\n\n1. **分析数据**:帮你理解数据的内容和结构\n2. **生成图表**:根据你的需求创建折线图、柱状图、散点图等各种图表\n3. **定制样式**:调整颜色、标签、网格线等视觉效果\n4. **导出代码**:提供可以直接在LaTeX文档中使用的PGFPlots代码\n\n你想用这些数据做什么样的图表呢?或者有其他图表需求吗?", - "generation_description": "用户查询: 哈哈哈,你是谁", - "created_at": "2025-12-09T15:55:59.451Z", - "metadata": { - "chart_type": "line", - "data_ids": [ - 1 - ], - "has_chart_code": true, - "code_length": 267 - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/4.json b/src/hello/backend/storage/history/2/4.json deleted file mode 100644 index c9c17713..00000000 --- a/src/hello/backend/storage/history/2/4.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "history_id": 4, - "user_id": 2, - "data_id": null, - "file_name": "", - "dataset_name": "", - "user_input": "生成折线图", - "ai_response": "我需要更多信息来生成折线图。请提供以下内容:\n\n1. **数据集**:请上传数据文件(如CSV、TXT等)或提供示例数据格式\n2. **图表要求**:\n - X轴和Y轴分别表示什么?\n - 有多少条折线?\n - 需要图例吗?\n - 图表标题是什么?\n - 有什么特定的样式要求吗?\n\n如果您还没有具体数据,我可以先提供一个通用的折线图模板:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={折线图示例},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n legend pos=north west,\n grid=major,\n xmin=0, xmax=10,\n ymin=0, ymax=100\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1,10)(2,30)(3,40)(4,50)(5,70)\n };\n \\addlegendentry{数据系列1}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1,20)(2,25)(3,35)(4,45)(5,60)\n };\n \\addlegendentry{数据系列2}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n请提供您的具体需求,我可以为您生成定制化的代码。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={折线图示例},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n legend pos=north west,\n grid=major,\n xmin=0, xmax=10,\n ymin=0, ymax=100\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1,10)(2,30)(3,40)(4,50)(5,70)\n };\n \\addlegendentry{数据系列1}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1,20)(2,25)(3,35)(4,45)(5,60)\n };\n \\addlegendentry{数据系列2}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 生成折线图", - "created_at": "2025-12-09T15:56:29.960Z", - "metadata": { - "chart_type": "line", - "data_ids": [], - "has_chart_code": true, - "code_length": 616 - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/5.json b/src/hello/backend/storage/history/2/5.json deleted file mode 100644 index 54d54268..00000000 --- a/src/hello/backend/storage/history/2/5.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 5, - "user_id": 2, - "data_id": 2, - "file_name": "test.xlsx", - "dataset_name": "test", - "user_input": "生成折线图", - "ai_response": "由于我无法直接读取您上传的 Excel 文件内容,我将提供一个通用的 LaTeX PGFPlots 折线图示例代码。您可以根据您的实际数据修改 `coordinates` 部分。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图},\n xlabel={X 轴标签},\n ylabel={Y 轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n grid style=dashed,\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n]\ncoordinates {\n (1,10)(2,30)(3,40)(4,50)(5,60)(6,65)(7,70)(8,75)(9,80)(10,85)\n};\n\\addlegendentry{数据集 A}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n]\ncoordinates {\n (1,5)(2,20)(3,35)(4,40)(5,55)(6,60)(7,65)(8,70)(9,75)(10,80)\n};\n\\addlegendentry{数据集 B}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n**使用说明:**\n1. 将示例数据替换为您的实际数据\n2. 调整坐标范围(`xmin`, `xmax`, `ymin`, `ymax`)\n3. 修改标题和轴标签\n4. 如需更多数据线,复制 `\\addplot` 部分并修改数据\n\n如果您能提供数据的文本格式(如 CSV 的前几行),我可以为您生成更贴合数据的代码。", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图},\n xlabel={X 轴标签},\n ylabel={Y 轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n grid style=dashed,\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n]\ncoordinates {\n (1,10)(2,30)(3,40)(4,50)(5,60)(6,65)(7,70)(8,75)(9,80)(10,85)\n};\n\\addlegendentry{数据集 A}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n]\ncoordinates {\n (1,5)(2,20)(3,35)(4,40)(5,55)(6,60)(7,65)(8,70)(9,75)(10,80)\n};\n\\addlegendentry{数据集 B}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", - "generation_description": "用户查询: 生成折线图", - "created_at": "2025-12-10T03:01:27.816Z", - "metadata": { - "chart_type": "line", - "data_ids": [ - 2 - ], - "has_chart_code": true, - "code_length": 728 - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/6.json b/src/hello/backend/storage/history/2/6.json deleted file mode 100644 index 48fb3c73..00000000 --- a/src/hello/backend/storage/history/2/6.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "history_id": 6, - "user_id": 2, - "data_id": 2, - "file_name": "test.xlsx", - "dataset_name": "test", - "user_input": "生成直方图", - "ai_response": "我将根据您上传的数据集生成直方图的LaTeX PGFPlots代码。由于我无法直接查看Excel文件的内容,我将提供一个通用的直方图模板,您可以根据实际数据调整参数。\n\n以下是直方图的LaTeX代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={数据分布直方图},\n xlabel={数据值},\n ylabel={频数},\n ybar interval,\n xticklabel style={rotate=45, anchor=east},\n width=12cm,\n height=8cm,\n grid=major,\n grid style={dashed, gray!30},\n bar width=0.8cm,\n nodes near coords,\n every node near coord/.style={font=\\tiny},\n x tick label style={/pgf/number format/.cd, fixed, fixed zerofill, precision=1},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1}\n]\n\n% 示例数据 - 请替换为您的实际数据\n\\addplot+[hist={bins=10, data min=0, data max=100}]\ntable[row sep=\\\\, y index=0] {\ndata\\\\\n10\\\\ 15\\\\ 20\\\\ 25\\\\ 30\\\\ 35\\\\ 40\\\\ 45\\\\ 50\\\\ 55\\\\\n60\\\\ 65\\\\ 70\\\\ 75\\\\ 80\\\\ 85\\\\ 90\\\\ 95\\\\ 100\\\\\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{数据分布直方图示例}\n\\label{fig:histogram}\n\\end{figure}\n\n\\end{document}\n```\n\n如果您有特定的数据需要可视化,请提供以下信息,我可以为您生成更精确的代码:\n\n1. **数据范围**:最小值和最大值\n2. **分组数量**:直方图的柱子数量\n3. **数据特征**:数据的分布特点\n4. **图表样式**:颜色、标签、标题等偏好\n\n或者,如果您能提供数据的具体内容(如CSV格式或数据表),我可以为您生成完全匹配的代码。\n\n**使用说明**:\n1. 将代码保存为`.tex`文件\n2. 使用LaTeX编译器(如TeX Live、MiKTeX)编译\n3. 如果需要使用实际数据,请将示例数据替换为您的数据\n\n您是否需要我根据特定的数据格式或要求调整这个直方图?", - "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={数据分布直方图},\n xlabel={数据值},\n ylabel={频数},\n ybar interval,\n xticklabel style={rotate=45, anchor=east},\n width=12cm,\n height=8cm,\n grid=major,\n grid style={dashed, gray!30},\n bar width=0.8cm,\n nodes near coords,\n every node near coord/.style={font=\\tiny},\n x tick label style={/pgf/number format/.cd, fixed, fixed zerofill, precision=1},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1}\n]\n\n% 示例数据 - 请替换为您的实际数据\n\\addplot+[hist={bins=10, data min=0, data max=100}]\ntable[row sep=\\\\, y index=0] {\ndata\\\\\n10\\\\ 15\\\\ 20\\\\ 25\\\\ 30\\\\ 35\\\\ 40\\\\ 45\\\\ 50\\\\ 55\\\\\n60\\\\ 65\\\\ 70\\\\ 75\\\\ 80\\\\ 85\\\\ 90\\\\ 95\\\\ 100\\\\\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{数据分布直方图示例}\n\\label{fig:histogram}\n\\end{figure}\n\n\\end{document}", - "generation_description": "用户查询: 生成直方图", - "created_at": "2025-12-10T03:08:45.640Z", - "metadata": { - "chart_type": "bar", - "data_ids": [ - 2 - ], - "has_chart_code": true, - "code_length": 943 - } -} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/7.json b/src/hello/backend/storage/history/2/7.json deleted file mode 100644 index f3b6f834..00000000 --- a/src/hello/backend/storage/history/2/7.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "history_id": 7, - "user_id": 2, - "data_id": 1, - "file_name": "test.txt", - "dataset_name": "测试", - "user_input": "你可以阅读它们吗\n", - "ai_response": "是的,我可以读取您上传的数据文件。根据内容,您上传了两个文件:\n\n1. **test.txt**:包含一行年份(2021-2026)和一行对应的数值(单位:万),数据如下:\n ```\n 2021年 2022年 2023年 2024年 2025年 2026年\n 377万 457万 474万 438万 388万 343万\n ```\n\n2. **test.xlsx**:这是一个Excel文件,包含多个工作表(sheet1、sheet2、sheet3),但您提供的文本内容似乎是该文件的二进制编码,无法直接解析为可读数据。不过,从您提供的文本片段中,我可以看到一些数据片段(如“377万”、“457万”等),这些数据与test.txt中的内容一致。\n\n基于这些数据,我可以为您生成一个图表。例如,可以创建一个折线图或柱状图来展示2021年至2026年的数值变化。以下是一个使用LaTeX PGFPlots生成的简单柱状图代码示例,展示这些数据:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={2021-2026年数据变化},\n xlabel={年份},\n ylabel={数值(万)},\n ymin=300,\n ymax=500,\n xtick=data,\n xticklabels={2021,2022,2023,2024,2025,2026},\n ymajorgrids=true,\n grid style=dashed,\n bar width=0.6cm,\n ybar,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.append style={font=\\small, yshift=5pt},\n width=12cm,\n height=8cm,\n]\n\n\\addplot coordinates {\n (1,377)\n (2,457)\n (3,474)\n (4,438)\n (5,388)\n (6,343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{基于test.txt数据生成的柱状图。数据点显示为柱状图上的数值标签。}\n\\end{figure}\n\n\\end{document}\n```\n\n### 代码说明:\n- **图表类型**:柱状图(`ybar`),适合展示年度数据对比。\n- **数据点**:坐标基于test.txt中的数据,年份映射为x轴位置(1到6),数值为y轴值。\n- **样式设置**:\n - 标题、轴标签、网格线等基础设置。\n - `ymin`和`ymax`手动设置以优化显示范围。\n - `nodes near coords`在柱状图上显示具体数值。\n - 图表尺寸调整为12cm×8cm,适合A4页面。\n- **数据来源**:仅使用了test.txt中的数据,因为Excel文件内容未明确提供额外信息。\n\n如果您需要其他类型的图表(如折线图、散点图)或希望调整样式(颜色、标签、图例等),请告诉我,我可以修改代码以满足您的需求。此外,如果test.xlsx中有其他需要可视化的数据,请提供更详细的信息或提取后的数据,以便我为您生成更全面的图表。", - "chart_code": "2021年 2022年 2023年 2024年 2025年 2026年\n 377万 457万 474万 438万 388万 343万", - "generation_description": "用户查询: 你可以阅读它们吗\n", - "created_at": "2025-12-10T03:10:53.624Z", - "metadata": { - "chart_type": "line", - "data_ids": [ - 1, - 2 - ], - "has_chart_code": true, - "code_length": 68 - } -} \ No newline at end of file diff --git a/src/hello/backend/uploads/1764816049366-764027884.txt b/src/hello/backend/uploads/1764816049366-764027884.txt deleted file mode 100644 index 8876332b..00000000 --- a/src/hello/backend/uploads/1764816049366-764027884.txt +++ /dev/null @@ -1,11 +0,0 @@ -https://blog.csdn.net/s_naughty/article/details/144981486参考网址 -国内下载node.JS即可 - - -vue create xx -cd xx - -npm run serve运行 - - -保存即可实时更新 \ No newline at end of file diff --git a/src/hello/backend/uploads/1765164260279-800046417.txt b/src/hello/backend/uploads/1765164260279-800046417.txt deleted file mode 100644 index 84a83d35..00000000 --- a/src/hello/backend/uploads/1765164260279-800046417.txt +++ /dev/null @@ -1 +0,0 @@ -source D:\A\1.sql \ No newline at end of file diff --git a/src/hello/backend/uploads/1765164658111-19052528.txt b/src/hello/backend/uploads/1765164658111-19052528.txt deleted file mode 100644 index 8876332b..00000000 --- a/src/hello/backend/uploads/1765164658111-19052528.txt +++ /dev/null @@ -1,11 +0,0 @@ -https://blog.csdn.net/s_naughty/article/details/144981486参考网址 -国内下载node.JS即可 - - -vue create xx -cd xx - -npm run serve运行 - - -保存即可实时更新 \ No newline at end of file diff --git a/src/hello/backend/uploads/1765176544456-938258365.png b/src/hello/backend/uploads/1765176544456-938258365.png deleted file mode 100644 index b7f1a28c..00000000 Binary files a/src/hello/backend/uploads/1765176544456-938258365.png and /dev/null differ diff --git a/src/hello/backend/uploads/1765179027490-890137162.txt b/src/hello/backend/uploads/1765179027490-890137162.txt deleted file mode 100644 index 8876332b..00000000 --- a/src/hello/backend/uploads/1765179027490-890137162.txt +++ /dev/null @@ -1,11 +0,0 @@ -https://blog.csdn.net/s_naughty/article/details/144981486参考网址 -国内下载node.JS即可 - - -vue create xx -cd xx - -npm run serve运行 - - -保存即可实时更新 \ No newline at end of file diff --git a/src/hello/backend/uploads/1765252300385-86393892.xlsx b/src/hello/backend/uploads/1765252300385-86393892.xlsx deleted file mode 100644 index a7e043a2..00000000 Binary files a/src/hello/backend/uploads/1765252300385-86393892.xlsx and /dev/null differ diff --git a/src/hello/backend/uploads/1765289877906-669835215.txt b/src/hello/backend/uploads/1765289877906-669835215.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765289877906-669835215.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765292159337-98777043.txt b/src/hello/backend/uploads/1765292159337-98777043.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765292159337-98777043.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765293849467-954122175.txt b/src/hello/backend/uploads/1765293849467-954122175.txt deleted file mode 100644 index 8876332b..00000000 --- a/src/hello/backend/uploads/1765293849467-954122175.txt +++ /dev/null @@ -1,11 +0,0 @@ -https://blog.csdn.net/s_naughty/article/details/144981486参考网址 -国内下载node.JS即可 - - -vue create xx -cd xx - -npm run serve运行 - - -保存即可实时更新 \ No newline at end of file diff --git a/src/hello/backend/uploads/1765294114483-787432264.txt b/src/hello/backend/uploads/1765294114483-787432264.txt deleted file mode 100644 index 8876332b..00000000 --- a/src/hello/backend/uploads/1765294114483-787432264.txt +++ /dev/null @@ -1,11 +0,0 @@ -https://blog.csdn.net/s_naughty/article/details/144981486参考网址 -国内下载node.JS即可 - - -vue create xx -cd xx - -npm run serve运行 - - -保存即可实时更新 \ No newline at end of file diff --git a/src/hello/backend/uploads/1765294721313-148273429.txt b/src/hello/backend/uploads/1765294721313-148273429.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765294721313-148273429.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765335659532-235551492.xlsx b/src/hello/backend/uploads/1765335659532-235551492.xlsx deleted file mode 100644 index d686fba7..00000000 Binary files a/src/hello/backend/uploads/1765335659532-235551492.xlsx and /dev/null differ diff --git a/src/hello/backend/uploads/1765336320582-343717199.xlsx b/src/hello/backend/uploads/1765336320582-343717199.xlsx deleted file mode 100644 index d686fba7..00000000 Binary files a/src/hello/backend/uploads/1765336320582-343717199.xlsx and /dev/null differ diff --git a/src/hello/backend/uploads/1765443316043-511473345.txt b/src/hello/backend/uploads/1765443316043-511473345.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765443316043-511473345.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765465102501-519310196.txt b/src/hello/backend/uploads/1765465102501-519310196.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765465102501-519310196.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765466699247-486960765.txt b/src/hello/backend/uploads/1765466699247-486960765.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765466699247-486960765.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765519967760-288135528.txt b/src/hello/backend/uploads/1765519967760-288135528.txt deleted file mode 100644 index c6cb888f..00000000 --- a/src/hello/backend/uploads/1765519967760-288135528.txt +++ /dev/null @@ -1,2 +0,0 @@ -男生 52% -女生 48% \ No newline at end of file diff --git a/src/hello/backend/uploads/1765529169462-890462373.txt b/src/hello/backend/uploads/1765529169462-890462373.txt deleted file mode 100644 index 8876332b..00000000 --- a/src/hello/backend/uploads/1765529169462-890462373.txt +++ /dev/null @@ -1,11 +0,0 @@ -https://blog.csdn.net/s_naughty/article/details/144981486参考网址 -国内下载node.JS即可 - - -vue create xx -cd xx - -npm run serve运行 - - -保存即可实时更新 \ No newline at end of file diff --git a/src/hello/backend/uploads/1765530750846-699069599.xlsx b/src/hello/backend/uploads/1765530750846-699069599.xlsx deleted file mode 100644 index d686fba7..00000000 Binary files a/src/hello/backend/uploads/1765530750846-699069599.xlsx and /dev/null differ diff --git a/src/hello/backend/uploads/1765531717372-74845116.xlsx b/src/hello/backend/uploads/1765531717372-74845116.xlsx deleted file mode 100644 index d686fba7..00000000 Binary files a/src/hello/backend/uploads/1765531717372-74845116.xlsx and /dev/null differ diff --git a/src/hello/backend/uploads/1765531727685-617018012.txt b/src/hello/backend/uploads/1765531727685-617018012.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765531727685-617018012.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765547604826-43909521.txt b/src/hello/backend/uploads/1765547604826-43909521.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765547604826-43909521.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765550422684-330066234.txt b/src/hello/backend/uploads/1765550422684-330066234.txt deleted file mode 100644 index c6cb888f..00000000 --- a/src/hello/backend/uploads/1765550422684-330066234.txt +++ /dev/null @@ -1,2 +0,0 @@ -男生 52% -女生 48% \ No newline at end of file diff --git a/src/hello/backend/uploads/1765550539249-820071406.txt b/src/hello/backend/uploads/1765550539249-820071406.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765550539249-820071406.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765552388531-851909563.txt b/src/hello/backend/uploads/1765552388531-851909563.txt deleted file mode 100644 index c6cb888f..00000000 --- a/src/hello/backend/uploads/1765552388531-851909563.txt +++ /dev/null @@ -1,2 +0,0 @@ -男生 52% -女生 48% \ No newline at end of file diff --git a/src/hello/backend/uploads/1765553298923-121184478.txt b/src/hello/backend/uploads/1765553298923-121184478.txt deleted file mode 100644 index c6cb888f..00000000 --- a/src/hello/backend/uploads/1765553298923-121184478.txt +++ /dev/null @@ -1,2 +0,0 @@ -男生 52% -女生 48% \ No newline at end of file diff --git a/src/hello/backend/uploads/1765553737854-309106534.txt b/src/hello/backend/uploads/1765553737854-309106534.txt deleted file mode 100644 index c6cb888f..00000000 --- a/src/hello/backend/uploads/1765553737854-309106534.txt +++ /dev/null @@ -1,2 +0,0 @@ -男生 52% -女生 48% \ No newline at end of file diff --git a/src/hello/backend/uploads/1765779468005-200119650.xlsx b/src/hello/backend/uploads/1765779468005-200119650.xlsx deleted file mode 100644 index d686fba7..00000000 Binary files a/src/hello/backend/uploads/1765779468005-200119650.xlsx and /dev/null differ diff --git a/src/hello/backend/uploads/1765779506209-563257344.txt b/src/hello/backend/uploads/1765779506209-563257344.txt deleted file mode 100644 index ccb3ec67..00000000 --- a/src/hello/backend/uploads/1765779506209-563257344.txt +++ /dev/null @@ -1,2 +0,0 @@ -2021年 2022年 2023年 2024年 2025年 2026年 -377万 457万 474万 438万 388万 343万 diff --git a/src/hello/backend/uploads/1765779570418-478995305.md b/src/hello/backend/uploads/1765779570418-478995305.md deleted file mode 100644 index 2fdd00b2..00000000 --- a/src/hello/backend/uploads/1765779570418-478995305.md +++ /dev/null @@ -1,24 +0,0 @@ -# hello - -## Project setup -``` -npm install -``` - -### Compiles and hot-reloads for development -``` -npm run serve -``` - -### Compiles and minifies for production -``` -npm run build -``` - -### Lints and fixes files -``` -npm run lint -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/src/hello/backend/uploads/1765779583800-967348828.xlsx b/src/hello/backend/uploads/1765779583800-967348828.xlsx deleted file mode 100644 index d686fba7..00000000 Binary files a/src/hello/backend/uploads/1765779583800-967348828.xlsx and /dev/null differ diff --git a/src/hello/backend/yarn.lock b/src/hello/backend/yarn.lock deleted file mode 100644 index 0e918fd6..00000000 --- a/src/hello/backend/yarn.lock +++ /dev/null @@ -1,1705 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@eslint-community/eslint-utils@^4.2.0": - version "4.9.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" - integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g== - dependencies: - eslint-visitor-keys "^3.4.3" - -"@eslint-community/regexpp@^4.6.1": - version "4.12.2" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" - integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.57.1": - version "8.57.1" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" - integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== - -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== - dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@ungap/structured-clone@^1.2.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" - integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn@^8.9.0: - version "8.15.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" - integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== - -adler-32@~1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/adler-32/-/adler-32-1.3.1.tgz#1dbf0b36dda0012189a32b3679061932df1821e2" - integrity sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A== - -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -aws-ssl-profiles@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz#157dd77e9f19b1d123678e93f120e6f193022641" - integrity sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g== - -axios@^1.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.13.2.tgz#9ada120b7b5ab24509553ec3e40123521117f687" - integrity sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.4" - proxy-from-env "^1.1.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -bcryptjs@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-3.0.3.tgz#4b93d6a398c48bfc9f32ee65d301174a8a8ea56f" - integrity sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g== - -bignumber.js@9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" - integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== - -binary-extensions@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" - integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== - -body-parser@~1.20.3: - version "1.20.4" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.4.tgz#f8e20f4d06ca8a50a71ed329c15dccad1cdc547f" - integrity sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA== - dependencies: - bytes "~3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "~1.2.0" - http-errors "~2.0.1" - iconv-lite "~0.4.24" - on-finished "~2.4.1" - qs "~6.14.0" - raw-body "~2.5.3" - type-is "~1.6.18" - unpipe "~1.0.0" - -brace-expansion@^1.1.7: - version "1.1.12" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" - integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@~3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -buffer-equal-constant-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== - -bytes@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" - integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - -call-bound@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a" - integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg== - dependencies: - call-bind-apply-helpers "^1.0.2" - get-intrinsic "^1.3.0" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -cfb@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cfb/-/cfb-1.2.2.tgz#94e687628c700e5155436dac05f74e08df23bc44" - integrity sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA== - dependencies: - adler-32 "~1.3.0" - crc-32 "~1.2.0" - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -child_process@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/child_process/-/child_process-1.0.2.tgz#b1f7e7fc73d25e7fd1d455adc94e143830182b5a" - integrity sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g== - -chokidar@^3.5.2: - version "3.6.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" - integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -codepage@~1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/codepage/-/codepage-1.15.0.tgz#2e00519024b39424ec66eeb3ec07227e692618ab" - integrity sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA== - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -content-disposition@~0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4, content-type@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - -cookie-signature@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.7.tgz#ab5dd7ab757c54e60f37ef6550f481c426d10454" - integrity sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA== - -cookie@~0.7.1: - version "0.7.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" - integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -crc-32@~1.2.0, crc-32@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -cross-spawn@^7.0.2: - version "7.0.6" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" - integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^4, debug@^4.3.1, debug@^4.3.2: - version "4.4.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== - dependencies: - ms "^2.1.3" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -denque@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" - integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== - -depd@2.0.0, depd@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -destroy@1.2.0, destroy@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dotenv@^16.3.1: - version "16.6.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.6.1.tgz#773f0e69527a8315c7285d5ee73c4459d20a8020" - integrity sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow== - -dunder-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" - integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== - dependencies: - call-bind-apply-helpers "^1.0.1" - es-errors "^1.3.0" - gopd "^1.2.0" - -ecdsa-sig-formatter@1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -encodeurl@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" - integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== - -es-define-property@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" - integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== - -es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" - integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== - dependencies: - es-errors "^1.3.0" - -es-set-tostringtag@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" - integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== - dependencies: - es-errors "^1.3.0" - get-intrinsic "^1.2.6" - has-tostringtag "^1.0.2" - hasown "^2.0.2" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-config-google@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.14.0.tgz#4f5f8759ba6e11b424294a219dbfa18c508bcc1a" - integrity sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw== - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -eslint@^8.45.0: - version "8.57.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" - integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.1" - "@humanwhocodes/config-array" "^0.13.0" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esquery@^1.4.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" - integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -express@^4.18.2: - version "4.22.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.22.1.tgz#1de23a09745a4fffdb39247b344bb5eaff382069" - integrity sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "~1.20.3" - content-disposition "~0.5.4" - content-type "~1.0.4" - cookie "~0.7.1" - cookie-signature "~1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~2.0.0" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.3.1" - fresh "~0.5.2" - http-errors "~2.0.0" - merge-descriptors "1.0.3" - methods "~1.1.2" - on-finished "~2.4.1" - parseurl "~1.3.3" - path-to-regexp "~0.1.12" - proxy-addr "~2.0.7" - qs "~6.14.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "~0.19.0" - serve-static "~1.16.2" - setprototypeof "1.2.0" - statuses "~2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.19.1" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" - integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== - dependencies: - reusify "^1.0.4" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@~1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.2.tgz#1ebc2228fc7673aac4a472c310cc05b77d852b88" - integrity sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg== - dependencies: - debug "2.6.9" - encodeurl "~2.0.0" - escape-html "~1.0.3" - on-finished "~2.4.1" - parseurl "~1.3.3" - statuses "~2.0.2" - unpipe "~1.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - -flatted@^3.2.9: - version "3.3.3" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358" - integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== - -follow-redirects@^1.15.6: - version "1.15.11" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.11.tgz#777d73d72a92f8ec4d2e410eb47352a56b8e8340" - integrity sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ== - -form-data@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.5.tgz#b49e48858045ff4cbf6b03e1805cebcad3679053" - integrity sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - es-set-tostringtag "^2.1.0" - hasown "^2.0.2" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -frac@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b" - integrity sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA== - -fresh@0.5.2, fresh@~0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -generate-function@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" - integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== - dependencies: - is-property "^1.0.2" - -get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" - integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== - dependencies: - call-bind-apply-helpers "^1.0.2" - es-define-property "^1.0.1" - es-errors "^1.3.0" - es-object-atoms "^1.1.1" - function-bind "^1.1.2" - get-proto "^1.0.1" - gopd "^1.2.0" - has-symbols "^1.1.0" - hasown "^2.0.2" - math-intrinsics "^1.1.0" - -get-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" - integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== - dependencies: - dunder-proto "^1.0.1" - es-object-atoms "^1.0.0" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" - -gopd@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" - integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbols@^1.0.3, has-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" - integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== - -has-tostringtag@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" - integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== - dependencies: - has-symbols "^1.0.3" - -hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-errors@~2.0.0, http-errors@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.1.tgz#36d2f65bc909c8790018dd36fb4d93da6caae06b" - integrity sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ== - dependencies: - depd "~2.0.0" - inherits "~2.0.4" - setprototypeof "~1.2.0" - statuses "~2.0.2" - toidentifier "~1.0.1" - -iconv-lite@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.7.1.tgz#d4af1d2092f2bb05aab6296e5e7cd286d2f15432" - integrity sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -iconv-lite@~0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ignore-by-default@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" - integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== - -ignore@^5.2.0: - version "5.3.2" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" - integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== - -import-fresh@^3.2.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" - integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@~2.0.3, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-property@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -js-yaml@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" - integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== - dependencies: - argparse "^2.0.1" - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -jsonwebtoken@^9.0.2: - version "9.0.3" - resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz#6cd57ab01e9b0ac07cb847d53d3c9b6ee31f7ae2" - integrity sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g== - dependencies: - jws "^4.0.1" - lodash.includes "^4.3.0" - lodash.isboolean "^3.0.3" - lodash.isinteger "^4.0.4" - lodash.isnumber "^3.0.3" - lodash.isplainobject "^4.0.6" - lodash.isstring "^4.0.1" - lodash.once "^4.0.0" - ms "^2.1.1" - semver "^7.5.4" - -jwa@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.1.tgz#bf8176d1ad0cd72e0f3f58338595a13e110bc804" - integrity sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg== - dependencies: - buffer-equal-constant-time "^1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.1.tgz#07edc1be8fac20e677b283ece261498bd38f0690" - integrity sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA== - dependencies: - jwa "^2.0.1" - safe-buffer "^5.0.1" - -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.includes@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" - integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== - -lodash.isboolean@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" - integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== - -lodash.isinteger@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" - integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== - -lodash.isnumber@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" - integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== - -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== - -lodash.isstring@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" - integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.once@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" - integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== - -long@^5.2.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/long/-/long-5.3.2.tgz#1d84463095999262d7d7b7f8bfd4a8cc55167f83" - integrity sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA== - -lru.min@^1.0.0, lru.min@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/lru.min/-/lru.min-1.1.3.tgz#c8c3d001dfb4cbe5b8d1f4bea207d4a320e5d76f" - integrity sha512-Lkk/vx6ak3rYkRR0Nhu4lFUT2VDnQSxBe8Hbl7f36358p6ow8Bnvr8lrLt98H8J1aGxfhbX4Fs5tYg2+FTwr5Q== - -math-intrinsics@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" - integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -merge-descriptors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" - integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.3, ms@^2.1.1, ms@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -mysql2@^3.15.3: - version "3.15.3" - resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-3.15.3.tgz#f0348d9c7401bb98cb1f45ffc5a773b109f70808" - integrity sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg== - dependencies: - aws-ssl-profiles "^1.1.1" - denque "^2.1.0" - generate-function "^2.3.1" - iconv-lite "^0.7.0" - long "^5.2.1" - lru.min "^1.0.0" - named-placeholders "^1.1.3" - seq-queue "^0.0.5" - sqlstring "^2.3.2" - -mysql@^2.18.1: - version "2.18.1" - resolved "https://registry.yarnpkg.com/mysql/-/mysql-2.18.1.tgz#2254143855c5a8c73825e4522baf2ea021766717" - integrity sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig== - dependencies: - bignumber.js "9.0.0" - readable-stream "2.3.7" - safe-buffer "5.1.2" - sqlstring "2.3.1" - -named-placeholders@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.4.tgz#92882114525181077e21aab96889f25e857e233a" - integrity sha512-/qfG0Kk/bLJIvej4FcPQ2KYUJP8iQdU1CTxysNb/U2wUNb+/4K485yeio8iNoiwfqJnsTInXoRPTza0dZWHVJQ== - dependencies: - lru.min "^1.1.0" - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -nodemailer@^7.0.11: - version "7.0.11" - resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-7.0.11.tgz#5f7b06afaec20073cff36bea92d1c7395cc3e512" - integrity sha512-gnXhNRE0FNhD7wPSCGhdNh46Hs6nm+uTyg+Kq0cZukNQiYdnCsoQjodNP9BQVG9XrcK/v6/MgpAPBUFyzh9pvw== - -nodemon@^3.0.1: - version "3.1.11" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.1.11.tgz#04a54d1e794fbec9d8f6ffd8bf1ba9ea93a756ed" - integrity sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g== - dependencies: - chokidar "^3.5.2" - debug "^4" - ignore-by-default "^1.0.1" - minimatch "^3.1.2" - pstree.remy "^1.1.8" - semver "^7.5.3" - simple-update-notifier "^2.0.0" - supports-color "^5.5.0" - touch "^3.1.0" - undefsafe "^2.0.5" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -object-inspect@^1.13.3: - version "1.13.4" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213" - integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew== - -on-finished@2.4.1, on-finished@~2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-to-regexp@~0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz#d5e1a12e478a976d432ef3c58d534b9923164bb7" - integrity sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -pstree.remy@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" - integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== - -punycode@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -qs@~6.14.0: - version "6.14.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930" - integrity sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w== - dependencies: - side-channel "^1.1.0" - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@~2.5.3: - version "2.5.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.3.tgz#11c6650ee770a7de1b494f197927de0c923822e2" - integrity sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA== - dependencies: - bytes "~3.1.2" - http-errors "~2.0.1" - iconv-lite "~0.4.24" - unpipe "~1.0.0" - -readable-stream@2.3.7: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -reusify@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" - integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@^5.0.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -semver@^7.5.3, semver@^7.5.4: - version "7.7.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" - integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== - -send@0.19.0: - version "0.19.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" - integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -send@~0.19.0: - version "0.19.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.19.1.tgz#1c2563b2ee4fe510b806b21ec46f355005a369f9" - integrity sha512-p4rRk4f23ynFEfcD9LA0xRYngj+IyGiEYyqqOak8kaN0TvNmuxC2dcVeBn62GpCeR2CpWqyHCNScTP91QbAVFg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~2.0.0" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -seq-queue@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e" - integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q== - -serve-static@~1.16.2: - version "1.16.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" - integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== - dependencies: - encodeurl "~2.0.0" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.19.0" - -setprototypeof@1.2.0, setprototypeof@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -side-channel-list@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad" - integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA== - dependencies: - es-errors "^1.3.0" - object-inspect "^1.13.3" - -side-channel-map@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/side-channel-map/-/side-channel-map-1.0.1.tgz#d6bb6b37902c6fef5174e5f533fab4c732a26f42" - integrity sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA== - dependencies: - call-bound "^1.0.2" - es-errors "^1.3.0" - get-intrinsic "^1.2.5" - object-inspect "^1.13.3" - -side-channel-weakmap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz#11dda19d5368e40ce9ec2bdc1fb0ecbc0790ecea" - integrity sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A== - dependencies: - call-bound "^1.0.2" - es-errors "^1.3.0" - get-intrinsic "^1.2.5" - object-inspect "^1.13.3" - side-channel-map "^1.0.1" - -side-channel@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9" - integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw== - dependencies: - es-errors "^1.3.0" - object-inspect "^1.13.3" - side-channel-list "^1.0.0" - side-channel-map "^1.0.1" - side-channel-weakmap "^1.0.2" - -simple-update-notifier@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb" - integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w== - dependencies: - semver "^7.5.3" - -sqlstring@2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.1.tgz#475393ff9e91479aea62dcaf0ca3d14983a7fb40" - integrity sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ== - -sqlstring@^2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c" - integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg== - -ssf@~0.11.2: - version "0.11.2" - resolved "https://registry.yarnpkg.com/ssf/-/ssf-0.11.2.tgz#0b99698b237548d088fc43cdf2b70c1a7512c06c" - integrity sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g== - dependencies: - frac "~1.1.2" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -statuses@~2.0.1, statuses@~2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382" - integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw== - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1, toidentifier@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -touch@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.1.tgz#097a23d7b161476435e5c1344a95c0f75b4a5694" - integrity sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -undefsafe@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" - integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== - -unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@^13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-13.0.0.tgz#263dc341b19b4d755eb8fe36b78d95a6b65707e8" - integrity sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w== - -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wmf@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da" - integrity sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw== - -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== - -word@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/word/-/word-0.3.0.tgz#8542157e4f8e849f4a363a288992d47612db9961" - integrity sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA== - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -xlsx@^0.18.5: - version "0.18.5" - resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.18.5.tgz#16711b9113c848076b8a177022799ad356eba7d0" - integrity sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ== - dependencies: - adler-32 "~1.3.0" - cfb "~1.2.1" - codepage "~1.15.0" - crc-32 "~1.2.1" - ssf "~0.11.2" - wmf "~1.0.1" - word "~0.3.0" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/src/hello/backend/.env b/src/hello/server/.env similarity index 70% rename from src/hello/backend/.env rename to src/hello/server/.env index a35ed976..6f60367b 100644 --- a/src/hello/backend/.env +++ b/src/hello/server/.env @@ -1,16 +1,10 @@ # 服务器配置 -PORT=3000 +PORT=8889 NODE_ENV=development # JWT密钥(用于生成token) JWT_SECRET=your-super-secret-jwt-key-2024 -# 数据库配置 -DB_HOST=localhost -DB_USER=root -DB_PASSWORD=your-mysql-password -DB_NAME=your-database-name - # 邮件服务配置(QQ邮箱示例) SMTP_HOST=smtp.qq.com SMTP_PORT=465 @@ -21,5 +15,5 @@ SMTP_FROM="系统管理员 <3242899892@qq.com>" # AI接口调用 DEEPSEEK_API_KEY=sk-2e1cd028b63c4e1d8623f88a5b842ee6 DEEPSEEK_API_URL=https://api.deepseek.com/v1/chat/completions -PORT=3000 +PORT=8889 DATABASE_URL=your-database-url \ No newline at end of file diff --git a/src/hello/backend/app.js b/src/hello/server/app.js similarity index 91% rename from src/hello/backend/app.js rename to src/hello/server/app.js index ae2089c2..444aa685 100644 --- a/src/hello/backend/app.js +++ b/src/hello/server/app.js @@ -1,45 +1,46 @@ -// app.js -require('dotenv').config(); -const express = require('express'); -const cors = require('cors') -const path = require('path'); -const app = express(); - - -app.use(cors())// 使用中间件解决跨域问题 -app.use(express.json()); - -// 路由引入 -const authRoutes = require('./routes/auth'); -const deepseekRoutes = require('./routes/deepseek'); -const feedbackRoutes = require('./routes/feedback'); -const verificationRoutes = require('./routes/verification'); -const datasetsRoutes = require('./routes/datasets'); -const compileRouter = require('./routes/compile'); -const historyRouter = require('./routes/history'); -const noticeRouter = require('./routes/notice'); -const adminNoticeRouter = require('./routes/AdminNotice'); -const adminUserRouter = require('./routes/AdminUser'); -const adminLogRouter = require('./routes/AdminLog'); -const adminStaticRouter = require('./routes/AdminStatic'); -// 路由注册 -app.use('/api/auth', authRoutes); -app.use('/api/deepseek', deepseekRoutes); -app.use('/api/feedback', feedbackRoutes); -app.use('/api/verification', verificationRoutes); -app.use('/api/datasets', datasetsRoutes); -app.use('/api/compile', compileRouter); -app.use('/api/history', historyRouter); -app.use('/api/notice', noticeRouter); -app.use('/api/admin/notices', adminNoticeRouter); -app.use('/api/admin/users', adminUserRouter); -app.use('/api/admin/log', adminLogRouter); -app.use('/api/admin/static', adminStaticRouter); -//静态文件服务,查看pdf -app.use('/storage', express.static(path.join(__dirname, 'storage'))); - -// 启动服务器 -const PORT = process.env.PORT || 3000; -app.listen(PORT, () => { - console.log(`服务器运行在端口 ${PORT}`); +// app.js +require('dotenv').config(); +const express = require('express'); +const cors = require('cors') +const path = require('path'); +const app = express(); + + +app.use(cors())// 使用中间件解决跨域问题 +app.use(express.json()); + +// 路由引入 +const authRoutes = require('./routes/auth'); +const deepseekRoutes = require('./routes/deepseek'); +const feedbackRoutes = require('./routes/feedback'); +const verificationRoutes = require('./routes/verification'); +const datasetsRoutes = require('./routes/datasets'); +const compileRouter = require('./routes/compile'); +const historyRouter = require('./routes/history'); +const noticeRouter = require('./routes/notice'); +const adminNoticeRouter = require('./routes/AdminNotice'); +const adminUserRouter = require('./routes/AdminUser'); +const adminLogRouter = require('./routes/AdminLog'); +const adminStaticRouter = require('./routes/AdminStatic'); +// 路由注册 +app.use('/api/auth', authRoutes); +app.use('/api/deepseek', deepseekRoutes); +app.use('/api/feedback', feedbackRoutes); +app.use('/api/verification', verificationRoutes); +app.use('/api/datasets', datasetsRoutes); +app.use('/api/compile', compileRouter); +app.use('/api/history', historyRouter); +app.use('/api/notice', noticeRouter); +app.use('/api/admin/notices', adminNoticeRouter); +app.use('/api/admin/users', adminUserRouter); +app.use('/api/admin/log', adminLogRouter); +app.use('/api/admin/static', adminStaticRouter); +//静态文件服务,查看pdf +app.use('/storage', express.static(path.join(__dirname, 'storage'))); + +// 启动服务器 +const PORT = process.env.PORT || 8889; +const HOST = process.env.HOST || '0.0.0.0'; //添加这行,允许外部访问 +app.listen(PORT,HOST, () => { + console.log(`服务器运行在端口 ${PORT}`); }); \ No newline at end of file diff --git a/src/hello/server/createAdmin.js b/src/hello/server/createAdmin.js new file mode 100644 index 00000000..45c0da77 --- /dev/null +++ b/src/hello/server/createAdmin.js @@ -0,0 +1,11 @@ +// generateHash.js +const bcrypt = require('bcryptjs'); + +async function generateHash() { + const hash = await bcrypt.hash('666666', 10); + console.log('密码哈希值:', hash); + console.log('请复制这个哈希值用于 SQL 插入'); + //$2b$10$kkbK9FE66BSuZt.zEyitl.G8WqkK2yUmusQ53HWkFKRzLq..4iuc2 +} + +generateHash(); \ No newline at end of file diff --git a/src/hello/backend/db.js b/src/hello/server/db.js similarity index 71% rename from src/hello/backend/db.js rename to src/hello/server/db.js index 13861fbf..470999b5 100644 --- a/src/hello/backend/db.js +++ b/src/hello/server/db.js @@ -1,12 +1,12 @@ -// db.js - 共享连接池 -const mysql = require('mysql2/promise'); -const pool = mysql.createPool({ - host: 'localhost', - user: 'root', - password: '201225', - database: 'X', - connectionLimit: 10, // 控制最大连接数 - waitForConnections: true -}); - +// db.js - 共享连接池 +const mysql = require('mysql2/promise'); +const pool = mysql.createPool({ + host: 'localhost', + user: 'mydb', + password: 'mydb', + database: 'X', + connectionLimit: 10, // 控制最大连接数 + waitForConnections: true +}); + module.exports = { promisePool: pool }; \ No newline at end of file diff --git a/src/hello/backend/middleware/auth.js b/src/hello/server/middleware/auth.js similarity index 100% rename from src/hello/backend/middleware/auth.js rename to src/hello/server/middleware/auth.js diff --git a/src/hello/server/missfont.log b/src/hello/server/missfont.log new file mode 100644 index 00000000..754862a1 --- /dev/null +++ b/src/hello/server/missfont.log @@ -0,0 +1 @@ +mktextfm SimSun/OT diff --git a/src/hello/backend/node_modules/acorn/bin/acorn b/src/hello/server/node_modules/.bin/acorn similarity index 100% rename from src/hello/backend/node_modules/acorn/bin/acorn rename to src/hello/server/node_modules/.bin/acorn diff --git a/src/hello/backend/node_modules/bcryptjs/bin/bcrypt b/src/hello/server/node_modules/.bin/bcrypt similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/bin/bcrypt rename to src/hello/server/node_modules/.bin/bcrypt diff --git a/src/hello/backend/node_modules/crc-32/bin/crc32.njs b/src/hello/server/node_modules/.bin/crc32 similarity index 100% rename from src/hello/backend/node_modules/crc-32/bin/crc32.njs rename to src/hello/server/node_modules/.bin/crc32 diff --git a/src/hello/backend/node_modules/eslint/bin/eslint.js b/src/hello/server/node_modules/.bin/eslint similarity index 100% rename from src/hello/backend/node_modules/eslint/bin/eslint.js rename to src/hello/server/node_modules/.bin/eslint diff --git a/src/hello/backend/node_modules/js-yaml/bin/js-yaml.js b/src/hello/server/node_modules/.bin/js-yaml similarity index 100% rename from src/hello/backend/node_modules/js-yaml/bin/js-yaml.js rename to src/hello/server/node_modules/.bin/js-yaml diff --git a/src/hello/backend/node_modules/mime/cli.js b/src/hello/server/node_modules/.bin/mime similarity index 100% rename from src/hello/backend/node_modules/mime/cli.js rename to src/hello/server/node_modules/.bin/mime diff --git a/src/hello/server/node_modules/.bin/mkdirp b/src/hello/server/node_modules/.bin/mkdirp new file mode 100644 index 00000000..d95de15a --- /dev/null +++ b/src/hello/server/node_modules/.bin/mkdirp @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/src/hello/server/node_modules/.bin/node-gyp-build b/src/hello/server/node_modules/.bin/node-gyp-build new file mode 100644 index 00000000..c778e0ab --- /dev/null +++ b/src/hello/server/node_modules/.bin/node-gyp-build @@ -0,0 +1,84 @@ +#!/usr/bin/env node + +var proc = require('child_process') +var os = require('os') +var path = require('path') + +if (!buildFromSource()) { + proc.exec('node-gyp-build-test', function (err, stdout, stderr) { + if (err) { + if (verbose()) console.error(stderr) + preinstall() + } + }) +} else { + preinstall() +} + +function build () { + var win32 = os.platform() === 'win32' + var shell = win32 + var args = [win32 ? 'node-gyp.cmd' : 'node-gyp', 'rebuild'] + + try { + var pkg = require('node-gyp/package.json') + args = [ + process.execPath, + path.join(require.resolve('node-gyp/package.json'), '..', typeof pkg.bin === 'string' ? pkg.bin : pkg.bin['node-gyp']), + 'rebuild' + ] + shell = false + } catch (_) {} + + proc.spawn(args[0], args.slice(1), { stdio: 'inherit', shell, windowsHide: true }).on('exit', function (code) { + if (code || !process.argv[3]) process.exit(code) + exec(process.argv[3]).on('exit', function (code) { + process.exit(code) + }) + }) +} + +function preinstall () { + if (!process.argv[2]) return build() + exec(process.argv[2]).on('exit', function (code) { + if (code) process.exit(code) + build() + }) +} + +function exec (cmd) { + if (process.platform !== 'win32') { + var shell = os.platform() === 'android' ? 'sh' : true + return proc.spawn(cmd, [], { + shell, + stdio: 'inherit' + }) + } + + return proc.spawn(cmd, [], { + windowsVerbatimArguments: true, + stdio: 'inherit', + shell: true, + windowsHide: true + }) +} + +function buildFromSource () { + return hasFlag('--build-from-source') || process.env.npm_config_build_from_source === 'true' +} + +function verbose () { + return hasFlag('--verbose') || process.env.npm_config_loglevel === 'verbose' +} + +// TODO (next major): remove in favor of env.npm_config_* which works since npm +// 0.1.8 while npm_config_argv will stop working in npm 7. See npm/rfcs#90 +function hasFlag (flag) { + if (!process.env.npm_config_argv) return false + + try { + return JSON.parse(process.env.npm_config_argv).original.indexOf(flag) !== -1 + } catch (_) { + return false + } +} diff --git a/src/hello/server/node_modules/.bin/node-gyp-build-optional b/src/hello/server/node_modules/.bin/node-gyp-build-optional new file mode 100644 index 00000000..8daa04a6 --- /dev/null +++ b/src/hello/server/node_modules/.bin/node-gyp-build-optional @@ -0,0 +1,7 @@ +#!/usr/bin/env node + +/* +I am only useful as an install script to make node-gyp not compile for purely optional native deps +*/ + +process.exit(0) diff --git a/src/hello/server/node_modules/.bin/node-gyp-build-test b/src/hello/server/node_modules/.bin/node-gyp-build-test new file mode 100644 index 00000000..b6622a5c --- /dev/null +++ b/src/hello/server/node_modules/.bin/node-gyp-build-test @@ -0,0 +1,19 @@ +#!/usr/bin/env node + +process.env.NODE_ENV = 'test' + +var path = require('path') +var test = null + +try { + var pkg = require(path.join(process.cwd(), 'package.json')) + if (pkg.name && process.env[pkg.name.toUpperCase().replace(/-/g, '_')]) { + process.exit(0) + } + test = pkg.prebuild.test +} catch (err) { + // do nothing +} + +if (test) require(path.join(process.cwd(), test)) +else require('./')() diff --git a/src/hello/backend/node_modules/which/bin/node-which b/src/hello/server/node_modules/.bin/node-which similarity index 100% rename from src/hello/backend/node_modules/which/bin/node-which rename to src/hello/server/node_modules/.bin/node-which diff --git a/src/hello/backend/node_modules/nodemon/bin/nodemon.js b/src/hello/server/node_modules/.bin/nodemon similarity index 100% rename from src/hello/backend/node_modules/nodemon/bin/nodemon.js rename to src/hello/server/node_modules/.bin/nodemon diff --git a/src/hello/backend/node_modules/touch/bin/nodetouch.js b/src/hello/server/node_modules/.bin/nodetouch similarity index 100% rename from src/hello/backend/node_modules/touch/bin/nodetouch.js rename to src/hello/server/node_modules/.bin/nodetouch diff --git a/src/hello/backend/node_modules/rimraf/bin.js b/src/hello/server/node_modules/.bin/rimraf similarity index 100% rename from src/hello/backend/node_modules/rimraf/bin.js rename to src/hello/server/node_modules/.bin/rimraf diff --git a/src/hello/backend/node_modules/semver/bin/semver.js b/src/hello/server/node_modules/.bin/semver similarity index 100% rename from src/hello/backend/node_modules/semver/bin/semver.js rename to src/hello/server/node_modules/.bin/semver diff --git a/src/hello/backend/node_modules/uuid/dist-node/bin/uuid b/src/hello/server/node_modules/.bin/uuid similarity index 100% rename from src/hello/backend/node_modules/uuid/dist-node/bin/uuid rename to src/hello/server/node_modules/.bin/uuid diff --git a/src/hello/backend/node_modules/xlsx/bin/xlsx.njs b/src/hello/server/node_modules/.bin/xlsx similarity index 100% rename from src/hello/backend/node_modules/xlsx/bin/xlsx.njs rename to src/hello/server/node_modules/.bin/xlsx diff --git a/src/hello/server/node_modules/.package-lock.json b/src/hello/server/node_modules/.package-lock.json new file mode 100644 index 00000000..95b7abc8 --- /dev/null +++ b/src/hello/server/node_modules/.package-lock.json @@ -0,0 +1,3139 @@ +{ + "name": "my-google-style-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmmirror.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmmirror.com/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/axios": { + "version": "1.13.2", + "resolved": "https://registry.npmmirror.com/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bcrypt": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/bcrypt/-/bcrypt-6.0.0.tgz", + "integrity": "sha512-cU8v/EGSrnH+HnxV2z0J7/blxH8gq7Xh2JFT6Aroax7UohdmiJJlxApMxtKfuI7z68NvvVcmR78k2LbT6efhRg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^8.3.0", + "node-gyp-build": "^4.8.4" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/bcryptjs": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/bcryptjs/-/bcryptjs-3.0.3.tgz", + "integrity": "sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==", + "license": "BSD-3-Clause", + "bin": { + "bcrypt": "bin/bcrypt" + } + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "1.20.4", + "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cfb": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "license": "Apache-2.0", + "dependencies": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/child_process": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/child_process/-/child_process-1.0.2.tgz", + "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==", + "license": "ISC" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-google": { + "version": "0.14.0", + "resolved": "https://registry.npmmirror.com/eslint-config-google/-/eslint-config-google-0.14.0.tgz", + "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "eslint": ">=5.16.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmmirror.com/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmmirror.com/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-validator": { + "version": "7.3.1", + "resolved": "https://registry.npmmirror.com/express-validator/-/express-validator-7.3.1.tgz", + "integrity": "sha512-IGenaSf+DnWc69lKuqlRE9/i/2t5/16VpH5bXoqdxWz1aCpRvEdrBuu1y95i/iL5QP8ZYVATiwLFhwk3EDl5vg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21", + "validator": "~13.15.23" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmmirror.com/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/frac": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmmirror.com/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "license": "MIT" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonwebtoken": { + "version": "9.0.3", + "resolved": "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", + "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", + "license": "MIT", + "dependencies": { + "jws": "^4.0.1", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "license": "MIT", + "dependencies": { + "jwa": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmmirror.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmmirror.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmmirror.com/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/lru.min": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/lru.min/-/lru.min-1.1.3.tgz", + "integrity": "sha512-Lkk/vx6ak3rYkRR0Nhu4lFUT2VDnQSxBe8Hbl7f36358p6ow8Bnvr8lrLt98H8J1aGxfhbX4Fs5tYg2+FTwr5Q==", + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/multer": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.6.0", + "concat-stream": "^2.0.0", + "mkdirp": "^0.5.6", + "object-assign": "^4.1.1", + "type-is": "^1.6.18", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmmirror.com/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "license": "MIT", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/mysql2": { + "version": "3.16.0", + "resolved": "https://registry.npmmirror.com/mysql2/-/mysql2-3.16.0.tgz", + "integrity": "sha512-AEGW7QLLSuSnjCS4pk3EIqOmogegmze9h8EyrndavUQnIUcfkVal/sK7QznE+a3bc6rzPbAiui9Jcb+96tPwYA==", + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.7.0", + "long": "^5.2.1", + "lru.min": "^1.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/mysql2/node_modules/iconv-lite": { + "version": "0.7.1", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.7.1.tgz", + "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/mysql2/node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.6.tgz", + "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==", + "license": "MIT", + "dependencies": { + "lru.min": "^1.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-addon-api": { + "version": "8.5.0", + "resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-8.5.0.tgz", + "integrity": "sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==", + "license": "MIT", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmmirror.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/nodemailer": { + "version": "7.0.12", + "resolved": "https://registry.npmmirror.com/nodemailer/-/nodemailer-7.0.12.tgz", + "integrity": "sha512-H+rnK5bX2Pi/6ms3sN4/jRQvYSMltV6vqup/0SFOrxYYY/qoNvhXPlYq3e+Pm9RFJRwrMGbMIwi81M4dxpomhA==", + "license": "MIT-0", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/nodemon": { + "version": "3.1.11", + "resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-3.1.11.tgz", + "integrity": "sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/nodemon/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmmirror.com/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.14.1", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmmirror.com/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmmirror.com/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ssf": { + "version": "0.11.2", + "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "license": "Apache-2.0", + "dependencies": { + "frac": "~1.1.2" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "13.0.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-13.0.0.tgz", + "integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, + "node_modules/validator": { + "version": "13.15.26", + "resolved": "https://registry.npmmirror.com/validator/-/validator-13.15.26.tgz", + "integrity": "sha512-spH26xU080ydGggxRyR1Yhcbgx+j3y5jbNXk/8L+iRvdIEQ4uTRH2Sgf2dokud6Q4oAtsbNvJ1Ft+9xmm6IZcA==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wmf": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xlsx": { + "version": "0.18.5", + "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz", + "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "license": "Apache-2.0", + "dependencies": { + "adler-32": "~1.3.0", + "cfb": "~1.2.1", + "codepage": "~1.15.0", + "crc-32": "~1.2.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + }, + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/LICENSE b/src/hello/server/node_modules/@eslint-community/eslint-utils/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/eslint-utils/LICENSE rename to src/hello/server/node_modules/@eslint-community/eslint-utils/LICENSE diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/README.md b/src/hello/server/node_modules/@eslint-community/eslint-utils/README.md similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/eslint-utils/README.md rename to src/hello/server/node_modules/@eslint-community/eslint-utils/README.md diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.d.mts b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.d.mts similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/eslint-utils/index.d.mts rename to src/hello/server/node_modules/@eslint-community/eslint-utils/index.d.mts diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.d.ts b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/eslint-utils/index.d.ts rename to src/hello/server/node_modules/@eslint-community/eslint-utils/index.d.ts diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.js b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.js similarity index 99% rename from src/hello/backend/node_modules/@eslint-community/eslint-utils/index.js rename to src/hello/server/node_modules/@eslint-community/eslint-utils/index.js index 0d76fb6f..9c8998f7 100644 --- a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.js +++ b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.js @@ -266,9 +266,10 @@ function getFunctionHeadLocation(node, sourceCode) { start = arrowToken.loc.start; end = arrowToken.loc.end; } else if ( - parent.type === "Property" || - parent.type === "MethodDefinition" || - parent.type === "PropertyDefinition" + parent && + (parent.type === "Property" || + parent.type === "MethodDefinition" || + parent.type === "PropertyDefinition") ) { start = /** @type {SourceLocation} */ (parent.loc).start; end = getOpeningParenOfParams(node, sourceCode).loc.start; @@ -1306,6 +1307,11 @@ function getPropertyName(node, initialScope) { // eslint-disable-next-line complexity function getFunctionNameWithKind(node, sourceCode) { const parent = /** @type {RuleNode} */ (node).parent; + + if (!parent) { + return "" + } + const tokens = []; const isObjectMethod = parent.type === "Property" && parent.value === node; const isClassMethod = @@ -1659,6 +1665,10 @@ function hasSideEffect(node, sourceCode, options = {}) { function getParentSyntaxParen(node, sourceCode) { const parent = /** @type {RuleNode} */ (node).parent; + if (!parent) { + return null + } + switch (parent.type) { case "CallExpression": case "NewExpression": @@ -2312,6 +2322,9 @@ class ReferenceTracker { } const parent = /** @type {RuleNode} */ (node).parent; + if (!parent) { + return + } if (parent.type === "MemberExpression") { if (parent.object === node) { const key = getPropertyName(parent); diff --git a/src/hello/server/node_modules/@eslint-community/eslint-utils/index.js.map b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.js.map new file mode 100644 index 00000000..47913acd --- /dev/null +++ b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n\n/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = /** @type {[number, number]} */ (node.range)[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = /** @type {[number, number]} */ (\n childScope.block.range\n )\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n /** @type {Scope|null} */\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Comment} Comment */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n/**\n * @template {string} Value\n * @typedef {import(\"./types.mjs\").PunctuatorToken} PunctuatorToken\n */\n\n/** @typedef {Comment | Token} CommentOrToken */\n\n/**\n * Creates the negate function of the given function.\n * @param {function(CommentOrToken):boolean} f - The function to negate.\n * @returns {function(CommentOrToken):boolean} Negated function.\n */\nfunction negate(f) {\n return (token) => !f(token)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @template {string} Value\n * @param {CommentOrToken} token - The token to check.\n * @param {Value} value - The value to check.\n * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ArrowToken} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is CommaToken} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is SemicolonToken} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ColonToken} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is Comment} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").SourceLocation} SourceLocation */\n/** @typedef {import(\"estree\").Position} Position */\n\n/**\n * Get the `(` token of the given function node.\n * @param {FunctionExpression | FunctionDeclaration} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? /** @type {Token} */ (\n sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n )\n : /** @type {Token} */ (\n sourceCode.getFirstToken(node, isOpeningParenToken)\n )\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {SourceLocation|null} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n /** @type {Position|null} */\n let start = null\n /** @type {Position|null} */\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = /** @type {Token} */ (\n sourceCode.getTokenBefore(node.body, isArrowToken)\n )\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent &&\n (parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\")\n ) {\n start = /** @type {SourceLocation} */ (parent.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = /** @type {SourceLocation} */ (node.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.MemberExpression} MemberExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Property} Property */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Literal} Literal */\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : // @ts-ignore\n typeof self !== \"undefined\"\n ? // @ts-ignore\n self\n : // @ts-ignore\n typeof window !== \"undefined\"\n ? // @ts-ignore\n window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n // @ts-ignore\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n .../** @type {(keyof typeof Math)[]} */ (\n Object.getOwnPropertyNames(Math)\n )\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values.\n * @param {Scope|undefined|null} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(.../** @type {Iterable} */ (argument.value))\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Checks if a variable is a built-in global.\n * @param {Variable|null} variable The variable to check.\n * @returns {variable is Variable & {defs:[]}}\n */\nfunction isBuiltinGlobal(variable) {\n return (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n )\n}\n\n/**\n * Checks if a variable can be considered as a constant.\n * @param {Variable} variable\n * @returns {variable is Variable & {defs: [import(\"eslint\").Scope.Definition & { type: \"Variable\" }]}} True if the variable can be considered as a constant.\n */\nfunction canBeConsideredConst(variable) {\n if (variable.defs.length !== 1) {\n return false\n }\n const def = variable.defs[0]\n return Boolean(\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" || isEffectivelyConst(variable)),\n )\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\n/**\n * Checks if a variable has mutation in its property.\n * @param {Variable} variable The variable to check.\n * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {boolean} True if the variable has mutation in its property.\n */\nfunction hasMutationInProperty(variable, initialScope) {\n for (const ref of variable.references) {\n let node = /** @type {TSESTreeNode} */ (ref.identifier)\n while (node && node.parent && node.parent.type === \"MemberExpression\") {\n node = node.parent\n }\n if (!node || !node.parent) {\n continue\n }\n if (\n (node.parent.type === \"AssignmentExpression\" &&\n node.parent.left === node) ||\n (node.parent.type === \"UpdateExpression\" &&\n node.parent.argument === node)\n ) {\n // This is a mutation.\n return true\n }\n if (\n node.parent.type === \"CallExpression\" &&\n node.parent.callee === node &&\n node.type === \"MemberExpression\"\n ) {\n const methodName = getStaticPropertyNameValue(node, initialScope)\n if (isNameOfMutationArrayMethod(methodName)) {\n // This is a mutation.\n return true\n }\n }\n }\n return false\n\n /**\n * Checks if a method name is one of the mutation array methods.\n * @param {StaticValue|null} methodName The method name to check.\n * @returns {boolean} True if the method name is a mutation array method.\n */\n function isNameOfMutationArrayMethod(methodName) {\n if (methodName == null || methodName.value == null) {\n return false\n }\n const name = methodName.value\n return (\n name === \"copyWithin\" ||\n name === \"fill\" ||\n name === \"pop\" ||\n name === \"push\" ||\n name === \"reverse\" ||\n name === \"shift\" ||\n name === \"sort\" ||\n name === \"splice\" ||\n name === \"unshift\"\n )\n }\n}\n\n/**\n * @template {TSESTreeNodeTypes} T\n * @callback VisitorCallback\n * @param {TSESTreeNode & { type: T }} node\n * @param {Scope|undefined|null} initialScope\n * @returns {StaticValue | null}\n */\n/**\n * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations\n */\n/**\n * @type {Operations}\n */\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return {\n value:\n /** @type {any} */ (left.value) <\n /** @type {any} */ (right.value),\n }\n case \"<=\":\n return {\n value:\n /** @type {any} */ (left.value) <=\n /** @type {any} */ (right.value),\n }\n case \">\":\n return {\n value:\n /** @type {any} */ (left.value) >\n /** @type {any} */ (right.value),\n }\n case \">=\":\n return {\n value:\n /** @type {any} */ (left.value) >=\n /** @type {any} */ (right.value),\n }\n case \"<<\":\n return {\n value:\n /** @type {any} */ (left.value) <<\n /** @type {any} */ (right.value),\n }\n case \">>\":\n return {\n value:\n /** @type {any} */ (left.value) >>\n /** @type {any} */ (right.value),\n }\n case \">>>\":\n return {\n value:\n /** @type {any} */ (left.value) >>>\n /** @type {any} */ (right.value),\n }\n case \"+\":\n return {\n value:\n /** @type {any} */ (left.value) +\n /** @type {any} */ (right.value),\n }\n case \"-\":\n return {\n value:\n /** @type {any} */ (left.value) -\n /** @type {any} */ (right.value),\n }\n case \"*\":\n return {\n value:\n /** @type {any} */ (left.value) *\n /** @type {any} */ (right.value),\n }\n case \"/\":\n return {\n value:\n /** @type {any} */ (left.value) /\n /** @type {any} */ (right.value),\n }\n case \"%\":\n return {\n value:\n /** @type {any} */ (left.value) %\n /** @type {any} */ (right.value),\n }\n case \"**\":\n return {\n value:\n /** @type {any} */ (left.value) **\n /** @type {any} */ (right.value),\n }\n case \"|\":\n return {\n value:\n /** @type {any} */ (left.value) |\n /** @type {any} */ (right.value),\n }\n case \"^\":\n return {\n value:\n /** @type {any} */ (left.value) ^\n /** @type {any} */ (right.value),\n }\n case \"&\":\n return {\n value:\n /** @type {any} */ (left.value) &\n /** @type {any} */ (right.value),\n }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver =\n /** @type {Record any>} */ (\n object.value\n )\n const methodName = /** @type {PropertyKey} */ (\n property.value\n )\n if (callAllowed.has(receiver[methodName])) {\n return {\n value: receiver[methodName](...args),\n }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = /** @type {(...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n if (variable != null) {\n // Built-in globals.\n if (isBuiltinGlobal(variable)) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (canBeConsideredConst(variable)) {\n const def = variable.defs[0]\n if (\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n const init = getStaticValueR(\n def.node.init,\n initialScope,\n )\n if (\n init &&\n typeof init.value === \"object\" &&\n init.value !== null\n ) {\n if (hasMutationInProperty(variable, initialScope)) {\n // This variable has mutation in its property.\n return null\n }\n }\n return init\n }\n }\n }\n }\n return null\n },\n\n Literal(node) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n //istanbul ignore if : this is implementation-specific behavior.\n if (\n (literal.regex != null || literal.bigint != null) &&\n literal.value == null\n ) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: literal.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (\n !isGetter(\n /** @type {object} */ (object.value),\n /** @type {PropertyKey} */ (property.value),\n )\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(/** @type {string} */ (property.value))\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = /** @type {new (...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n /** @type {Record} */\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[/** @type {PropertyKey} */ (key.value)] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n // @ts-expect-error -- Backward compatibility\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = /** @type {(...args: any[]) => any} */ (tag.value)\n /** @type {any[] & { raw?: string[] }} */\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += /** @type {string} */ (node.quasis[i + 1].value.cooked)\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -(/** @type {any} */ (arg.value)) }\n case \"+\":\n return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~(/** @type {any} */ (arg.value)) }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n TSAsExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSSatisfiesExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSTypeAssertion(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSNonNullExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSInstantiationExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node|TSESTreeNode|null|undefined} node The node to get.\n * @param {Scope|undefined|null} initialScope The scope to start finding variable.\n * @returns {StaticValue|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return /** @type {VisitorCallback} */ (operations[node.type])(\n /** @type {TSESTreeNode} */ (node),\n initialScope,\n )\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {MemberExpression|Property} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {StaticValue|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (/** @type {Partial} */ (nameNode).bigint) {\n return { value: /** @type {BigIntLiteral} */ (nameNode).bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {StaticValue | null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"estree\").BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"estree\").SimpleLiteral} SimpleLiteral */\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n if (literal.regex) {\n return `/${literal.regex.pattern}/${literal.regex.flags}`\n }\n if (literal.bigint) {\n return literal.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n\n if (evaluated) {\n // `String(Symbol.prototype)` throws error\n try {\n return String(evaluated.value)\n } catch {\n // No op\n }\n }\n\n return null\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null|undefined} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.property).name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.key).name\n\n default:\n break\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the name and kind of the given function node.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n if (!parent) {\n return \"\"\n }\n\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (hasId(node)) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n\n/**\n * @param {FunctionNode} node\n * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }}\n */\nfunction hasId(node) {\n return Boolean(\n /** @type {Partial} */ (node)\n .id,\n )\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"estree\").BinaryExpression} BinaryExpression */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").UnaryExpression} UnaryExpression */\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {x is Node} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof (/** @type {any} */ (this)[type]) === \"function\") {\n return /** @type {any} */ (this)[type](\n node,\n options,\n visitorKeys,\n )\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of /** @type {(keyof Node)[]} */ (\n visitorKeys[type] || getKeys(node)\n )) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n /**\n * @param {BinaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n /**\n * @param {MemberExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {MethodDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n /**\n * @param {Property} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {PropertyDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {UnaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {HasSideEffectOptions} [options] The option object.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(node, sourceCode, options = {}) {\n const { considerGetters = false, considerImplicitTypeConversion = false } =\n options\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.NewExpression} TSNewExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.CallExpression} TSCallExpression */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\n// eslint-disable-next-line complexity\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n if (!parent) {\n return null\n }\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384\n parent.typeArguments ||\n /** @type {RuleNode} */ (\n /** @type {unknown} */ (\n /** @type {TSNewExpression | TSCallExpression} */ (\n parent\n ).typeParameters\n )\n ) ||\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node|number} timesOrNode The first parameter.\n * @param {Node|SourceCode} nodeOrSourceCode The second parameter.\n * @param {SourceCode} [optionalSourceCode] The third parameter.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n /** @type {number} */\n let times,\n /** @type {RuleNode} */\n node,\n /** @type {SourceCode} */\n sourceCode,\n maybeLeftParen,\n maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = /** @type {RuleNode} */ (nodeOrSourceCode)\n sourceCode = /** @type {SourceCode} */ (optionalSourceCode)\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = /** @type {RuleNode} */ (timesOrNode)\n sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode)\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /**\n * @param {string} key The placeholder.\n * @param {RegExpExecArray} match The matched information.\n * @returns {string} The replaced string.\n */\n function replacer(key, match) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[/** @type {any} */ (i)]\n }\n return key\n }\n }\n }\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n replacement.replace(placeholder, (key) => replacer(key, match)),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n String(\n replace(\n .../** @type {[string, ...string[]]} */ (\n /** @type {string[]} */ (match)\n ),\n match.index,\n match.input,\n ),\n ),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped?:boolean}} [options] The options.\n */\n constructor(pattern, options = {}) {\n const { escaped = false } = options\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } =\n /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this))\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").Expression} Expression */\n/** @typedef {import(\"estree\").Pattern} Pattern */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n/** @typedef {import(\"estree\").SimpleCallExpression} CallExpression */\n/** @typedef {import(\"estree\").Program} Program */\n/** @typedef {import(\"estree\").ImportDeclaration} ImportDeclaration */\n/** @typedef {import(\"estree\").ExportAllDeclaration} ExportAllDeclaration */\n/** @typedef {import(\"estree\").ExportDefaultDeclaration} ExportDefaultDeclaration */\n/** @typedef {import(\"estree\").ExportNamedDeclaration} ExportNamedDeclaration */\n/** @typedef {import(\"estree\").ImportSpecifier} ImportSpecifier */\n/** @typedef {import(\"estree\").ImportDefaultSpecifier} ImportDefaultSpecifier */\n/** @typedef {import(\"estree\").ImportNamespaceSpecifier} ImportNamespaceSpecifier */\n/** @typedef {import(\"estree\").ExportSpecifier} ExportSpecifier */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").AssignmentProperty} AssignmentProperty */\n/** @typedef {import(\"estree\").Literal} Literal */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMapObject} TraceMapObject\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\n\n/**\n * Check whether a given node is an import node or not.\n * @param {Node} node\n * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node.\n */\nfunction isHasSource(node) {\n return (\n IMPORT_TYPE.test(node.type) &&\n /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ (\n node\n ).source != null\n )\n}\nconst has =\n /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ (\n Function.call.bind(Object.hasOwnProperty)\n )\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable|undefined} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = /** @type {TSESTreeNode} */ (node).parent\n\n if (parent) {\n switch (parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return (\n parent.expressions[parent.expressions.length - 1] === node\n )\n case \"ChainExpression\":\n return true\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n case \"TSInstantiationExpression\":\n return true\n\n default:\n return false\n }\n }\n return false\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(globalScope, options = {}) {\n const {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = options\n /** @private @type {Variable[]} */\n this.variableStack = []\n /** @private */\n this.globalScope = globalScope\n /** @private */\n this.mode = mode\n /** @private */\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n /** @type {string[]} */\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(\n /** @type {CallExpression} */ (node).arguments[0],\n )\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n /** @type {CallExpression} */ (node),\n path,\n nextTraceMap,\n )\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = /** @type {Program} */ (this.globalScope.block)\n\n for (const node of programNode.body) {\n if (!isHasSource(node)) {\n continue\n }\n const moduleId = /** @type {string} */ (node.source.value)\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the property references for a given expression AST node.\n * @template T\n * @param {Expression} node The expression AST node to iterate property references.\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate property references.\n */\n *iteratePropertyReferences(node, traceMap) {\n yield* this._iteratePropertyReferences(node, [], traceMap)\n }\n\n /**\n * Iterate the references for a given variable.\n * @private\n * @template T\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = /** @type {RuleNode & Identifier} */ (\n reference.identifier\n )\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @private\n * @template T\n * @param {Expression} rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = /** @type {RuleNode} */ (node).parent\n if (!parent) {\n return\n }\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @private\n * @template T\n * @param {Pattern} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(\n /** @type {AssignmentProperty} */ (property),\n )\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (property),\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n /** @type {AssignmentProperty} */ (property).value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @private\n * @template T\n * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key =\n specifierNode.local.type === \"Identifier\"\n ? specifierNode.local.name\n : specifierNode.local.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"./types.mjs\").StaticValueOptional} StaticValueOptional */\n/** @typedef {import(\"./types.mjs\").StaticValueProvided} StaticValueProvided */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n\nimport { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":["getKeys","KEYS"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,mCAAmC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAC;AACpE;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAAK,GAAG,MAAK;AACrB,IAAI,GAAG;AACP,QAAQ,KAAK,GAAG,MAAK;AACrB,QAAQ,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;AACpD,YAAY,MAAM,KAAK;AACvB,gBAAgB,UAAU,CAAC,KAAK,CAAC,KAAK;AACtC,cAAa;AACb;AACA,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;AAC7D,gBAAgB,KAAK,GAAG,WAAU;AAClC,gBAAgB,KAAK,GAAG,KAAI;AAC5B,gBAAgB,KAAK;AACrB,aAAa;AACb,SAAS;AACT,KAAK,QAAQ,KAAK,CAAC;AACnB;AACA,IAAI,OAAO,KAAK;AAChB;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,YAAY,EAAE,UAAU,EAAE;AACvD,IAAI,IAAI,IAAI,GAAG,GAAE;AACjB;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B;AACA,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;AACxC,QAAQ,IAAI,GAAG,WAAU;AACzB,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BAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.mjs b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.mjs similarity index 99% rename from src/hello/backend/node_modules/@eslint-community/eslint-utils/index.mjs rename to src/hello/server/node_modules/@eslint-community/eslint-utils/index.mjs index 9a647b8c..469b2338 100644 --- a/src/hello/backend/node_modules/@eslint-community/eslint-utils/index.mjs +++ b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.mjs @@ -262,9 +262,10 @@ function getFunctionHeadLocation(node, sourceCode) { start = arrowToken.loc.start; end = arrowToken.loc.end; } else if ( - parent.type === "Property" || - parent.type === "MethodDefinition" || - parent.type === "PropertyDefinition" + parent && + (parent.type === "Property" || + parent.type === "MethodDefinition" || + parent.type === "PropertyDefinition") ) { start = /** @type {SourceLocation} */ (parent.loc).start; end = getOpeningParenOfParams(node, sourceCode).loc.start; @@ -1302,6 +1303,11 @@ function getPropertyName(node, initialScope) { // eslint-disable-next-line complexity function getFunctionNameWithKind(node, sourceCode) { const parent = /** @type {RuleNode} */ (node).parent; + + if (!parent) { + return "" + } + const tokens = []; const isObjectMethod = parent.type === "Property" && parent.value === node; const isClassMethod = @@ -1655,6 +1661,10 @@ function hasSideEffect(node, sourceCode, options = {}) { function getParentSyntaxParen(node, sourceCode) { const parent = /** @type {RuleNode} */ (node).parent; + if (!parent) { + return null + } + switch (parent.type) { case "CallExpression": case "NewExpression": @@ -2308,6 +2318,9 @@ class ReferenceTracker { } const parent = /** @type {RuleNode} */ (node).parent; + if (!parent) { + return + } if (parent.type === "MemberExpression") { if (parent.object === node) { const key = getPropertyName(parent); diff --git a/src/hello/server/node_modules/@eslint-community/eslint-utils/index.mjs.map b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.mjs.map new file mode 100644 index 00000000..05bc6401 --- /dev/null +++ b/src/hello/server/node_modules/@eslint-community/eslint-utils/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n\n/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = /** @type {[number, number]} */ (node.range)[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = /** @type {[number, number]} */ (\n childScope.block.range\n )\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Identifier} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n /** @type {Scope|null} */\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Comment} Comment */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n/**\n * @template {string} Value\n * @typedef {import(\"./types.mjs\").PunctuatorToken} PunctuatorToken\n */\n\n/** @typedef {Comment | Token} CommentOrToken */\n\n/**\n * Creates the negate function of the given function.\n * @param {function(CommentOrToken):boolean} f - The function to negate.\n * @returns {function(CommentOrToken):boolean} Negated function.\n */\nfunction negate(f) {\n return (token) => !f(token)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @template {string} Value\n * @param {CommentOrToken} token - The token to check.\n * @param {Value} value - The value to check.\n * @returns {token is PunctuatorToken} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ArrowToken} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is CommaToken} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is SemicolonToken} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ColonToken} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningParenToken} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingParenToken} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBracketToken} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBracketToken} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is OpeningBraceToken} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is ClosingBraceToken} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {CommentOrToken} token - The token to check.\n * @returns {token is Comment} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").SourceLocation} SourceLocation */\n/** @typedef {import(\"estree\").Position} Position */\n\n/**\n * Get the `(` token of the given function node.\n * @param {FunctionExpression | FunctionDeclaration} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? /** @type {Token} */ (\n sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n )\n : /** @type {Token} */ (\n sourceCode.getFirstToken(node, isOpeningParenToken)\n )\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {SourceLocation|null} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n /** @type {Position|null} */\n let start = null\n /** @type {Position|null} */\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = /** @type {Token} */ (\n sourceCode.getTokenBefore(node.body, isArrowToken)\n )\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent &&\n (parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\")\n ) {\n start = /** @type {SourceLocation} */ (parent.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = /** @type {SourceLocation} */ (node.loc).start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.AST_NODE_TYPES} TSESTreeNodeTypes */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.MemberExpression} MemberExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Property} Property */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Literal} Literal */\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : // @ts-ignore\n typeof self !== \"undefined\"\n ? // @ts-ignore\n self\n : // @ts-ignore\n typeof window !== \"undefined\"\n ? // @ts-ignore\n window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n // @ts-ignore\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n .../** @type {(keyof typeof Math)[]} */ (\n Object.getOwnPropertyNames(Math)\n )\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {(Node|TSESTreeNode|null)[]} nodeList The node list to get values.\n * @param {Scope|undefined|null} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(.../** @type {Iterable} */ (argument.value))\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Checks if a variable is a built-in global.\n * @param {Variable|null} variable The variable to check.\n * @returns {variable is Variable & {defs:[]}}\n */\nfunction isBuiltinGlobal(variable) {\n return (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n )\n}\n\n/**\n * Checks if a variable can be considered as a constant.\n * @param {Variable} variable\n * @returns {variable is Variable & {defs: [import(\"eslint\").Scope.Definition & { type: \"Variable\" }]}} True if the variable can be considered as a constant.\n */\nfunction canBeConsideredConst(variable) {\n if (variable.defs.length !== 1) {\n return false\n }\n const def = variable.defs[0]\n return Boolean(\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" || isEffectivelyConst(variable)),\n )\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\n/**\n * Checks if a variable has mutation in its property.\n * @param {Variable} variable The variable to check.\n * @param {Scope|null} initialScope The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {boolean} True if the variable has mutation in its property.\n */\nfunction hasMutationInProperty(variable, initialScope) {\n for (const ref of variable.references) {\n let node = /** @type {TSESTreeNode} */ (ref.identifier)\n while (node && node.parent && node.parent.type === \"MemberExpression\") {\n node = node.parent\n }\n if (!node || !node.parent) {\n continue\n }\n if (\n (node.parent.type === \"AssignmentExpression\" &&\n node.parent.left === node) ||\n (node.parent.type === \"UpdateExpression\" &&\n node.parent.argument === node)\n ) {\n // This is a mutation.\n return true\n }\n if (\n node.parent.type === \"CallExpression\" &&\n node.parent.callee === node &&\n node.type === \"MemberExpression\"\n ) {\n const methodName = getStaticPropertyNameValue(node, initialScope)\n if (isNameOfMutationArrayMethod(methodName)) {\n // This is a mutation.\n return true\n }\n }\n }\n return false\n\n /**\n * Checks if a method name is one of the mutation array methods.\n * @param {StaticValue|null} methodName The method name to check.\n * @returns {boolean} True if the method name is a mutation array method.\n */\n function isNameOfMutationArrayMethod(methodName) {\n if (methodName == null || methodName.value == null) {\n return false\n }\n const name = methodName.value\n return (\n name === \"copyWithin\" ||\n name === \"fill\" ||\n name === \"pop\" ||\n name === \"push\" ||\n name === \"reverse\" ||\n name === \"shift\" ||\n name === \"sort\" ||\n name === \"splice\" ||\n name === \"unshift\"\n )\n }\n}\n\n/**\n * @template {TSESTreeNodeTypes} T\n * @callback VisitorCallback\n * @param {TSESTreeNode & { type: T }} node\n * @param {Scope|undefined|null} initialScope\n * @returns {StaticValue | null}\n */\n/**\n * @typedef { { [K in TSESTreeNodeTypes]?: VisitorCallback } } Operations\n */\n/**\n * @type {Operations}\n */\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return {\n value:\n /** @type {any} */ (left.value) <\n /** @type {any} */ (right.value),\n }\n case \"<=\":\n return {\n value:\n /** @type {any} */ (left.value) <=\n /** @type {any} */ (right.value),\n }\n case \">\":\n return {\n value:\n /** @type {any} */ (left.value) >\n /** @type {any} */ (right.value),\n }\n case \">=\":\n return {\n value:\n /** @type {any} */ (left.value) >=\n /** @type {any} */ (right.value),\n }\n case \"<<\":\n return {\n value:\n /** @type {any} */ (left.value) <<\n /** @type {any} */ (right.value),\n }\n case \">>\":\n return {\n value:\n /** @type {any} */ (left.value) >>\n /** @type {any} */ (right.value),\n }\n case \">>>\":\n return {\n value:\n /** @type {any} */ (left.value) >>>\n /** @type {any} */ (right.value),\n }\n case \"+\":\n return {\n value:\n /** @type {any} */ (left.value) +\n /** @type {any} */ (right.value),\n }\n case \"-\":\n return {\n value:\n /** @type {any} */ (left.value) -\n /** @type {any} */ (right.value),\n }\n case \"*\":\n return {\n value:\n /** @type {any} */ (left.value) *\n /** @type {any} */ (right.value),\n }\n case \"/\":\n return {\n value:\n /** @type {any} */ (left.value) /\n /** @type {any} */ (right.value),\n }\n case \"%\":\n return {\n value:\n /** @type {any} */ (left.value) %\n /** @type {any} */ (right.value),\n }\n case \"**\":\n return {\n value:\n /** @type {any} */ (left.value) **\n /** @type {any} */ (right.value),\n }\n case \"|\":\n return {\n value:\n /** @type {any} */ (left.value) |\n /** @type {any} */ (right.value),\n }\n case \"^\":\n return {\n value:\n /** @type {any} */ (left.value) ^\n /** @type {any} */ (right.value),\n }\n case \"&\":\n return {\n value:\n /** @type {any} */ (left.value) &\n /** @type {any} */ (right.value),\n }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver =\n /** @type {Record any>} */ (\n object.value\n )\n const methodName = /** @type {PropertyKey} */ (\n property.value\n )\n if (callAllowed.has(receiver[methodName])) {\n return {\n value: receiver[methodName](...args),\n }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = /** @type {(...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n if (variable != null) {\n // Built-in globals.\n if (isBuiltinGlobal(variable)) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (canBeConsideredConst(variable)) {\n const def = variable.defs[0]\n if (\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n const init = getStaticValueR(\n def.node.init,\n initialScope,\n )\n if (\n init &&\n typeof init.value === \"object\" &&\n init.value !== null\n ) {\n if (hasMutationInProperty(variable, initialScope)) {\n // This variable has mutation in its property.\n return null\n }\n }\n return init\n }\n }\n }\n }\n return null\n },\n\n Literal(node) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n //istanbul ignore if : this is implementation-specific behavior.\n if (\n (literal.regex != null || literal.bigint != null) &&\n literal.value == null\n ) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: literal.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (\n !isGetter(\n /** @type {object} */ (object.value),\n /** @type {PropertyKey} */ (property.value),\n )\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(/** @type {string} */ (property.value))\n ) {\n return {\n value: /** @type {Record} */ (\n object.value\n )[/** @type {PropertyKey} */ (property.value)],\n }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = /** @type {new (...args: any[]) => any} */ (\n callee.value\n )\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n /** @type {Record} */\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[/** @type {PropertyKey} */ (key.value)] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n // @ts-expect-error -- Backward compatibility\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = /** @type {(...args: any[]) => any} */ (tag.value)\n /** @type {any[] & { raw?: string[] }} */\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += /** @type {string} */ (node.quasis[i + 1].value.cooked)\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -(/** @type {any} */ (arg.value)) }\n case \"+\":\n return { value: +(/** @type {any} */ (arg.value)) } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~(/** @type {any} */ (arg.value)) }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n TSAsExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSSatisfiesExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSTypeAssertion(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSNonNullExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n TSInstantiationExpression(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node|TSESTreeNode|null|undefined} node The node to get.\n * @param {Scope|undefined|null} initialScope The scope to start finding variable.\n * @returns {StaticValue|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return /** @type {VisitorCallback} */ (operations[node.type])(\n /** @type {TSESTreeNode} */ (node),\n initialScope,\n )\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {MemberExpression|Property} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {StaticValue|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (/** @type {Partial} */ (nameNode).bigint) {\n return { value: /** @type {BigIntLiteral} */ (nameNode).bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {StaticValue | null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").RegExpLiteral} RegExpLiteral */\n/** @typedef {import(\"estree\").BigIntLiteral} BigIntLiteral */\n/** @typedef {import(\"estree\").SimpleLiteral} SimpleLiteral */\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope|null} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n const literal =\n /** @type {Partial & Partial & Partial} */ (\n node\n )\n if (literal.regex) {\n return `/${literal.regex.pattern}/${literal.regex.flags}`\n }\n if (literal.bigint) {\n return literal.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n\n if (evaluated) {\n // `String(Symbol.prototype)` throws error\n try {\n return String(evaluated.value)\n } catch {\n // No op\n }\n }\n\n return null\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {MemberExpression | MethodDefinition | Property | PropertyDefinition} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null|undefined} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.property).name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return /** @type {Partial} */ (node.key).name\n\n default:\n break\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"estree\").Function} FunctionNode */\n/** @typedef {import(\"estree\").FunctionDeclaration} FunctionDeclaration */\n/** @typedef {import(\"estree\").FunctionExpression} FunctionExpression */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n\n/**\n * Get the name and kind of the given function node.\n * @param {FunctionNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n if (!parent) {\n return \"\"\n }\n\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (hasId(node)) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n\n/**\n * @param {FunctionNode} node\n * @returns {node is FunctionDeclaration | FunctionExpression & { id: Identifier }}\n */\nfunction hasId(node) {\n return Boolean(\n /** @type {Partial} */ (node)\n .id,\n )\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"estree\").BinaryExpression} BinaryExpression */\n/** @typedef {import(\"estree\").MemberExpression} MemberExpression */\n/** @typedef {import(\"estree\").MethodDefinition} MethodDefinition */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").PropertyDefinition} PropertyDefinition */\n/** @typedef {import(\"estree\").UnaryExpression} UnaryExpression */\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {x is Node} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof (/** @type {any} */ (this)[type]) === \"function\") {\n return /** @type {any} */ (this)[type](\n node,\n options,\n visitorKeys,\n )\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n /**\n * @param {Node} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of /** @type {(keyof Node)[]} */ (\n visitorKeys[type] || getKeys(node)\n )) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n /**\n * @param {BinaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n /**\n * @param {MemberExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {MethodDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n /**\n * @param {Property} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {PropertyDefinition} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n /**\n * @param {UnaryExpression} node\n * @param {HasSideEffectOptions} options\n * @param {Record} visitorKeys\n */\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {HasSideEffectOptions} [options] The option object.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(node, sourceCode, options = {}) {\n const { considerGetters = false, considerImplicitTypeConversion = false } =\n options\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.NewExpression} TSNewExpression */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.CallExpression} TSCallExpression */\n/** @typedef {import(\"eslint\").SourceCode} SourceCode */\n/** @typedef {import(\"eslint\").AST.Token} Token */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\n// eslint-disable-next-line complexity\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = /** @type {RuleNode} */ (node).parent\n\n if (!parent) {\n return null\n }\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384\n parent.typeArguments ||\n /** @type {RuleNode} */ (\n /** @type {unknown} */ (\n /** @type {TSNewExpression | TSCallExpression} */ (\n parent\n ).typeParameters\n )\n ) ||\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node|number} timesOrNode The first parameter.\n * @param {Node|SourceCode} nodeOrSourceCode The second parameter.\n * @param {SourceCode} [optionalSourceCode] The third parameter.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n /** @type {number} */\n let times,\n /** @type {RuleNode} */\n node,\n /** @type {SourceCode} */\n sourceCode,\n maybeLeftParen,\n maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = /** @type {RuleNode} */ (nodeOrSourceCode)\n sourceCode = /** @type {SourceCode} */ (optionalSourceCode)\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = /** @type {RuleNode} */ (timesOrNode)\n sourceCode = /** @type {SourceCode} */ (nodeOrSourceCode)\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /**\n * @param {string} key The placeholder.\n * @param {RegExpExecArray} match The matched information.\n * @returns {string} The replaced string.\n */\n function replacer(key, match) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[/** @type {any} */ (i)]\n }\n return key\n }\n }\n }\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n replacement.replace(placeholder, (key) => replacer(key, match)),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(substring: string, ...args: any[]) => string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(\n String(\n replace(\n .../** @type {[string, ...string[]]} */ (\n /** @type {string[]} */ (match)\n ),\n match.index,\n match.input,\n ),\n ),\n )\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped?:boolean}} [options] The options.\n */\n constructor(pattern, options = {}) {\n const { escaped = false } = options\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } =\n /** @type {{pattern:RegExp,escaped:boolean}} */ (internal.get(this))\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n/** @typedef {import(\"eslint\").Scope.Scope} Scope */\n/** @typedef {import(\"eslint\").Scope.Variable} Variable */\n/** @typedef {import(\"eslint\").Rule.Node} RuleNode */\n/** @typedef {import(\"estree\").Node} Node */\n/** @typedef {import(\"estree\").Expression} Expression */\n/** @typedef {import(\"estree\").Pattern} Pattern */\n/** @typedef {import(\"estree\").Identifier} Identifier */\n/** @typedef {import(\"estree\").SimpleCallExpression} CallExpression */\n/** @typedef {import(\"estree\").Program} Program */\n/** @typedef {import(\"estree\").ImportDeclaration} ImportDeclaration */\n/** @typedef {import(\"estree\").ExportAllDeclaration} ExportAllDeclaration */\n/** @typedef {import(\"estree\").ExportDefaultDeclaration} ExportDefaultDeclaration */\n/** @typedef {import(\"estree\").ExportNamedDeclaration} ExportNamedDeclaration */\n/** @typedef {import(\"estree\").ImportSpecifier} ImportSpecifier */\n/** @typedef {import(\"estree\").ImportDefaultSpecifier} ImportDefaultSpecifier */\n/** @typedef {import(\"estree\").ImportNamespaceSpecifier} ImportNamespaceSpecifier */\n/** @typedef {import(\"estree\").ExportSpecifier} ExportSpecifier */\n/** @typedef {import(\"estree\").Property} Property */\n/** @typedef {import(\"estree\").AssignmentProperty} AssignmentProperty */\n/** @typedef {import(\"estree\").Literal} Literal */\n/** @typedef {import(\"@typescript-eslint/types\").TSESTree.Node} TSESTreeNode */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMapObject} TraceMapObject\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\n\n/**\n * Check whether a given node is an import node or not.\n * @param {Node} node\n * @returns {node is ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration&{source: Literal}} `true` if the node is an import node.\n */\nfunction isHasSource(node) {\n return (\n IMPORT_TYPE.test(node.type) &&\n /** @type {ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration} */ (\n node\n ).source != null\n )\n}\nconst has =\n /** @type {(traceMap: TraceMap, v: T) => v is (string extends T ? string : T)} */ (\n Function.call.bind(Object.hasOwnProperty)\n )\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable|undefined} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {node is RuleNode & {parent: Expression}} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = /** @type {TSESTreeNode} */ (node).parent\n\n if (parent) {\n switch (parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return (\n parent.expressions[parent.expressions.length - 1] === node\n )\n case \"ChainExpression\":\n return true\n case \"TSAsExpression\":\n case \"TSSatisfiesExpression\":\n case \"TSTypeAssertion\":\n case \"TSNonNullExpression\":\n case \"TSInstantiationExpression\":\n return true\n\n default:\n return false\n }\n }\n return false\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(globalScope, options = {}) {\n const {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = options\n /** @private @type {Variable[]} */\n this.variableStack = []\n /** @private */\n this.globalScope = globalScope\n /** @private */\n this.mode = mode\n /** @private */\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n /** @type {string[]} */\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (variable),\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(\n /** @type {CallExpression} */ (node).arguments[0],\n )\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n /** @type {CallExpression} */ (node),\n path,\n nextTraceMap,\n )\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @template T\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = /** @type {Program} */ (this.globalScope.block)\n\n for (const node of programNode.body) {\n if (!isHasSource(node)) {\n continue\n }\n const moduleId = /** @type {string} */ (node.source.value)\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n // eslint-disable-next-line object-shorthand -- apply type\n node: /** @type {RuleNode} */ (node),\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the property references for a given expression AST node.\n * @template T\n * @param {Expression} node The expression AST node to iterate property references.\n * @param {TraceMap} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate property references.\n */\n *iteratePropertyReferences(node, traceMap) {\n yield* this._iteratePropertyReferences(node, [], traceMap)\n }\n\n /**\n * Iterate the references for a given variable.\n * @private\n * @template T\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = /** @type {RuleNode & Identifier} */ (\n reference.identifier\n )\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @private\n * @template T\n * @param {Expression} rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = /** @type {RuleNode} */ (node).parent\n if (!parent) {\n return\n }\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @private\n * @template T\n * @param {Pattern} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(\n /** @type {AssignmentProperty} */ (property),\n )\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (property),\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n /** @type {AssignmentProperty} */ (property).value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @private\n * @template T\n * @param {ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {TraceMapObject} traceMap The trace map.\n * @returns {IterableIterator>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n /** @type {Variable} */ (\n findVariable(this.globalScope, specifierNode.local)\n ),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key =\n specifierNode.local.type === \"Identifier\"\n ? specifierNode.local.name\n : specifierNode.local.value\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: /** @type {RuleNode} */ (specifierNode),\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","/** @typedef {import(\"./types.mjs\").StaticValue} StaticValue */\n/** @typedef {import(\"./types.mjs\").StaticValueOptional} StaticValueOptional */\n/** @typedef {import(\"./types.mjs\").StaticValueProvided} StaticValueProvided */\n/** @typedef {import(\"./types.mjs\").ReferenceTrackerOptions} ReferenceTrackerOptions */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TraceMap} TraceMap\n */\n/**\n * @template T\n * @typedef {import(\"./types.mjs\").TrackedReferences} TrackedReferences\n */\n/** @typedef {import(\"./types.mjs\").HasSideEffectOptions} HasSideEffectOptions */\n/** @typedef {import(\"./types.mjs\").ArrowToken} ArrowToken */\n/** @typedef {import(\"./types.mjs\").CommaToken} CommaToken */\n/** @typedef {import(\"./types.mjs\").SemicolonToken} SemicolonToken */\n/** @typedef {import(\"./types.mjs\").ColonToken} ColonToken */\n/** @typedef {import(\"./types.mjs\").OpeningParenToken} OpeningParenToken */\n/** @typedef {import(\"./types.mjs\").ClosingParenToken} ClosingParenToken */\n/** @typedef {import(\"./types.mjs\").OpeningBracketToken} OpeningBracketToken */\n/** @typedef {import(\"./types.mjs\").ClosingBracketToken} ClosingBracketToken */\n/** @typedef {import(\"./types.mjs\").OpeningBraceToken} OpeningBraceToken */\n/** @typedef {import(\"./types.mjs\").ClosingBraceToken} ClosingBraceToken */\n\nimport { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,mCAAmC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAC;AACpE;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IA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,IAAI,gBAAgB;AACpB;;;;"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/@eslint-community/eslint-utils/package.json b/src/hello/server/node_modules/@eslint-community/eslint-utils/package.json similarity index 99% rename from src/hello/backend/node_modules/@eslint-community/eslint-utils/package.json rename to src/hello/server/node_modules/@eslint-community/eslint-utils/package.json index ce5b54d1..77dc06ba 100644 --- a/src/hello/backend/node_modules/@eslint-community/eslint-utils/package.json +++ b/src/hello/server/node_modules/@eslint-community/eslint-utils/package.json @@ -1,6 +1,6 @@ { "name": "@eslint-community/eslint-utils", - "version": "4.9.0", + "version": "4.9.1", "description": "Utilities for ESLint plugins.", "keywords": [ "eslint" diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/LICENSE b/src/hello/server/node_modules/@eslint-community/regexpp/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/LICENSE rename to src/hello/server/node_modules/@eslint-community/regexpp/LICENSE diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/README.md b/src/hello/server/node_modules/@eslint-community/regexpp/README.md similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/README.md rename to src/hello/server/node_modules/@eslint-community/regexpp/README.md diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/index.d.ts b/src/hello/server/node_modules/@eslint-community/regexpp/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/index.d.ts rename to src/hello/server/node_modules/@eslint-community/regexpp/index.d.ts diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/index.js b/src/hello/server/node_modules/@eslint-community/regexpp/index.js similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/index.js rename to src/hello/server/node_modules/@eslint-community/regexpp/index.js diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/index.js.map b/src/hello/server/node_modules/@eslint-community/regexpp/index.js.map similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/index.js.map rename to src/hello/server/node_modules/@eslint-community/regexpp/index.js.map diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/index.mjs b/src/hello/server/node_modules/@eslint-community/regexpp/index.mjs similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/index.mjs rename to src/hello/server/node_modules/@eslint-community/regexpp/index.mjs diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/index.mjs.map b/src/hello/server/node_modules/@eslint-community/regexpp/index.mjs.map similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/index.mjs.map rename to src/hello/server/node_modules/@eslint-community/regexpp/index.mjs.map diff --git a/src/hello/backend/node_modules/@eslint-community/regexpp/package.json b/src/hello/server/node_modules/@eslint-community/regexpp/package.json similarity index 100% rename from src/hello/backend/node_modules/@eslint-community/regexpp/package.json rename to src/hello/server/node_modules/@eslint-community/regexpp/package.json diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/LICENSE b/src/hello/server/node_modules/@eslint/eslintrc/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/LICENSE rename to src/hello/server/node_modules/@eslint/eslintrc/LICENSE diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/README.md b/src/hello/server/node_modules/@eslint/eslintrc/README.md similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/README.md rename to src/hello/server/node_modules/@eslint/eslintrc/README.md diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/conf/config-schema.js b/src/hello/server/node_modules/@eslint/eslintrc/conf/config-schema.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/conf/config-schema.js rename to src/hello/server/node_modules/@eslint/eslintrc/conf/config-schema.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/conf/environments.js b/src/hello/server/node_modules/@eslint/eslintrc/conf/environments.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/conf/environments.js rename to src/hello/server/node_modules/@eslint/eslintrc/conf/environments.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs b/src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs rename to src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map b/src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map rename to src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs b/src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc.cjs similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs rename to src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc.cjs diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map b/src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map rename to src/hello/server/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array-factory.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/config-array-factory.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array-factory.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/config-array-factory.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/config-array.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/config-array.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/config-array.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/config-array.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/index.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/index.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/index.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/index.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/flat-compat.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/flat-compat.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/flat-compat.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/flat-compat.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/index-universal.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/index-universal.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/index-universal.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/index-universal.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/index.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/index.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/index.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/index.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/ajv.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/shared/ajv.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/ajv.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/shared/ajv.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/config-ops.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/shared/config-ops.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/config-ops.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/shared/config-ops.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/config-validator.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/shared/config-validator.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/config-validator.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/shared/config-validator.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/naming.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/shared/naming.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/naming.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/shared/naming.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/types.js b/src/hello/server/node_modules/@eslint/eslintrc/lib/shared/types.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/lib/shared/types.js rename to src/hello/server/node_modules/@eslint/eslintrc/lib/shared/types.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/package.json b/src/hello/server/node_modules/@eslint/eslintrc/package.json similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/package.json rename to src/hello/server/node_modules/@eslint/eslintrc/package.json diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/universal.js b/src/hello/server/node_modules/@eslint/eslintrc/universal.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/universal.js rename to src/hello/server/node_modules/@eslint/eslintrc/universal.js diff --git a/src/hello/backend/node_modules/@eslint/js/LICENSE b/src/hello/server/node_modules/@eslint/js/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@eslint/js/LICENSE rename to src/hello/server/node_modules/@eslint/js/LICENSE diff --git a/src/hello/backend/node_modules/@eslint/js/README.md b/src/hello/server/node_modules/@eslint/js/README.md similarity index 100% rename from src/hello/backend/node_modules/@eslint/js/README.md rename to src/hello/server/node_modules/@eslint/js/README.md diff --git a/src/hello/backend/node_modules/@eslint/js/package.json b/src/hello/server/node_modules/@eslint/js/package.json similarity index 100% rename from src/hello/backend/node_modules/@eslint/js/package.json rename to src/hello/server/node_modules/@eslint/js/package.json diff --git a/src/hello/backend/node_modules/@eslint/js/src/configs/eslint-all.js b/src/hello/server/node_modules/@eslint/js/src/configs/eslint-all.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/js/src/configs/eslint-all.js rename to src/hello/server/node_modules/@eslint/js/src/configs/eslint-all.js diff --git a/src/hello/backend/node_modules/@eslint/js/src/configs/eslint-recommended.js b/src/hello/server/node_modules/@eslint/js/src/configs/eslint-recommended.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/js/src/configs/eslint-recommended.js rename to src/hello/server/node_modules/@eslint/js/src/configs/eslint-recommended.js diff --git a/src/hello/backend/node_modules/@eslint/js/src/index.js b/src/hello/server/node_modules/@eslint/js/src/index.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/js/src/index.js rename to src/hello/server/node_modules/@eslint/js/src/index.js diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/LICENSE b/src/hello/server/node_modules/@humanwhocodes/config-array/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/config-array/LICENSE rename to src/hello/server/node_modules/@humanwhocodes/config-array/LICENSE diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/README.md b/src/hello/server/node_modules/@humanwhocodes/config-array/README.md similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/config-array/README.md rename to src/hello/server/node_modules/@humanwhocodes/config-array/README.md diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/api.js b/src/hello/server/node_modules/@humanwhocodes/config-array/api.js similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/config-array/api.js rename to src/hello/server/node_modules/@humanwhocodes/config-array/api.js diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/package.json b/src/hello/server/node_modules/@humanwhocodes/config-array/package.json similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/config-array/package.json rename to src/hello/server/node_modules/@humanwhocodes/config-array/package.json diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/CHANGELOG.md b/src/hello/server/node_modules/@humanwhocodes/module-importer/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/CHANGELOG.md rename to src/hello/server/node_modules/@humanwhocodes/module-importer/CHANGELOG.md diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/LICENSE b/src/hello/server/node_modules/@humanwhocodes/module-importer/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/LICENSE rename to src/hello/server/node_modules/@humanwhocodes/module-importer/LICENSE diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/README.md b/src/hello/server/node_modules/@humanwhocodes/module-importer/README.md similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/README.md rename to src/hello/server/node_modules/@humanwhocodes/module-importer/README.md diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs b/src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs rename to src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts b/src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts rename to src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts b/src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts rename to src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.js b/src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.js similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/dist/module-importer.js rename to src/hello/server/node_modules/@humanwhocodes/module-importer/dist/module-importer.js diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/package.json b/src/hello/server/node_modules/@humanwhocodes/module-importer/package.json similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/package.json rename to src/hello/server/node_modules/@humanwhocodes/module-importer/package.json diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs b/src/hello/server/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs rename to src/hello/server/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs diff --git a/src/hello/backend/node_modules/@humanwhocodes/module-importer/src/module-importer.js b/src/hello/server/node_modules/@humanwhocodes/module-importer/src/module-importer.js similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/module-importer/src/module-importer.js rename to src/hello/server/node_modules/@humanwhocodes/module-importer/src/module-importer.js diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/CHANGELOG.md b/src/hello/server/node_modules/@humanwhocodes/object-schema/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/CHANGELOG.md rename to src/hello/server/node_modules/@humanwhocodes/object-schema/CHANGELOG.md diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/LICENSE b/src/hello/server/node_modules/@humanwhocodes/object-schema/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/LICENSE rename to src/hello/server/node_modules/@humanwhocodes/object-schema/LICENSE diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/README.md b/src/hello/server/node_modules/@humanwhocodes/object-schema/README.md similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/README.md rename to src/hello/server/node_modules/@humanwhocodes/object-schema/README.md diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/package.json b/src/hello/server/node_modules/@humanwhocodes/object-schema/package.json similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/package.json rename to src/hello/server/node_modules/@humanwhocodes/object-schema/package.json diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/src/index.js b/src/hello/server/node_modules/@humanwhocodes/object-schema/src/index.js similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/src/index.js rename to src/hello/server/node_modules/@humanwhocodes/object-schema/src/index.js diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js b/src/hello/server/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js rename to src/hello/server/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/src/object-schema.js b/src/hello/server/node_modules/@humanwhocodes/object-schema/src/object-schema.js similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/src/object-schema.js rename to src/hello/server/node_modules/@humanwhocodes/object-schema/src/object-schema.js diff --git a/src/hello/backend/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js b/src/hello/server/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js similarity index 100% rename from src/hello/backend/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js rename to src/hello/server/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/LICENSE b/src/hello/server/node_modules/@nodelib/fs.scandir/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/LICENSE rename to src/hello/server/node_modules/@nodelib/fs.scandir/LICENSE diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/README.md b/src/hello/server/node_modules/@nodelib/fs.scandir/README.md similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/README.md rename to src/hello/server/node_modules/@nodelib/fs.scandir/README.md diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/adapters/fs.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/adapters/fs.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/adapters/fs.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/adapters/fs.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/constants.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/constants.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/constants.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/constants.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/constants.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/constants.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/constants.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/constants.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/index.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/index.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/async.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/async.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/async.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/async.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/common.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/common.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/common.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/common.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/sync.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/sync.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/providers/sync.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/providers/sync.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/settings.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/settings.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/settings.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/settings.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/settings.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/settings.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/settings.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/settings.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/types/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/types/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/types/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/types/index.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/types/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/types/index.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/types/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/fs.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/fs.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/fs.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/fs.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/index.js b/src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/out/utils/index.js rename to src/hello/server/node_modules/@nodelib/fs.scandir/out/utils/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.scandir/package.json b/src/hello/server/node_modules/@nodelib/fs.scandir/package.json similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.scandir/package.json rename to src/hello/server/node_modules/@nodelib/fs.scandir/package.json diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/LICENSE b/src/hello/server/node_modules/@nodelib/fs.stat/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/LICENSE rename to src/hello/server/node_modules/@nodelib/fs.stat/LICENSE diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/README.md b/src/hello/server/node_modules/@nodelib/fs.stat/README.md similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/README.md rename to src/hello/server/node_modules/@nodelib/fs.stat/README.md diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts b/src/hello/server/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts rename to src/hello/server/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/adapters/fs.js b/src/hello/server/node_modules/@nodelib/fs.stat/out/adapters/fs.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/adapters/fs.js rename to src/hello/server/node_modules/@nodelib/fs.stat/out/adapters/fs.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.stat/out/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.stat/out/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/index.js b/src/hello/server/node_modules/@nodelib/fs.stat/out/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/index.js rename to src/hello/server/node_modules/@nodelib/fs.stat/out/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/async.d.ts b/src/hello/server/node_modules/@nodelib/fs.stat/out/providers/async.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/async.d.ts rename to src/hello/server/node_modules/@nodelib/fs.stat/out/providers/async.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/async.js b/src/hello/server/node_modules/@nodelib/fs.stat/out/providers/async.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/async.js rename to src/hello/server/node_modules/@nodelib/fs.stat/out/providers/async.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts b/src/hello/server/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts rename to src/hello/server/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/sync.js b/src/hello/server/node_modules/@nodelib/fs.stat/out/providers/sync.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/providers/sync.js rename to src/hello/server/node_modules/@nodelib/fs.stat/out/providers/sync.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/settings.d.ts b/src/hello/server/node_modules/@nodelib/fs.stat/out/settings.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/settings.d.ts rename to src/hello/server/node_modules/@nodelib/fs.stat/out/settings.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/settings.js b/src/hello/server/node_modules/@nodelib/fs.stat/out/settings.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/settings.js rename to src/hello/server/node_modules/@nodelib/fs.stat/out/settings.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/types/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.stat/out/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/types/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.stat/out/types/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/out/types/index.js b/src/hello/server/node_modules/@nodelib/fs.stat/out/types/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/out/types/index.js rename to src/hello/server/node_modules/@nodelib/fs.stat/out/types/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.stat/package.json b/src/hello/server/node_modules/@nodelib/fs.stat/package.json similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.stat/package.json rename to src/hello/server/node_modules/@nodelib/fs.stat/package.json diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/LICENSE b/src/hello/server/node_modules/@nodelib/fs.walk/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/LICENSE rename to src/hello/server/node_modules/@nodelib/fs.walk/LICENSE diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/README.md b/src/hello/server/node_modules/@nodelib/fs.walk/README.md similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/README.md rename to src/hello/server/node_modules/@nodelib/fs.walk/README.md diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/index.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/index.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/async.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/async.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/async.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/async.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/async.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/async.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/async.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/async.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/index.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/index.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/stream.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/stream.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/stream.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/stream.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/sync.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/providers/sync.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/providers/sync.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/providers/sync.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/async.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/async.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/async.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/async.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/async.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/async.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/async.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/async.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/common.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/common.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/common.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/common.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/common.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/common.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/common.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/common.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/reader.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/reader.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/reader.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/reader.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/sync.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/readers/sync.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/readers/sync.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/readers/sync.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/settings.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/settings.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/settings.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/settings.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/settings.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/settings.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/settings.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/settings.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/types/index.d.ts b/src/hello/server/node_modules/@nodelib/fs.walk/out/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/types/index.d.ts rename to src/hello/server/node_modules/@nodelib/fs.walk/out/types/index.d.ts diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/out/types/index.js b/src/hello/server/node_modules/@nodelib/fs.walk/out/types/index.js similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/out/types/index.js rename to src/hello/server/node_modules/@nodelib/fs.walk/out/types/index.js diff --git a/src/hello/backend/node_modules/@nodelib/fs.walk/package.json b/src/hello/server/node_modules/@nodelib/fs.walk/package.json similarity index 100% rename from src/hello/backend/node_modules/@nodelib/fs.walk/package.json rename to src/hello/server/node_modules/@nodelib/fs.walk/package.json diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml b/src/hello/server/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml rename to src/hello/server/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/LICENSE b/src/hello/server/node_modules/@ungap/structured-clone/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/LICENSE rename to src/hello/server/node_modules/@ungap/structured-clone/LICENSE diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/README.md b/src/hello/server/node_modules/@ungap/structured-clone/README.md similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/README.md rename to src/hello/server/node_modules/@ungap/structured-clone/README.md diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/cjs/deserialize.js b/src/hello/server/node_modules/@ungap/structured-clone/cjs/deserialize.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/cjs/deserialize.js rename to src/hello/server/node_modules/@ungap/structured-clone/cjs/deserialize.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/cjs/index.js b/src/hello/server/node_modules/@ungap/structured-clone/cjs/index.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/cjs/index.js rename to src/hello/server/node_modules/@ungap/structured-clone/cjs/index.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/cjs/json.js b/src/hello/server/node_modules/@ungap/structured-clone/cjs/json.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/cjs/json.js rename to src/hello/server/node_modules/@ungap/structured-clone/cjs/json.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/cjs/package.json b/src/hello/server/node_modules/@ungap/structured-clone/cjs/package.json similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/cjs/package.json rename to src/hello/server/node_modules/@ungap/structured-clone/cjs/package.json diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/cjs/serialize.js b/src/hello/server/node_modules/@ungap/structured-clone/cjs/serialize.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/cjs/serialize.js rename to src/hello/server/node_modules/@ungap/structured-clone/cjs/serialize.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/cjs/types.js b/src/hello/server/node_modules/@ungap/structured-clone/cjs/types.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/cjs/types.js rename to src/hello/server/node_modules/@ungap/structured-clone/cjs/types.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/esm/deserialize.js b/src/hello/server/node_modules/@ungap/structured-clone/esm/deserialize.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/esm/deserialize.js rename to src/hello/server/node_modules/@ungap/structured-clone/esm/deserialize.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/esm/index.js b/src/hello/server/node_modules/@ungap/structured-clone/esm/index.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/esm/index.js rename to src/hello/server/node_modules/@ungap/structured-clone/esm/index.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/esm/json.js b/src/hello/server/node_modules/@ungap/structured-clone/esm/json.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/esm/json.js rename to src/hello/server/node_modules/@ungap/structured-clone/esm/json.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/esm/serialize.js b/src/hello/server/node_modules/@ungap/structured-clone/esm/serialize.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/esm/serialize.js rename to src/hello/server/node_modules/@ungap/structured-clone/esm/serialize.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/esm/types.js b/src/hello/server/node_modules/@ungap/structured-clone/esm/types.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/esm/types.js rename to src/hello/server/node_modules/@ungap/structured-clone/esm/types.js diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/package.json b/src/hello/server/node_modules/@ungap/structured-clone/package.json similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/package.json rename to src/hello/server/node_modules/@ungap/structured-clone/package.json diff --git a/src/hello/backend/node_modules/@ungap/structured-clone/structured-json.js b/src/hello/server/node_modules/@ungap/structured-clone/structured-json.js similarity index 100% rename from src/hello/backend/node_modules/@ungap/structured-clone/structured-json.js rename to src/hello/server/node_modules/@ungap/structured-clone/structured-json.js diff --git a/src/hello/backend/node_modules/accepts/HISTORY.md b/src/hello/server/node_modules/accepts/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/accepts/HISTORY.md rename to src/hello/server/node_modules/accepts/HISTORY.md diff --git a/src/hello/backend/node_modules/accepts/LICENSE b/src/hello/server/node_modules/accepts/LICENSE similarity index 100% rename from src/hello/backend/node_modules/accepts/LICENSE rename to src/hello/server/node_modules/accepts/LICENSE diff --git a/src/hello/backend/node_modules/accepts/README.md b/src/hello/server/node_modules/accepts/README.md similarity index 100% rename from src/hello/backend/node_modules/accepts/README.md rename to src/hello/server/node_modules/accepts/README.md diff --git a/src/hello/backend/node_modules/accepts/index.js b/src/hello/server/node_modules/accepts/index.js similarity index 100% rename from src/hello/backend/node_modules/accepts/index.js rename to src/hello/server/node_modules/accepts/index.js diff --git a/src/hello/backend/node_modules/accepts/package.json b/src/hello/server/node_modules/accepts/package.json similarity index 100% rename from src/hello/backend/node_modules/accepts/package.json rename to src/hello/server/node_modules/accepts/package.json diff --git a/src/hello/backend/node_modules/acorn-jsx/LICENSE b/src/hello/server/node_modules/acorn-jsx/LICENSE similarity index 100% rename from src/hello/backend/node_modules/acorn-jsx/LICENSE rename to src/hello/server/node_modules/acorn-jsx/LICENSE diff --git a/src/hello/backend/node_modules/acorn-jsx/README.md b/src/hello/server/node_modules/acorn-jsx/README.md similarity index 100% rename from src/hello/backend/node_modules/acorn-jsx/README.md rename to src/hello/server/node_modules/acorn-jsx/README.md diff --git a/src/hello/backend/node_modules/acorn-jsx/index.d.ts b/src/hello/server/node_modules/acorn-jsx/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/acorn-jsx/index.d.ts rename to src/hello/server/node_modules/acorn-jsx/index.d.ts diff --git a/src/hello/backend/node_modules/acorn-jsx/index.js b/src/hello/server/node_modules/acorn-jsx/index.js similarity index 100% rename from src/hello/backend/node_modules/acorn-jsx/index.js rename to src/hello/server/node_modules/acorn-jsx/index.js diff --git a/src/hello/backend/node_modules/acorn-jsx/package.json b/src/hello/server/node_modules/acorn-jsx/package.json similarity index 100% rename from src/hello/backend/node_modules/acorn-jsx/package.json rename to src/hello/server/node_modules/acorn-jsx/package.json diff --git a/src/hello/backend/node_modules/acorn-jsx/xhtml.js b/src/hello/server/node_modules/acorn-jsx/xhtml.js similarity index 100% rename from src/hello/backend/node_modules/acorn-jsx/xhtml.js rename to src/hello/server/node_modules/acorn-jsx/xhtml.js diff --git a/src/hello/backend/node_modules/acorn/CHANGELOG.md b/src/hello/server/node_modules/acorn/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/acorn/CHANGELOG.md rename to src/hello/server/node_modules/acorn/CHANGELOG.md diff --git a/src/hello/backend/node_modules/acorn/LICENSE b/src/hello/server/node_modules/acorn/LICENSE similarity index 100% rename from src/hello/backend/node_modules/acorn/LICENSE rename to src/hello/server/node_modules/acorn/LICENSE diff --git a/src/hello/backend/node_modules/acorn/README.md b/src/hello/server/node_modules/acorn/README.md similarity index 100% rename from src/hello/backend/node_modules/acorn/README.md rename to src/hello/server/node_modules/acorn/README.md diff --git a/src/hello/server/node_modules/acorn/bin/acorn b/src/hello/server/node_modules/acorn/bin/acorn new file mode 100644 index 00000000..3ef3c124 --- /dev/null +++ b/src/hello/server/node_modules/acorn/bin/acorn @@ -0,0 +1,4 @@ +#!/usr/bin/env node +"use strict" + +require("../dist/bin.js") diff --git a/src/hello/backend/node_modules/acorn/dist/acorn.d.mts b/src/hello/server/node_modules/acorn/dist/acorn.d.mts similarity index 100% rename from src/hello/backend/node_modules/acorn/dist/acorn.d.mts rename to src/hello/server/node_modules/acorn/dist/acorn.d.mts diff --git a/src/hello/backend/node_modules/acorn/dist/acorn.d.ts b/src/hello/server/node_modules/acorn/dist/acorn.d.ts similarity index 100% rename from src/hello/backend/node_modules/acorn/dist/acorn.d.ts rename to src/hello/server/node_modules/acorn/dist/acorn.d.ts diff --git a/src/hello/backend/node_modules/acorn/dist/acorn.js b/src/hello/server/node_modules/acorn/dist/acorn.js similarity index 100% rename from src/hello/backend/node_modules/acorn/dist/acorn.js rename to src/hello/server/node_modules/acorn/dist/acorn.js diff --git a/src/hello/backend/node_modules/acorn/dist/acorn.mjs b/src/hello/server/node_modules/acorn/dist/acorn.mjs similarity index 100% rename from src/hello/backend/node_modules/acorn/dist/acorn.mjs rename to src/hello/server/node_modules/acorn/dist/acorn.mjs diff --git a/src/hello/backend/node_modules/acorn/dist/bin.js b/src/hello/server/node_modules/acorn/dist/bin.js similarity index 100% rename from src/hello/backend/node_modules/acorn/dist/bin.js rename to src/hello/server/node_modules/acorn/dist/bin.js diff --git a/src/hello/backend/node_modules/acorn/package.json b/src/hello/server/node_modules/acorn/package.json similarity index 100% rename from src/hello/backend/node_modules/acorn/package.json rename to src/hello/server/node_modules/acorn/package.json diff --git a/src/hello/backend/node_modules/adler-32/LICENSE b/src/hello/server/node_modules/adler-32/LICENSE similarity index 100% rename from src/hello/backend/node_modules/adler-32/LICENSE rename to src/hello/server/node_modules/adler-32/LICENSE diff --git a/src/hello/backend/node_modules/adler-32/README.md b/src/hello/server/node_modules/adler-32/README.md similarity index 100% rename from src/hello/backend/node_modules/adler-32/README.md rename to src/hello/server/node_modules/adler-32/README.md diff --git a/src/hello/backend/node_modules/adler-32/adler32.js b/src/hello/server/node_modules/adler-32/adler32.js similarity index 100% rename from src/hello/backend/node_modules/adler-32/adler32.js rename to src/hello/server/node_modules/adler-32/adler32.js diff --git a/src/hello/backend/node_modules/adler-32/package.json b/src/hello/server/node_modules/adler-32/package.json similarity index 100% rename from src/hello/backend/node_modules/adler-32/package.json rename to src/hello/server/node_modules/adler-32/package.json diff --git a/src/hello/backend/node_modules/adler-32/types/index.d.ts b/src/hello/server/node_modules/adler-32/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/adler-32/types/index.d.ts rename to src/hello/server/node_modules/adler-32/types/index.d.ts diff --git a/src/hello/backend/node_modules/adler-32/types/tsconfig.json b/src/hello/server/node_modules/adler-32/types/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/adler-32/types/tsconfig.json rename to src/hello/server/node_modules/adler-32/types/tsconfig.json diff --git a/src/hello/backend/node_modules/adler-32/types/tslint.json b/src/hello/server/node_modules/adler-32/types/tslint.json similarity index 100% rename from src/hello/backend/node_modules/adler-32/types/tslint.json rename to src/hello/server/node_modules/adler-32/types/tslint.json diff --git a/src/hello/backend/node_modules/ajv/.tonic_example.js b/src/hello/server/node_modules/ajv/.tonic_example.js similarity index 100% rename from src/hello/backend/node_modules/ajv/.tonic_example.js rename to src/hello/server/node_modules/ajv/.tonic_example.js diff --git a/src/hello/backend/node_modules/ajv/LICENSE b/src/hello/server/node_modules/ajv/LICENSE similarity index 100% rename from src/hello/backend/node_modules/ajv/LICENSE rename to src/hello/server/node_modules/ajv/LICENSE diff --git a/src/hello/backend/node_modules/ajv/README.md b/src/hello/server/node_modules/ajv/README.md similarity index 100% rename from src/hello/backend/node_modules/ajv/README.md rename to src/hello/server/node_modules/ajv/README.md diff --git a/src/hello/backend/node_modules/ajv/dist/ajv.bundle.js b/src/hello/server/node_modules/ajv/dist/ajv.bundle.js similarity index 100% rename from src/hello/backend/node_modules/ajv/dist/ajv.bundle.js rename to src/hello/server/node_modules/ajv/dist/ajv.bundle.js diff --git a/src/hello/backend/node_modules/ajv/dist/ajv.min.js b/src/hello/server/node_modules/ajv/dist/ajv.min.js similarity index 100% rename from src/hello/backend/node_modules/ajv/dist/ajv.min.js rename to src/hello/server/node_modules/ajv/dist/ajv.min.js diff --git a/src/hello/backend/node_modules/ajv/dist/ajv.min.js.map b/src/hello/server/node_modules/ajv/dist/ajv.min.js.map similarity index 100% rename from src/hello/backend/node_modules/ajv/dist/ajv.min.js.map rename to src/hello/server/node_modules/ajv/dist/ajv.min.js.map diff --git a/src/hello/backend/node_modules/ajv/lib/ajv.d.ts b/src/hello/server/node_modules/ajv/lib/ajv.d.ts similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/ajv.d.ts rename to src/hello/server/node_modules/ajv/lib/ajv.d.ts diff --git a/src/hello/backend/node_modules/ajv/lib/ajv.js b/src/hello/server/node_modules/ajv/lib/ajv.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/ajv.js rename to src/hello/server/node_modules/ajv/lib/ajv.js diff --git a/src/hello/backend/node_modules/ajv/lib/cache.js b/src/hello/server/node_modules/ajv/lib/cache.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/cache.js rename to src/hello/server/node_modules/ajv/lib/cache.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/async.js b/src/hello/server/node_modules/ajv/lib/compile/async.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/async.js rename to src/hello/server/node_modules/ajv/lib/compile/async.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/equal.js b/src/hello/server/node_modules/ajv/lib/compile/equal.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/equal.js rename to src/hello/server/node_modules/ajv/lib/compile/equal.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/error_classes.js b/src/hello/server/node_modules/ajv/lib/compile/error_classes.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/error_classes.js rename to src/hello/server/node_modules/ajv/lib/compile/error_classes.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/formats.js b/src/hello/server/node_modules/ajv/lib/compile/formats.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/formats.js rename to src/hello/server/node_modules/ajv/lib/compile/formats.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/index.js b/src/hello/server/node_modules/ajv/lib/compile/index.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/index.js rename to src/hello/server/node_modules/ajv/lib/compile/index.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/resolve.js b/src/hello/server/node_modules/ajv/lib/compile/resolve.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/resolve.js rename to src/hello/server/node_modules/ajv/lib/compile/resolve.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/rules.js b/src/hello/server/node_modules/ajv/lib/compile/rules.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/rules.js rename to src/hello/server/node_modules/ajv/lib/compile/rules.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/schema_obj.js b/src/hello/server/node_modules/ajv/lib/compile/schema_obj.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/schema_obj.js rename to src/hello/server/node_modules/ajv/lib/compile/schema_obj.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/ucs2length.js b/src/hello/server/node_modules/ajv/lib/compile/ucs2length.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/ucs2length.js rename to src/hello/server/node_modules/ajv/lib/compile/ucs2length.js diff --git a/src/hello/backend/node_modules/ajv/lib/compile/util.js b/src/hello/server/node_modules/ajv/lib/compile/util.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/compile/util.js rename to src/hello/server/node_modules/ajv/lib/compile/util.js diff --git a/src/hello/backend/node_modules/ajv/lib/data.js b/src/hello/server/node_modules/ajv/lib/data.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/data.js rename to src/hello/server/node_modules/ajv/lib/data.js diff --git a/src/hello/backend/node_modules/ajv/lib/definition_schema.js b/src/hello/server/node_modules/ajv/lib/definition_schema.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/definition_schema.js rename to src/hello/server/node_modules/ajv/lib/definition_schema.js diff --git a/src/hello/backend/node_modules/ajv/lib/dot/_limit.jst b/src/hello/server/node_modules/ajv/lib/dot/_limit.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/_limit.jst rename to src/hello/server/node_modules/ajv/lib/dot/_limit.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/_limitItems.jst b/src/hello/server/node_modules/ajv/lib/dot/_limitItems.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/_limitItems.jst rename to src/hello/server/node_modules/ajv/lib/dot/_limitItems.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/_limitLength.jst b/src/hello/server/node_modules/ajv/lib/dot/_limitLength.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/_limitLength.jst rename to src/hello/server/node_modules/ajv/lib/dot/_limitLength.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/_limitProperties.jst b/src/hello/server/node_modules/ajv/lib/dot/_limitProperties.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/_limitProperties.jst rename to src/hello/server/node_modules/ajv/lib/dot/_limitProperties.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/allOf.jst b/src/hello/server/node_modules/ajv/lib/dot/allOf.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/allOf.jst rename to src/hello/server/node_modules/ajv/lib/dot/allOf.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/anyOf.jst b/src/hello/server/node_modules/ajv/lib/dot/anyOf.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/anyOf.jst rename to src/hello/server/node_modules/ajv/lib/dot/anyOf.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/coerce.def b/src/hello/server/node_modules/ajv/lib/dot/coerce.def similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/coerce.def rename to src/hello/server/node_modules/ajv/lib/dot/coerce.def diff --git a/src/hello/backend/node_modules/ajv/lib/dot/comment.jst b/src/hello/server/node_modules/ajv/lib/dot/comment.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/comment.jst rename to src/hello/server/node_modules/ajv/lib/dot/comment.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/const.jst b/src/hello/server/node_modules/ajv/lib/dot/const.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/const.jst rename to src/hello/server/node_modules/ajv/lib/dot/const.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/contains.jst b/src/hello/server/node_modules/ajv/lib/dot/contains.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/contains.jst rename to src/hello/server/node_modules/ajv/lib/dot/contains.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/custom.jst b/src/hello/server/node_modules/ajv/lib/dot/custom.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/custom.jst rename to src/hello/server/node_modules/ajv/lib/dot/custom.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/defaults.def b/src/hello/server/node_modules/ajv/lib/dot/defaults.def similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/defaults.def rename to src/hello/server/node_modules/ajv/lib/dot/defaults.def diff --git a/src/hello/backend/node_modules/ajv/lib/dot/definitions.def b/src/hello/server/node_modules/ajv/lib/dot/definitions.def similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/definitions.def rename to src/hello/server/node_modules/ajv/lib/dot/definitions.def diff --git a/src/hello/backend/node_modules/ajv/lib/dot/dependencies.jst b/src/hello/server/node_modules/ajv/lib/dot/dependencies.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/dependencies.jst rename to src/hello/server/node_modules/ajv/lib/dot/dependencies.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/enum.jst b/src/hello/server/node_modules/ajv/lib/dot/enum.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/enum.jst rename to src/hello/server/node_modules/ajv/lib/dot/enum.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/errors.def b/src/hello/server/node_modules/ajv/lib/dot/errors.def similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/errors.def rename to src/hello/server/node_modules/ajv/lib/dot/errors.def diff --git a/src/hello/backend/node_modules/ajv/lib/dot/format.jst b/src/hello/server/node_modules/ajv/lib/dot/format.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/format.jst rename to src/hello/server/node_modules/ajv/lib/dot/format.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/if.jst b/src/hello/server/node_modules/ajv/lib/dot/if.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/if.jst rename to src/hello/server/node_modules/ajv/lib/dot/if.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/items.jst b/src/hello/server/node_modules/ajv/lib/dot/items.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/items.jst rename to src/hello/server/node_modules/ajv/lib/dot/items.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/missing.def b/src/hello/server/node_modules/ajv/lib/dot/missing.def similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/missing.def rename to src/hello/server/node_modules/ajv/lib/dot/missing.def diff --git a/src/hello/backend/node_modules/ajv/lib/dot/multipleOf.jst b/src/hello/server/node_modules/ajv/lib/dot/multipleOf.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/multipleOf.jst rename to src/hello/server/node_modules/ajv/lib/dot/multipleOf.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/not.jst b/src/hello/server/node_modules/ajv/lib/dot/not.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/not.jst rename to src/hello/server/node_modules/ajv/lib/dot/not.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/oneOf.jst b/src/hello/server/node_modules/ajv/lib/dot/oneOf.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/oneOf.jst rename to src/hello/server/node_modules/ajv/lib/dot/oneOf.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/pattern.jst b/src/hello/server/node_modules/ajv/lib/dot/pattern.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/pattern.jst rename to src/hello/server/node_modules/ajv/lib/dot/pattern.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/properties.jst b/src/hello/server/node_modules/ajv/lib/dot/properties.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/properties.jst rename to src/hello/server/node_modules/ajv/lib/dot/properties.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/propertyNames.jst b/src/hello/server/node_modules/ajv/lib/dot/propertyNames.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/propertyNames.jst rename to src/hello/server/node_modules/ajv/lib/dot/propertyNames.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/ref.jst b/src/hello/server/node_modules/ajv/lib/dot/ref.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/ref.jst rename to src/hello/server/node_modules/ajv/lib/dot/ref.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/required.jst b/src/hello/server/node_modules/ajv/lib/dot/required.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/required.jst rename to src/hello/server/node_modules/ajv/lib/dot/required.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/uniqueItems.jst b/src/hello/server/node_modules/ajv/lib/dot/uniqueItems.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/uniqueItems.jst rename to src/hello/server/node_modules/ajv/lib/dot/uniqueItems.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dot/validate.jst b/src/hello/server/node_modules/ajv/lib/dot/validate.jst similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dot/validate.jst rename to src/hello/server/node_modules/ajv/lib/dot/validate.jst diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/README.md b/src/hello/server/node_modules/ajv/lib/dotjs/README.md similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/README.md rename to src/hello/server/node_modules/ajv/lib/dotjs/README.md diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/_limit.js b/src/hello/server/node_modules/ajv/lib/dotjs/_limit.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/_limit.js rename to src/hello/server/node_modules/ajv/lib/dotjs/_limit.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/_limitItems.js b/src/hello/server/node_modules/ajv/lib/dotjs/_limitItems.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/_limitItems.js rename to src/hello/server/node_modules/ajv/lib/dotjs/_limitItems.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/_limitLength.js b/src/hello/server/node_modules/ajv/lib/dotjs/_limitLength.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/_limitLength.js rename to src/hello/server/node_modules/ajv/lib/dotjs/_limitLength.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/_limitProperties.js b/src/hello/server/node_modules/ajv/lib/dotjs/_limitProperties.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/_limitProperties.js rename to src/hello/server/node_modules/ajv/lib/dotjs/_limitProperties.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/allOf.js b/src/hello/server/node_modules/ajv/lib/dotjs/allOf.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/allOf.js rename to src/hello/server/node_modules/ajv/lib/dotjs/allOf.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/anyOf.js b/src/hello/server/node_modules/ajv/lib/dotjs/anyOf.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/anyOf.js rename to src/hello/server/node_modules/ajv/lib/dotjs/anyOf.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/comment.js b/src/hello/server/node_modules/ajv/lib/dotjs/comment.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/comment.js rename to src/hello/server/node_modules/ajv/lib/dotjs/comment.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/const.js b/src/hello/server/node_modules/ajv/lib/dotjs/const.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/const.js rename to src/hello/server/node_modules/ajv/lib/dotjs/const.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/contains.js b/src/hello/server/node_modules/ajv/lib/dotjs/contains.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/contains.js rename to src/hello/server/node_modules/ajv/lib/dotjs/contains.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/custom.js b/src/hello/server/node_modules/ajv/lib/dotjs/custom.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/custom.js rename to src/hello/server/node_modules/ajv/lib/dotjs/custom.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/dependencies.js b/src/hello/server/node_modules/ajv/lib/dotjs/dependencies.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/dependencies.js rename to src/hello/server/node_modules/ajv/lib/dotjs/dependencies.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/enum.js b/src/hello/server/node_modules/ajv/lib/dotjs/enum.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/enum.js rename to src/hello/server/node_modules/ajv/lib/dotjs/enum.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/format.js b/src/hello/server/node_modules/ajv/lib/dotjs/format.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/format.js rename to src/hello/server/node_modules/ajv/lib/dotjs/format.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/if.js b/src/hello/server/node_modules/ajv/lib/dotjs/if.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/if.js rename to src/hello/server/node_modules/ajv/lib/dotjs/if.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/index.js b/src/hello/server/node_modules/ajv/lib/dotjs/index.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/index.js rename to src/hello/server/node_modules/ajv/lib/dotjs/index.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/items.js b/src/hello/server/node_modules/ajv/lib/dotjs/items.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/items.js rename to src/hello/server/node_modules/ajv/lib/dotjs/items.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/multipleOf.js b/src/hello/server/node_modules/ajv/lib/dotjs/multipleOf.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/multipleOf.js rename to src/hello/server/node_modules/ajv/lib/dotjs/multipleOf.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/not.js b/src/hello/server/node_modules/ajv/lib/dotjs/not.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/not.js rename to src/hello/server/node_modules/ajv/lib/dotjs/not.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/oneOf.js b/src/hello/server/node_modules/ajv/lib/dotjs/oneOf.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/oneOf.js rename to src/hello/server/node_modules/ajv/lib/dotjs/oneOf.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/pattern.js b/src/hello/server/node_modules/ajv/lib/dotjs/pattern.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/pattern.js rename to src/hello/server/node_modules/ajv/lib/dotjs/pattern.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/properties.js b/src/hello/server/node_modules/ajv/lib/dotjs/properties.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/properties.js rename to src/hello/server/node_modules/ajv/lib/dotjs/properties.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/propertyNames.js b/src/hello/server/node_modules/ajv/lib/dotjs/propertyNames.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/propertyNames.js rename to src/hello/server/node_modules/ajv/lib/dotjs/propertyNames.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/ref.js b/src/hello/server/node_modules/ajv/lib/dotjs/ref.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/ref.js rename to src/hello/server/node_modules/ajv/lib/dotjs/ref.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/required.js b/src/hello/server/node_modules/ajv/lib/dotjs/required.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/required.js rename to src/hello/server/node_modules/ajv/lib/dotjs/required.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/uniqueItems.js b/src/hello/server/node_modules/ajv/lib/dotjs/uniqueItems.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/uniqueItems.js rename to src/hello/server/node_modules/ajv/lib/dotjs/uniqueItems.js diff --git a/src/hello/backend/node_modules/ajv/lib/dotjs/validate.js b/src/hello/server/node_modules/ajv/lib/dotjs/validate.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/dotjs/validate.js rename to src/hello/server/node_modules/ajv/lib/dotjs/validate.js diff --git a/src/hello/backend/node_modules/ajv/lib/keyword.js b/src/hello/server/node_modules/ajv/lib/keyword.js similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/keyword.js rename to src/hello/server/node_modules/ajv/lib/keyword.js diff --git a/src/hello/backend/node_modules/ajv/lib/refs/data.json b/src/hello/server/node_modules/ajv/lib/refs/data.json similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/refs/data.json rename to src/hello/server/node_modules/ajv/lib/refs/data.json diff --git a/src/hello/backend/node_modules/ajv/lib/refs/json-schema-draft-04.json b/src/hello/server/node_modules/ajv/lib/refs/json-schema-draft-04.json similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/refs/json-schema-draft-04.json rename to src/hello/server/node_modules/ajv/lib/refs/json-schema-draft-04.json diff --git a/src/hello/backend/node_modules/ajv/lib/refs/json-schema-draft-06.json b/src/hello/server/node_modules/ajv/lib/refs/json-schema-draft-06.json similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/refs/json-schema-draft-06.json rename to src/hello/server/node_modules/ajv/lib/refs/json-schema-draft-06.json diff --git a/src/hello/backend/node_modules/ajv/lib/refs/json-schema-draft-07.json b/src/hello/server/node_modules/ajv/lib/refs/json-schema-draft-07.json similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/refs/json-schema-draft-07.json rename to src/hello/server/node_modules/ajv/lib/refs/json-schema-draft-07.json diff --git a/src/hello/backend/node_modules/ajv/lib/refs/json-schema-secure.json b/src/hello/server/node_modules/ajv/lib/refs/json-schema-secure.json similarity index 100% rename from src/hello/backend/node_modules/ajv/lib/refs/json-schema-secure.json rename to src/hello/server/node_modules/ajv/lib/refs/json-schema-secure.json diff --git a/src/hello/backend/node_modules/ajv/package.json b/src/hello/server/node_modules/ajv/package.json similarity index 100% rename from src/hello/backend/node_modules/ajv/package.json rename to src/hello/server/node_modules/ajv/package.json diff --git a/src/hello/backend/node_modules/ajv/scripts/.eslintrc.yml b/src/hello/server/node_modules/ajv/scripts/.eslintrc.yml similarity index 100% rename from src/hello/backend/node_modules/ajv/scripts/.eslintrc.yml rename to src/hello/server/node_modules/ajv/scripts/.eslintrc.yml diff --git a/src/hello/backend/node_modules/ajv/scripts/bundle.js b/src/hello/server/node_modules/ajv/scripts/bundle.js similarity index 100% rename from src/hello/backend/node_modules/ajv/scripts/bundle.js rename to src/hello/server/node_modules/ajv/scripts/bundle.js diff --git a/src/hello/backend/node_modules/ajv/scripts/compile-dots.js b/src/hello/server/node_modules/ajv/scripts/compile-dots.js similarity index 100% rename from src/hello/backend/node_modules/ajv/scripts/compile-dots.js rename to src/hello/server/node_modules/ajv/scripts/compile-dots.js diff --git a/src/hello/backend/node_modules/ajv/scripts/info b/src/hello/server/node_modules/ajv/scripts/info similarity index 100% rename from src/hello/backend/node_modules/ajv/scripts/info rename to src/hello/server/node_modules/ajv/scripts/info diff --git a/src/hello/backend/node_modules/ajv/scripts/prepare-tests b/src/hello/server/node_modules/ajv/scripts/prepare-tests similarity index 100% rename from src/hello/backend/node_modules/ajv/scripts/prepare-tests rename to src/hello/server/node_modules/ajv/scripts/prepare-tests diff --git a/src/hello/backend/node_modules/ajv/scripts/publish-built-version b/src/hello/server/node_modules/ajv/scripts/publish-built-version similarity index 100% rename from src/hello/backend/node_modules/ajv/scripts/publish-built-version rename to src/hello/server/node_modules/ajv/scripts/publish-built-version diff --git a/src/hello/backend/node_modules/ajv/scripts/travis-gh-pages b/src/hello/server/node_modules/ajv/scripts/travis-gh-pages similarity index 100% rename from src/hello/backend/node_modules/ajv/scripts/travis-gh-pages rename to src/hello/server/node_modules/ajv/scripts/travis-gh-pages diff --git a/src/hello/backend/node_modules/ansi-regex/index.d.ts b/src/hello/server/node_modules/ansi-regex/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/ansi-regex/index.d.ts rename to src/hello/server/node_modules/ansi-regex/index.d.ts diff --git a/src/hello/backend/node_modules/ansi-regex/index.js b/src/hello/server/node_modules/ansi-regex/index.js similarity index 100% rename from src/hello/backend/node_modules/ansi-regex/index.js rename to src/hello/server/node_modules/ansi-regex/index.js diff --git a/src/hello/backend/node_modules/ansi-regex/license b/src/hello/server/node_modules/ansi-regex/license similarity index 100% rename from src/hello/backend/node_modules/ansi-regex/license rename to src/hello/server/node_modules/ansi-regex/license diff --git a/src/hello/backend/node_modules/ansi-regex/package.json b/src/hello/server/node_modules/ansi-regex/package.json similarity index 100% rename from src/hello/backend/node_modules/ansi-regex/package.json rename to src/hello/server/node_modules/ansi-regex/package.json diff --git a/src/hello/backend/node_modules/ansi-regex/readme.md b/src/hello/server/node_modules/ansi-regex/readme.md similarity index 100% rename from src/hello/backend/node_modules/ansi-regex/readme.md rename to src/hello/server/node_modules/ansi-regex/readme.md diff --git a/src/hello/backend/node_modules/ansi-styles/index.d.ts b/src/hello/server/node_modules/ansi-styles/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/ansi-styles/index.d.ts rename to src/hello/server/node_modules/ansi-styles/index.d.ts diff --git a/src/hello/backend/node_modules/ansi-styles/index.js b/src/hello/server/node_modules/ansi-styles/index.js similarity index 100% rename from src/hello/backend/node_modules/ansi-styles/index.js rename to src/hello/server/node_modules/ansi-styles/index.js diff --git a/src/hello/backend/node_modules/ansi-styles/license b/src/hello/server/node_modules/ansi-styles/license similarity index 100% rename from src/hello/backend/node_modules/ansi-styles/license rename to src/hello/server/node_modules/ansi-styles/license diff --git a/src/hello/backend/node_modules/ansi-styles/package.json b/src/hello/server/node_modules/ansi-styles/package.json similarity index 100% rename from src/hello/backend/node_modules/ansi-styles/package.json rename to src/hello/server/node_modules/ansi-styles/package.json diff --git a/src/hello/backend/node_modules/ansi-styles/readme.md b/src/hello/server/node_modules/ansi-styles/readme.md similarity index 100% rename from src/hello/backend/node_modules/ansi-styles/readme.md rename to src/hello/server/node_modules/ansi-styles/readme.md diff --git a/src/hello/backend/node_modules/anymatch/LICENSE b/src/hello/server/node_modules/anymatch/LICENSE similarity index 100% rename from src/hello/backend/node_modules/anymatch/LICENSE rename to src/hello/server/node_modules/anymatch/LICENSE diff --git a/src/hello/backend/node_modules/anymatch/README.md b/src/hello/server/node_modules/anymatch/README.md similarity index 100% rename from src/hello/backend/node_modules/anymatch/README.md rename to src/hello/server/node_modules/anymatch/README.md diff --git a/src/hello/backend/node_modules/anymatch/index.d.ts b/src/hello/server/node_modules/anymatch/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/anymatch/index.d.ts rename to src/hello/server/node_modules/anymatch/index.d.ts diff --git a/src/hello/backend/node_modules/anymatch/index.js b/src/hello/server/node_modules/anymatch/index.js similarity index 100% rename from src/hello/backend/node_modules/anymatch/index.js rename to src/hello/server/node_modules/anymatch/index.js diff --git a/src/hello/backend/node_modules/anymatch/package.json b/src/hello/server/node_modules/anymatch/package.json similarity index 100% rename from src/hello/backend/node_modules/anymatch/package.json rename to src/hello/server/node_modules/anymatch/package.json diff --git a/src/hello/server/node_modules/append-field/.npmignore b/src/hello/server/node_modules/append-field/.npmignore new file mode 100644 index 00000000..c2658d7d --- /dev/null +++ b/src/hello/server/node_modules/append-field/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/src/hello/server/node_modules/append-field/LICENSE b/src/hello/server/node_modules/append-field/LICENSE new file mode 100644 index 00000000..14b1f891 --- /dev/null +++ b/src/hello/server/node_modules/append-field/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Linus Unnebäck + +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/src/hello/server/node_modules/append-field/README.md b/src/hello/server/node_modules/append-field/README.md new file mode 100644 index 00000000..62b901b7 --- /dev/null +++ b/src/hello/server/node_modules/append-field/README.md @@ -0,0 +1,44 @@ +# `append-field` + +A [W3C HTML JSON forms spec](http://www.w3.org/TR/html-json-forms/) compliant +field appender (for lack of a better name). Useful for people implementing +`application/x-www-form-urlencoded` and `multipart/form-data` parsers. + +It works best on objects created with `Object.create(null)`. Otherwise it might +conflict with variables from the prototype (e.g. `hasOwnProperty`). + +## Installation + +```sh +npm install --save append-field +``` + +## Usage + +```javascript +var appendField = require('append-field') +var obj = Object.create(null) + +appendField(obj, 'pets[0][species]', 'Dahut') +appendField(obj, 'pets[0][name]', 'Hypatia') +appendField(obj, 'pets[1][species]', 'Felis Stultus') +appendField(obj, 'pets[1][name]', 'Billie') + +console.log(obj) +``` + +```text +{ pets: + [ { species: 'Dahut', name: 'Hypatia' }, + { species: 'Felis Stultus', name: 'Billie' } ] } +``` + +## API + +### `appendField(store, key, value)` + +Adds the field named `key` with the value `value` to the object `store`. + +## License + +MIT diff --git a/src/hello/server/node_modules/append-field/index.js b/src/hello/server/node_modules/append-field/index.js new file mode 100644 index 00000000..fc5acc8b --- /dev/null +++ b/src/hello/server/node_modules/append-field/index.js @@ -0,0 +1,12 @@ +var parsePath = require('./lib/parse-path') +var setValue = require('./lib/set-value') + +function appendField (store, key, value) { + var steps = parsePath(key) + + steps.reduce(function (context, step) { + return setValue(context, step, context[step.key], value) + }, store) +} + +module.exports = appendField diff --git a/src/hello/server/node_modules/append-field/lib/parse-path.js b/src/hello/server/node_modules/append-field/lib/parse-path.js new file mode 100644 index 00000000..31d61796 --- /dev/null +++ b/src/hello/server/node_modules/append-field/lib/parse-path.js @@ -0,0 +1,53 @@ +var reFirstKey = /^[^\[]*/ +var reDigitPath = /^\[(\d+)\]/ +var reNormalPath = /^\[([^\]]+)\]/ + +function parsePath (key) { + function failure () { + return [{ type: 'object', key: key, last: true }] + } + + var firstKey = reFirstKey.exec(key)[0] + if (!firstKey) return failure() + + var len = key.length + var pos = firstKey.length + var tail = { type: 'object', key: firstKey } + var steps = [tail] + + while (pos < len) { + var m + + if (key[pos] === '[' && key[pos + 1] === ']') { + pos += 2 + tail.append = true + if (pos !== len) return failure() + continue + } + + m = reDigitPath.exec(key.substring(pos)) + if (m !== null) { + pos += m[0].length + tail.nextType = 'array' + tail = { type: 'array', key: parseInt(m[1], 10) } + steps.push(tail) + continue + } + + m = reNormalPath.exec(key.substring(pos)) + if (m !== null) { + pos += m[0].length + tail.nextType = 'object' + tail = { type: 'object', key: m[1] } + steps.push(tail) + continue + } + + return failure() + } + + tail.last = true + return steps +} + +module.exports = parsePath diff --git a/src/hello/server/node_modules/append-field/lib/set-value.js b/src/hello/server/node_modules/append-field/lib/set-value.js new file mode 100644 index 00000000..c15e8737 --- /dev/null +++ b/src/hello/server/node_modules/append-field/lib/set-value.js @@ -0,0 +1,64 @@ +function valueType (value) { + if (value === undefined) return 'undefined' + if (Array.isArray(value)) return 'array' + if (typeof value === 'object') return 'object' + return 'scalar' +} + +function setLastValue (context, step, currentValue, entryValue) { + switch (valueType(currentValue)) { + case 'undefined': + if (step.append) { + context[step.key] = [entryValue] + } else { + context[step.key] = entryValue + } + break + case 'array': + context[step.key].push(entryValue) + break + case 'object': + return setLastValue(currentValue, { type: 'object', key: '', last: true }, currentValue[''], entryValue) + case 'scalar': + context[step.key] = [context[step.key], entryValue] + break + } + + return context +} + +function setValue (context, step, currentValue, entryValue) { + if (step.last) return setLastValue(context, step, currentValue, entryValue) + + var obj + switch (valueType(currentValue)) { + case 'undefined': + if (step.nextType === 'array') { + context[step.key] = [] + } else { + context[step.key] = Object.create(null) + } + return context[step.key] + case 'object': + return context[step.key] + case 'array': + if (step.nextType === 'array') { + return currentValue + } + + obj = Object.create(null) + context[step.key] = obj + currentValue.forEach(function (item, i) { + if (item !== undefined) obj['' + i] = item + }) + + return obj + case 'scalar': + obj = Object.create(null) + obj[''] = currentValue + context[step.key] = obj + return obj + } +} + +module.exports = setValue diff --git a/src/hello/server/node_modules/append-field/package.json b/src/hello/server/node_modules/append-field/package.json new file mode 100644 index 00000000..8d6e7164 --- /dev/null +++ b/src/hello/server/node_modules/append-field/package.json @@ -0,0 +1,19 @@ +{ + "name": "append-field", + "version": "1.0.0", + "license": "MIT", + "author": "Linus Unnebäck ", + "main": "index.js", + "devDependencies": { + "mocha": "^2.2.4", + "standard": "^6.0.5", + "testdata-w3c-json-form": "^0.2.0" + }, + "scripts": { + "test": "standard && mocha" + }, + "repository": { + "type": "git", + "url": "http://github.com/LinusU/node-append-field.git" + } +} diff --git a/src/hello/server/node_modules/append-field/test/forms.js b/src/hello/server/node_modules/append-field/test/forms.js new file mode 100644 index 00000000..dd6fbc98 --- /dev/null +++ b/src/hello/server/node_modules/append-field/test/forms.js @@ -0,0 +1,19 @@ +/* eslint-env mocha */ + +var assert = require('assert') +var appendField = require('../') +var testData = require('testdata-w3c-json-form') + +describe('Append Field', function () { + for (var test of testData) { + it('handles ' + test.name, function () { + var store = Object.create(null) + + for (var field of test.fields) { + appendField(store, field.key, field.value) + } + + assert.deepEqual(store, test.expected) + }) + } +}) diff --git a/src/hello/backend/node_modules/argparse/CHANGELOG.md b/src/hello/server/node_modules/argparse/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/argparse/CHANGELOG.md rename to src/hello/server/node_modules/argparse/CHANGELOG.md diff --git a/src/hello/backend/node_modules/argparse/LICENSE b/src/hello/server/node_modules/argparse/LICENSE similarity index 100% rename from src/hello/backend/node_modules/argparse/LICENSE rename to src/hello/server/node_modules/argparse/LICENSE diff --git a/src/hello/backend/node_modules/argparse/README.md b/src/hello/server/node_modules/argparse/README.md similarity index 100% rename from src/hello/backend/node_modules/argparse/README.md rename to src/hello/server/node_modules/argparse/README.md diff --git a/src/hello/backend/node_modules/argparse/argparse.js b/src/hello/server/node_modules/argparse/argparse.js similarity index 100% rename from src/hello/backend/node_modules/argparse/argparse.js rename to src/hello/server/node_modules/argparse/argparse.js diff --git a/src/hello/backend/node_modules/argparse/lib/sub.js b/src/hello/server/node_modules/argparse/lib/sub.js similarity index 100% rename from src/hello/backend/node_modules/argparse/lib/sub.js rename to src/hello/server/node_modules/argparse/lib/sub.js diff --git a/src/hello/backend/node_modules/argparse/lib/textwrap.js b/src/hello/server/node_modules/argparse/lib/textwrap.js similarity index 100% rename from src/hello/backend/node_modules/argparse/lib/textwrap.js rename to src/hello/server/node_modules/argparse/lib/textwrap.js diff --git a/src/hello/backend/node_modules/argparse/package.json b/src/hello/server/node_modules/argparse/package.json similarity index 100% rename from src/hello/backend/node_modules/argparse/package.json rename to src/hello/server/node_modules/argparse/package.json diff --git a/src/hello/backend/node_modules/array-flatten/LICENSE b/src/hello/server/node_modules/array-flatten/LICENSE similarity index 100% rename from src/hello/backend/node_modules/array-flatten/LICENSE rename to src/hello/server/node_modules/array-flatten/LICENSE diff --git a/src/hello/backend/node_modules/array-flatten/README.md b/src/hello/server/node_modules/array-flatten/README.md similarity index 100% rename from src/hello/backend/node_modules/array-flatten/README.md rename to src/hello/server/node_modules/array-flatten/README.md diff --git a/src/hello/backend/node_modules/array-flatten/array-flatten.js b/src/hello/server/node_modules/array-flatten/array-flatten.js similarity index 100% rename from src/hello/backend/node_modules/array-flatten/array-flatten.js rename to src/hello/server/node_modules/array-flatten/array-flatten.js diff --git a/src/hello/backend/node_modules/array-flatten/package.json b/src/hello/server/node_modules/array-flatten/package.json similarity index 100% rename from src/hello/backend/node_modules/array-flatten/package.json rename to src/hello/server/node_modules/array-flatten/package.json diff --git a/src/hello/backend/node_modules/asynckit/LICENSE b/src/hello/server/node_modules/asynckit/LICENSE similarity index 100% rename from src/hello/backend/node_modules/asynckit/LICENSE rename to src/hello/server/node_modules/asynckit/LICENSE diff --git a/src/hello/backend/node_modules/asynckit/README.md b/src/hello/server/node_modules/asynckit/README.md similarity index 100% rename from src/hello/backend/node_modules/asynckit/README.md rename to src/hello/server/node_modules/asynckit/README.md diff --git a/src/hello/backend/node_modules/asynckit/bench.js b/src/hello/server/node_modules/asynckit/bench.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/bench.js rename to src/hello/server/node_modules/asynckit/bench.js diff --git a/src/hello/backend/node_modules/asynckit/index.js b/src/hello/server/node_modules/asynckit/index.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/index.js rename to src/hello/server/node_modules/asynckit/index.js diff --git a/src/hello/backend/node_modules/asynckit/lib/abort.js b/src/hello/server/node_modules/asynckit/lib/abort.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/abort.js rename to src/hello/server/node_modules/asynckit/lib/abort.js diff --git a/src/hello/backend/node_modules/asynckit/lib/async.js b/src/hello/server/node_modules/asynckit/lib/async.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/async.js rename to src/hello/server/node_modules/asynckit/lib/async.js diff --git a/src/hello/backend/node_modules/asynckit/lib/defer.js b/src/hello/server/node_modules/asynckit/lib/defer.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/defer.js rename to src/hello/server/node_modules/asynckit/lib/defer.js diff --git a/src/hello/backend/node_modules/asynckit/lib/iterate.js b/src/hello/server/node_modules/asynckit/lib/iterate.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/iterate.js rename to src/hello/server/node_modules/asynckit/lib/iterate.js diff --git a/src/hello/backend/node_modules/asynckit/lib/readable_asynckit.js b/src/hello/server/node_modules/asynckit/lib/readable_asynckit.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/readable_asynckit.js rename to src/hello/server/node_modules/asynckit/lib/readable_asynckit.js diff --git a/src/hello/backend/node_modules/asynckit/lib/readable_parallel.js b/src/hello/server/node_modules/asynckit/lib/readable_parallel.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/readable_parallel.js rename to src/hello/server/node_modules/asynckit/lib/readable_parallel.js diff --git a/src/hello/backend/node_modules/asynckit/lib/readable_serial.js b/src/hello/server/node_modules/asynckit/lib/readable_serial.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/readable_serial.js rename to src/hello/server/node_modules/asynckit/lib/readable_serial.js diff --git a/src/hello/backend/node_modules/asynckit/lib/readable_serial_ordered.js b/src/hello/server/node_modules/asynckit/lib/readable_serial_ordered.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/readable_serial_ordered.js rename to src/hello/server/node_modules/asynckit/lib/readable_serial_ordered.js diff --git a/src/hello/backend/node_modules/asynckit/lib/state.js b/src/hello/server/node_modules/asynckit/lib/state.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/state.js rename to src/hello/server/node_modules/asynckit/lib/state.js diff --git a/src/hello/backend/node_modules/asynckit/lib/streamify.js b/src/hello/server/node_modules/asynckit/lib/streamify.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/streamify.js rename to src/hello/server/node_modules/asynckit/lib/streamify.js diff --git a/src/hello/backend/node_modules/asynckit/lib/terminator.js b/src/hello/server/node_modules/asynckit/lib/terminator.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/lib/terminator.js rename to src/hello/server/node_modules/asynckit/lib/terminator.js diff --git a/src/hello/backend/node_modules/asynckit/package.json b/src/hello/server/node_modules/asynckit/package.json similarity index 100% rename from src/hello/backend/node_modules/asynckit/package.json rename to src/hello/server/node_modules/asynckit/package.json diff --git a/src/hello/backend/node_modules/asynckit/parallel.js b/src/hello/server/node_modules/asynckit/parallel.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/parallel.js rename to src/hello/server/node_modules/asynckit/parallel.js diff --git a/src/hello/backend/node_modules/asynckit/serial.js b/src/hello/server/node_modules/asynckit/serial.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/serial.js rename to src/hello/server/node_modules/asynckit/serial.js diff --git a/src/hello/backend/node_modules/asynckit/serialOrdered.js b/src/hello/server/node_modules/asynckit/serialOrdered.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/serialOrdered.js rename to src/hello/server/node_modules/asynckit/serialOrdered.js diff --git a/src/hello/backend/node_modules/asynckit/stream.js b/src/hello/server/node_modules/asynckit/stream.js similarity index 100% rename from src/hello/backend/node_modules/asynckit/stream.js rename to src/hello/server/node_modules/asynckit/stream.js diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/LICENSE b/src/hello/server/node_modules/aws-ssl-profiles/LICENSE similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/LICENSE rename to src/hello/server/node_modules/aws-ssl-profiles/LICENSE diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/README.md b/src/hello/server/node_modules/aws-ssl-profiles/README.md similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/README.md rename to src/hello/server/node_modules/aws-ssl-profiles/README.md diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/@types/profiles.d.ts b/src/hello/server/node_modules/aws-ssl-profiles/lib/@types/profiles.d.ts similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/@types/profiles.d.ts rename to src/hello/server/node_modules/aws-ssl-profiles/lib/@types/profiles.d.ts diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/@types/profiles.js b/src/hello/server/node_modules/aws-ssl-profiles/lib/@types/profiles.js similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/@types/profiles.js rename to src/hello/server/node_modules/aws-ssl-profiles/lib/@types/profiles.js diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/index.d.ts b/src/hello/server/node_modules/aws-ssl-profiles/lib/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/index.d.ts rename to src/hello/server/node_modules/aws-ssl-profiles/lib/index.d.ts diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/index.js b/src/hello/server/node_modules/aws-ssl-profiles/lib/index.js similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/index.js rename to src/hello/server/node_modules/aws-ssl-profiles/lib/index.js diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.d.ts b/src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.d.ts similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.d.ts rename to src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.d.ts diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js b/src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js rename to src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.d.ts b/src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.d.ts similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.d.ts rename to src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.d.ts diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js b/src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js rename to src/hello/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js diff --git a/src/hello/backend/node_modules/aws-ssl-profiles/package.json b/src/hello/server/node_modules/aws-ssl-profiles/package.json similarity index 100% rename from src/hello/backend/node_modules/aws-ssl-profiles/package.json rename to src/hello/server/node_modules/aws-ssl-profiles/package.json diff --git a/src/hello/backend/node_modules/axios/CHANGELOG.md b/src/hello/server/node_modules/axios/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/axios/CHANGELOG.md rename to src/hello/server/node_modules/axios/CHANGELOG.md diff --git a/src/hello/backend/node_modules/axios/LICENSE b/src/hello/server/node_modules/axios/LICENSE similarity index 100% rename from src/hello/backend/node_modules/axios/LICENSE rename to src/hello/server/node_modules/axios/LICENSE diff --git a/src/hello/backend/node_modules/axios/MIGRATION_GUIDE.md b/src/hello/server/node_modules/axios/MIGRATION_GUIDE.md similarity index 100% rename from src/hello/backend/node_modules/axios/MIGRATION_GUIDE.md rename to src/hello/server/node_modules/axios/MIGRATION_GUIDE.md diff --git a/src/hello/backend/node_modules/axios/README.md b/src/hello/server/node_modules/axios/README.md similarity index 100% rename from src/hello/backend/node_modules/axios/README.md rename to src/hello/server/node_modules/axios/README.md diff --git a/src/hello/backend/node_modules/axios/dist/axios.js b/src/hello/server/node_modules/axios/dist/axios.js similarity index 100% rename from src/hello/backend/node_modules/axios/dist/axios.js rename to src/hello/server/node_modules/axios/dist/axios.js diff --git a/src/hello/backend/node_modules/axios/dist/axios.js.map b/src/hello/server/node_modules/axios/dist/axios.js.map similarity index 100% rename from src/hello/backend/node_modules/axios/dist/axios.js.map rename to src/hello/server/node_modules/axios/dist/axios.js.map diff --git a/src/hello/backend/node_modules/axios/dist/axios.min.js b/src/hello/server/node_modules/axios/dist/axios.min.js similarity index 100% rename from src/hello/backend/node_modules/axios/dist/axios.min.js rename to src/hello/server/node_modules/axios/dist/axios.min.js diff --git a/src/hello/backend/node_modules/axios/dist/axios.min.js.map b/src/hello/server/node_modules/axios/dist/axios.min.js.map similarity index 100% rename from src/hello/backend/node_modules/axios/dist/axios.min.js.map rename to src/hello/server/node_modules/axios/dist/axios.min.js.map diff --git a/src/hello/backend/node_modules/axios/dist/browser/axios.cjs b/src/hello/server/node_modules/axios/dist/browser/axios.cjs similarity index 100% rename from src/hello/backend/node_modules/axios/dist/browser/axios.cjs rename to src/hello/server/node_modules/axios/dist/browser/axios.cjs diff --git a/src/hello/backend/node_modules/axios/dist/browser/axios.cjs.map b/src/hello/server/node_modules/axios/dist/browser/axios.cjs.map similarity index 100% rename from src/hello/backend/node_modules/axios/dist/browser/axios.cjs.map rename to src/hello/server/node_modules/axios/dist/browser/axios.cjs.map diff --git a/src/hello/backend/node_modules/axios/dist/esm/axios.js b/src/hello/server/node_modules/axios/dist/esm/axios.js similarity index 100% rename from src/hello/backend/node_modules/axios/dist/esm/axios.js rename to src/hello/server/node_modules/axios/dist/esm/axios.js diff --git a/src/hello/backend/node_modules/axios/dist/esm/axios.js.map b/src/hello/server/node_modules/axios/dist/esm/axios.js.map similarity index 100% rename from src/hello/backend/node_modules/axios/dist/esm/axios.js.map rename to src/hello/server/node_modules/axios/dist/esm/axios.js.map diff --git a/src/hello/backend/node_modules/axios/dist/esm/axios.min.js b/src/hello/server/node_modules/axios/dist/esm/axios.min.js similarity index 100% rename from src/hello/backend/node_modules/axios/dist/esm/axios.min.js rename to src/hello/server/node_modules/axios/dist/esm/axios.min.js diff --git a/src/hello/backend/node_modules/axios/dist/esm/axios.min.js.map b/src/hello/server/node_modules/axios/dist/esm/axios.min.js.map similarity index 100% rename from src/hello/backend/node_modules/axios/dist/esm/axios.min.js.map rename to src/hello/server/node_modules/axios/dist/esm/axios.min.js.map diff --git a/src/hello/backend/node_modules/axios/dist/node/axios.cjs b/src/hello/server/node_modules/axios/dist/node/axios.cjs similarity index 100% rename from src/hello/backend/node_modules/axios/dist/node/axios.cjs rename to src/hello/server/node_modules/axios/dist/node/axios.cjs diff --git a/src/hello/backend/node_modules/axios/dist/node/axios.cjs.map b/src/hello/server/node_modules/axios/dist/node/axios.cjs.map similarity index 100% rename from src/hello/backend/node_modules/axios/dist/node/axios.cjs.map rename to src/hello/server/node_modules/axios/dist/node/axios.cjs.map diff --git a/src/hello/backend/node_modules/axios/index.d.cts b/src/hello/server/node_modules/axios/index.d.cts similarity index 100% rename from src/hello/backend/node_modules/axios/index.d.cts rename to src/hello/server/node_modules/axios/index.d.cts diff --git a/src/hello/backend/node_modules/axios/index.d.ts b/src/hello/server/node_modules/axios/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/axios/index.d.ts rename to src/hello/server/node_modules/axios/index.d.ts diff --git a/src/hello/backend/node_modules/axios/index.js b/src/hello/server/node_modules/axios/index.js similarity index 100% rename from src/hello/backend/node_modules/axios/index.js rename to src/hello/server/node_modules/axios/index.js diff --git a/src/hello/backend/node_modules/axios/lib/adapters/README.md b/src/hello/server/node_modules/axios/lib/adapters/README.md similarity index 100% rename from src/hello/backend/node_modules/axios/lib/adapters/README.md rename to src/hello/server/node_modules/axios/lib/adapters/README.md diff --git a/src/hello/backend/node_modules/axios/lib/adapters/adapters.js b/src/hello/server/node_modules/axios/lib/adapters/adapters.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/adapters/adapters.js rename to src/hello/server/node_modules/axios/lib/adapters/adapters.js diff --git a/src/hello/backend/node_modules/axios/lib/adapters/fetch.js b/src/hello/server/node_modules/axios/lib/adapters/fetch.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/adapters/fetch.js rename to src/hello/server/node_modules/axios/lib/adapters/fetch.js diff --git a/src/hello/backend/node_modules/axios/lib/adapters/http.js b/src/hello/server/node_modules/axios/lib/adapters/http.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/adapters/http.js rename to src/hello/server/node_modules/axios/lib/adapters/http.js diff --git a/src/hello/backend/node_modules/axios/lib/adapters/xhr.js b/src/hello/server/node_modules/axios/lib/adapters/xhr.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/adapters/xhr.js rename to src/hello/server/node_modules/axios/lib/adapters/xhr.js diff --git a/src/hello/backend/node_modules/axios/lib/axios.js b/src/hello/server/node_modules/axios/lib/axios.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/axios.js rename to src/hello/server/node_modules/axios/lib/axios.js diff --git a/src/hello/backend/node_modules/axios/lib/cancel/CancelToken.js b/src/hello/server/node_modules/axios/lib/cancel/CancelToken.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/cancel/CancelToken.js rename to src/hello/server/node_modules/axios/lib/cancel/CancelToken.js diff --git a/src/hello/backend/node_modules/axios/lib/cancel/CanceledError.js b/src/hello/server/node_modules/axios/lib/cancel/CanceledError.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/cancel/CanceledError.js rename to src/hello/server/node_modules/axios/lib/cancel/CanceledError.js diff --git a/src/hello/backend/node_modules/axios/lib/cancel/isCancel.js b/src/hello/server/node_modules/axios/lib/cancel/isCancel.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/cancel/isCancel.js rename to src/hello/server/node_modules/axios/lib/cancel/isCancel.js diff --git a/src/hello/backend/node_modules/axios/lib/core/Axios.js b/src/hello/server/node_modules/axios/lib/core/Axios.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/Axios.js rename to src/hello/server/node_modules/axios/lib/core/Axios.js diff --git a/src/hello/backend/node_modules/axios/lib/core/AxiosError.js b/src/hello/server/node_modules/axios/lib/core/AxiosError.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/AxiosError.js rename to src/hello/server/node_modules/axios/lib/core/AxiosError.js diff --git a/src/hello/backend/node_modules/axios/lib/core/AxiosHeaders.js b/src/hello/server/node_modules/axios/lib/core/AxiosHeaders.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/AxiosHeaders.js rename to src/hello/server/node_modules/axios/lib/core/AxiosHeaders.js diff --git a/src/hello/backend/node_modules/axios/lib/core/InterceptorManager.js b/src/hello/server/node_modules/axios/lib/core/InterceptorManager.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/InterceptorManager.js rename to src/hello/server/node_modules/axios/lib/core/InterceptorManager.js diff --git a/src/hello/backend/node_modules/axios/lib/core/README.md b/src/hello/server/node_modules/axios/lib/core/README.md similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/README.md rename to src/hello/server/node_modules/axios/lib/core/README.md diff --git a/src/hello/backend/node_modules/axios/lib/core/buildFullPath.js b/src/hello/server/node_modules/axios/lib/core/buildFullPath.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/buildFullPath.js rename to src/hello/server/node_modules/axios/lib/core/buildFullPath.js diff --git a/src/hello/backend/node_modules/axios/lib/core/dispatchRequest.js b/src/hello/server/node_modules/axios/lib/core/dispatchRequest.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/dispatchRequest.js rename to src/hello/server/node_modules/axios/lib/core/dispatchRequest.js diff --git a/src/hello/backend/node_modules/axios/lib/core/mergeConfig.js b/src/hello/server/node_modules/axios/lib/core/mergeConfig.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/mergeConfig.js rename to src/hello/server/node_modules/axios/lib/core/mergeConfig.js diff --git a/src/hello/backend/node_modules/axios/lib/core/settle.js b/src/hello/server/node_modules/axios/lib/core/settle.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/settle.js rename to src/hello/server/node_modules/axios/lib/core/settle.js diff --git a/src/hello/backend/node_modules/axios/lib/core/transformData.js b/src/hello/server/node_modules/axios/lib/core/transformData.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/core/transformData.js rename to src/hello/server/node_modules/axios/lib/core/transformData.js diff --git a/src/hello/backend/node_modules/axios/lib/defaults/index.js b/src/hello/server/node_modules/axios/lib/defaults/index.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/defaults/index.js rename to src/hello/server/node_modules/axios/lib/defaults/index.js diff --git a/src/hello/backend/node_modules/axios/lib/defaults/transitional.js b/src/hello/server/node_modules/axios/lib/defaults/transitional.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/defaults/transitional.js rename to src/hello/server/node_modules/axios/lib/defaults/transitional.js diff --git a/src/hello/backend/node_modules/axios/lib/env/README.md b/src/hello/server/node_modules/axios/lib/env/README.md similarity index 100% rename from src/hello/backend/node_modules/axios/lib/env/README.md rename to src/hello/server/node_modules/axios/lib/env/README.md diff --git a/src/hello/backend/node_modules/axios/lib/env/classes/FormData.js b/src/hello/server/node_modules/axios/lib/env/classes/FormData.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/env/classes/FormData.js rename to src/hello/server/node_modules/axios/lib/env/classes/FormData.js diff --git a/src/hello/backend/node_modules/axios/lib/env/data.js b/src/hello/server/node_modules/axios/lib/env/data.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/env/data.js rename to src/hello/server/node_modules/axios/lib/env/data.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/AxiosTransformStream.js b/src/hello/server/node_modules/axios/lib/helpers/AxiosTransformStream.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/AxiosTransformStream.js rename to src/hello/server/node_modules/axios/lib/helpers/AxiosTransformStream.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/AxiosURLSearchParams.js b/src/hello/server/node_modules/axios/lib/helpers/AxiosURLSearchParams.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/AxiosURLSearchParams.js rename to src/hello/server/node_modules/axios/lib/helpers/AxiosURLSearchParams.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/HttpStatusCode.js b/src/hello/server/node_modules/axios/lib/helpers/HttpStatusCode.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/HttpStatusCode.js rename to src/hello/server/node_modules/axios/lib/helpers/HttpStatusCode.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/README.md b/src/hello/server/node_modules/axios/lib/helpers/README.md similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/README.md rename to src/hello/server/node_modules/axios/lib/helpers/README.md diff --git a/src/hello/backend/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js b/src/hello/server/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js rename to src/hello/server/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/bind.js b/src/hello/server/node_modules/axios/lib/helpers/bind.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/bind.js rename to src/hello/server/node_modules/axios/lib/helpers/bind.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/buildURL.js b/src/hello/server/node_modules/axios/lib/helpers/buildURL.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/buildURL.js rename to src/hello/server/node_modules/axios/lib/helpers/buildURL.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/callbackify.js b/src/hello/server/node_modules/axios/lib/helpers/callbackify.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/callbackify.js rename to src/hello/server/node_modules/axios/lib/helpers/callbackify.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/combineURLs.js b/src/hello/server/node_modules/axios/lib/helpers/combineURLs.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/combineURLs.js rename to src/hello/server/node_modules/axios/lib/helpers/combineURLs.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/composeSignals.js b/src/hello/server/node_modules/axios/lib/helpers/composeSignals.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/composeSignals.js rename to src/hello/server/node_modules/axios/lib/helpers/composeSignals.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/cookies.js b/src/hello/server/node_modules/axios/lib/helpers/cookies.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/cookies.js rename to src/hello/server/node_modules/axios/lib/helpers/cookies.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/deprecatedMethod.js b/src/hello/server/node_modules/axios/lib/helpers/deprecatedMethod.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/deprecatedMethod.js rename to src/hello/server/node_modules/axios/lib/helpers/deprecatedMethod.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js b/src/hello/server/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js rename to src/hello/server/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/formDataToJSON.js b/src/hello/server/node_modules/axios/lib/helpers/formDataToJSON.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/formDataToJSON.js rename to src/hello/server/node_modules/axios/lib/helpers/formDataToJSON.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/formDataToStream.js b/src/hello/server/node_modules/axios/lib/helpers/formDataToStream.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/formDataToStream.js rename to src/hello/server/node_modules/axios/lib/helpers/formDataToStream.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/fromDataURI.js b/src/hello/server/node_modules/axios/lib/helpers/fromDataURI.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/fromDataURI.js rename to src/hello/server/node_modules/axios/lib/helpers/fromDataURI.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/isAbsoluteURL.js b/src/hello/server/node_modules/axios/lib/helpers/isAbsoluteURL.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/isAbsoluteURL.js rename to src/hello/server/node_modules/axios/lib/helpers/isAbsoluteURL.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/isAxiosError.js b/src/hello/server/node_modules/axios/lib/helpers/isAxiosError.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/isAxiosError.js rename to src/hello/server/node_modules/axios/lib/helpers/isAxiosError.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/isURLSameOrigin.js b/src/hello/server/node_modules/axios/lib/helpers/isURLSameOrigin.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/isURLSameOrigin.js rename to src/hello/server/node_modules/axios/lib/helpers/isURLSameOrigin.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/null.js b/src/hello/server/node_modules/axios/lib/helpers/null.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/null.js rename to src/hello/server/node_modules/axios/lib/helpers/null.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/parseHeaders.js b/src/hello/server/node_modules/axios/lib/helpers/parseHeaders.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/parseHeaders.js rename to src/hello/server/node_modules/axios/lib/helpers/parseHeaders.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/parseProtocol.js b/src/hello/server/node_modules/axios/lib/helpers/parseProtocol.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/parseProtocol.js rename to src/hello/server/node_modules/axios/lib/helpers/parseProtocol.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/progressEventReducer.js b/src/hello/server/node_modules/axios/lib/helpers/progressEventReducer.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/progressEventReducer.js rename to src/hello/server/node_modules/axios/lib/helpers/progressEventReducer.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/readBlob.js b/src/hello/server/node_modules/axios/lib/helpers/readBlob.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/readBlob.js rename to src/hello/server/node_modules/axios/lib/helpers/readBlob.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/resolveConfig.js b/src/hello/server/node_modules/axios/lib/helpers/resolveConfig.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/resolveConfig.js rename to src/hello/server/node_modules/axios/lib/helpers/resolveConfig.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/speedometer.js b/src/hello/server/node_modules/axios/lib/helpers/speedometer.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/speedometer.js rename to src/hello/server/node_modules/axios/lib/helpers/speedometer.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/spread.js b/src/hello/server/node_modules/axios/lib/helpers/spread.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/spread.js rename to src/hello/server/node_modules/axios/lib/helpers/spread.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/throttle.js b/src/hello/server/node_modules/axios/lib/helpers/throttle.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/throttle.js rename to src/hello/server/node_modules/axios/lib/helpers/throttle.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/toFormData.js b/src/hello/server/node_modules/axios/lib/helpers/toFormData.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/toFormData.js rename to src/hello/server/node_modules/axios/lib/helpers/toFormData.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/toURLEncodedForm.js b/src/hello/server/node_modules/axios/lib/helpers/toURLEncodedForm.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/toURLEncodedForm.js rename to src/hello/server/node_modules/axios/lib/helpers/toURLEncodedForm.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/trackStream.js b/src/hello/server/node_modules/axios/lib/helpers/trackStream.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/trackStream.js rename to src/hello/server/node_modules/axios/lib/helpers/trackStream.js diff --git a/src/hello/backend/node_modules/axios/lib/helpers/validator.js b/src/hello/server/node_modules/axios/lib/helpers/validator.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/helpers/validator.js rename to src/hello/server/node_modules/axios/lib/helpers/validator.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/browser/classes/Blob.js b/src/hello/server/node_modules/axios/lib/platform/browser/classes/Blob.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/browser/classes/Blob.js rename to src/hello/server/node_modules/axios/lib/platform/browser/classes/Blob.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/browser/classes/FormData.js b/src/hello/server/node_modules/axios/lib/platform/browser/classes/FormData.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/browser/classes/FormData.js rename to src/hello/server/node_modules/axios/lib/platform/browser/classes/FormData.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js b/src/hello/server/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js rename to src/hello/server/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/browser/index.js b/src/hello/server/node_modules/axios/lib/platform/browser/index.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/browser/index.js rename to src/hello/server/node_modules/axios/lib/platform/browser/index.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/common/utils.js b/src/hello/server/node_modules/axios/lib/platform/common/utils.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/common/utils.js rename to src/hello/server/node_modules/axios/lib/platform/common/utils.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/index.js b/src/hello/server/node_modules/axios/lib/platform/index.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/index.js rename to src/hello/server/node_modules/axios/lib/platform/index.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/node/classes/FormData.js b/src/hello/server/node_modules/axios/lib/platform/node/classes/FormData.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/node/classes/FormData.js rename to src/hello/server/node_modules/axios/lib/platform/node/classes/FormData.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/node/classes/URLSearchParams.js b/src/hello/server/node_modules/axios/lib/platform/node/classes/URLSearchParams.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/node/classes/URLSearchParams.js rename to src/hello/server/node_modules/axios/lib/platform/node/classes/URLSearchParams.js diff --git a/src/hello/backend/node_modules/axios/lib/platform/node/index.js b/src/hello/server/node_modules/axios/lib/platform/node/index.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/platform/node/index.js rename to src/hello/server/node_modules/axios/lib/platform/node/index.js diff --git a/src/hello/backend/node_modules/axios/lib/utils.js b/src/hello/server/node_modules/axios/lib/utils.js similarity index 100% rename from src/hello/backend/node_modules/axios/lib/utils.js rename to src/hello/server/node_modules/axios/lib/utils.js diff --git a/src/hello/backend/node_modules/axios/package.json b/src/hello/server/node_modules/axios/package.json similarity index 100% rename from src/hello/backend/node_modules/axios/package.json rename to src/hello/server/node_modules/axios/package.json diff --git a/src/hello/backend/node_modules/balanced-match/.github/FUNDING.yml b/src/hello/server/node_modules/balanced-match/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/balanced-match/.github/FUNDING.yml rename to src/hello/server/node_modules/balanced-match/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/balanced-match/LICENSE.md b/src/hello/server/node_modules/balanced-match/LICENSE.md similarity index 100% rename from src/hello/backend/node_modules/balanced-match/LICENSE.md rename to src/hello/server/node_modules/balanced-match/LICENSE.md diff --git a/src/hello/backend/node_modules/balanced-match/README.md b/src/hello/server/node_modules/balanced-match/README.md similarity index 100% rename from src/hello/backend/node_modules/balanced-match/README.md rename to src/hello/server/node_modules/balanced-match/README.md diff --git a/src/hello/backend/node_modules/balanced-match/index.js b/src/hello/server/node_modules/balanced-match/index.js similarity index 100% rename from src/hello/backend/node_modules/balanced-match/index.js rename to src/hello/server/node_modules/balanced-match/index.js diff --git a/src/hello/backend/node_modules/balanced-match/package.json b/src/hello/server/node_modules/balanced-match/package.json similarity index 100% rename from src/hello/backend/node_modules/balanced-match/package.json rename to src/hello/server/node_modules/balanced-match/package.json diff --git a/src/hello/server/node_modules/bcrypt/.dockerignore b/src/hello/server/node_modules/bcrypt/.dockerignore new file mode 100644 index 00000000..01f4eb7a --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/.dockerignore @@ -0,0 +1,6 @@ +.git/ +.vscode/ +Dockerfile* +prebuilds/ +node_modules/ +build*/ diff --git a/src/hello/server/node_modules/bcrypt/.editorconfig b/src/hello/server/node_modules/bcrypt/.editorconfig new file mode 100644 index 00000000..4e12f93b --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/.editorconfig @@ -0,0 +1,19 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[{package.json,*.yml}] +indent_style = space +indent_size = 2 + +[appveyor.yml] +end_of_line = crlf + +[*.md] +trim_trailing_whitespace = false diff --git a/src/hello/server/node_modules/bcrypt/.github/workflows/build-pack-publish.yml b/src/hello/server/node_modules/bcrypt/.github/workflows/build-pack-publish.yml new file mode 100644 index 00000000..9b14ee12 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/.github/workflows/build-pack-publish.yml @@ -0,0 +1,110 @@ +name: Prebuildify, package, publish + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + release: + types: [ prereleased, released ] + +jobs: + build-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # This is unsafe, but we really don't use any other native dependencies + - run: npm ci + - run: docker run -u $(id -u):$(id -g) -v `pwd`:/input -w /input ghcr.io/prebuild/almalinux-devtoolset11 npx prebuildify --napi --tag-libc --strip --target=node@18.0.0 + - run: docker run -u $(id -u):$(id -g) -v `pwd`:/input -w /input ghcr.io/prebuild/alpine npx prebuildify --napi --tag-libc --strip --target=node@18.0.0 + - run: docker run -u $(id -u):$(id -g) -v `pwd`:/input -w /input ghcr.io/prebuild/linux-armv7 npx prebuildify --napi --tag-libc --strip --target=node@18.0.0 + - run: docker run -u $(id -u):$(id -g) -v `pwd`:/input -w /input ghcr.io/prebuild/linux-armv7l-musl npx prebuildify --napi --tag-libc --strip --target=node@18.0.0 + - run: docker run -u $(id -u):$(id -g) -v `pwd`:/input -w /input ghcr.io/prebuild/linux-arm64 npx prebuildify --napi --tag-libc --strip --target=node@18.0.0 + - run: docker run -u $(id -u):$(id -g) -v `pwd`:/input -w /input ghcr.io/prebuild/linux-arm64-musl npx prebuildify --napi --tag-libc --strip --target=node@18.0.0 + - run: find prebuilds + - uses: actions/upload-artifact@v4 + with: + name: prebuild-linux + path: ./prebuilds/ + + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npx prebuildify --napi --strip --arch=x64 --target=node@18.0.0 + - run: npx prebuildify --napi --strip --arch=arm64 --target=node@20.0.0 + - run: dir prebuilds + - uses: actions/upload-artifact@v4 + with: + name: prebuild-windows + path: ./prebuilds/ + + build-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npx prebuildify --napi --strip --arch=arm64 --target=node@18.0.0 + - run: npx prebuildify --napi --strip --arch=x64 --target=node@18.0.0 + - run: find prebuilds + - uses: actions/upload-artifact@v4 + with: + name: prebuild-macos + path: ./prebuilds/ + + pack: + needs: + - build-linux + - build-windows + - build-macos + runs-on: ubuntu-latest + outputs: + PACK_FILE: ${{ steps.pack.outputs.PACK_FILE }} + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + path: /tmp/prebuilds/ + - name: Coalesce prebuilds from build matrix + run: | + mkdir prebuilds + for d in /tmp/prebuilds/*; do + cp -Rav $d/* prebuilds/ + done + - run: chmod a+x prebuilds/*/*.node && find prebuilds -executable -type f + - id: pack + name: Prepare NPM package + run: | + echo "PACK_FILE=$(npm pack)" >> "$GITHUB_OUTPUT" + - uses: actions/upload-artifact@v4 + with: + name: package-tgz + path: ${{ steps.pack.outputs.PACK_FILE }} + if-no-files-found: 'error' + + test-package: + needs: pack + strategy: + matrix: + node-version: [ 18, 20, 22, 23 ] + os: [ ubuntu-latest, windows-latest, macos-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + - uses: actions/download-artifact@v4 + with: + name: package-tgz + - run: npm install ${{ needs.pack.outputs.PACK_FILE }} + - run: node -e "const b = require('bcrypt'); const h = b.hashSync('hello', 10); console.log(h, b.compareSync('hello', h))" diff --git a/src/hello/server/node_modules/bcrypt/.github/workflows/ci.yaml b/src/hello/server/node_modules/bcrypt/.github/workflows/ci.yaml new file mode 100644 index 00000000..77c4e5a9 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/.github/workflows/ci.yaml @@ -0,0 +1,42 @@ +name: ci + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20, 22] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - name: Test + run: npm test + + build-alpine: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20, 22] + container: + image: node:${{ matrix.node-version }}-alpine + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + apk add make g++ python3 + - run: npm ci + - name: Test + run: | + npm test --unsafe-perm diff --git a/src/hello/server/node_modules/bcrypt/CHANGELOG.md b/src/hello/server/node_modules/bcrypt/CHANGELOG.md new file mode 100644 index 00000000..eab713b4 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/CHANGELOG.md @@ -0,0 +1,184 @@ +# 6.0.0 (2025-02-28) + * Drop support for NodeJS <= 16 + * Remove `node-pre-gyp` in favor of `prebuildify`, prebuilt binaries are now shipped with the package + * Update `node-addon-api` to 8.3.0 + * Update JS code to newer ES syntax + +# 5.1.0 (2022-10-06) + * Update `node-pre-gyp` to 1.0.11 + +# 5.1.0 (2022-10-06) + * Update `node-pre-gyp` to 1.0.10 + * Replace `nodeunit` with `jest` as the testing library + +# 5.0.1 (2021-02-22) + + * Update `node-pre-gyp` to 1.0.0 + +# 5.0.0 (2020-06-02) + + * Fix the bcrypt "wrap-around" bug. It affects passwords with lengths >= 255. + It is uncommon but it's a bug nevertheless. Previous attempts to fix the bug + was unsuccessful. + * Experimental support for z/OS + * Fix a bug related to NUL in password input + * Update `node-pre-gyp` to 0.15.0 + +# 4.0.1 (2020-02-27) + + * Fix compilation errors in Alpine linux + +# 4.0.0 (2020-02-17) + + * Switch to NAPI bcrypt + * Drop support for NodeJS 8 + +# 3.0.8 (2019-12-31) + + * Update `node-pre-gyp` to 0.14 + * Pre-built binaries for NodeJS 13 + +# 3.0.7 (2019-10-18) + + * Update `nan` to 2.14.0 + * Update `node-pre-gyp` to 0.13 + +# 3.0.6 (2019-04-11) + + * Update `nan` to 2.13.2 + +# 3.0.5 (2019-03-19) + + * Update `nan` to 2.13.1 + * NodeJS 12 compatibility + * Remove `node-pre-gyp` from bundled dependencies + +# 3.0.4-napi (2019-03-08) + + * Sync N-API bcrypt with NAN bcrypt + +# 3.0.4 (2019-02-07) + + * Fix GCC, NAN and V8 deprecation warnings + +# 3.0.3 (2018-12-19) + + * Update `nan` to 2.12.1 + +# 3.0.2 (2018-10-18) + + * Update `nan` to 2.11.1 + +# 3.0.1 (2018-09-20) + + * Update `nan` to 2.11.0 + +# 3.0.0 (2018-07-06) + + * Drop support for NodeJS <= 4 + +# 2.0.1 (2018-04-20) + + * Update `node-pre-gyp` to allow downloading prebuilt modules + +# 2.0.0 (2018-04-07) + + * Make `2b` the default bcrypt version + +# 1.1.0-napi (2018-01-21) + + * Initial support for [N-API](https://nodejs.org/api/n-api.html) + +# 1.0.3 (2016-08-23) + + * update to nan v2.6.2 for NodeJS 8 support + * Fix: use npm scripts instead of node-gyp directly. + +# 1.0.2 (2016-12-31) + + * Fix `compare` promise rejection with invalid arguments + +# 1.0.1 (2016-12-07) + + * Fix destructuring imports with promises + +# 1.0.0 (2016-12-04) + + * add Promise support (commit 2488473) + +# 0.8.7 (2016-06-09) + + * update nan to 2.3.5 for improved node v6 support + +# 0.8.6 (2016-04-20) + + * update nan for node v6 support + +# 0.8.5 (2015-08-12) + + * update to nan v2 (adds support for iojs 3) + +# 0.8.4 (2015-07-24) + + * fix deprecation warning for the Encode API + +# 0.8.3 (2015-05-06) + + * update nan to 1.8.4 for iojs 2.x support + +# 0.8.2 (2015-03-28) + + * always use callback for generating random bytes to avoid blocking + +# 0.8.1 (2015-01-18) + * update NaN to 1.5.0 for iojs support + +# 0.8.0 (2014-08-03) + * migrate to NAN for bindings + +# v0.5.0 + * Fix for issue around empty string params throwing Errors. + * Method deprecation. + * Upgrade from libeio/ev to libuv. (shtylman) + ** --- NOTE --- Breaks 0.4.x compatability + * EV_MULTIPLICITY compile flag. + +# v0.4.1 + * Thread safety fix around OpenSSL (GH-32). (bnoordhuis - through node) + * C++ code changes using delete and new instead of malloc and free. (shtylman) + * Compile options for speed, zoom. (shtylman) + * Move much of the type and variable checking to the JS. (shtylman) + +# v0.4.0 + * Added getRounds function that will tell you the number of rounds within a hash/salt + +# v0.3.2 + * Fix api issue with async salt gen first param + +# v0.3.1 + * Compile under node 0.5.x + +# v0.3.0 + * Internal Refactoring + * Remove pthread dependencies and locking + * Fix compiler warnings and a memory bug + +# v0.2.4 + * Use threadsafe functions instead of pthread mutexes + * salt validation to make sure the salt is of the correct size and format + +# v0.2.3 + * cygwin support + +# v0.2.2 + * Remove dependency on libbsd, use libssl instead + +# v0.2.0 + * Added async functionality + * API changes + * hashpw -> encrypt + * all old sync methods now end with _sync + * Removed libbsd(arc4random) dependency...now uses openssl which is more widely spread + +# v0.1.2 + * Security fix. Wasn't reading rounds in properly and was always only using 4 rounds diff --git a/src/hello/server/node_modules/bcrypt/Dockerfile b/src/hello/server/node_modules/bcrypt/Dockerfile new file mode 100644 index 00000000..2802bafa --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/Dockerfile @@ -0,0 +1,57 @@ +# Usage: +# +# docker build -t bcryptjs-builder . +# CONTAINER=$(docker create bcryptjs-builder) +# # Then copy the artifact to your host: +# docker cp "$CONTAINER:/usr/local/opt/bcrypt-js/prebuilds" . +# docker rm "$CONTAINER" +# +# Use --platform to build cross-platform i.e. for ARM: +# +# docker build -t bcryptjs-builder --platform "linux/arm64/v8" . +# CONTAINER=$docker create --platform "linux/arm64/v8" bcryptjs-builder) +# # this copies the prebuilds/linux-arm artifacts +# docker cp "$CONTAINER:/usr/local/opt/bcrypt-js/prebuilds" . +# docker rm "$CONTAINER" + + +ARG FROM_IMAGE=node:18-bullseye +#ARG FROM_IMAGE=arm32v7/node:16-bullseye +#ARG FROM_IMAGE=arm64v8/node:16-bullseye +FROM ${FROM_IMAGE} + +ENV project bcrypt-js +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL en_US.UTF-8 +ENV LANG ${LC_ALL} + +RUN echo "#log: ${project}: Setup system" \ + && set -x \ + && apt-get update -y \ + && apt-get install -y \ + build-essential \ + python3 \ + && apt-get clean \ + && update-alternatives --install /usr/local/bin/python python /usr/bin/python3 20 \ + && npm i -g prebuildify@5 node-gyp@9 \ + && sync + +ADD . /usr/local/opt/${project} +WORKDIR /usr/local/opt/${project} + +RUN echo "#log: ${project}: Running build" \ + && set -x \ + && npm ci \ + && npm run build + +ARG RUN_TESTS=true +ARG TEST_TIMEOUT_SECONDS= + +RUN if "${RUN_TESTS}"; then \ + echo "#log ${project}: Running tests" \ + && npm test; \ + else \ + echo "#log ${project}: Tests were skipped!"; \ + fi + +CMD /bin/bash -l diff --git a/src/hello/server/node_modules/bcrypt/Dockerfile-alpine b/src/hello/server/node_modules/bcrypt/Dockerfile-alpine new file mode 100644 index 00000000..7570cfe8 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/Dockerfile-alpine @@ -0,0 +1,41 @@ +# Usage: +# +# docker build -t bcryptjs-linux-alpine-builder -f Dockerfile-alpine . +# CONTAINER=$(docker create bcryptjs-linux-alpine-builder) +# # Then copy the artifact to your host: +# docker cp "$CONTAINER:/usr/local/opt/bcrypt-js/prebuilds" . +# docker rm "$CONTAINER" + +ARG FROM_IMAGE=node:18-alpine +FROM ${FROM_IMAGE} + +ENV project bcrypt-js +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL en_US.UTF-8 +ENV LANG ${LC_ALL} + +RUN echo "#log: ${project}: Setup system" \ + && set -x \ + && apk add --update build-base python3 \ + && npm i -g prebuildify@5 node-gyp@9 \ + && sync + +ADD . /usr/local/opt/${project} +WORKDIR /usr/local/opt/${project} + +RUN echo "#log: ${project}: Running build" \ + && set -x \ + && npm ci \ + && npm run build + +ARG RUN_TESTS=true +ARG TEST_TIMEOUT_SECONDS= + +RUN if "${RUN_TESTS}"; then \ + echo "#log ${project}: Running tests" \ + && npm test; \ + else \ + echo "#log ${project}: Tests were skipped!"; \ + fi + +CMD /bin/bash -l diff --git a/src/hello/server/node_modules/bcrypt/ISSUE_TEMPLATE.md b/src/hello/server/node_modules/bcrypt/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..b4baa008 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/ISSUE_TEMPLATE.md @@ -0,0 +1,18 @@ +Thanks for reporting a new issue with the node bcrypt module! + +To help you resolve your issue faster please make sure you have done the following: + +* Searched existing issues (even closed ones) for your same problem +* Make sure you have installed the required dependencies listed on the readme +* Read your npm error log for lines telling you what failed, usually it is a problem with not having the correct dependencies installed to build the native module + +Once you have done the above and are still confident that the issue is with the module, please describe it below. Some things that really help get your issue resolved faster are: + +* What went wrong? +* What did you expect to happen? +* Which version of nodejs and OS? +* If you find a bug, please write a failing test. + +Thanks! + +P.S. If it doesn't look like you read the above then your issue will likely be closed without further explanation. Sorry, but there are just too many issues opened with no useful information or questions which have been previously addressed. diff --git a/src/hello/server/node_modules/bcrypt/LICENSE b/src/hello/server/node_modules/bcrypt/LICENSE new file mode 100644 index 00000000..94e2ba5f --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Nicholas Campbell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/src/hello/server/node_modules/bcrypt/Makefile b/src/hello/server/node_modules/bcrypt/Makefile new file mode 100644 index 00000000..cb222526 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/Makefile @@ -0,0 +1,19 @@ +TESTS = test/*.js + +all: test + +build: clean compile + +compile: + npm install . + npm run install + +test: build + @./node_modules/.bin/jest \ + $(TESTS) + +clean: + rm -Rf lib/bindings/ + + +.PHONY: clean test build diff --git a/src/hello/server/node_modules/bcrypt/README.md b/src/hello/server/node_modules/bcrypt/README.md new file mode 100644 index 00000000..e9231081 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/README.md @@ -0,0 +1,388 @@ +# node.bcrypt.js + +[![ci](https://github.com/kelektiv/node.bcrypt.js/actions/workflows/ci.yaml/badge.svg)](https://github.com/kelektiv/node.bcrypt.js/actions/workflows/ci.yaml) + +[![Build Status](https://ci.appveyor.com/api/projects/status/github/kelektiv/node.bcrypt.js)](https://ci.appveyor.com/project/defunctzombie/node-bcrypt-js-pgo26/branch/master) + +A library to help you hash passwords. + +You can read about [bcrypt in Wikipedia][bcryptwiki] as well as in the following article: +[How To Safely Store A Password][codahale] + +## If You Are Submitting Bugs or Issues + +Please verify that the NodeJS version you are using is a _stable_ version; Unstable versions are currently not supported and issues created while using an unstable version will be closed. + +If you are on a stable version of NodeJS, please provide a sufficient code snippet or log files for installation issues. The code snippet does not require you to include confidential information. However, it must provide enough information so the problem can be replicable, or it may be closed without an explanation. + + +## Version Compatibility + +_Please upgrade to atleast v5.0.0 to avoid security issues mentioned below._ + +| Node Version | Bcrypt Version | +| -------------- | ------------------| +| 0.4 | <= 0.4 | +| 0.6, 0.8, 0.10 | >= 0.5 | +| 0.11 | >= 0.8 | +| 4 | <= 2.1.0 | +| 8 | >= 1.0.3 < 4.0.0 | +| 10, 11 | >= 3 | +| 12 onwards | >= 3.0.6 | + +`node-gyp` only works with stable/released versions of node. Since the `bcrypt` module uses `node-gyp` to build and install, you'll need a stable version of node to use bcrypt. If you do not, you'll likely see an error that starts with: + +``` +gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead +``` + +## Security Issues And Concerns + +> Per bcrypt implementation, only the first 72 bytes of a string are used. Any extra bytes are ignored when matching passwords. Note that this is not the first 72 *characters*. It is possible for a string to contain less than 72 characters, while taking up more than 72 bytes (e.g. a UTF-8 encoded string containing emojis). If a string is provided, it will be encoded using UTF-8. + +As should be the case with any security tool, anyone using this library should scrutinise it. If you find or suspect an issue with the code, please bring it to the maintainers' attention. We will spend some time ensuring that this library is as secure as possible. + +Here is a list of BCrypt-related security issues/concerns that have come up over the years. + +* An [issue with passwords][jtr] was found with a version of the Blowfish algorithm developed for John the Ripper. This is not present in the OpenBSD version and is thus not a problem for this module. HT [zooko][zooko]. +* Versions `< 5.0.0` suffer from bcrypt wrap-around bug and _will truncate passwords >= 255 characters leading to severely weakened passwords_. Please upgrade at earliest. See [this wiki page][wrap-around-bug] for more details. +* Versions `< 5.0.0` _do not handle NUL characters inside passwords properly leading to all subsequent characters being dropped and thus resulting in severely weakened passwords_. Please upgrade at earliest. See [this wiki page][improper-nuls] for more details. + +## Compatibility Note + +This library supports `$2a$` and `$2b$` prefix bcrypt hashes. `$2x$` and `$2y$` hashes are specific to bcrypt implementation developed for John the Ripper. In theory, they should be compatible with `$2b$` prefix. + +Compatibility with hashes generated by other languages is not 100% guaranteed due to difference in character encodings. However, it should not be an issue for most cases. + +### Migrating from v1.0.x + +Hashes generated in earlier version of `bcrypt` remain 100% supported in `v2.x.x` and later versions. In most cases, the migration should be a bump in the `package.json`. + +Hashes generated in `v2.x.x` using the defaults parameters will not work in earlier versions. + +## Dependencies + +* NodeJS +* `node-gyp` + * Please check the dependencies for this tool at: https://github.com/nodejs/node-gyp + * Windows users will need the options for c# and c++ installed with their visual studio instance. + * Python 2.x/3.x +* `OpenSSL` - This is only required to build the `bcrypt` project if you are using versions <= 0.7.7. Otherwise, we're using the builtin node crypto bindings for seed data (which use the same OpenSSL code paths we were, but don't have the external dependency). + +## Install via NPM + +``` +npm install bcrypt +``` +***Note:*** OS X users using Xcode 4.3.1 or above may need to run the following command in their terminal prior to installing if errors occur regarding xcodebuild: ```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer``` + +_Pre-built binaries for various NodeJS versions are made available on a best-effort basis._ + +Only the current stable and supported LTS releases are actively tested against. + +_There may be an interval between the release of the module and the availabilty of the compiled modules._ + +Currently, we have pre-built binaries that support the following platforms: + +1. Windows x32 and x64 +2. Linux x64 (GlibC and musl) +3. macOS + +If you face an error like this: + +``` +node-pre-gyp ERR! Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/bcrypt_lib-v1.0.2-node-v48-linux-x64.tar.gz +``` + +make sure you have the appropriate dependencies installed and configured for your platform. You can find installation instructions for the dependencies for some common platforms [in this page][depsinstall]. + +## Usage + +### async (recommended) + +```javascript +const bcrypt = require('bcrypt'); +const saltRounds = 10; +const myPlaintextPassword = 's0/\/\P4$$w0rD'; +const someOtherPlaintextPassword = 'not_bacon'; +``` + +#### To hash a password: + +Technique 1 (generate a salt and hash on separate function calls): + +```javascript +bcrypt.genSalt(saltRounds, function(err, salt) { + bcrypt.hash(myPlaintextPassword, salt, function(err, hash) { + // Store hash in your password DB. + }); +}); +``` + +Technique 2 (auto-gen a salt and hash): + +```javascript +bcrypt.hash(myPlaintextPassword, saltRounds, function(err, hash) { + // Store hash in your password DB. +}); +``` + +Note that both techniques achieve the same end-result. + +#### To check a password: + +```javascript +// Load hash from your password DB. +bcrypt.compare(myPlaintextPassword, hash, function(err, result) { + // result == true +}); +bcrypt.compare(someOtherPlaintextPassword, hash, function(err, result) { + // result == false +}); +``` + +[A Note on Timing Attacks](#a-note-on-timing-attacks) + +### with promises + +bcrypt uses whatever `Promise` implementation is available in `global.Promise`. NodeJS >= 0.12 has a native `Promise` implementation built in. However, this should work in any Promises/A+ compliant implementation. + +Async methods that accept a callback, return a `Promise` when callback is not specified if Promise support is available. + +```javascript +bcrypt.hash(myPlaintextPassword, saltRounds).then(function(hash) { + // Store hash in your password DB. +}); +``` +```javascript +// Load hash from your password DB. +bcrypt.compare(myPlaintextPassword, hash).then(function(result) { + // result == true +}); +bcrypt.compare(someOtherPlaintextPassword, hash).then(function(result) { + // result == false +}); +``` + +This is also compatible with `async/await` + +```javascript +async function checkUser(username, password) { + //... fetch user from a db etc. + + const match = await bcrypt.compare(password, user.passwordHash); + + if(match) { + //login + } + + //... +} +``` + +### ESM import +```javascript +import bcrypt from "bcrypt"; + +// later +await bcrypt.compare(password, hash); +``` + +### sync + +```javascript +const bcrypt = require('bcrypt'); +const saltRounds = 10; +const myPlaintextPassword = 's0/\/\P4$$w0rD'; +const someOtherPlaintextPassword = 'not_bacon'; +``` + +#### To hash a password: + +Technique 1 (generate a salt and hash on separate function calls): + +```javascript +const salt = bcrypt.genSaltSync(saltRounds); +const hash = bcrypt.hashSync(myPlaintextPassword, salt); +// Store hash in your password DB. +``` + +Technique 2 (auto-gen a salt and hash): + +```javascript +const hash = bcrypt.hashSync(myPlaintextPassword, saltRounds); +// Store hash in your password DB. +``` + +As with async, both techniques achieve the same end-result. + +#### To check a password: + +```javascript +// Load hash from your password DB. +bcrypt.compareSync(myPlaintextPassword, hash); // true +bcrypt.compareSync(someOtherPlaintextPassword, hash); // false +``` + +[A Note on Timing Attacks](#a-note-on-timing-attacks) + +### Why is async mode recommended over sync mode? +We recommend using async API if you use `bcrypt` on a server. Bcrypt hashing is CPU intensive which will cause the sync APIs to block the event loop and prevent your application from servicing any inbound requests or events. The async version uses a thread pool which does not block the main event loop. + +## API + +`BCrypt.` + + * `genSaltSync(rounds, minor)` + * `rounds` - [OPTIONAL] - the cost of processing the data. (default - 10) + * `minor` - [OPTIONAL] - minor version of bcrypt to use. (default - b) + * `genSalt(rounds, minor, cb)` + * `rounds` - [OPTIONAL] - the cost of processing the data. (default - 10) + * `minor` - [OPTIONAL] - minor version of bcrypt to use. (default - b) + * `cb` - [OPTIONAL] - a callback to be fired once the salt has been generated. uses eio making it asynchronous. If `cb` is not specified, a `Promise` is returned if Promise support is available. + * `err` - First parameter to the callback detailing any errors. + * `salt` - Second parameter to the callback providing the generated salt. + * `hashSync(data, salt)` + * `data` - [REQUIRED] - the data to be encrypted. + * `salt` - [REQUIRED] - the salt to be used to hash the password. if specified as a number then a salt will be generated with the specified number of rounds and used (see example under **Usage**). + * `hash(data, salt, cb)` + * `data` - [REQUIRED] - the data to be encrypted. + * `salt` - [REQUIRED] - the salt to be used to hash the password. if specified as a number then a salt will be generated with the specified number of rounds and used (see example under **Usage**). + * `cb` - [OPTIONAL] - a callback to be fired once the data has been encrypted. uses eio making it asynchronous. If `cb` is not specified, a `Promise` is returned if Promise support is available. + * `err` - First parameter to the callback detailing any errors. + * `encrypted` - Second parameter to the callback providing the encrypted form. + * `compareSync(data, encrypted)` + * `data` - [REQUIRED] - data to compare. + * `encrypted` - [REQUIRED] - data to be compared to. + * `compare(data, encrypted, cb)` + * `data` - [REQUIRED] - data to compare. + * `encrypted` - [REQUIRED] - data to be compared to. + * `cb` - [OPTIONAL] - a callback to be fired once the data has been compared. uses eio making it asynchronous. If `cb` is not specified, a `Promise` is returned if Promise support is available. + * `err` - First parameter to the callback detailing any errors. + * `same` - Second parameter to the callback providing whether the data and encrypted forms match [true | false]. + * `getRounds(encrypted)` - return the number of rounds used to encrypt a given hash + * `encrypted` - [REQUIRED] - hash from which the number of rounds used should be extracted. + +## A Note on Rounds + +A note about the cost: when you are hashing your data, the module will go through a series of rounds to give you a secure hash. The value you submit is not just the number of rounds the module will go through to hash your data. The module will use the value you enter and go through `2^rounds` hashing iterations. + +From @garthk, on a 2GHz core you can roughly expect: + + rounds=8 : ~40 hashes/sec + rounds=9 : ~20 hashes/sec + rounds=10: ~10 hashes/sec + rounds=11: ~5 hashes/sec + rounds=12: 2-3 hashes/sec + rounds=13: ~1 sec/hash + rounds=14: ~1.5 sec/hash + rounds=15: ~3 sec/hash + rounds=25: ~1 hour/hash + rounds=31: 2-3 days/hash + + +## A Note on Timing Attacks + +Because it's come up multiple times in this project and other bcrypt projects, it needs to be said. The `bcrypt` library is not susceptible to timing attacks. From codahale/bcrypt-ruby#42: + +> One of the desired properties of a cryptographic hash function is preimage attack resistance, which means there is no shortcut for generating a message which, when hashed, produces a specific digest. + +A great thread on this, in much more detail can be found @ codahale/bcrypt-ruby#43 + +If you're unfamiliar with timing attacks and want to learn more you can find a great writeup @ [A Lesson In Timing Attacks][timingatk] + +However, timing attacks are real. And the comparison function is _not_ time safe. That means that it may exit the function early in the comparison process. Timing attacks happen because of the above. We don't need to be careful that an attacker will learn anything, and our comparison function provides a comparison of hashes. It is a utility to the overall purpose of the library. If you end up using it for something else, we cannot guarantee the security of the comparator. Keep that in mind as you use the library. + +## Hash Info + +The characters that comprise the resultant hash are `./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$`. + +Resultant hashes will be 60 characters long and they will include the salt among other parameters, as follows: + +`$[algorithm]$[cost]$[salt][hash]` + +- 2 chars hash algorithm identifier prefix. `"$2a$" or "$2b$"` indicates BCrypt +- Cost-factor (n). Represents the exponent used to determine how many iterations 2^n +- 16-byte (128-bit) salt, base64 encoded to 22 characters +- 24-byte (192-bit) hash, base64 encoded to 31 characters + +Example: +``` +$2b$10$nOUIs5kJ7naTuTFkBy1veuK0kSxUFXfuaOKdOKf9xYT0KKIGSJwFa + | | | | + | | | hash-value = K0kSxUFXfuaOKdOKf9xYT0KKIGSJwFa + | | | + | | salt = nOUIs5kJ7naTuTFkBy1veu + | | + | cost-factor => 10 = 2^10 rounds + | + hash-algorithm identifier => 2b = BCrypt +``` + +## Testing + +If you create a pull request, tests better pass :) + +``` +npm install +npm test +``` + +## Credits + +The code for this comes from a few sources: + +* blowfish.cc - OpenBSD +* bcrypt.cc - OpenBSD +* bcrypt::gen_salt - [gen_salt inclusion to bcrypt][bcryptgs] +* bcrypt_node.cc - me + +## Contributors + +* [Antonio Salazar Cardozo][shadowfiend] - Early MacOS X support (when we used libbsd) +* [Ben Glow][pixelglow] - Fixes for thread safety with async calls +* [Van Nguyen][thegoleffect] - Found a timing attack in the comparator +* [NewITFarmer][newitfarmer] - Initial Cygwin support +* [David Trejo][dtrejo] - packaging fixes +* [Alfred Westerveld][alfredwesterveld] - packaging fixes +* [Vincent Côté-Roy][vincentr] - Testing around concurrency issues +* [Lloyd Hilaiel][lloyd] - Documentation fixes +* [Roman Shtylman][shtylman] - Code refactoring, general rot reduction, compile options, better memory management with delete and new, and an upgrade to libuv over eio/ev. +* [Vadim Graboys][vadimg] - Code changes to support 0.5.5+ +* [Ben Noordhuis][bnoordhuis] - Fixed a thread safety issue in nodejs that was perfectly mappable to this module. +* [Nate Rajlich][tootallnate] - Bindings and build process. +* [Sean McArthur][seanmonstar] - Windows Support +* [Fanie Oosthuysen][weareu] - Windows Support +* [Amitosh Swain Mahapatra][recrsn] - $2b$ hash support, ES6 Promise support +* [Nicola Del Gobbo][NickNaso] - Initial implementation with N-API + +## License +Unless stated elsewhere, file headers or otherwise, the license as stated in the LICENSE file. + +[bcryptwiki]: https://en.wikipedia.org/wiki/Bcrypt +[bcryptgs]: http://mail-index.netbsd.org/tech-crypto/2002/05/24/msg000204.html +[codahale]: http://codahale.com/how-to-safely-store-a-password/ +[gh13]: https://github.com/ncb000gt/node.bcrypt.js/issues/13 +[jtr]: http://www.openwall.com/lists/oss-security/2011/06/20/2 +[depsinstall]: https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions +[timingatk]: https://codahale.com/a-lesson-in-timing-attacks/ +[wrap-around-bug]: https://github.com/kelektiv/node.bcrypt.js/wiki/Security-Issues-and-Concerns#bcrypt-wrap-around-bug-medium-severity +[improper-nuls]: https://github.com/kelektiv/node.bcrypt.js/wiki/Security-Issues-and-Concerns#improper-nul-handling-medium-severity + +[shadowfiend]:https://github.com/Shadowfiend +[thegoleffect]:https://github.com/thegoleffect +[pixelglow]:https://github.com/pixelglow +[dtrejo]:https://github.com/dtrejo +[alfredwesterveld]:https://github.com/alfredwesterveld +[newitfarmer]:https://github.com/newitfarmer +[zooko]:https://twitter.com/zooko +[vincentr]:https://twitter.com/vincentcr +[lloyd]:https://github.com/lloyd +[shtylman]:https://github.com/shtylman +[vadimg]:https://github.com/vadimg +[bnoordhuis]:https://github.com/bnoordhuis +[tootallnate]:https://github.com/tootallnate +[seanmonstar]:https://github.com/seanmonstar +[weareu]:https://github.com/weareu +[recrsn]:https://github.com/recrsn +[NickNaso]: https://github.com/NickNaso diff --git a/src/hello/server/node_modules/bcrypt/SECURITY.md b/src/hello/server/node_modules/bcrypt/SECURITY.md new file mode 100644 index 00000000..c132dc86 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/SECURITY.md @@ -0,0 +1,15 @@ +# Security Policy + +As with any software, `bcrypt` is likely to have bugs. Please report any security vulnerabilities responsibly + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 5.0.x | :white_check_mark: | +| < 5.0 | :x: | + +## Reporting a Vulnerability + +If you are reporting a security vulnerability, please refrain from opening a GitHub issue and instead mail it to +one of the maintainers listed in the README. diff --git a/src/hello/server/node_modules/bcrypt/bcrypt.js b/src/hello/server/node_modules/bcrypt/bcrypt.js new file mode 100644 index 00000000..62da5252 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/bcrypt.js @@ -0,0 +1,242 @@ +const path = require('path'); +const bindings = require('node-gyp-build')(path.resolve(__dirname)); + +const crypto = require('crypto'); + +const promises = require('./promises'); + +/// generate a salt (sync) +/// @param {Number} [rounds] number of rounds (default 10) +/// @return {String} salt +function genSaltSync(rounds, minor) { + // default 10 rounds + if (!rounds) { + rounds = 10; + } else if (typeof rounds !== 'number') { + throw new Error('rounds must be a number'); + } + + if (!minor) { + minor = 'b'; + } else if (minor !== 'b' && minor !== 'a') { + throw new Error('minor must be either "a" or "b"'); + } + + return bindings.gen_salt_sync(minor, rounds, crypto.randomBytes(16)); +} + +/// generate a salt +/// @param {Number} [rounds] number of rounds (default 10) +/// @param {Function} cb callback(err, salt) +function genSalt(rounds, minor, cb) { + let error; + + // if callback is first argument, then use defaults for others + if (typeof arguments[0] === 'function') { + // have to set callback first otherwise arguments are overridden + cb = arguments[0]; + rounds = 10; + minor = 'b'; + // callback is second argument + } else if (typeof arguments[1] === 'function') { + // have to set callback first otherwise arguments are overridden + cb = arguments[1]; + minor = 'b'; + } + + if (!cb) { + return promises.promise(genSalt, this, [rounds, minor]); + } + + // default 10 rounds + if (!rounds) { + rounds = 10; + } else if (typeof rounds !== 'number') { + // callback error asynchronously + error = new Error('rounds must be a number'); + return process.nextTick(function () { + cb(error); + }); + } + + if (!minor) { + minor = 'b' + } else if (minor !== 'b' && minor !== 'a') { + error = new Error('minor must be either "a" or "b"'); + return process.nextTick(function () { + cb(error); + }); + } + + crypto.randomBytes(16, function (error, randomBytes) { + if (error) { + cb(error); + return; + } + + bindings.gen_salt(minor, rounds, randomBytes, cb); + }); +} + +/// hash data using a salt +/// @param {String|Buffer} data the data to encrypt +/// @param {String} salt the salt to use when hashing +/// @return {String} hash +function hashSync(data, salt) { + if (data == null || salt == null) { + throw new Error('data and salt arguments required'); + } + + if (!(typeof data === 'string' || data instanceof Buffer) || (typeof salt !== 'string' && typeof salt !== 'number')) { + throw new Error('data must be a string or Buffer and salt must either be a salt string or a number of rounds'); + } + + if (typeof salt === 'number') { + salt = module.exports.genSaltSync(salt); + } + + return bindings.encrypt_sync(data, salt); +} + +/// hash data using a salt +/// @param {String|Buffer} data the data to encrypt +/// @param {String} salt the salt to use when hashing +/// @param {Function} cb callback(err, hash) +function hash(data, salt, cb) { + let error; + + if (typeof data === 'function') { + error = new Error('data must be a string or Buffer and salt must either be a salt string or a number of rounds'); + return process.nextTick(function () { + data(error); + }); + } + + if (typeof salt === 'function') { + error = new Error('data must be a string or Buffer and salt must either be a salt string or a number of rounds'); + return process.nextTick(function () { + salt(error); + }); + } + + // cb exists but is not a function + // return a rejecting promise + if (cb && typeof cb !== 'function') { + return promises.reject(new Error('cb must be a function or null to return a Promise')); + } + + if (!cb) { + return promises.promise(hash, this, [data, salt]); + } + + if (data == null || salt == null) { + error = new Error('data and salt arguments required'); + return process.nextTick(function () { + cb(error); + }); + } + + if (!(typeof data === 'string' || data instanceof Buffer) || (typeof salt !== 'string' && typeof salt !== 'number')) { + error = new Error('data must be a string or Buffer and salt must either be a salt string or a number of rounds'); + return process.nextTick(function () { + cb(error); + }); + } + + + if (typeof salt === 'number') { + return module.exports.genSalt(salt, function (err, salt) { + return bindings.encrypt(data, salt, cb); + }); + } + + return bindings.encrypt(data, salt, cb); +} + +/// compare raw data to hash +/// @param {String|Buffer} data the data to hash and compare +/// @param {String} hash expected hash +/// @return {bool} true if hashed data matches hash +function compareSync(data, hash) { + if (data == null || hash == null) { + throw new Error('data and hash arguments required'); + } + + if (!(typeof data === 'string' || data instanceof Buffer) || typeof hash !== 'string') { + throw new Error('data must be a string or Buffer and hash must be a string'); + } + + return bindings.compare_sync(data, hash); +} + +/// compare raw data to hash +/// @param {String|Buffer} data the data to hash and compare +/// @param {String} hash expected hash +/// @param {Function} cb callback(err, matched) - matched is true if hashed data matches hash +function compare(data, hash, cb) { + let error; + + if (typeof data === 'function') { + error = new Error('data and hash arguments required'); + return process.nextTick(function () { + data(error); + }); + } + + if (typeof hash === 'function') { + error = new Error('data and hash arguments required'); + return process.nextTick(function () { + hash(error); + }); + } + + // cb exists but is not a function + // return a rejecting promise + if (cb && typeof cb !== 'function') { + return promises.reject(new Error('cb must be a function or null to return a Promise')); + } + + if (!cb) { + return promises.promise(compare, this, [data, hash]); + } + + if (data == null || hash == null) { + error = new Error('data and hash arguments required'); + return process.nextTick(function () { + cb(error); + }); + } + + if (!(typeof data === 'string' || data instanceof Buffer) || typeof hash !== 'string') { + error = new Error('data and hash must be strings'); + return process.nextTick(function () { + cb(error); + }); + } + + return bindings.compare(data, hash, cb); +} + +/// @param {String} hash extract rounds from this hash +/// @return {Number} the number of rounds used to encrypt a given hash +function getRounds(hash) { + if (hash == null) { + throw new Error('hash argument required'); + } + + if (typeof hash !== 'string') { + throw new Error('hash must be a string'); + } + + return bindings.get_rounds(hash); +} + +module.exports = { + genSaltSync, + genSalt, + hashSync, + hash, + compareSync, + compare, + getRounds, +} diff --git a/src/hello/server/node_modules/bcrypt/binding.gyp b/src/hello/server/node_modules/bcrypt/binding.gyp new file mode 100644 index 00000000..46428be7 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/binding.gyp @@ -0,0 +1,49 @@ +{ + "variables": { + "NODE_VERSION%":" { + const start = Date.now(); + + // genSalt + const salt = await bcrypt.genSalt(10) + console.log('salt: ' + salt); + console.log('salt cb end: ' + (Date.now() - start) + 'ms'); + + // hash + const crypted = await bcrypt.hash('test', salt) + console.log('crypted: ' + crypted); + console.log('crypted cb end: ' + (Date.now() - start) + 'ms'); + console.log('rounds used from hash:', bcrypt.getRounds(crypted)); + + // compare + const res = await bcrypt.compare('test', crypted) + console.log('compared true: ' + res); + console.log('compared true cb end: ' + (Date.now() - start) + 'ms'); + + // compare + const res2 = await bcrypt.compare('bacon', crypted) + console.log('compared false: ' + res2); + console.log('compared false cb end: ' + (Date.now() - start) + 'ms'); + + console.log('end: ' + (Date.now() - start) + 'ms'); +})(); diff --git a/src/hello/server/node_modules/bcrypt/examples/forever_gen_salt.js b/src/hello/server/node_modules/bcrypt/examples/forever_gen_salt.js new file mode 100644 index 00000000..3f2ff2f4 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/examples/forever_gen_salt.js @@ -0,0 +1,8 @@ +const bcrypt = require('../bcrypt'); + +(function printSalt() { + bcrypt.genSalt(10, (err, salt) => { + console.log('salt: ' + salt); + printSalt(); + }); +})() diff --git a/src/hello/server/node_modules/bcrypt/package.json b/src/hello/server/node_modules/bcrypt/package.json new file mode 100644 index 00000000..c849897a --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/package.json @@ -0,0 +1,62 @@ +{ + "name": "bcrypt", + "description": "A bcrypt library for NodeJS.", + "keywords": [ + "bcrypt", + "password", + "auth", + "authentication", + "encryption", + "crypt", + "crypto" + ], + "main": "./bcrypt", + "version": "6.0.0", + "author": "Nick Campbell (https://github.com/ncb000gt)", + "engines": { + "node": ">= 18" + }, + "repository": { + "type": "git", + "url": "https://github.com/kelektiv/node.bcrypt.js.git" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/kelektiv/node.bcrypt.js/issues" + }, + "scripts": { + "test": "jest", + "install": "node-gyp-build", + "build": "prebuildify --napi --tag-libc --strip" + }, + "dependencies": { + "node-addon-api": "^8.3.0", + "node-gyp-build": "^4.8.4" + }, + "devDependencies": { + "jest": "^29.7.0", + "prebuildify": "^6.0.1" + }, + "contributors": [ + "Antonio Salazar Cardozo (https://github.com/Shadowfiend)", + "Van Nguyen (https://github.com/thegoleffect)", + "David Trejo (https://github.com/dtrejo)", + "Ben Glow (https://github.com/pixelglow)", + "NewITFarmer.com <> (https://github.com/newitfarmer)", + "Alfred Westerveld (https://github.com/alfredwesterveld)", + "Vincent Côté-Roy (https://github.com/vincentcr)", + "Lloyd Hilaiel (https://github.com/lloyd)", + "Roman Shtylman (https://github.com/shtylman)", + "Vadim Graboys (https://github.com/vadimg)", + "Ben Noorduis <> (https://github.com/bnoordhuis)", + "Nate Rajlich (https://github.com/tootallnate)", + "Sean McArthur (https://github.com/seanmonstar)", + "Fanie Oosthuysen (https://github.com/weareu)", + "Amitosh Swain Mahapatra (https://github.com/Agathver)", + "Corbin Crutchley (https://github.com/crutchcorn)", + "Nicola Del Gobbo (https://github.com/NickNaso)" + ], + "binary": { + "module_name": "bcrypt_lib" + } +} diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/darwin-arm64/bcrypt.node b/src/hello/server/node_modules/bcrypt/prebuilds/darwin-arm64/bcrypt.node new file mode 100644 index 00000000..5160c6c3 Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/darwin-arm64/bcrypt.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/darwin-x64/bcrypt.node b/src/hello/server/node_modules/bcrypt/prebuilds/darwin-x64/bcrypt.node new file mode 100644 index 00000000..8de9c5f7 Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/darwin-x64/bcrypt.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm/bcrypt.glibc.node b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm/bcrypt.glibc.node new file mode 100644 index 00000000..3deef80e Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm/bcrypt.glibc.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm/bcrypt.musl.node b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm/bcrypt.musl.node new file mode 100644 index 00000000..be7ca5f1 Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm/bcrypt.musl.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm64/bcrypt.glibc.node b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm64/bcrypt.glibc.node new file mode 100644 index 00000000..6b2c7a9e Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm64/bcrypt.glibc.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm64/bcrypt.musl.node b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm64/bcrypt.musl.node new file mode 100644 index 00000000..717cd145 Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/linux-arm64/bcrypt.musl.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/linux-x64/bcrypt.glibc.node b/src/hello/server/node_modules/bcrypt/prebuilds/linux-x64/bcrypt.glibc.node new file mode 100644 index 00000000..b58e7dc6 Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/linux-x64/bcrypt.glibc.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/linux-x64/bcrypt.musl.node b/src/hello/server/node_modules/bcrypt/prebuilds/linux-x64/bcrypt.musl.node new file mode 100644 index 00000000..e62ce92d Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/linux-x64/bcrypt.musl.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/win32-arm64/bcrypt.node b/src/hello/server/node_modules/bcrypt/prebuilds/win32-arm64/bcrypt.node new file mode 100644 index 00000000..3b308398 Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/win32-arm64/bcrypt.node differ diff --git a/src/hello/server/node_modules/bcrypt/prebuilds/win32-x64/bcrypt.node b/src/hello/server/node_modules/bcrypt/prebuilds/win32-x64/bcrypt.node new file mode 100644 index 00000000..f7ef025e Binary files /dev/null and b/src/hello/server/node_modules/bcrypt/prebuilds/win32-x64/bcrypt.node differ diff --git a/src/hello/server/node_modules/bcrypt/promises.js b/src/hello/server/node_modules/bcrypt/promises.js new file mode 100644 index 00000000..6685cc25 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/promises.js @@ -0,0 +1,45 @@ +let Promise = global.Promise; + +/// encapsulate a method with a node-style callback in a Promise +/// @param {object} 'this' of the encapsulated function +/// @param {function} function to be encapsulated +/// @param {Array-like} args to be passed to the called function +/// @return {Promise} a Promise encapsulating the function +function promise(fn, context, args) { + if (!Array.isArray(args)) { + args = Array.prototype.slice.call(args); + } + + if (typeof fn !== 'function') { + return Promise.reject(new Error('fn must be a function')); + } + + return new Promise((resolve, reject) => { + args.push((err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); + + fn.apply(context, args); + }); +} + +/// @param {err} the error to be thrown +function reject(err) { + return Promise.reject(err); +} + +/// changes the promise implementation that bcrypt uses +/// @param {Promise} the implementation to use +function use(promise) { + Promise = promise; +} + +module.exports = { + promise, + reject, + use +} diff --git a/src/hello/server/node_modules/bcrypt/src/bcrypt.cc b/src/hello/server/node_modules/bcrypt/src/bcrypt.cc new file mode 100644 index 00000000..bd8c5735 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/src/bcrypt.cc @@ -0,0 +1,315 @@ +/* $OpenBSD: bcrypt.c,v 1.31 2014/03/22 23:02:03 tedu Exp $ */ + +/* + * Copyright (c) 1997 Niels Provos + * + * Permission to use, copy, modify, and 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. + */ + +/* This password hashing algorithm was designed by David Mazieres + * and works as follows: + * + * 1. state := InitState () + * 2. state := ExpandKey (state, salt, password) + * 3. REPEAT rounds: + * state := ExpandKey (state, 0, password) + * state := ExpandKey (state, 0, salt) + * 4. ctext := "OrpheanBeholderScryDoubt" + * 5. REPEAT 64: + * ctext := Encrypt_ECB (state, ctext); + * 6. RETURN Concatenate (salt, ctext); + * + */ + +#include +#include +#include +#include + +#include "node_blf.h" + +#ifdef _WIN32 +#define snprintf _snprintf +#endif + +//#if !defined(__APPLE__) && !defined(__MACH__) +//#include "bsd/stdlib.h" +//#endif + +/* This implementation is adaptable to current computing power. + * You can have up to 2^31 rounds which should be enough for some + * time to come. + */ + +static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t); +static void decode_base64(u_int8_t *, u_int16_t, u_int8_t *); + +const static char* error = ":"; + +const static u_int8_t Base64Code[] = +"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + +const static u_int8_t index_64[128] = { + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 0, 1, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 255, 255, + 255, 255, 255, 255, 255, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 255, 255, 255, 255, 255, 255, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 255, 255, 255, 255, 255 +}; +#define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)]) + +static void +decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data) +{ + u_int8_t *bp = buffer; + u_int8_t *p = data; + u_int8_t c1, c2, c3, c4; + while (bp < buffer + len) { + c1 = CHAR64(*p); + c2 = CHAR64(*(p + 1)); + + /* Invalid data */ + if (c1 == 255 || c2 == 255) + break; + + *bp++ = (c1 << 2) | ((c2 & 0x30) >> 4); + if (bp >= buffer + len) + break; + + c3 = CHAR64(*(p + 2)); + if (c3 == 255) + break; + + *bp++ = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2); + if (bp >= buffer + len) + break; + + c4 = CHAR64(*(p + 3)); + if (c4 == 255) + break; + *bp++ = ((c3 & 0x03) << 6) | c4; + + p += 4; + } +} + +void +encode_salt(char *salt, u_int8_t *csalt, char minor, u_int16_t clen, u_int8_t logr) +{ + salt[0] = '$'; + salt[1] = BCRYPT_VERSION; + salt[2] = minor; + salt[3] = '$'; + + // Max rounds are 31 + snprintf(salt + 4, 4, "%2.2u$", logr & 0x001F); + + encode_base64((u_int8_t *) salt + 7, csalt, clen); +} + + +/* Generates a salt for this version of crypt. + Since versions may change. Keeping this here + seems sensible. + from: http://mail-index.netbsd.org/tech-crypto/2002/05/24/msg000204.html +*/ +void +bcrypt_gensalt(char minor, u_int8_t log_rounds, u_int8_t *seed, char *gsalt) +{ + if (log_rounds < 4) + log_rounds = 4; + else if (log_rounds > 31) + log_rounds = 31; + + encode_salt(gsalt, seed, minor, BCRYPT_MAXSALT, log_rounds); +} + +/* We handle $Vers$log2(NumRounds)$salt+passwd$ + i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */ + +void +bcrypt(const char *key, size_t key_len, const char *salt, char *encrypted) +{ + blf_ctx state; + u_int32_t rounds, i, k; + u_int16_t j; + u_int8_t salt_len, logr, minor; + u_int8_t ciphertext[4 * BCRYPT_BLOCKS+1] = "OrpheanBeholderScryDoubt"; + u_int8_t csalt[BCRYPT_MAXSALT]; + u_int32_t cdata[BCRYPT_BLOCKS]; + int n; + + /* Discard "$" identifier */ + salt++; + + if (*salt > BCRYPT_VERSION) { + /* How do I handle errors ? Return ':' */ + strcpy(encrypted, error); + return; + } + + /* Check for minor versions */ + if (salt[1] != '$') { + switch (salt[1]) { + case 'a': /* 'ab' should not yield the same as 'abab' */ + case 'b': /* cap input length at 72 bytes */ + minor = salt[1]; + salt++; + break; + default: + strcpy(encrypted, error); + return; + } + } else + minor = 0; + + /* Discard version + "$" identifier */ + salt += 2; + + if (salt[2] != '$') { + /* Out of sync with passwd entry */ + strcpy(encrypted, error); + return; + } + + /* Computer power doesn't increase linear, 2^x should be fine */ + n = atoi(salt); + if (n > 31 || n < 0) { + strcpy(encrypted, error); + return; + } + logr = (u_int8_t)n; + if ((rounds = (u_int32_t) 1 << logr) < BCRYPT_MINROUNDS) { + strcpy(encrypted, error); + return; + } + + /* Discard num rounds + "$" identifier */ + salt += 3; + + if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) { + strcpy(encrypted, error); + return; + } + + /* We dont want the base64 salt but the raw data */ + decode_base64(csalt, BCRYPT_MAXSALT, (u_int8_t *) salt); + salt_len = BCRYPT_MAXSALT; + if (minor <= 'a') + key_len = (u_int8_t)(key_len + (minor >= 'a' ? 1 : 0)); + else + { + /* cap key_len at the actual maximum supported + * length here to avoid integer wraparound */ + if (key_len > 72) + key_len = 72; + key_len++; /* include the NUL */ + } + + + /* Setting up S-Boxes and Subkeys */ + Blowfish_initstate(&state); + Blowfish_expandstate(&state, csalt, salt_len, + (u_int8_t *) key, key_len); + for (k = 0; k < rounds; k++) { + Blowfish_expand0state(&state, (u_int8_t *) key, key_len); + Blowfish_expand0state(&state, csalt, salt_len); + } + + /* This can be precomputed later */ + j = 0; + for (i = 0; i < BCRYPT_BLOCKS; i++) + cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_BLOCKS, &j); + + /* Now do the encryption */ + for (k = 0; k < 64; k++) + blf_enc(&state, cdata, BCRYPT_BLOCKS / 2); + + for (i = 0; i < BCRYPT_BLOCKS; i++) { + ciphertext[4 * i + 3] = cdata[i] & 0xff; + cdata[i] = cdata[i] >> 8; + ciphertext[4 * i + 2] = cdata[i] & 0xff; + cdata[i] = cdata[i] >> 8; + ciphertext[4 * i + 1] = cdata[i] & 0xff; + cdata[i] = cdata[i] >> 8; + ciphertext[4 * i + 0] = cdata[i] & 0xff; + } + + i = 0; + encrypted[i++] = '$'; + encrypted[i++] = BCRYPT_VERSION; + if (minor) + encrypted[i++] = minor; + encrypted[i++] = '$'; + + snprintf(encrypted + i, 4, "%2.2u$", logr & 0x001F); + + encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT); + encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext, + 4 * BCRYPT_BLOCKS - 1); + memset(&state, 0, sizeof(state)); + memset(ciphertext, 0, sizeof(ciphertext)); + memset(csalt, 0, sizeof(csalt)); + memset(cdata, 0, sizeof(cdata)); +} + +u_int32_t bcrypt_get_rounds(const char * hash) +{ + /* skip past the leading "$" */ + if (!hash || *(hash++) != '$') return 0; + + /* skip past version */ + if (0 == (*hash++)) return 0; + if (*hash && *hash != '$') hash++; + if (*hash++ != '$') return 0; + + return atoi(hash); +} + +static void +encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len) +{ + u_int8_t *bp = buffer; + u_int8_t *p = data; + u_int8_t c1, c2; + while (p < data + len) { + c1 = *p++; + *bp++ = Base64Code[(c1 >> 2)]; + c1 = (c1 & 0x03) << 4; + if (p >= data + len) { + *bp++ = Base64Code[c1]; + break; + } + c2 = *p++; + c1 |= (c2 >> 4) & 0x0f; + *bp++ = Base64Code[c1]; + c1 = (c2 & 0x0f) << 2; + if (p >= data + len) { + *bp++ = Base64Code[c1]; + break; + } + c2 = *p++; + c1 |= (c2 >> 6) & 0x03; + *bp++ = Base64Code[c1]; + *bp++ = Base64Code[c2 & 0x3f]; + } + *bp = '\0'; +} diff --git a/src/hello/server/node_modules/bcrypt/src/bcrypt_node.cc b/src/hello/server/node_modules/bcrypt/src/bcrypt_node.cc new file mode 100644 index 00000000..2f072a4f --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/src/bcrypt_node.cc @@ -0,0 +1,288 @@ +#define NAPI_VERSION 3 + +#include + +#include +#include +#include +#include // atoi + +#include "node_blf.h" + +#define NODE_LESS_THAN (!(NODE_VERSION_AT_LEAST(0, 5, 4))) + +namespace { + + bool ValidateSalt(const char* salt) { + + if (!salt || *salt != '$') { + return false; + } + + // discard $ + salt++; + + if (*salt > BCRYPT_VERSION) { + return false; + } + + if (salt[1] != '$') { + switch (salt[1]) { + case 'a': + case 'b': + salt++; + break; + default: + return false; + } + } + + // discard version + $ + salt += 2; + + if (salt[2] != '$') { + return false; + } + + int n = atoi(salt); + if (n > 31 || n < 0) { + return false; + } + + if (((uint8_t)1 << (uint8_t)n) < BCRYPT_MINROUNDS) { + return false; + } + + salt += 3; + if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) { + return false; + } + + return true; + } + + inline char ToCharVersion(const std::string& str) { + return str[0]; + } + + /* SALT GENERATION */ + + class SaltAsyncWorker : public Napi::AsyncWorker { + public: + SaltAsyncWorker(const Napi::Function& callback, const std::string& seed, ssize_t rounds, char minor_ver) + : Napi::AsyncWorker(callback, "bcrypt:SaltAsyncWorker"), seed(seed), rounds(rounds), minor_ver(minor_ver) { + } + + ~SaltAsyncWorker() {} + + void Execute() { + bcrypt_gensalt(minor_ver, rounds, (u_int8_t *)&seed[0], salt); + } + + void OnOK() { + Napi::HandleScope scope(Env()); + Callback().Call({Env().Undefined(), Napi::String::New(Env(), salt)}); + } + + private: + std::string seed; + ssize_t rounds; + char minor_ver; + char salt[_SALT_LEN]; + }; + + Napi::Value GenerateSalt(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + if (info.Length() < 4) { + throw Napi::TypeError::New(env, "4 arguments expected"); + } + if (!info[0].IsString()) { + throw Napi::TypeError::New(env, "First argument must be a string"); + } + if (!info[2].IsBuffer() || (info[2].As>()).Length() != 16) { + throw Napi::TypeError::New(env, "Second argument must be a 16 byte Buffer"); + } + + const char minor_ver = ToCharVersion(info[0].As()); + const int32_t rounds = info[1].As(); + Napi::Buffer seed = info[2].As>(); + Napi::Function callback = info[3].As(); + SaltAsyncWorker* saltWorker = new SaltAsyncWorker(callback, std::string(seed.Data(), 16), rounds, minor_ver); + saltWorker->Queue(); + return env.Undefined(); + } + + Napi::Value GenerateSaltSync(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + if (info.Length() < 3) { + throw Napi::TypeError::New(env, "3 arguments expected"); + } + if (!info[0].IsString()) { + throw Napi::TypeError::New(env, "First argument must be a string"); + } + if (!info[2].IsBuffer() || (info[2].As>()).Length() != 16) { + throw Napi::TypeError::New(env, "Third argument must be a 16 byte Buffer"); + } + const char minor_ver = ToCharVersion(info[0].As()); + const int32_t rounds = info[1].As(); + Napi::Buffer buffer = info[2].As>(); + u_int8_t* seed = (u_int8_t*) buffer.Data(); + char salt[_SALT_LEN]; + bcrypt_gensalt(minor_ver, rounds, seed, salt); + return Napi::String::New(env, salt, strlen(salt)); + } + + inline std::string BufferToString(const Napi::Buffer &buf) { + return std::string(buf.Data(), buf.Length()); + } + + /* ENCRYPT DATA - USED TO BE HASHPW */ + + class EncryptAsyncWorker : public Napi::AsyncWorker { + public: + EncryptAsyncWorker(const Napi::Function& callback, const std::string& input, const std::string& salt) + : Napi::AsyncWorker(callback, "bcrypt:EncryptAsyncWorker"), input(input), salt(salt) { + } + + ~EncryptAsyncWorker() {} + + void Execute() { + if (!(ValidateSalt(salt.c_str()))) { + SetError("Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue"); + } + bcrypt(input.c_str(), input.length(), salt.c_str(), bcrypted); + } + + void OnOK() { + Napi::HandleScope scope(Env()); + Callback().Call({Env().Undefined(),Napi::String::New(Env(), bcrypted)}); + } + private: + std::string input; + std::string salt; + char bcrypted[_PASSWORD_LEN]; + }; + + Napi::Value Encrypt(const Napi::CallbackInfo& info) { + if (info.Length() < 3) { + throw Napi::TypeError::New(info.Env(), "3 arguments expected"); + } + std::string data = info[0].IsBuffer() + ? BufferToString(info[0].As>()) + : info[0].As(); + std::string salt = info[1].As(); + Napi::Function callback = info[2].As(); + EncryptAsyncWorker* encryptWorker = new EncryptAsyncWorker(callback, data, salt); + encryptWorker->Queue(); + return info.Env().Undefined(); + } + + Napi::Value EncryptSync(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + if (info.Length() < 2) { + throw Napi::TypeError::New(info.Env(), "2 arguments expected"); + } + std::string data = info[0].IsBuffer() + ? BufferToString(info[0].As>()) + : info[0].As(); + std::string salt = info[1].As(); + if (!(ValidateSalt(salt.c_str()))) { + throw Napi::Error::New(env, "Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue"); + } + char bcrypted[_PASSWORD_LEN]; + bcrypt(data.c_str(), data.length(), salt.c_str(), bcrypted); + return Napi::String::New(env, bcrypted, strlen(bcrypted)); + } + + /* COMPARATOR */ + inline bool CompareStrings(const char* s1, const char* s2) { + return strcmp(s1, s2) == 0; + } + + class CompareAsyncWorker : public Napi::AsyncWorker { + public: + CompareAsyncWorker(const Napi::Function& callback, const std::string& input, const std::string& encrypted) + : Napi::AsyncWorker(callback, "bcrypt:CompareAsyncWorker"), input(input), encrypted(encrypted) { + result = false; + } + + ~CompareAsyncWorker() {} + + void Execute() { + char bcrypted[_PASSWORD_LEN]; + if (ValidateSalt(encrypted.c_str())) { + bcrypt(input.c_str(), input.length(), encrypted.c_str(), bcrypted); + result = CompareStrings(bcrypted, encrypted.c_str()); + } + } + + void OnOK() { + Napi::HandleScope scope(Env()); + Callback().Call({Env().Undefined(), Napi::Boolean::New(Env(), result)}); + } + + private: + std::string input; + std::string encrypted; + bool result; + }; + + Napi::Value Compare(const Napi::CallbackInfo& info) { + if (info.Length() < 3) { + throw Napi::TypeError::New(info.Env(), "3 arguments expected"); + } + std::string input = info[0].IsBuffer() + ? BufferToString(info[0].As>()) + : info[0].As(); + std::string encrypted = info[1].As(); + Napi::Function callback = info[2].As(); + CompareAsyncWorker* compareWorker = new CompareAsyncWorker(callback, input, encrypted); + compareWorker->Queue(); + return info.Env().Undefined(); + } + + Napi::Value CompareSync(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + if (info.Length() < 2) { + throw Napi::TypeError::New(info.Env(), "2 arguments expected"); + } + std::string pw = info[0].IsBuffer() + ? BufferToString(info[0].As>()) + : info[0].As(); + std::string hash = info[1].As(); + char bcrypted[_PASSWORD_LEN]; + if (ValidateSalt(hash.c_str())) { + bcrypt(pw.c_str(), pw.length(), hash.c_str(), bcrypted); + return Napi::Boolean::New(env, CompareStrings(bcrypted, hash.c_str())); + } else { + return Napi::Boolean::New(env, false); + } + } + + Napi::Value GetRounds(const Napi::CallbackInfo& info) { + Napi::Env env = info.Env(); + if (info.Length() < 1) { + throw Napi::TypeError::New(env, "1 argument expected"); + } + std::string hash = info[0].As(); + u_int32_t rounds; + if (!(rounds = bcrypt_get_rounds(hash.c_str()))) { + throw Napi::Error::New(env, "invalid hash provided"); + } + return Napi::Number::New(env, rounds); + } + +} // anonymous namespace + +Napi::Object init(Napi::Env env, Napi::Object exports) { + exports.Set(Napi::String::New(env, "gen_salt_sync"), Napi::Function::New(env, GenerateSaltSync)); + exports.Set(Napi::String::New(env, "encrypt_sync"), Napi::Function::New(env, EncryptSync)); + exports.Set(Napi::String::New(env, "compare_sync"), Napi::Function::New(env, CompareSync)); + exports.Set(Napi::String::New(env, "get_rounds"), Napi::Function::New(env, GetRounds)); + exports.Set(Napi::String::New(env, "gen_salt"), Napi::Function::New(env, GenerateSalt)); + exports.Set(Napi::String::New(env, "encrypt"), Napi::Function::New(env, Encrypt)); + exports.Set(Napi::String::New(env, "compare"), Napi::Function::New(env, Compare)); + return exports; +} + +NODE_API_MODULE(NODE_GYP_MODULE_NAME, init) diff --git a/src/hello/server/node_modules/bcrypt/src/blowfish.cc b/src/hello/server/node_modules/bcrypt/src/blowfish.cc new file mode 100644 index 00000000..1fc6cf19 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/src/blowfish.cc @@ -0,0 +1,679 @@ +/* $OpenBSD: blowfish.c,v 1.18 2004/11/02 17:23:26 hshoexer Exp $ */ +/* + * Blowfish block cipher for OpenBSD + * Copyright 1997 Niels Provos + * All rights reserved. + * + * Implementation advice by David Mazieres . + * + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Niels Provos. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR 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. + */ + +/* + * This code is derived from section 14.3 and the given source + * in section V of Applied Cryptography, second edition. + * Blowfish is an unpatented fast block cipher designed by + * Bruce Schneier. + */ + +#include "node_blf.h" + +#undef inline +#ifdef __GNUC__ +#define inline __inline +#else /* !__GNUC__ */ +#define inline +#endif /* !__GNUC__ */ + +/* Function for Feistel Networks */ + +#define F(s, x) ((((s)[ (((x)>>24)&0xFF)] \ + + (s)[0x100 + (((x)>>16)&0xFF)]) \ + ^ (s)[0x200 + (((x)>> 8)&0xFF)]) \ + + (s)[0x300 + ( (x) &0xFF)]) + +#define BLFRND(s,p,i,j,n) (i ^= F(s,j) ^ (p)[n]) + +void +Blowfish_encipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr) +{ + u_int32_t Xl; + u_int32_t Xr; + u_int32_t *s = c->S[0]; + u_int32_t *p = c->P; + + Xl = *xl; + Xr = *xr; + + Xl ^= p[0]; + BLFRND(s, p, Xr, Xl, 1); BLFRND(s, p, Xl, Xr, 2); + BLFRND(s, p, Xr, Xl, 3); BLFRND(s, p, Xl, Xr, 4); + BLFRND(s, p, Xr, Xl, 5); BLFRND(s, p, Xl, Xr, 6); + BLFRND(s, p, Xr, Xl, 7); BLFRND(s, p, Xl, Xr, 8); + BLFRND(s, p, Xr, Xl, 9); BLFRND(s, p, Xl, Xr, 10); + BLFRND(s, p, Xr, Xl, 11); BLFRND(s, p, Xl, Xr, 12); + BLFRND(s, p, Xr, Xl, 13); BLFRND(s, p, Xl, Xr, 14); + BLFRND(s, p, Xr, Xl, 15); BLFRND(s, p, Xl, Xr, 16); + + *xl = Xr ^ p[17]; + *xr = Xl; +} + +void +Blowfish_decipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr) +{ + u_int32_t Xl; + u_int32_t Xr; + u_int32_t *s = c->S[0]; + u_int32_t *p = c->P; + + Xl = *xl; + Xr = *xr; + + Xl ^= p[17]; + BLFRND(s, p, Xr, Xl, 16); BLFRND(s, p, Xl, Xr, 15); + BLFRND(s, p, Xr, Xl, 14); BLFRND(s, p, Xl, Xr, 13); + BLFRND(s, p, Xr, Xl, 12); BLFRND(s, p, Xl, Xr, 11); + BLFRND(s, p, Xr, Xl, 10); BLFRND(s, p, Xl, Xr, 9); + BLFRND(s, p, Xr, Xl, 8); BLFRND(s, p, Xl, Xr, 7); + BLFRND(s, p, Xr, Xl, 6); BLFRND(s, p, Xl, Xr, 5); + BLFRND(s, p, Xr, Xl, 4); BLFRND(s, p, Xl, Xr, 3); + BLFRND(s, p, Xr, Xl, 2); BLFRND(s, p, Xl, Xr, 1); + + *xl = Xr ^ p[0]; + *xr = Xl; +} + +void +Blowfish_initstate(blf_ctx *c) +{ + /* P-box and S-box tables initialized with digits of Pi */ + + static const blf_ctx initstate = + { { + { + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a}, + { + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7}, + { + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0}, + { + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6} + }, + { + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b + } }; + + *c = initstate; +} + +u_int32_t +Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, + u_int16_t *current) +{ + u_int8_t i; + u_int16_t j; + u_int32_t temp; + + temp = 0x00000000; + j = *current; + + for (i = 0; i < 4; i++, j++) { + if (j >= databytes) + j = 0; + temp = (temp << 8) | data[j]; + } + + *current = j; + return temp; +} + +void +Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes) +{ + u_int16_t i; + u_int16_t j; + u_int16_t k; + u_int32_t temp; + u_int32_t datal; + u_int32_t datar; + + j = 0; + for (i = 0; i < BLF_N + 2; i++) { + /* Extract 4 int8 to 1 int32 from keystream */ + temp = Blowfish_stream2word(key, keybytes, &j); + c->P[i] = c->P[i] ^ temp; + } + + j = 0; + datal = 0x00000000; + datar = 0x00000000; + for (i = 0; i < BLF_N + 2; i += 2) { + Blowfish_encipher(c, &datal, &datar); + + c->P[i] = datal; + c->P[i + 1] = datar; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + Blowfish_encipher(c, &datal, &datar); + + c->S[i][k] = datal; + c->S[i][k + 1] = datar; + } + } +} + + +void +Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes, + const u_int8_t *key, u_int16_t keybytes) +{ + u_int16_t i; + u_int16_t j; + u_int16_t k; + u_int32_t temp; + u_int32_t datal; + u_int32_t datar; + + j = 0; + for (i = 0; i < BLF_N + 2; i++) { + /* Extract 4 int8 to 1 int32 from keystream */ + temp = Blowfish_stream2word(key, keybytes, &j); + c->P[i] = c->P[i] ^ temp; + } + + j = 0; + datal = 0x00000000; + datar = 0x00000000; + for (i = 0; i < BLF_N + 2; i += 2) { + datal ^= Blowfish_stream2word(data, databytes, &j); + datar ^= Blowfish_stream2word(data, databytes, &j); + Blowfish_encipher(c, &datal, &datar); + + c->P[i] = datal; + c->P[i + 1] = datar; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + datal ^= Blowfish_stream2word(data, databytes, &j); + datar ^= Blowfish_stream2word(data, databytes, &j); + Blowfish_encipher(c, &datal, &datar); + + c->S[i][k] = datal; + c->S[i][k + 1] = datar; + } + } + +} + +void +blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len) +{ + /* Initialize S-boxes and subkeys with Pi */ + Blowfish_initstate(c); + + /* Transform S-boxes and subkeys with key */ + Blowfish_expand0state(c, k, len); +} + +void +blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks) +{ + u_int32_t *d; + u_int16_t i; + + d = data; + for (i = 0; i < blocks; i++) { + Blowfish_encipher(c, d, d + 1); + d += 2; + } +} + +void +blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks) +{ + u_int32_t *d; + u_int16_t i; + + d = data; + for (i = 0; i < blocks; i++) { + Blowfish_decipher(c, d, d + 1); + d += 2; + } +} + +void +blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) +{ + u_int32_t l, r; + u_int32_t i; + + for (i = 0; i < len; i += 8) { + l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; + r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; + Blowfish_encipher(c, &l, &r); + data[0] = l >> 24 & 0xff; + data[1] = l >> 16 & 0xff; + data[2] = l >> 8 & 0xff; + data[3] = l & 0xff; + data[4] = r >> 24 & 0xff; + data[5] = r >> 16 & 0xff; + data[6] = r >> 8 & 0xff; + data[7] = r & 0xff; + data += 8; + } +} + +void +blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) +{ + u_int32_t l, r; + u_int32_t i; + + for (i = 0; i < len; i += 8) { + l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; + r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; + Blowfish_decipher(c, &l, &r); + data[0] = l >> 24 & 0xff; + data[1] = l >> 16 & 0xff; + data[2] = l >> 8 & 0xff; + data[3] = l & 0xff; + data[4] = r >> 24 & 0xff; + data[5] = r >> 16 & 0xff; + data[6] = r >> 8 & 0xff; + data[7] = r & 0xff; + data += 8; + } +} + +void +blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len) +{ + u_int32_t l, r; + u_int32_t i, j; + + for (i = 0; i < len; i += 8) { + for (j = 0; j < 8; j++) + data[j] ^= iv[j]; + l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; + r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; + Blowfish_encipher(c, &l, &r); + data[0] = l >> 24 & 0xff; + data[1] = l >> 16 & 0xff; + data[2] = l >> 8 & 0xff; + data[3] = l & 0xff; + data[4] = r >> 24 & 0xff; + data[5] = r >> 16 & 0xff; + data[6] = r >> 8 & 0xff; + data[7] = r & 0xff; + iv = data; + data += 8; + } +} + +void +blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len) +{ + u_int32_t l, r; + u_int8_t *iv; + u_int32_t i, j; + + iv = data + len - 16; + data = data + len - 8; + for (i = len - 8; i >= 8; i -= 8) { + l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; + r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; + Blowfish_decipher(c, &l, &r); + data[0] = l >> 24 & 0xff; + data[1] = l >> 16 & 0xff; + data[2] = l >> 8 & 0xff; + data[3] = l & 0xff; + data[4] = r >> 24 & 0xff; + data[5] = r >> 16 & 0xff; + data[6] = r >> 8 & 0xff; + data[7] = r & 0xff; + for (j = 0; j < 8; j++) + data[j] ^= iv[j]; + iv -= 8; + data -= 8; + } + l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; + r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; + Blowfish_decipher(c, &l, &r); + data[0] = l >> 24 & 0xff; + data[1] = l >> 16 & 0xff; + data[2] = l >> 8 & 0xff; + data[3] = l & 0xff; + data[4] = r >> 24 & 0xff; + data[5] = r >> 16 & 0xff; + data[6] = r >> 8 & 0xff; + data[7] = r & 0xff; + for (j = 0; j < 8; j++) + data[j] ^= iva[j]; +} + +#if 0 +void +report(u_int32_t data[], u_int16_t len) +{ + u_int16_t i; + for (i = 0; i < len; i += 2) + printf("Block %0hd: %08lx %08lx.\n", + i / 2, data[i], data[i + 1]); +} +void +main(void) +{ + + blf_ctx c; + char key[] = "AAAAA"; + char key2[] = "abcdefghijklmnopqrstuvwxyz"; + + u_int32_t data[10]; + u_int32_t data2[] = + {0x424c4f57l, 0x46495348l}; + + u_int16_t i; + + /* First test */ + for (i = 0; i < 10; i++) + data[i] = i; + + blf_key(&c, (u_int8_t *) key, 5); + blf_enc(&c, data, 5); + blf_dec(&c, data, 1); + blf_dec(&c, data + 2, 4); + printf("Should read as 0 - 9.\n"); + report(data, 10); + + /* Second test */ + blf_key(&c, (u_int8_t *) key2, strlen(key2)); + blf_enc(&c, data2, 1); + printf("\nShould read as: 0x324ed0fe 0xf413a203.\n"); + report(data2, 2); + blf_dec(&c, data2, 1); + report(data2, 2); +} +#endif diff --git a/src/hello/server/node_modules/bcrypt/src/node_blf.h b/src/hello/server/node_modules/bcrypt/src/node_blf.h new file mode 100644 index 00000000..2d50a39b --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/src/node_blf.h @@ -0,0 +1,132 @@ +/* $OpenBSD: blf.h,v 1.7 2007/03/14 17:59:41 grunk Exp $ */ +/* + * Blowfish - a fast block cipher designed by Bruce Schneier + * + * Copyright 1997 Niels Provos + * 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Niels Provos. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR 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. + */ + +#ifndef _NODE_BLF_H_ +#define _NODE_BLF_H_ + +#include + +/* Solaris compatibility */ +#ifdef __sun +#define u_int8_t uint8_t +#define u_int16_t uint16_t +#define u_int32_t uint32_t +#define u_int64_t uint64_t +#endif + +#ifdef _WIN32 +#define u_int8_t unsigned __int8 +#define u_int16_t unsigned __int16 +#define u_int32_t unsigned __int32 +#define u_int64_t unsigned __int64 +#endif + +/* Windows ssize_t compatibility */ +#if defined(_WIN32) || defined(_WIN64) +# if defined(_WIN64) + typedef __int64 LONG_PTR; +# else + typedef long LONG_PTR; +# endif + typedef LONG_PTR SSIZE_T; + typedef SSIZE_T ssize_t; +#endif + +/* z/OS compatibility */ +#ifdef __MVS__ +typedef unsigned char u_int8_t; +typedef unsigned short u_int16_t; +typedef unsigned int u_int32_t; +typedef unsigned long long u_int64_t; +#endif + +#define BCRYPT_VERSION '2' +#define BCRYPT_MAXSALT 16 /* Precomputation is just so nice */ +#define BCRYPT_BLOCKS 6 /* Ciphertext blocks */ +#define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */ + +/* Schneier specifies a maximum key length of 56 bytes. + * This ensures that every key bit affects every cipher + * bit. However, the subkeys can hold up to 72 bytes. + * Warning: For normal blowfish encryption only 56 bytes + * of the key affect all cipherbits. + */ + +#define BLF_N 16 /* Number of Subkeys */ +#define BLF_MAXKEYLEN ((BLF_N-2)*4) /* 448 bits */ +#define BLF_MAXUTILIZED ((BLF_N+2)*4) /* 576 bits */ + +#define _PASSWORD_LEN 128 /* max length, not counting NUL */ +#define _SALT_LEN 32 /* max length */ + +/* Blowfish context */ +typedef struct BlowfishContext { + u_int32_t S[4][256]; /* S-Boxes */ + u_int32_t P[BLF_N + 2]; /* Subkeys */ +} blf_ctx; + +/* Raw access to customized Blowfish + * blf_key is just: + * Blowfish_initstate( state ) + * Blowfish_expand0state( state, key, keylen ) + */ + +void Blowfish_encipher(blf_ctx *, u_int32_t *, u_int32_t *); +void Blowfish_decipher(blf_ctx *, u_int32_t *, u_int32_t *); +void Blowfish_initstate(blf_ctx *); +void Blowfish_expand0state(blf_ctx *, const u_int8_t *, u_int16_t); +void Blowfish_expandstate +(blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t); + +/* Standard Blowfish */ + +void blf_key(blf_ctx *, const u_int8_t *, u_int16_t); +void blf_enc(blf_ctx *, u_int32_t *, u_int16_t); +void blf_dec(blf_ctx *, u_int32_t *, u_int16_t); + +void blf_ecb_encrypt(blf_ctx *, u_int8_t *, u_int32_t); +void blf_ecb_decrypt(blf_ctx *, u_int8_t *, u_int32_t); + +void blf_cbc_encrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); +void blf_cbc_decrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); + +/* Converts u_int8_t to u_int32_t */ +u_int32_t Blowfish_stream2word(const u_int8_t *, u_int16_t , u_int16_t *); + +/* bcrypt functions*/ +void bcrypt_gensalt(char, u_int8_t, u_int8_t*, char *); +void bcrypt(const char *, size_t key_len, const char *, char *); +void encode_salt(char *, u_int8_t *, char, u_int16_t, u_int8_t); +u_int32_t bcrypt_get_rounds(const char *); + +#endif diff --git a/src/hello/server/node_modules/bcrypt/test/async.test.js b/src/hello/server/node_modules/bcrypt/test/async.test.js new file mode 100644 index 00000000..fb59367a --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/test/async.test.js @@ -0,0 +1,209 @@ +const bcrypt = require('../bcrypt'); + +test('salt_length', done => { + expect.assertions(1); + bcrypt.genSalt(10, function (err, salt) { + expect(salt).toHaveLength(29); + done(); + }); +}) + +test('salt_only_cb', () => { + expect.assertions(1); + expect(() => { + bcrypt.genSalt((err, salt) => { + }); + }).not.toThrow(); +}) + +test('salt_rounds_is_string_number', done => { + expect.assertions(2); + bcrypt.genSalt('10', void 0, function (err, salt) { + expect(err instanceof Error).toBe(true) + expect(err.message).toBe('rounds must be a number') + done(); + }); +}) + +test('salt_rounds_is_string_non_number', done => { + expect.assertions(2); + bcrypt.genSalt('z', function (err, salt) { + expect(err instanceof Error).toBe(true) + expect(err.message).toBe('rounds must be a number') + done(); + }); +}) + +test('salt_minor', done => { + expect.assertions(3); + bcrypt.genSalt(10, 'a', function (err, value) { + expect(value).toHaveLength(29); + const [_, minor, salt] = value.split('$'); + expect(minor).toEqual('2a'); + expect(salt).toEqual('10'); + done(); + }); +}) + +test('salt_minor_b', done => { + expect.assertions(3); + bcrypt.genSalt(10, 'b', function (err, value) { + expect(value).toHaveLength(29); + const [_, minor, salt] = value.split('$'); + expect(minor).toEqual('2b'); + expect(salt).toEqual('10'); + done(); + }); +}) + +test('hash', done => { + expect.assertions(2); + bcrypt.genSalt(10, function (err, salt) { + bcrypt.hash('password', salt, function (err, res) { + expect(res).toBeDefined(); + expect(err).toBeUndefined(); + done(); + }); + }); +}) + +test('hash_rounds', done => { + expect.assertions(1); + bcrypt.hash('bacon', 8, function (err, hash) { + expect(bcrypt.getRounds(hash)).toEqual(8); + done(); + }); +}) + +test('hash_empty_strings', done => { + expect.assertions(1); + bcrypt.genSalt(10, function (err, salt) { + bcrypt.hash('', salt, function (err, res) { + expect(res).toBeDefined(); + done(); + }); + }); +}) + +test('hash_fails_with_empty_salt', done => { + expect.assertions(1); + bcrypt.hash('', '', function (err, res) { + expect(err.message).toBe('Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue') + done(); + }); +}) + +test('hash_no_params', done => { + expect.assertions(1); + bcrypt.hash(function (err, hash) { + expect(err.message).toBe('data must be a string or Buffer and salt must either be a salt string or a number of rounds') + done(); + }); +}) + +test('hash_one_param', done => { + expect.assertions(1); + bcrypt.hash('password', function (err, hash) { + expect(err.message).toBe('data must be a string or Buffer and salt must either be a salt string or a number of rounds'); + done(); + }); +}) + +test('hash_salt_validity', done => { + expect.assertions(2); + bcrypt.hash('password', '$2a$10$somesaltyvaluertsetrse', function (err, enc) { + expect(err).toBeUndefined(); + bcrypt.hash('password', 'some$value', function (err, enc) { + expect(err.message).toBe("Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue"); + done(); + }); + }); +}) + +test('verify_salt', done => { + expect.assertions(2); + bcrypt.genSalt(10, function (err, value) { + const [_, version, rounds] = value.split('$'); + expect(version).toEqual('2b'); + expect(rounds).toEqual('10'); + done(); + }); +}) + +test('verify_salt_min_rounds', done => { + expect.assertions(2); + bcrypt.genSalt(1, function (err, value) { + const [_, version, rounds] = value.split('$'); + expect(version).toEqual('2b'); + expect(rounds).toEqual('04'); + done(); + }); +}) + +test('verify_salt_max_rounds', done => { + expect.assertions(2); + bcrypt.genSalt(100, function (err, value) { + const [_, version, rounds] = value.split('$'); + expect(version).toEqual('2b'); + expect(rounds).toEqual('31'); + done(); + }); +}) + +test('hash_compare', done => { + expect.assertions(2); + bcrypt.genSalt(10, function (err, salt) { + bcrypt.hash("test", salt, function (err, hash) { + bcrypt.compare("test", hash, function (err, res) { + expect(hash).toBeDefined(); + bcrypt.compare("blah", hash, function (err, res) { + expect(res).toBe(false); + done(); + }); + }); + }); + }); +}) + +test('hash_compare_empty_strings', done => { + expect.assertions(2); + const hash = bcrypt.hashSync("test", bcrypt.genSaltSync(10)); + + bcrypt.compare("", hash, function (err, res) { + expect(res).toEqual(false) + bcrypt.compare("", "", function (err, res) { + expect(res).toEqual(false); + done(); + }); + }); +}) + +test('hash_compare_invalid_strings', done => { + expect.assertions(2); + const fullString = 'envy1362987212538'; + const hash = '$2a$10$XOPbrlUPQdwdJUpSrIF6X.LbE14qsMmKGhM1A8W9iqaG3vv1BD7WC'; + const wut = ':'; + bcrypt.compare(fullString, hash, function (err, res) { + expect(res).toBe(true); + bcrypt.compare(fullString, wut, function (err, res) { + expect(res).toBe(false); + done(); + }); + }); +}) + +test('compare_no_params', done => { + expect.assertions(1); + bcrypt.compare(function (err, hash) { + expect(err.message).toBe('data and hash arguments required'); + done(); + }); +}) + +test('hash_compare_one_param', done => { + expect.assertions(1); + bcrypt.compare('password', function (err, hash) { + expect(err.message).toBe('data and hash arguments required'); + done(); + }); +}) diff --git a/src/hello/server/node_modules/bcrypt/test/implementation.test.js b/src/hello/server/node_modules/bcrypt/test/implementation.test.js new file mode 100644 index 00000000..647f32a9 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/test/implementation.test.js @@ -0,0 +1,48 @@ +const bcrypt = require('../bcrypt'); + +// some tests were adapted from https://github.com/riverrun/bcrypt_elixir/blob/master/test/base_test.exs +// which are under the BSD LICENSE + +test('openwall', () => { + expect(bcrypt.hashSync("U*U", "$2a$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW"); + expect(bcrypt.hashSync("U*U*", "$2a$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.VGOzA784oUp/Z0DY336zx7pLYAy0lwK"); + expect(bcrypt.hashSync("U*U*U", "$2a$05$XXXXXXXXXXXXXXXXXXXXXO")).toStrictEqual("$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a"); + expect(bcrypt.hashSync("", "$2a$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.7uG0VCzI2bS7j6ymqJi9CdcdxiRTWNy"); + expect(bcrypt.hashSync("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", "$2a$05$abcdefghijklmnopqrstuu")).toStrictEqual("$2a$05$abcdefghijklmnopqrstuu5s2v8.iXieOjg/.AySBTTZIIVFJeBui"); +}) + +test('openbsd', () => { + expect(bcrypt.hashSync("000000000000000000000000000000000000000000000000000000000000000000000000", "$2a$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.6.O1dLNbjod2uo0DVcW.jHucKbPDdHS") + expect(bcrypt.hashSync("000000000000000000000000000000000000000000000000000000000000000000000000", "$2b$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2b$05$CCCCCCCCCCCCCCCCCCCCC.6.O1dLNbjod2uo0DVcW.jHucKbPDdHS") +}) + +test('long_passwords', () => { + // bcrypt wrap-around bug in $2a$ + expect(bcrypt.hashSync("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", "$2a$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.6.O1dLNbjod2uo0DVcW.jHucKbPDdHS") + expect(bcrypt.hashSync("01XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "$2a$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.6.O1dLNbjod2uo0DVcW.jHucKbPDdHS") + + // tests for $2b$ which fixes wrap-around bugs + expect(bcrypt.hashSync("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234", "$2b$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2b$05$CCCCCCCCCCCCCCCCCCCCC.XxrQqgBi/5Sxuq9soXzDtjIZ7w5pMfK") + expect(bcrypt.hashSync("0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345", "$2b$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2b$05$CCCCCCCCCCCCCCCCCCCCC.XxrQqgBi/5Sxuq9soXzDtjIZ7w5pMfK") +}) + +test('embedded_nulls', () => { + expect(bcrypt.hashSync("Passw\0rd123", "$2b$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2b$05$CCCCCCCCCCCCCCCCCCCCC.VHy/kzL4sCcX3Ib3wN5rNGiRt.TpfxS") + expect(bcrypt.hashSync("Passw\0 you can literally write anything after the NUL character", "$2b$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2b$05$CCCCCCCCCCCCCCCCCCCCC.4vJLJQ6nZ/70INTjjSZWQ0iyUek92tu") + expect(bcrypt.hashSync(Buffer.from("Passw\0 you can literally write anything after the NUL character"), "$2b$05$CCCCCCCCCCCCCCCCCCCCC.")).toStrictEqual("$2b$05$CCCCCCCCCCCCCCCCCCCCC.4vJLJQ6nZ/70INTjjSZWQ0iyUek92tu") +}) + +test('shorten_salt_to_128_bits', () => { + expect(bcrypt.hashSync("test", "$2a$10$1234567899123456789012")).toStrictEqual("$2a$10$123456789912345678901u.OtL1A1eGK5wmvBKUDYKvuVKI7h2XBu") + expect(bcrypt.hashSync("U*U*", "$2a$05$CCCCCCCCCCCCCCCCCCCCCh")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCCeUQ7VjYZ2hd4bLYZdhuPpZMUpEUJDw1S") + expect(bcrypt.hashSync("U*U*", "$2a$05$CCCCCCCCCCCCCCCCCCCCCM")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.VGOzA784oUp/Z0DY336zx7pLYAy0lwK") + expect(bcrypt.hashSync("U*U*", "$2a$05$CCCCCCCCCCCCCCCCCCCCCA")).toStrictEqual("$2a$05$CCCCCCCCCCCCCCCCCCCCC.VGOzA784oUp/Z0DY336zx7pLYAy0lwK") +}) + +test('consistency', () => { + expect(bcrypt.hashSync("ππππππππ", "$2a$10$.TtQJ4Jr6isd4Hp.mVfZeu")).toStrictEqual("$2a$10$.TtQJ4Jr6isd4Hp.mVfZeuh6Gws4rOQ/vdBczhDx.19NFK0Y84Dle") + expect(bcrypt.hashSync("p@5sw0rd", "$2b$12$zQ4CooEXdGqcwi0PHsgc8e")).toStrictEqual("$2b$12$zQ4CooEXdGqcwi0PHsgc8eAf0DLXE/XHoBE8kCSGQ97rXwuClaPam") + expect(bcrypt.hashSync("C'est bon, la vie!", "$2b$12$cbo7LZ.wxgW4yxAA5Vqlv.")).toStrictEqual("$2b$12$cbo7LZ.wxgW4yxAA5Vqlv.KR6QFPt4qCdc9RYJNXxa/rbUOp.1sw.") + expect(bcrypt.hashSync("ἓν οἶδα ὅτι οὐδὲν οἶδα", "$2b$12$LeHKWR2bmrazi/6P22Jpau")).toStrictEqual("$2b$12$LeHKWR2bmrazi/6P22JpauX5my/eKwwKpWqL7L5iEByBnxNc76FRW") + expect(bcrypt.hashSync(Buffer.from("ἓν οἶδα ὅτι οὐδὲν οἶδα"), "$2b$12$LeHKWR2bmrazi/6P22Jpau")).toStrictEqual("$2b$12$LeHKWR2bmrazi/6P22JpauX5my/eKwwKpWqL7L5iEByBnxNc76FRW") +}) diff --git a/src/hello/server/node_modules/bcrypt/test/promise.test.js b/src/hello/server/node_modules/bcrypt/test/promise.test.js new file mode 100644 index 00000000..01034182 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/test/promise.test.js @@ -0,0 +1,168 @@ +const bcrypt = require('../bcrypt'); +const promises = require('../promises'); + +test('salt_returns_promise_on_no_args', () => { + // make sure test passes with non-native implementations such as bluebird + // http://stackoverflow.com/questions/27746304/how-do-i-tell-if-an-object-is-a-promise + expect(typeof bcrypt.genSalt().then).toEqual('function') +}) + +test('salt_returns_promise_on_null_callback', () => { + expect(typeof bcrypt.genSalt(13, null, null).then).toEqual('function') +}) + +test('salt_length', () => { + return expect(bcrypt.genSalt(10)).resolves.toHaveLength(29); +}) + +test('salt_rounds_is_string_number', () => { + return expect(bcrypt.genSalt('10')).rejects.toThrow('rounds must be a number'); +}) + +test('salt_rounds_is_string_non_number', () => { + return expect(bcrypt.genSalt('b')).rejects.toThrow('rounds must be a number'); +}) + +test('hash_returns_promise_on_null_callback', () => { + expect(typeof bcrypt.hash('password', 10, null).then).toStrictEqual('function') +}) + +test('hash', () => { + return expect(bcrypt.genSalt(10) + .then(salt => bcrypt.hash('password', salt))).resolves.toBeDefined() +}) + +test('hash_rounds', () => { + return bcrypt.hash('bacon', 8).then(hash => { + expect(bcrypt.getRounds(hash)).toStrictEqual(8) + }); +}) + +test('hash_empty_strings', () => { + expect.assertions(2); + return Promise.all([ + expect(bcrypt.genSalt(10) + .then(salt => bcrypt.hash('', salt))) + .resolves.toBeDefined(), + expect(bcrypt.hash('', '')).rejects.toThrow(''), + ]); +}) + +test('hash_no_params', () => { + expect.assertions(1); + return expect(bcrypt.hash()).rejects.toThrow('data and salt arguments required'); +}) + +test('hash_one_param', () => { + return expect(bcrypt.hash('password')).rejects.toThrow('data and salt arguments required'); +}) + +test('hash_salt_validity', () => { + expect.assertions(2); + return Promise.all( + [ + expect(bcrypt.hash('password', '$2a$10$somesaltyvaluertsetrse')).resolves.toBeDefined(), + expect(bcrypt.hash('password', 'some$value')).rejects.toThrow("Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue") + ]); +}) + +test('verify_salt', () => { + expect.assertions(2); + return bcrypt.genSalt(10).then(result => { + const [_, version, salt] = result.split('$'); + expect(version).toEqual('2b') + expect(salt).toEqual('10') + }); +}) + +test('verify_salt_min_rounds', () => { + expect.assertions(2); + return bcrypt.genSalt(1).then(value => { + const [_, version, rounds] = value.split('$'); + expect(version).toEqual('2b'); + expect(rounds).toEqual('04'); + }); +}) + +test('verify_salt_max_rounds', () => { + expect.assertions(2); + return bcrypt.genSalt(100).then(value => { + const [_, version, rounds] = value.split('$'); + expect(version).toEqual('2b'); + expect(rounds).toEqual('31'); + }); +}) + +test('hash_compare_returns_promise_on_null_callback', () => { + expect(typeof bcrypt.compare('password', 'something', null).then).toStrictEqual('function') +}) + +test('hash_compare', () => { + expect.assertions(3); + return bcrypt.genSalt(10).then(function (salt) { + expect(salt).toHaveLength(29); + return bcrypt.hash("test", salt); + }).then(hash => Promise.all( + [ + expect(bcrypt.compare("test", hash)).resolves.toEqual(true), + expect(bcrypt.compare("blah", hash)).resolves.toEqual(false) + ])); +}) + +test('hash_compare_empty_strings', () => { + expect.assertions(2); + const hash = bcrypt.hashSync("test", bcrypt.genSaltSync(10)); + return Promise.all([ + expect(bcrypt.compare("", hash)).resolves.toEqual(false), + expect(bcrypt.compare("", "")).resolves.toEqual(false) + ]); +}) + +test('hash_compare_invalid_strings', () => { + const fullString = 'envy1362987212538'; + const hash = '$2a$10$XOPbrlUPQdwdJUpSrIF6X.LbE14qsMmKGhM1A8W9iqaG3vv1BD7WC'; + const wut = ':'; + return Promise.all([ + expect(bcrypt.compare(fullString, hash)).resolves.toEqual(true), + expect(bcrypt.compare(fullString, wut)).resolves.toEqual(false), + ]); +}) + +test('hash_compare_no_params', () => { + expect.assertions(1); + return expect(bcrypt.compare()).rejects.toThrow('data and hash arguments required') +}) + +test('hash_compare_one_param', () => { + expect.assertions(1); + return expect(bcrypt.compare('password')).rejects.toThrow('data and hash arguments required') +}) + +test('change_promise_impl_reject', () => { + + promises.use({ + reject: function () { + return 'mock'; + } + }); + + expect(promises.reject()).toEqual('mock'); + + // need to reset the promise implementation because of require cache + promises.use(global.Promise); +}) + +test('change_promise_impl_promise', () => { + + promises.use({ + reject: function (err) { + expect(err.message).toEqual('fn must be a function'); + return 'mock'; + } + }); + + expect(promises.promise('', '', '')).toEqual('mock'); + + // need to reset the promise implementation because of require cache + promises.use(global.Promise); +}) diff --git a/src/hello/server/node_modules/bcrypt/test/repetitions.test.js b/src/hello/server/node_modules/bcrypt/test/repetitions.test.js new file mode 100644 index 00000000..63ff4077 --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/test/repetitions.test.js @@ -0,0 +1,55 @@ +const bcrypt = require('../bcrypt'); + +const EXPECTED = 2500; //number of times to iterate these tests.) +const { TEST_TIMEOUT_SECONDS } = process.env; +let timeout = 5e3; // default test timeout + +// it is necessary to increase the test timeout when emulating cross-architecture +// environments (i.e. arm64 from x86-64 host) which have significantly reduced performance: +if ( TEST_TIMEOUT_SECONDS ) + timeout = Number.parseInt(TEST_TIMEOUT_SECONDS, 10) * 1e3; + +jest.setTimeout(timeout); + +test('salt_length', () => { + expect.assertions(EXPECTED); + + return Promise.all(Array.from({length: EXPECTED}, + () => bcrypt.genSalt(10) + .then(salt => expect(salt).toHaveLength(29)))); +}) + +test('test_hash_length', () => { + expect.assertions(EXPECTED); + const SALT = '$2a$04$TnjywYklQbbZjdjBgBoA4e'; + return Promise.all(Array.from({length: EXPECTED}, + () => bcrypt.hash('test', SALT) + .then(hash => expect(hash).toHaveLength(60)))); +}) + +test('test_compare', () => { + expect.assertions(EXPECTED); + const HASH = '$2a$04$TnjywYklQbbZjdjBgBoA4e9G7RJt9blgMgsCvUvus4Iv4TENB5nHy'; + return Promise.all(Array.from({length: EXPECTED}, + () => bcrypt.compare('test', HASH) + .then(match => expect(match).toEqual(true)))); +}) + +test('test_hash_and_compare', () => { + expect.assertions(EXPECTED * 3); + const salt = bcrypt.genSaltSync(4) + + return Promise.all(Array.from({length: EXPECTED}, + () => { + const password = 'secret' + Math.random(); + return bcrypt.hash(password, salt) + .then(hash => { + expect(hash).toHaveLength(60); + const goodCompare = bcrypt.compare(password, hash).then(res => expect(res).toEqual(true)); + const badCompare = bcrypt.compare('bad' + password, hash).then(res => expect(res).toEqual(false)); + + return Promise.all([goodCompare, badCompare]); + }); + })); +}, timeout * 3); + diff --git a/src/hello/server/node_modules/bcrypt/test/sync.test.js b/src/hello/server/node_modules/bcrypt/test/sync.test.js new file mode 100644 index 00000000..2e6809af --- /dev/null +++ b/src/hello/server/node_modules/bcrypt/test/sync.test.js @@ -0,0 +1,125 @@ +const bcrypt = require('../bcrypt') + +test('salt_length', () => { + const salt = bcrypt.genSaltSync(13); + expect(salt).toHaveLength(29); + const [_, version, rounds] = salt.split('$'); + expect(version).toStrictEqual('2b') + expect(rounds).toStrictEqual('13') +}) + +test('salt_no_params', () => { + const salt = bcrypt.genSaltSync(); + const [_, version, rounds] = salt.split('$'); + expect(version).toStrictEqual('2b') + expect(rounds).toStrictEqual('10') +}) + +test('salt_rounds_is_string_number', () => { + expect(() => bcrypt.genSaltSync('10')).toThrowError('rounds must be a number'); +}) + +test('salt_rounds_is_NaN', () => { + expect(() => bcrypt.genSaltSync('b')).toThrowError("rounds must be a number"); +}) + +test('salt_minor_a', () => { + const salt = bcrypt.genSaltSync(10, 'a'); + const [_, version, rounds] = salt.split('$'); + expect(version).toStrictEqual('2a') + expect(rounds).toStrictEqual('10') +}) + +test('salt_minor_b', () => { + const salt = bcrypt.genSaltSync(10, 'b'); + const [_, version, rounds] = salt.split('$'); + expect(version).toStrictEqual('2b') + expect(rounds).toStrictEqual('10') +}) + +test('hash', () => { + expect(() => bcrypt.hashSync('password', bcrypt.genSaltSync(10))).not.toThrow() +}) + +test('hash_rounds', () => { + const hash = bcrypt.hashSync('password', 8); + expect(bcrypt.getRounds(hash)).toStrictEqual(8) +}) + +test('hash_empty_string', () => { + expect(() => bcrypt.hashSync('', bcrypt.genSaltSync(10))).not.toThrow(); + expect(() => bcrypt.hashSync('password', '')).toThrowError('Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue'); + expect(() => bcrypt.hashSync('', '')).toThrowError('Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue'); +}) + +test('hash_pw_no_params', () => { + expect(() => bcrypt.hashSync()).toThrow('data and salt arguments required'); +}) + +test('hash_pw_one_param', () => { + expect(() => bcrypt.hashSync('password')).toThrow('data and salt arguments required'); +}) + +test('hash_pw_not_hash_str', () => { + expect(() => bcrypt.hashSync('password', {})).toThrow("data must be a string or Buffer and salt must either be a salt string or a number of rounds") +}) + +test('hash_salt_validity', () => { + expect(2); + expect(bcrypt.hashSync('password', '$2a$10$somesaltyvaluertsetrse')).toBeDefined() + expect(() => bcrypt.hashSync('password', 'some$value')).toThrow('Invalid salt. Salt must be in the form of: $Vers$log2(NumRounds)$saltvalue') +}) + +test('verify_salt', () => { + const salt = bcrypt.genSaltSync(10); + const split_salt = salt.split('$'); + expect(split_salt[1]).toStrictEqual('2b') + expect(split_salt[2]).toStrictEqual('10') +}) + +test('verify_salt_min_rounds', () => { + const salt = bcrypt.genSaltSync(1); + const split_salt = salt.split('$'); + expect(split_salt[1]).toStrictEqual('2b') + expect(split_salt[2]).toStrictEqual('04') +}) + +test('verify_salt_max_rounds', () => { + const salt = bcrypt.genSaltSync(100); + const split_salt = salt.split('$'); + expect(split_salt[1]).toStrictEqual('2b') + expect(split_salt[2]).toStrictEqual('31') +}) + +test('hash_compare', () => { + const salt = bcrypt.genSaltSync(10); + expect(29).toStrictEqual(salt.length) + const hash = bcrypt.hashSync("test", salt); + expect(bcrypt.compareSync("test", hash)).toBeDefined() + expect(!(bcrypt.compareSync("blah", hash))).toBeDefined() +}) + +test('hash_compare_empty_strings', () => { + expect(!(bcrypt.compareSync("", "password"))).toBeDefined() + expect(!(bcrypt.compareSync("", ""))).toBeDefined() + expect(!(bcrypt.compareSync("password", ""))).toBeDefined() +}) + +test('hash_compare_invalid_strings', () => { + const fullString = 'envy1362987212538'; + const hash = '$2a$10$XOPbrlUPQdwdJUpSrIF6X.LbE14qsMmKGhM1A8W9iqaG3vv1BD7WC'; + const wut = ':'; + expect(bcrypt.compareSync(fullString, hash)).toBe(true); + expect(bcrypt.compareSync(fullString, wut)).toBe(false); +}) + +test('getRounds', () => { + const hash = bcrypt.hashSync("test", bcrypt.genSaltSync(9)); + expect(9).toStrictEqual(bcrypt.getRounds(hash)) +}) + +test('getRounds', () => { + const hash = bcrypt.hashSync("test", bcrypt.genSaltSync(9)); + expect(9).toStrictEqual(bcrypt.getRounds(hash)) + expect(() => bcrypt.getRounds('')).toThrow("invalid hash provided"); +}); diff --git a/src/hello/backend/node_modules/bcryptjs/LICENSE b/src/hello/server/node_modules/bcryptjs/LICENSE similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/LICENSE rename to src/hello/server/node_modules/bcryptjs/LICENSE diff --git a/src/hello/backend/node_modules/bcryptjs/README.md b/src/hello/server/node_modules/bcryptjs/README.md similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/README.md rename to src/hello/server/node_modules/bcryptjs/README.md diff --git a/src/hello/server/node_modules/bcryptjs/bin/bcrypt b/src/hello/server/node_modules/bcryptjs/bin/bcrypt new file mode 100644 index 00000000..5c72e0fa --- /dev/null +++ b/src/hello/server/node_modules/bcryptjs/bin/bcrypt @@ -0,0 +1,23 @@ +#!/usr/bin/env node + +import path from "node:path"; +import bcrypt from "../index.js"; + +if (process.argv.length < 3) { + console.log( + "Usage: " + path.basename(process.argv[1]) + " [rounds|salt]", + ); + process.exit(1); +} else { + var salt; + if (process.argv.length > 3) { + salt = process.argv[3]; + var rounds = parseInt(salt, 10); + if (rounds == salt) { + salt = bcrypt.genSaltSync(rounds); + } + } else { + salt = bcrypt.genSaltSync(); + } + console.log(bcrypt.hashSync(process.argv[2], salt)); +} diff --git a/src/hello/backend/node_modules/bcryptjs/index.d.ts b/src/hello/server/node_modules/bcryptjs/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/index.d.ts rename to src/hello/server/node_modules/bcryptjs/index.d.ts diff --git a/src/hello/backend/node_modules/bcryptjs/index.js b/src/hello/server/node_modules/bcryptjs/index.js similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/index.js rename to src/hello/server/node_modules/bcryptjs/index.js diff --git a/src/hello/backend/node_modules/bcryptjs/package.json b/src/hello/server/node_modules/bcryptjs/package.json similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/package.json rename to src/hello/server/node_modules/bcryptjs/package.json diff --git a/src/hello/backend/node_modules/bcryptjs/types.d.ts b/src/hello/server/node_modules/bcryptjs/types.d.ts similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/types.d.ts rename to src/hello/server/node_modules/bcryptjs/types.d.ts diff --git a/src/hello/backend/node_modules/bcryptjs/umd/index.d.ts b/src/hello/server/node_modules/bcryptjs/umd/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/umd/index.d.ts rename to src/hello/server/node_modules/bcryptjs/umd/index.d.ts diff --git a/src/hello/backend/node_modules/bcryptjs/umd/index.js b/src/hello/server/node_modules/bcryptjs/umd/index.js similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/umd/index.js rename to src/hello/server/node_modules/bcryptjs/umd/index.js diff --git a/src/hello/backend/node_modules/bcryptjs/umd/package.json b/src/hello/server/node_modules/bcryptjs/umd/package.json similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/umd/package.json rename to src/hello/server/node_modules/bcryptjs/umd/package.json diff --git a/src/hello/backend/node_modules/bcryptjs/umd/types.d.ts b/src/hello/server/node_modules/bcryptjs/umd/types.d.ts similarity index 100% rename from src/hello/backend/node_modules/bcryptjs/umd/types.d.ts rename to src/hello/server/node_modules/bcryptjs/umd/types.d.ts diff --git a/src/hello/backend/node_modules/bignumber.js/CHANGELOG.md b/src/hello/server/node_modules/bignumber.js/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/CHANGELOG.md rename to src/hello/server/node_modules/bignumber.js/CHANGELOG.md diff --git a/src/hello/backend/node_modules/bignumber.js/LICENCE b/src/hello/server/node_modules/bignumber.js/LICENCE similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/LICENCE rename to src/hello/server/node_modules/bignumber.js/LICENCE diff --git a/src/hello/backend/node_modules/bignumber.js/README.md b/src/hello/server/node_modules/bignumber.js/README.md similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/README.md rename to src/hello/server/node_modules/bignumber.js/README.md diff --git a/src/hello/backend/node_modules/bignumber.js/bignumber.d.ts b/src/hello/server/node_modules/bignumber.js/bignumber.d.ts similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/bignumber.d.ts rename to src/hello/server/node_modules/bignumber.js/bignumber.d.ts diff --git a/src/hello/backend/node_modules/bignumber.js/bignumber.js b/src/hello/server/node_modules/bignumber.js/bignumber.js similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/bignumber.js rename to src/hello/server/node_modules/bignumber.js/bignumber.js diff --git a/src/hello/backend/node_modules/bignumber.js/bignumber.min.js b/src/hello/server/node_modules/bignumber.js/bignumber.min.js similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/bignumber.min.js rename to src/hello/server/node_modules/bignumber.js/bignumber.min.js diff --git a/src/hello/backend/node_modules/bignumber.js/bignumber.min.js.map b/src/hello/server/node_modules/bignumber.js/bignumber.min.js.map similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/bignumber.min.js.map rename to src/hello/server/node_modules/bignumber.js/bignumber.min.js.map diff --git a/src/hello/backend/node_modules/bignumber.js/bignumber.mjs b/src/hello/server/node_modules/bignumber.js/bignumber.mjs similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/bignumber.mjs rename to src/hello/server/node_modules/bignumber.js/bignumber.mjs diff --git a/src/hello/backend/node_modules/bignumber.js/doc/API.html b/src/hello/server/node_modules/bignumber.js/doc/API.html similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/doc/API.html rename to src/hello/server/node_modules/bignumber.js/doc/API.html diff --git a/src/hello/backend/node_modules/bignumber.js/package.json b/src/hello/server/node_modules/bignumber.js/package.json similarity index 100% rename from src/hello/backend/node_modules/bignumber.js/package.json rename to src/hello/server/node_modules/bignumber.js/package.json diff --git a/src/hello/backend/node_modules/binary-extensions/binary-extensions.json b/src/hello/server/node_modules/binary-extensions/binary-extensions.json similarity index 100% rename from src/hello/backend/node_modules/binary-extensions/binary-extensions.json rename to src/hello/server/node_modules/binary-extensions/binary-extensions.json diff --git a/src/hello/backend/node_modules/binary-extensions/binary-extensions.json.d.ts b/src/hello/server/node_modules/binary-extensions/binary-extensions.json.d.ts similarity index 100% rename from src/hello/backend/node_modules/binary-extensions/binary-extensions.json.d.ts rename to src/hello/server/node_modules/binary-extensions/binary-extensions.json.d.ts diff --git a/src/hello/backend/node_modules/binary-extensions/index.d.ts b/src/hello/server/node_modules/binary-extensions/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/binary-extensions/index.d.ts rename to src/hello/server/node_modules/binary-extensions/index.d.ts diff --git a/src/hello/backend/node_modules/binary-extensions/index.js b/src/hello/server/node_modules/binary-extensions/index.js similarity index 100% rename from src/hello/backend/node_modules/binary-extensions/index.js rename to src/hello/server/node_modules/binary-extensions/index.js diff --git a/src/hello/backend/node_modules/binary-extensions/license b/src/hello/server/node_modules/binary-extensions/license similarity index 100% rename from src/hello/backend/node_modules/binary-extensions/license rename to src/hello/server/node_modules/binary-extensions/license diff --git a/src/hello/backend/node_modules/binary-extensions/package.json b/src/hello/server/node_modules/binary-extensions/package.json similarity index 100% rename from src/hello/backend/node_modules/binary-extensions/package.json rename to src/hello/server/node_modules/binary-extensions/package.json diff --git a/src/hello/backend/node_modules/binary-extensions/readme.md b/src/hello/server/node_modules/binary-extensions/readme.md similarity index 100% rename from src/hello/backend/node_modules/binary-extensions/readme.md rename to src/hello/server/node_modules/binary-extensions/readme.md diff --git a/src/hello/backend/node_modules/body-parser/HISTORY.md b/src/hello/server/node_modules/body-parser/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/body-parser/HISTORY.md rename to src/hello/server/node_modules/body-parser/HISTORY.md diff --git a/src/hello/backend/node_modules/body-parser/LICENSE b/src/hello/server/node_modules/body-parser/LICENSE similarity index 100% rename from src/hello/backend/node_modules/body-parser/LICENSE rename to src/hello/server/node_modules/body-parser/LICENSE diff --git a/src/hello/backend/node_modules/body-parser/README.md b/src/hello/server/node_modules/body-parser/README.md similarity index 100% rename from src/hello/backend/node_modules/body-parser/README.md rename to src/hello/server/node_modules/body-parser/README.md diff --git a/src/hello/backend/node_modules/body-parser/index.js b/src/hello/server/node_modules/body-parser/index.js similarity index 100% rename from src/hello/backend/node_modules/body-parser/index.js rename to src/hello/server/node_modules/body-parser/index.js diff --git a/src/hello/backend/node_modules/body-parser/lib/read.js b/src/hello/server/node_modules/body-parser/lib/read.js similarity index 100% rename from src/hello/backend/node_modules/body-parser/lib/read.js rename to src/hello/server/node_modules/body-parser/lib/read.js diff --git a/src/hello/backend/node_modules/body-parser/lib/types/json.js b/src/hello/server/node_modules/body-parser/lib/types/json.js similarity index 100% rename from src/hello/backend/node_modules/body-parser/lib/types/json.js rename to src/hello/server/node_modules/body-parser/lib/types/json.js diff --git a/src/hello/backend/node_modules/body-parser/lib/types/raw.js b/src/hello/server/node_modules/body-parser/lib/types/raw.js similarity index 100% rename from src/hello/backend/node_modules/body-parser/lib/types/raw.js rename to src/hello/server/node_modules/body-parser/lib/types/raw.js diff --git a/src/hello/backend/node_modules/body-parser/lib/types/text.js b/src/hello/server/node_modules/body-parser/lib/types/text.js similarity index 100% rename from src/hello/backend/node_modules/body-parser/lib/types/text.js rename to src/hello/server/node_modules/body-parser/lib/types/text.js diff --git a/src/hello/backend/node_modules/body-parser/lib/types/urlencoded.js b/src/hello/server/node_modules/body-parser/lib/types/urlencoded.js similarity index 100% rename from src/hello/backend/node_modules/body-parser/lib/types/urlencoded.js rename to src/hello/server/node_modules/body-parser/lib/types/urlencoded.js diff --git a/src/hello/backend/node_modules/debug/.coveralls.yml b/src/hello/server/node_modules/body-parser/node_modules/debug/.coveralls.yml similarity index 100% rename from src/hello/backend/node_modules/debug/.coveralls.yml rename to src/hello/server/node_modules/body-parser/node_modules/debug/.coveralls.yml diff --git a/src/hello/backend/node_modules/debug/.eslintrc b/src/hello/server/node_modules/body-parser/node_modules/debug/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/debug/.eslintrc rename to src/hello/server/node_modules/body-parser/node_modules/debug/.eslintrc diff --git a/src/hello/backend/node_modules/debug/.npmignore b/src/hello/server/node_modules/body-parser/node_modules/debug/.npmignore similarity index 100% rename from src/hello/backend/node_modules/debug/.npmignore rename to src/hello/server/node_modules/body-parser/node_modules/debug/.npmignore diff --git a/src/hello/backend/node_modules/debug/.travis.yml b/src/hello/server/node_modules/body-parser/node_modules/debug/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/debug/.travis.yml rename to src/hello/server/node_modules/body-parser/node_modules/debug/.travis.yml diff --git a/src/hello/backend/node_modules/debug/CHANGELOG.md b/src/hello/server/node_modules/body-parser/node_modules/debug/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/debug/CHANGELOG.md rename to src/hello/server/node_modules/body-parser/node_modules/debug/CHANGELOG.md diff --git a/src/hello/backend/node_modules/debug/LICENSE b/src/hello/server/node_modules/body-parser/node_modules/debug/LICENSE similarity index 100% rename from src/hello/backend/node_modules/debug/LICENSE rename to src/hello/server/node_modules/body-parser/node_modules/debug/LICENSE diff --git a/src/hello/backend/node_modules/debug/Makefile b/src/hello/server/node_modules/body-parser/node_modules/debug/Makefile similarity index 100% rename from src/hello/backend/node_modules/debug/Makefile rename to src/hello/server/node_modules/body-parser/node_modules/debug/Makefile diff --git a/src/hello/backend/node_modules/debug/README.md b/src/hello/server/node_modules/body-parser/node_modules/debug/README.md similarity index 100% rename from src/hello/backend/node_modules/debug/README.md rename to src/hello/server/node_modules/body-parser/node_modules/debug/README.md diff --git a/src/hello/backend/node_modules/debug/component.json b/src/hello/server/node_modules/body-parser/node_modules/debug/component.json similarity index 100% rename from src/hello/backend/node_modules/debug/component.json rename to src/hello/server/node_modules/body-parser/node_modules/debug/component.json diff --git a/src/hello/backend/node_modules/debug/karma.conf.js b/src/hello/server/node_modules/body-parser/node_modules/debug/karma.conf.js similarity index 100% rename from src/hello/backend/node_modules/debug/karma.conf.js rename to src/hello/server/node_modules/body-parser/node_modules/debug/karma.conf.js diff --git a/src/hello/backend/node_modules/debug/node.js b/src/hello/server/node_modules/body-parser/node_modules/debug/node.js similarity index 100% rename from src/hello/backend/node_modules/debug/node.js rename to src/hello/server/node_modules/body-parser/node_modules/debug/node.js diff --git a/src/hello/backend/node_modules/debug/package.json b/src/hello/server/node_modules/body-parser/node_modules/debug/package.json similarity index 100% rename from src/hello/backend/node_modules/debug/package.json rename to src/hello/server/node_modules/body-parser/node_modules/debug/package.json diff --git a/src/hello/backend/node_modules/debug/src/browser.js b/src/hello/server/node_modules/body-parser/node_modules/debug/src/browser.js similarity index 100% rename from src/hello/backend/node_modules/debug/src/browser.js rename to src/hello/server/node_modules/body-parser/node_modules/debug/src/browser.js diff --git a/src/hello/backend/node_modules/debug/src/debug.js b/src/hello/server/node_modules/body-parser/node_modules/debug/src/debug.js similarity index 100% rename from src/hello/backend/node_modules/debug/src/debug.js rename to src/hello/server/node_modules/body-parser/node_modules/debug/src/debug.js diff --git a/src/hello/backend/node_modules/debug/src/index.js b/src/hello/server/node_modules/body-parser/node_modules/debug/src/index.js similarity index 100% rename from src/hello/backend/node_modules/debug/src/index.js rename to src/hello/server/node_modules/body-parser/node_modules/debug/src/index.js diff --git a/src/hello/backend/node_modules/debug/src/inspector-log.js b/src/hello/server/node_modules/body-parser/node_modules/debug/src/inspector-log.js similarity index 100% rename from src/hello/backend/node_modules/debug/src/inspector-log.js rename to src/hello/server/node_modules/body-parser/node_modules/debug/src/inspector-log.js diff --git a/src/hello/backend/node_modules/debug/src/node.js b/src/hello/server/node_modules/body-parser/node_modules/debug/src/node.js similarity index 100% rename from src/hello/backend/node_modules/debug/src/node.js rename to src/hello/server/node_modules/body-parser/node_modules/debug/src/node.js diff --git a/src/hello/backend/node_modules/debug/node_modules/ms/index.js b/src/hello/server/node_modules/body-parser/node_modules/ms/index.js similarity index 100% rename from src/hello/backend/node_modules/debug/node_modules/ms/index.js rename to src/hello/server/node_modules/body-parser/node_modules/ms/index.js diff --git a/src/hello/backend/node_modules/debug/node_modules/ms/license.md b/src/hello/server/node_modules/body-parser/node_modules/ms/license.md similarity index 100% rename from src/hello/backend/node_modules/debug/node_modules/ms/license.md rename to src/hello/server/node_modules/body-parser/node_modules/ms/license.md diff --git a/src/hello/backend/node_modules/debug/node_modules/ms/package.json b/src/hello/server/node_modules/body-parser/node_modules/ms/package.json similarity index 100% rename from src/hello/backend/node_modules/debug/node_modules/ms/package.json rename to src/hello/server/node_modules/body-parser/node_modules/ms/package.json diff --git a/src/hello/backend/node_modules/debug/node_modules/ms/readme.md b/src/hello/server/node_modules/body-parser/node_modules/ms/readme.md similarity index 100% rename from src/hello/backend/node_modules/debug/node_modules/ms/readme.md rename to src/hello/server/node_modules/body-parser/node_modules/ms/readme.md diff --git a/src/hello/backend/node_modules/body-parser/package.json b/src/hello/server/node_modules/body-parser/package.json similarity index 100% rename from src/hello/backend/node_modules/body-parser/package.json rename to src/hello/server/node_modules/body-parser/package.json diff --git a/src/hello/backend/node_modules/brace-expansion/LICENSE b/src/hello/server/node_modules/brace-expansion/LICENSE similarity index 100% rename from src/hello/backend/node_modules/brace-expansion/LICENSE rename to src/hello/server/node_modules/brace-expansion/LICENSE diff --git a/src/hello/backend/node_modules/brace-expansion/README.md b/src/hello/server/node_modules/brace-expansion/README.md similarity index 100% rename from src/hello/backend/node_modules/brace-expansion/README.md rename to src/hello/server/node_modules/brace-expansion/README.md diff --git a/src/hello/backend/node_modules/brace-expansion/index.js b/src/hello/server/node_modules/brace-expansion/index.js similarity index 100% rename from src/hello/backend/node_modules/brace-expansion/index.js rename to src/hello/server/node_modules/brace-expansion/index.js diff --git a/src/hello/backend/node_modules/brace-expansion/package.json b/src/hello/server/node_modules/brace-expansion/package.json similarity index 100% rename from src/hello/backend/node_modules/brace-expansion/package.json rename to src/hello/server/node_modules/brace-expansion/package.json diff --git a/src/hello/backend/node_modules/braces/LICENSE b/src/hello/server/node_modules/braces/LICENSE similarity index 100% rename from src/hello/backend/node_modules/braces/LICENSE rename to src/hello/server/node_modules/braces/LICENSE diff --git a/src/hello/backend/node_modules/braces/README.md b/src/hello/server/node_modules/braces/README.md similarity index 100% rename from src/hello/backend/node_modules/braces/README.md rename to src/hello/server/node_modules/braces/README.md diff --git a/src/hello/backend/node_modules/braces/index.js b/src/hello/server/node_modules/braces/index.js similarity index 100% rename from src/hello/backend/node_modules/braces/index.js rename to src/hello/server/node_modules/braces/index.js diff --git a/src/hello/backend/node_modules/braces/lib/compile.js b/src/hello/server/node_modules/braces/lib/compile.js similarity index 100% rename from src/hello/backend/node_modules/braces/lib/compile.js rename to src/hello/server/node_modules/braces/lib/compile.js diff --git a/src/hello/backend/node_modules/braces/lib/constants.js b/src/hello/server/node_modules/braces/lib/constants.js similarity index 100% rename from src/hello/backend/node_modules/braces/lib/constants.js rename to src/hello/server/node_modules/braces/lib/constants.js diff --git a/src/hello/backend/node_modules/braces/lib/expand.js b/src/hello/server/node_modules/braces/lib/expand.js similarity index 100% rename from src/hello/backend/node_modules/braces/lib/expand.js rename to src/hello/server/node_modules/braces/lib/expand.js diff --git a/src/hello/backend/node_modules/braces/lib/parse.js b/src/hello/server/node_modules/braces/lib/parse.js similarity index 100% rename from src/hello/backend/node_modules/braces/lib/parse.js rename to src/hello/server/node_modules/braces/lib/parse.js diff --git a/src/hello/backend/node_modules/braces/lib/stringify.js b/src/hello/server/node_modules/braces/lib/stringify.js similarity index 100% rename from src/hello/backend/node_modules/braces/lib/stringify.js rename to src/hello/server/node_modules/braces/lib/stringify.js diff --git a/src/hello/backend/node_modules/braces/lib/utils.js b/src/hello/server/node_modules/braces/lib/utils.js similarity index 100% rename from src/hello/backend/node_modules/braces/lib/utils.js rename to src/hello/server/node_modules/braces/lib/utils.js diff --git a/src/hello/backend/node_modules/braces/package.json b/src/hello/server/node_modules/braces/package.json similarity index 100% rename from src/hello/backend/node_modules/braces/package.json rename to src/hello/server/node_modules/braces/package.json diff --git a/src/hello/backend/node_modules/buffer-equal-constant-time/.npmignore b/src/hello/server/node_modules/buffer-equal-constant-time/.npmignore similarity index 100% rename from src/hello/backend/node_modules/buffer-equal-constant-time/.npmignore rename to src/hello/server/node_modules/buffer-equal-constant-time/.npmignore diff --git a/src/hello/backend/node_modules/buffer-equal-constant-time/.travis.yml b/src/hello/server/node_modules/buffer-equal-constant-time/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/buffer-equal-constant-time/.travis.yml rename to src/hello/server/node_modules/buffer-equal-constant-time/.travis.yml diff --git a/src/hello/backend/node_modules/buffer-equal-constant-time/LICENSE.txt b/src/hello/server/node_modules/buffer-equal-constant-time/LICENSE.txt similarity index 100% rename from src/hello/backend/node_modules/buffer-equal-constant-time/LICENSE.txt rename to src/hello/server/node_modules/buffer-equal-constant-time/LICENSE.txt diff --git a/src/hello/backend/node_modules/buffer-equal-constant-time/README.md b/src/hello/server/node_modules/buffer-equal-constant-time/README.md similarity index 100% rename from src/hello/backend/node_modules/buffer-equal-constant-time/README.md rename to src/hello/server/node_modules/buffer-equal-constant-time/README.md diff --git a/src/hello/backend/node_modules/buffer-equal-constant-time/index.js b/src/hello/server/node_modules/buffer-equal-constant-time/index.js similarity index 100% rename from src/hello/backend/node_modules/buffer-equal-constant-time/index.js rename to src/hello/server/node_modules/buffer-equal-constant-time/index.js diff --git a/src/hello/backend/node_modules/buffer-equal-constant-time/package.json b/src/hello/server/node_modules/buffer-equal-constant-time/package.json similarity index 100% rename from src/hello/backend/node_modules/buffer-equal-constant-time/package.json rename to src/hello/server/node_modules/buffer-equal-constant-time/package.json diff --git a/src/hello/backend/node_modules/buffer-equal-constant-time/test.js b/src/hello/server/node_modules/buffer-equal-constant-time/test.js similarity index 100% rename from src/hello/backend/node_modules/buffer-equal-constant-time/test.js rename to src/hello/server/node_modules/buffer-equal-constant-time/test.js diff --git a/src/hello/server/node_modules/buffer-from/LICENSE b/src/hello/server/node_modules/buffer-from/LICENSE new file mode 100644 index 00000000..e4bf1d69 --- /dev/null +++ b/src/hello/server/node_modules/buffer-from/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016, 2018 Linus Unnebäck + +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/src/hello/server/node_modules/buffer-from/index.js b/src/hello/server/node_modules/buffer-from/index.js new file mode 100644 index 00000000..e1a58b5e --- /dev/null +++ b/src/hello/server/node_modules/buffer-from/index.js @@ -0,0 +1,72 @@ +/* eslint-disable node/no-deprecated-api */ + +var toString = Object.prototype.toString + +var isModern = ( + typeof Buffer !== 'undefined' && + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +) + +function isArrayBuffer (input) { + return toString.call(input).slice(8, -1) === 'ArrayBuffer' +} + +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0 + + var maxLength = obj.byteLength - byteOffset + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +module.exports = bufferFrom diff --git a/src/hello/server/node_modules/buffer-from/package.json b/src/hello/server/node_modules/buffer-from/package.json new file mode 100644 index 00000000..6ac5327b --- /dev/null +++ b/src/hello/server/node_modules/buffer-from/package.json @@ -0,0 +1,19 @@ +{ + "name": "buffer-from", + "version": "1.1.2", + "license": "MIT", + "repository": "LinusU/buffer-from", + "files": [ + "index.js" + ], + "scripts": { + "test": "standard && node test" + }, + "devDependencies": { + "standard": "^12.0.1" + }, + "keywords": [ + "buffer", + "buffer from" + ] +} diff --git a/src/hello/server/node_modules/buffer-from/readme.md b/src/hello/server/node_modules/buffer-from/readme.md new file mode 100644 index 00000000..9880a558 --- /dev/null +++ b/src/hello/server/node_modules/buffer-from/readme.md @@ -0,0 +1,69 @@ +# Buffer From + +A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available. + +## Installation + +```sh +npm install --save buffer-from +``` + +## Usage + +```js +const bufferFrom = require('buffer-from') + +console.log(bufferFrom([1, 2, 3, 4])) +//=> + +const arr = new Uint8Array([1, 2, 3, 4]) +console.log(bufferFrom(arr.buffer, 1, 2)) +//=> + +console.log(bufferFrom('test', 'utf8')) +//=> + +const buf = bufferFrom('test') +console.log(bufferFrom(buf)) +//=> +``` + +## API + +### bufferFrom(array) + +- `array` <Array> + +Allocates a new `Buffer` using an `array` of octets. + +### bufferFrom(arrayBuffer[, byteOffset[, length]]) + +- `arrayBuffer` <ArrayBuffer> The `.buffer` property of a TypedArray or ArrayBuffer +- `byteOffset` <Integer> Where to start copying from `arrayBuffer`. **Default:** `0` +- `length` <Integer> How many bytes to copy from `arrayBuffer`. **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. + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +### bufferFrom(buffer) + +- `buffer` <Buffer> An existing `Buffer` to copy data from + +Copies the passed `buffer` data onto a new `Buffer` instance. + +### bufferFrom(string[, encoding]) + +- `string` <String> A string to encode. +- `encoding` <String> The encoding of `string`. **Default:** `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `string`. If +provided, the `encoding` parameter identifies the character encoding of +`string`. + +## See also + +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` diff --git a/src/hello/server/node_modules/busboy/.eslintrc.js b/src/hello/server/node_modules/busboy/.eslintrc.js new file mode 100644 index 00000000..be9311d0 --- /dev/null +++ b/src/hello/server/node_modules/busboy/.eslintrc.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + extends: '@mscdex/eslint-config', +}; diff --git a/src/hello/server/node_modules/busboy/.github/workflows/ci.yml b/src/hello/server/node_modules/busboy/.github/workflows/ci.yml new file mode 100644 index 00000000..799bae04 --- /dev/null +++ b/src/hello/server/node_modules/busboy/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + pull_request: + push: + branches: [ master ] + +jobs: + tests-linux: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: [10.16.0, 10.x, 12.x, 14.x, 16.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install module + run: npm install + - name: Run tests + run: npm test diff --git a/src/hello/server/node_modules/busboy/.github/workflows/lint.yml b/src/hello/server/node_modules/busboy/.github/workflows/lint.yml new file mode 100644 index 00000000..9f9e1f58 --- /dev/null +++ b/src/hello/server/node_modules/busboy/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: lint + +on: + pull_request: + push: + branches: [ master ] + +env: + NODE_VERSION: 16.x + +jobs: + lint-js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v1 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Install ESLint + ESLint configs/plugins + run: npm install --only=dev + - name: Lint files + run: npm run lint diff --git a/src/hello/server/node_modules/busboy/LICENSE b/src/hello/server/node_modules/busboy/LICENSE new file mode 100644 index 00000000..290762e9 --- /dev/null +++ b/src/hello/server/node_modules/busboy/LICENSE @@ -0,0 +1,19 @@ +Copyright Brian White. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. \ No newline at end of file diff --git a/src/hello/server/node_modules/busboy/README.md b/src/hello/server/node_modules/busboy/README.md new file mode 100644 index 00000000..654af304 --- /dev/null +++ b/src/hello/server/node_modules/busboy/README.md @@ -0,0 +1,191 @@ +# Description + +A node.js module for parsing incoming HTML form data. + +Changes (breaking or otherwise) in v1.0.0 can be found [here](https://github.com/mscdex/busboy/issues/266). + +# Requirements + +* [node.js](http://nodejs.org/) -- v10.16.0 or newer + + +# Install + + npm install busboy + + +# Examples + +* Parsing (multipart) with default options: + +```js +const http = require('http'); + +const busboy = require('busboy'); + +http.createServer((req, res) => { + if (req.method === 'POST') { + console.log('POST request'); + const bb = busboy({ headers: req.headers }); + bb.on('file', (name, file, info) => { + const { filename, encoding, mimeType } = info; + console.log( + `File [${name}]: filename: %j, encoding: %j, mimeType: %j`, + filename, + encoding, + mimeType + ); + file.on('data', (data) => { + console.log(`File [${name}] got ${data.length} bytes`); + }).on('close', () => { + console.log(`File [${name}] done`); + }); + }); + bb.on('field', (name, val, info) => { + console.log(`Field [${name}]: value: %j`, val); + }); + bb.on('close', () => { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(bb); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end(` + + + +
+
+
+ +
+ + + `); + } +}).listen(8000, () => { + console.log('Listening for requests'); +}); + +// Example output: +// +// Listening for requests +// < ... form submitted ... > +// POST request +// File [filefield]: filename: "logo.jpg", encoding: "binary", mime: "image/jpeg" +// File [filefield] got 11912 bytes +// Field [textfield]: value: "testing! :-)" +// File [filefield] done +// Done parsing form! +``` + +* Save all incoming files to disk: + +```js +const { randomFillSync } = require('crypto'); +const fs = require('fs'); +const http = require('http'); +const os = require('os'); +const path = require('path'); + +const busboy = require('busboy'); + +const random = (() => { + const buf = Buffer.alloc(16); + return () => randomFillSync(buf).toString('hex'); +})(); + +http.createServer((req, res) => { + if (req.method === 'POST') { + const bb = busboy({ headers: req.headers }); + bb.on('file', (name, file, info) => { + const saveTo = path.join(os.tmpdir(), `busboy-upload-${random()}`); + file.pipe(fs.createWriteStream(saveTo)); + }); + bb.on('close', () => { + res.writeHead(200, { 'Connection': 'close' }); + res.end(`That's all folks!`); + }); + req.pipe(bb); + return; + } + res.writeHead(404); + res.end(); +}).listen(8000, () => { + console.log('Listening for requests'); +}); +``` + + +# API + +## Exports + +`busboy` exports a single function: + +**( _function_ )**(< _object_ >config) - Creates and returns a new _Writable_ form parser stream. + +* Valid `config` properties: + + * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers. + + * **highWaterMark** - _integer_ - highWaterMark to use for the parser stream. **Default:** node's _stream.Writable_ default. + + * **fileHwm** - _integer_ - highWaterMark to use for individual file streams. **Default:** node's _stream.Readable_ default. + + * **defCharset** - _string_ - Default character set to use when one isn't defined. **Default:** `'utf8'`. + + * **defParamCharset** - _string_ - For multipart forms, the default character set to use for values of part header parameters (e.g. filename) that are not extended parameters (that contain an explicit charset). **Default:** `'latin1'`. + + * **preservePath** - _boolean_ - If paths in filenames from file parts in a `'multipart/form-data'` request shall be preserved. **Default:** `false`. + + * **limits** - _object_ - Various limits on incoming data. Valid properties are: + + * **fieldNameSize** - _integer_ - Max field name size (in bytes). **Default:** `100`. + + * **fieldSize** - _integer_ - Max field value size (in bytes). **Default:** `1048576` (1MB). + + * **fields** - _integer_ - Max number of non-file fields. **Default:** `Infinity`. + + * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes). **Default:** `Infinity`. + + * **files** - _integer_ - For multipart forms, the max number of file fields. **Default:** `Infinity`. + + * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files). **Default:** `Infinity`. + + * **headerPairs** - _integer_ - For multipart forms, the max number of header key-value pairs to parse. **Default:** `2000` (same as node's http module). + +This function can throw exceptions if there is something wrong with the values in `config`. For example, if the Content-Type in `headers` is missing entirely, is not a supported type, or is missing the boundary for `'multipart/form-data'` requests. + +## (Special) Parser stream events + +* **file**(< _string_ >name, < _Readable_ >stream, < _object_ >info) - Emitted for each new file found. `name` contains the form field name. `stream` is a _Readable_ stream containing the file's data. No transformations/conversions (e.g. base64 to raw binary) are done on the file's data. `info` contains the following properties: + + * `filename` - _string_ - If supplied, this contains the file's filename. **WARNING:** You should almost _never_ use this value as-is (especially if you are using `preservePath: true` in your `config`) as it could contain malicious input. You are better off generating your own (safe) filenames, or at the very least using a hash of the filename. + + * `encoding` - _string_ - The file's `'Content-Transfer-Encoding'` value. + + * `mimeType` - _string_ - The file's `'Content-Type'` value. + + **Note:** If you listen for this event, you should always consume the `stream` whether you care about its contents or not (you can simply do `stream.resume();` if you want to discard/skip the contents), otherwise the `'finish'`/`'close'` event will never fire on the busboy parser stream. + However, if you aren't accepting files, you can either simply not listen for the `'file'` event at all or set `limits.files` to `0`, and any/all files will be automatically skipped (these skipped files will still count towards any configured `limits.files` and `limits.parts` limits though). + + **Note:** If a configured `limits.fileSize` limit was reached for a file, `stream` will both have a boolean property `truncated` set to `true` (best checked at the end of the stream) and emit a `'limit'` event to notify you when this happens. + +* **field**(< _string_ >name, < _string_ >value, < _object_ >info) - Emitted for each new non-file field found. `name` contains the form field name. `value` contains the string value of the field. `info` contains the following properties: + + * `nameTruncated` - _boolean_ - Whether `name` was truncated or not (due to a configured `limits.fieldNameSize` limit) + + * `valueTruncated` - _boolean_ - Whether `value` was truncated or not (due to a configured `limits.fieldSize` limit) + + * `encoding` - _string_ - The field's `'Content-Transfer-Encoding'` value. + + * `mimeType` - _string_ - The field's `'Content-Type'` value. + +* **partsLimit**() - Emitted when the configured `limits.parts` limit has been reached. No more `'file'` or `'field'` events will be emitted. + +* **filesLimit**() - Emitted when the configured `limits.files` limit has been reached. No more `'file'` events will be emitted. + +* **fieldsLimit**() - Emitted when the configured `limits.fields` limit has been reached. No more `'field'` events will be emitted. diff --git a/src/hello/server/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js b/src/hello/server/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js new file mode 100644 index 00000000..ef15729e --- /dev/null +++ b/src/hello/server/node_modules/busboy/bench/bench-multipart-fields-100mb-big.js @@ -0,0 +1,149 @@ +'use strict'; + +function createMultipartBuffers(boundary, sizes) { + const bufs = []; + for (let i = 0; i < sizes.length; ++i) { + const mb = sizes[i] * 1024 * 1024; + bufs.push(Buffer.from([ + `--${boundary}`, + `content-disposition: form-data; name="field${i + 1}"`, + '', + '0'.repeat(mb), + '', + ].join('\r\n'))); + } + bufs.push(Buffer.from([ + `--${boundary}--`, + '', + ].join('\r\n'))); + return bufs; +} + +const boundary = '-----------------------------168072824752491622650073'; +const buffers = createMultipartBuffers(boundary, [ + 10, + 10, + 10, + 20, + 50, +]); +const calls = { + partBegin: 0, + headerField: 0, + headerValue: 0, + headerEnd: 0, + headersEnd: 0, + partData: 0, + partEnd: 0, + end: 0, +}; + +const moduleName = process.argv[2]; +switch (moduleName) { + case 'busboy': { + const busboy = require('busboy'); + + const parser = busboy({ + limits: { + fieldSizeLimit: Infinity, + }, + headers: { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }, + }); + parser.on('field', (name, val, info) => { + ++calls.partBegin; + ++calls.partData; + ++calls.partEnd; + }).on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + break; + } + + case 'formidable': { + const { MultipartParser } = require('formidable'); + + const parser = new MultipartParser(); + parser.initWithBoundary(boundary); + parser.on('data', ({ name }) => { + ++calls[name]; + if (name === 'end') + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + + break; + } + + case 'multiparty': { + const { Readable } = require('stream'); + + const { Form } = require('multiparty'); + + const form = new Form({ + maxFieldsSize: Infinity, + maxFields: Infinity, + maxFilesSize: Infinity, + autoFields: false, + autoFiles: false, + }); + + const req = new Readable({ read: () => {} }); + req.headers = { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }; + + function hijack(name, fn) { + const oldFn = form[name]; + form[name] = function() { + fn(); + return oldFn.apply(this, arguments); + }; + } + + hijack('onParseHeaderField', () => { + ++calls.headerField; + }); + hijack('onParseHeaderValue', () => { + ++calls.headerValue; + }); + hijack('onParsePartBegin', () => { + ++calls.partBegin; + }); + hijack('onParsePartData', () => { + ++calls.partData; + }); + hijack('onParsePartEnd', () => { + ++calls.partEnd; + }); + + form.on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }).on('part', (p) => p.resume()); + + console.time(moduleName); + form.parse(req); + for (const buf of buffers) + req.push(buf); + req.push(null); + + break; + } + + default: + if (moduleName === undefined) + console.error('Missing parser module name'); + else + console.error(`Invalid parser module name: ${moduleName}`); + process.exit(1); +} diff --git a/src/hello/server/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js b/src/hello/server/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js new file mode 100644 index 00000000..f32d421c --- /dev/null +++ b/src/hello/server/node_modules/busboy/bench/bench-multipart-fields-100mb-small.js @@ -0,0 +1,143 @@ +'use strict'; + +function createMultipartBuffers(boundary, sizes) { + const bufs = []; + for (let i = 0; i < sizes.length; ++i) { + const mb = sizes[i] * 1024 * 1024; + bufs.push(Buffer.from([ + `--${boundary}`, + `content-disposition: form-data; name="field${i + 1}"`, + '', + '0'.repeat(mb), + '', + ].join('\r\n'))); + } + bufs.push(Buffer.from([ + `--${boundary}--`, + '', + ].join('\r\n'))); + return bufs; +} + +const boundary = '-----------------------------168072824752491622650073'; +const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1)); +const calls = { + partBegin: 0, + headerField: 0, + headerValue: 0, + headerEnd: 0, + headersEnd: 0, + partData: 0, + partEnd: 0, + end: 0, +}; + +const moduleName = process.argv[2]; +switch (moduleName) { + case 'busboy': { + const busboy = require('busboy'); + + const parser = busboy({ + limits: { + fieldSizeLimit: Infinity, + }, + headers: { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }, + }); + parser.on('field', (name, val, info) => { + ++calls.partBegin; + ++calls.partData; + ++calls.partEnd; + }).on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + break; + } + + case 'formidable': { + const { MultipartParser } = require('formidable'); + + const parser = new MultipartParser(); + parser.initWithBoundary(boundary); + parser.on('data', ({ name }) => { + ++calls[name]; + if (name === 'end') + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + + break; + } + + case 'multiparty': { + const { Readable } = require('stream'); + + const { Form } = require('multiparty'); + + const form = new Form({ + maxFieldsSize: Infinity, + maxFields: Infinity, + maxFilesSize: Infinity, + autoFields: false, + autoFiles: false, + }); + + const req = new Readable({ read: () => {} }); + req.headers = { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }; + + function hijack(name, fn) { + const oldFn = form[name]; + form[name] = function() { + fn(); + return oldFn.apply(this, arguments); + }; + } + + hijack('onParseHeaderField', () => { + ++calls.headerField; + }); + hijack('onParseHeaderValue', () => { + ++calls.headerValue; + }); + hijack('onParsePartBegin', () => { + ++calls.partBegin; + }); + hijack('onParsePartData', () => { + ++calls.partData; + }); + hijack('onParsePartEnd', () => { + ++calls.partEnd; + }); + + form.on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }).on('part', (p) => p.resume()); + + console.time(moduleName); + form.parse(req); + for (const buf of buffers) + req.push(buf); + req.push(null); + + break; + } + + default: + if (moduleName === undefined) + console.error('Missing parser module name'); + else + console.error(`Invalid parser module name: ${moduleName}`); + process.exit(1); +} diff --git a/src/hello/server/node_modules/busboy/bench/bench-multipart-files-100mb-big.js b/src/hello/server/node_modules/busboy/bench/bench-multipart-files-100mb-big.js new file mode 100644 index 00000000..b46bdee0 --- /dev/null +++ b/src/hello/server/node_modules/busboy/bench/bench-multipart-files-100mb-big.js @@ -0,0 +1,154 @@ +'use strict'; + +function createMultipartBuffers(boundary, sizes) { + const bufs = []; + for (let i = 0; i < sizes.length; ++i) { + const mb = sizes[i] * 1024 * 1024; + bufs.push(Buffer.from([ + `--${boundary}`, + `content-disposition: form-data; name="file${i + 1}"; ` + + `filename="random${i + 1}.bin"`, + 'content-type: application/octet-stream', + '', + '0'.repeat(mb), + '', + ].join('\r\n'))); + } + bufs.push(Buffer.from([ + `--${boundary}--`, + '', + ].join('\r\n'))); + return bufs; +} + +const boundary = '-----------------------------168072824752491622650073'; +const buffers = createMultipartBuffers(boundary, [ + 10, + 10, + 10, + 20, + 50, +]); +const calls = { + partBegin: 0, + headerField: 0, + headerValue: 0, + headerEnd: 0, + headersEnd: 0, + partData: 0, + partEnd: 0, + end: 0, +}; + +const moduleName = process.argv[2]; +switch (moduleName) { + case 'busboy': { + const busboy = require('busboy'); + + const parser = busboy({ + limits: { + fieldSizeLimit: Infinity, + }, + headers: { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }, + }); + parser.on('file', (name, stream, info) => { + ++calls.partBegin; + stream.on('data', (chunk) => { + ++calls.partData; + }).on('end', () => { + ++calls.partEnd; + }); + }).on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + break; + } + + case 'formidable': { + const { MultipartParser } = require('formidable'); + + const parser = new MultipartParser(); + parser.initWithBoundary(boundary); + parser.on('data', ({ name }) => { + ++calls[name]; + if (name === 'end') + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + + break; + } + + case 'multiparty': { + const { Readable } = require('stream'); + + const { Form } = require('multiparty'); + + const form = new Form({ + maxFieldsSize: Infinity, + maxFields: Infinity, + maxFilesSize: Infinity, + autoFields: false, + autoFiles: false, + }); + + const req = new Readable({ read: () => {} }); + req.headers = { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }; + + function hijack(name, fn) { + const oldFn = form[name]; + form[name] = function() { + fn(); + return oldFn.apply(this, arguments); + }; + } + + hijack('onParseHeaderField', () => { + ++calls.headerField; + }); + hijack('onParseHeaderValue', () => { + ++calls.headerValue; + }); + hijack('onParsePartBegin', () => { + ++calls.partBegin; + }); + hijack('onParsePartData', () => { + ++calls.partData; + }); + hijack('onParsePartEnd', () => { + ++calls.partEnd; + }); + + form.on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }).on('part', (p) => p.resume()); + + console.time(moduleName); + form.parse(req); + for (const buf of buffers) + req.push(buf); + req.push(null); + + break; + } + + default: + if (moduleName === undefined) + console.error('Missing parser module name'); + else + console.error(`Invalid parser module name: ${moduleName}`); + process.exit(1); +} diff --git a/src/hello/server/node_modules/busboy/bench/bench-multipart-files-100mb-small.js b/src/hello/server/node_modules/busboy/bench/bench-multipart-files-100mb-small.js new file mode 100644 index 00000000..46b5dffb --- /dev/null +++ b/src/hello/server/node_modules/busboy/bench/bench-multipart-files-100mb-small.js @@ -0,0 +1,148 @@ +'use strict'; + +function createMultipartBuffers(boundary, sizes) { + const bufs = []; + for (let i = 0; i < sizes.length; ++i) { + const mb = sizes[i] * 1024 * 1024; + bufs.push(Buffer.from([ + `--${boundary}`, + `content-disposition: form-data; name="file${i + 1}"; ` + + `filename="random${i + 1}.bin"`, + 'content-type: application/octet-stream', + '', + '0'.repeat(mb), + '', + ].join('\r\n'))); + } + bufs.push(Buffer.from([ + `--${boundary}--`, + '', + ].join('\r\n'))); + return bufs; +} + +const boundary = '-----------------------------168072824752491622650073'; +const buffers = createMultipartBuffers(boundary, (new Array(100)).fill(1)); +const calls = { + partBegin: 0, + headerField: 0, + headerValue: 0, + headerEnd: 0, + headersEnd: 0, + partData: 0, + partEnd: 0, + end: 0, +}; + +const moduleName = process.argv[2]; +switch (moduleName) { + case 'busboy': { + const busboy = require('busboy'); + + const parser = busboy({ + limits: { + fieldSizeLimit: Infinity, + }, + headers: { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }, + }); + parser.on('file', (name, stream, info) => { + ++calls.partBegin; + stream.on('data', (chunk) => { + ++calls.partData; + }).on('end', () => { + ++calls.partEnd; + }); + }).on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + break; + } + + case 'formidable': { + const { MultipartParser } = require('formidable'); + + const parser = new MultipartParser(); + parser.initWithBoundary(boundary); + parser.on('data', ({ name }) => { + ++calls[name]; + if (name === 'end') + console.timeEnd(moduleName); + }); + + console.time(moduleName); + for (const buf of buffers) + parser.write(buf); + + break; + } + + case 'multiparty': { + const { Readable } = require('stream'); + + const { Form } = require('multiparty'); + + const form = new Form({ + maxFieldsSize: Infinity, + maxFields: Infinity, + maxFilesSize: Infinity, + autoFields: false, + autoFiles: false, + }); + + const req = new Readable({ read: () => {} }); + req.headers = { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }; + + function hijack(name, fn) { + const oldFn = form[name]; + form[name] = function() { + fn(); + return oldFn.apply(this, arguments); + }; + } + + hijack('onParseHeaderField', () => { + ++calls.headerField; + }); + hijack('onParseHeaderValue', () => { + ++calls.headerValue; + }); + hijack('onParsePartBegin', () => { + ++calls.partBegin; + }); + hijack('onParsePartData', () => { + ++calls.partData; + }); + hijack('onParsePartEnd', () => { + ++calls.partEnd; + }); + + form.on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }).on('part', (p) => p.resume()); + + console.time(moduleName); + form.parse(req); + for (const buf of buffers) + req.push(buf); + req.push(null); + + break; + } + + default: + if (moduleName === undefined) + console.error('Missing parser module name'); + else + console.error(`Invalid parser module name: ${moduleName}`); + process.exit(1); +} diff --git a/src/hello/server/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js b/src/hello/server/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js new file mode 100644 index 00000000..5c337df2 --- /dev/null +++ b/src/hello/server/node_modules/busboy/bench/bench-urlencoded-fields-100pairs-small.js @@ -0,0 +1,101 @@ +'use strict'; + +const buffers = [ + Buffer.from( + (new Array(100)).fill('').map((_, i) => `key${i}=value${i}`).join('&') + ), +]; +const calls = { + field: 0, + end: 0, +}; + +let n = 3e3; + +const moduleName = process.argv[2]; +switch (moduleName) { + case 'busboy': { + const busboy = require('busboy'); + + console.time(moduleName); + (function next() { + const parser = busboy({ + limits: { + fieldSizeLimit: Infinity, + }, + headers: { + 'content-type': 'application/x-www-form-urlencoded; charset=utf-8', + }, + }); + parser.on('field', (name, val, info) => { + ++calls.field; + }).on('close', () => { + ++calls.end; + if (--n === 0) + console.timeEnd(moduleName); + else + process.nextTick(next); + }); + + for (const buf of buffers) + parser.write(buf); + parser.end(); + })(); + break; + } + + case 'formidable': { + const QuerystringParser = + require('formidable/src/parsers/Querystring.js'); + + console.time(moduleName); + (function next() { + const parser = new QuerystringParser(); + parser.on('data', (obj) => { + ++calls.field; + }).on('end', () => { + ++calls.end; + if (--n === 0) + console.timeEnd(moduleName); + else + process.nextTick(next); + }); + + for (const buf of buffers) + parser.write(buf); + parser.end(); + })(); + break; + } + + case 'formidable-streaming': { + const QuerystringParser = + require('formidable/src/parsers/StreamingQuerystring.js'); + + console.time(moduleName); + (function next() { + const parser = new QuerystringParser(); + parser.on('data', (obj) => { + ++calls.field; + }).on('end', () => { + ++calls.end; + if (--n === 0) + console.timeEnd(moduleName); + else + process.nextTick(next); + }); + + for (const buf of buffers) + parser.write(buf); + parser.end(); + })(); + break; + } + + default: + if (moduleName === undefined) + console.error('Missing parser module name'); + else + console.error(`Invalid parser module name: ${moduleName}`); + process.exit(1); +} diff --git a/src/hello/server/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js b/src/hello/server/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js new file mode 100644 index 00000000..1f5645cb --- /dev/null +++ b/src/hello/server/node_modules/busboy/bench/bench-urlencoded-fields-900pairs-small-alt.js @@ -0,0 +1,84 @@ +'use strict'; + +const buffers = [ + Buffer.from( + (new Array(900)).fill('').map((_, i) => `key${i}=value${i}`).join('&') + ), +]; +const calls = { + field: 0, + end: 0, +}; + +const moduleName = process.argv[2]; +switch (moduleName) { + case 'busboy': { + const busboy = require('busboy'); + + console.time(moduleName); + const parser = busboy({ + limits: { + fieldSizeLimit: Infinity, + }, + headers: { + 'content-type': 'application/x-www-form-urlencoded; charset=utf-8', + }, + }); + parser.on('field', (name, val, info) => { + ++calls.field; + }).on('close', () => { + ++calls.end; + console.timeEnd(moduleName); + }); + + for (const buf of buffers) + parser.write(buf); + parser.end(); + break; + } + + case 'formidable': { + const QuerystringParser = + require('formidable/src/parsers/Querystring.js'); + + console.time(moduleName); + const parser = new QuerystringParser(); + parser.on('data', (obj) => { + ++calls.field; + }).on('end', () => { + ++calls.end; + console.timeEnd(moduleName); + }); + + for (const buf of buffers) + parser.write(buf); + parser.end(); + break; + } + + case 'formidable-streaming': { + const QuerystringParser = + require('formidable/src/parsers/StreamingQuerystring.js'); + + console.time(moduleName); + const parser = new QuerystringParser(); + parser.on('data', (obj) => { + ++calls.field; + }).on('end', () => { + ++calls.end; + console.timeEnd(moduleName); + }); + + for (const buf of buffers) + parser.write(buf); + parser.end(); + break; + } + + default: + if (moduleName === undefined) + console.error('Missing parser module name'); + else + console.error(`Invalid parser module name: ${moduleName}`); + process.exit(1); +} diff --git a/src/hello/server/node_modules/busboy/lib/index.js b/src/hello/server/node_modules/busboy/lib/index.js new file mode 100644 index 00000000..873272d9 --- /dev/null +++ b/src/hello/server/node_modules/busboy/lib/index.js @@ -0,0 +1,57 @@ +'use strict'; + +const { parseContentType } = require('./utils.js'); + +function getInstance(cfg) { + const headers = cfg.headers; + const conType = parseContentType(headers['content-type']); + if (!conType) + throw new Error('Malformed content type'); + + for (const type of TYPES) { + const matched = type.detect(conType); + if (!matched) + continue; + + const instanceCfg = { + limits: cfg.limits, + headers, + conType, + highWaterMark: undefined, + fileHwm: undefined, + defCharset: undefined, + defParamCharset: undefined, + preservePath: false, + }; + if (cfg.highWaterMark) + instanceCfg.highWaterMark = cfg.highWaterMark; + if (cfg.fileHwm) + instanceCfg.fileHwm = cfg.fileHwm; + instanceCfg.defCharset = cfg.defCharset; + instanceCfg.defParamCharset = cfg.defParamCharset; + instanceCfg.preservePath = cfg.preservePath; + return new type(instanceCfg); + } + + throw new Error(`Unsupported content type: ${headers['content-type']}`); +} + +// Note: types are explicitly listed here for easier bundling +// See: https://github.com/mscdex/busboy/issues/121 +const TYPES = [ + require('./types/multipart'), + require('./types/urlencoded'), +].filter(function(typemod) { return typeof typemod.detect === 'function'; }); + +module.exports = (cfg) => { + if (typeof cfg !== 'object' || cfg === null) + cfg = {}; + + if (typeof cfg.headers !== 'object' + || cfg.headers === null + || typeof cfg.headers['content-type'] !== 'string') { + throw new Error('Missing Content-Type'); + } + + return getInstance(cfg); +}; diff --git a/src/hello/server/node_modules/busboy/lib/types/multipart.js b/src/hello/server/node_modules/busboy/lib/types/multipart.js new file mode 100644 index 00000000..cc0d7bb6 --- /dev/null +++ b/src/hello/server/node_modules/busboy/lib/types/multipart.js @@ -0,0 +1,653 @@ +'use strict'; + +const { Readable, Writable } = require('stream'); + +const StreamSearch = require('streamsearch'); + +const { + basename, + convertToUTF8, + getDecoder, + parseContentType, + parseDisposition, +} = require('../utils.js'); + +const BUF_CRLF = Buffer.from('\r\n'); +const BUF_CR = Buffer.from('\r'); +const BUF_DASH = Buffer.from('-'); + +function noop() {} + +const MAX_HEADER_PAIRS = 2000; // From node +const MAX_HEADER_SIZE = 16 * 1024; // From node (its default value) + +const HPARSER_NAME = 0; +const HPARSER_PRE_OWS = 1; +const HPARSER_VALUE = 2; +class HeaderParser { + constructor(cb) { + this.header = Object.create(null); + this.pairCount = 0; + this.byteCount = 0; + this.state = HPARSER_NAME; + this.name = ''; + this.value = ''; + this.crlf = 0; + this.cb = cb; + } + + reset() { + this.header = Object.create(null); + this.pairCount = 0; + this.byteCount = 0; + this.state = HPARSER_NAME; + this.name = ''; + this.value = ''; + this.crlf = 0; + } + + push(chunk, pos, end) { + let start = pos; + while (pos < end) { + switch (this.state) { + case HPARSER_NAME: { + let done = false; + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (TOKEN[code] !== 1) { + if (code !== 58/* ':' */) + return -1; + this.name += chunk.latin1Slice(start, pos); + if (this.name.length === 0) + return -1; + ++pos; + done = true; + this.state = HPARSER_PRE_OWS; + break; + } + } + if (!done) { + this.name += chunk.latin1Slice(start, pos); + break; + } + // FALLTHROUGH + } + case HPARSER_PRE_OWS: { + // Skip optional whitespace + let done = false; + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) { + start = pos; + done = true; + this.state = HPARSER_VALUE; + break; + } + } + if (!done) + break; + // FALLTHROUGH + } + case HPARSER_VALUE: + switch (this.crlf) { + case 0: // Nothing yet + for (; pos < end; ++pos) { + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (FIELD_VCHAR[code] !== 1) { + if (code !== 13/* '\r' */) + return -1; + ++this.crlf; + break; + } + } + this.value += chunk.latin1Slice(start, pos++); + break; + case 1: // Received CR + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + if (chunk[pos++] !== 10/* '\n' */) + return -1; + ++this.crlf; + break; + case 2: { // Received CR LF + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + const code = chunk[pos]; + if (code === 32/* ' ' */ || code === 9/* '\t' */) { + // Folded value + start = pos; + this.crlf = 0; + } else { + if (++this.pairCount < MAX_HEADER_PAIRS) { + this.name = this.name.toLowerCase(); + if (this.header[this.name] === undefined) + this.header[this.name] = [this.value]; + else + this.header[this.name].push(this.value); + } + if (code === 13/* '\r' */) { + ++this.crlf; + ++pos; + } else { + // Assume start of next header field name + start = pos; + this.crlf = 0; + this.state = HPARSER_NAME; + this.name = ''; + this.value = ''; + } + } + break; + } + case 3: { // Received CR LF CR + if (this.byteCount === MAX_HEADER_SIZE) + return -1; + ++this.byteCount; + if (chunk[pos++] !== 10/* '\n' */) + return -1; + // End of header + const header = this.header; + this.reset(); + this.cb(header); + return pos; + } + } + break; + } + } + + return pos; + } +} + +class FileStream extends Readable { + constructor(opts, owner) { + super(opts); + this.truncated = false; + this._readcb = null; + this.once('end', () => { + // We need to make sure that we call any outstanding _writecb() that is + // associated with this file so that processing of the rest of the form + // can continue. This may not happen if the file stream ends right after + // backpressure kicks in, so we force it here. + this._read(); + if (--owner._fileEndsLeft === 0 && owner._finalcb) { + const cb = owner._finalcb; + owner._finalcb = null; + // Make sure other 'end' event handlers get a chance to be executed + // before busboy's 'finish' event is emitted + process.nextTick(cb); + } + }); + } + _read(n) { + const cb = this._readcb; + if (cb) { + this._readcb = null; + cb(); + } + } +} + +const ignoreData = { + push: (chunk, pos) => {}, + destroy: () => {}, +}; + +function callAndUnsetCb(self, err) { + const cb = self._writecb; + self._writecb = null; + if (err) + self.destroy(err); + else if (cb) + cb(); +} + +function nullDecoder(val, hint) { + return val; +} + +class Multipart extends Writable { + constructor(cfg) { + const streamOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: (typeof cfg.highWaterMark === 'number' + ? cfg.highWaterMark + : undefined), + }; + super(streamOpts); + + if (!cfg.conType.params || typeof cfg.conType.params.boundary !== 'string') + throw new Error('Multipart: Boundary not found'); + + const boundary = cfg.conType.params.boundary; + const paramDecoder = (typeof cfg.defParamCharset === 'string' + && cfg.defParamCharset + ? getDecoder(cfg.defParamCharset) + : nullDecoder); + const defCharset = (cfg.defCharset || 'utf8'); + const preservePath = cfg.preservePath; + const fileOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: (typeof cfg.fileHwm === 'number' + ? cfg.fileHwm + : undefined), + }; + + const limits = cfg.limits; + const fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' + ? limits.fieldSize + : 1 * 1024 * 1024); + const fileSizeLimit = (limits && typeof limits.fileSize === 'number' + ? limits.fileSize + : Infinity); + const filesLimit = (limits && typeof limits.files === 'number' + ? limits.files + : Infinity); + const fieldsLimit = (limits && typeof limits.fields === 'number' + ? limits.fields + : Infinity); + const partsLimit = (limits && typeof limits.parts === 'number' + ? limits.parts + : Infinity); + + let parts = -1; // Account for initial boundary + let fields = 0; + let files = 0; + let skipPart = false; + + this._fileEndsLeft = 0; + this._fileStream = undefined; + this._complete = false; + let fileSize = 0; + + let field; + let fieldSize = 0; + let partCharset; + let partEncoding; + let partType; + let partName; + let partTruncated = false; + + let hitFilesLimit = false; + let hitFieldsLimit = false; + + this._hparser = null; + const hparser = new HeaderParser((header) => { + this._hparser = null; + skipPart = false; + + partType = 'text/plain'; + partCharset = defCharset; + partEncoding = '7bit'; + partName = undefined; + partTruncated = false; + + let filename; + if (!header['content-disposition']) { + skipPart = true; + return; + } + + const disp = parseDisposition(header['content-disposition'][0], + paramDecoder); + if (!disp || disp.type !== 'form-data') { + skipPart = true; + return; + } + + if (disp.params) { + if (disp.params.name) + partName = disp.params.name; + + if (disp.params['filename*']) + filename = disp.params['filename*']; + else if (disp.params.filename) + filename = disp.params.filename; + + if (filename !== undefined && !preservePath) + filename = basename(filename); + } + + if (header['content-type']) { + const conType = parseContentType(header['content-type'][0]); + if (conType) { + partType = `${conType.type}/${conType.subtype}`; + if (conType.params && typeof conType.params.charset === 'string') + partCharset = conType.params.charset.toLowerCase(); + } + } + + if (header['content-transfer-encoding']) + partEncoding = header['content-transfer-encoding'][0].toLowerCase(); + + if (partType === 'application/octet-stream' || filename !== undefined) { + // File + + if (files === filesLimit) { + if (!hitFilesLimit) { + hitFilesLimit = true; + this.emit('filesLimit'); + } + skipPart = true; + return; + } + ++files; + + if (this.listenerCount('file') === 0) { + skipPart = true; + return; + } + + fileSize = 0; + this._fileStream = new FileStream(fileOpts, this); + ++this._fileEndsLeft; + this.emit( + 'file', + partName, + this._fileStream, + { filename, + encoding: partEncoding, + mimeType: partType } + ); + } else { + // Non-file + + if (fields === fieldsLimit) { + if (!hitFieldsLimit) { + hitFieldsLimit = true; + this.emit('fieldsLimit'); + } + skipPart = true; + return; + } + ++fields; + + if (this.listenerCount('field') === 0) { + skipPart = true; + return; + } + + field = []; + fieldSize = 0; + } + }); + + let matchPostBoundary = 0; + const ssCb = (isMatch, data, start, end, isDataSafe) => { +retrydata: + while (data) { + if (this._hparser !== null) { + const ret = this._hparser.push(data, start, end); + if (ret === -1) { + this._hparser = null; + hparser.reset(); + this.emit('error', new Error('Malformed part header')); + break; + } + start = ret; + } + + if (start === end) + break; + + if (matchPostBoundary !== 0) { + if (matchPostBoundary === 1) { + switch (data[start]) { + case 45: // '-' + // Try matching '--' after boundary + matchPostBoundary = 2; + ++start; + break; + case 13: // '\r' + // Try matching CR LF before header + matchPostBoundary = 3; + ++start; + break; + default: + matchPostBoundary = 0; + } + if (start === end) + return; + } + + if (matchPostBoundary === 2) { + matchPostBoundary = 0; + if (data[start] === 45/* '-' */) { + // End of multipart data + this._complete = true; + this._bparser = ignoreData; + return; + } + // We saw something other than '-', so put the dash we consumed + // "back" + const writecb = this._writecb; + this._writecb = noop; + ssCb(false, BUF_DASH, 0, 1, false); + this._writecb = writecb; + } else if (matchPostBoundary === 3) { + matchPostBoundary = 0; + if (data[start] === 10/* '\n' */) { + ++start; + if (parts >= partsLimit) + break; + // Prepare the header parser + this._hparser = hparser; + if (start === end) + break; + // Process the remaining data as a header + continue retrydata; + } else { + // We saw something other than LF, so put the CR we consumed + // "back" + const writecb = this._writecb; + this._writecb = noop; + ssCb(false, BUF_CR, 0, 1, false); + this._writecb = writecb; + } + } + } + + if (!skipPart) { + if (this._fileStream) { + let chunk; + const actualLen = Math.min(end - start, fileSizeLimit - fileSize); + if (!isDataSafe) { + chunk = Buffer.allocUnsafe(actualLen); + data.copy(chunk, 0, start, start + actualLen); + } else { + chunk = data.slice(start, start + actualLen); + } + + fileSize += chunk.length; + if (fileSize === fileSizeLimit) { + if (chunk.length > 0) + this._fileStream.push(chunk); + this._fileStream.emit('limit'); + this._fileStream.truncated = true; + skipPart = true; + } else if (!this._fileStream.push(chunk)) { + if (this._writecb) + this._fileStream._readcb = this._writecb; + this._writecb = null; + } + } else if (field !== undefined) { + let chunk; + const actualLen = Math.min( + end - start, + fieldSizeLimit - fieldSize + ); + if (!isDataSafe) { + chunk = Buffer.allocUnsafe(actualLen); + data.copy(chunk, 0, start, start + actualLen); + } else { + chunk = data.slice(start, start + actualLen); + } + + fieldSize += actualLen; + field.push(chunk); + if (fieldSize === fieldSizeLimit) { + skipPart = true; + partTruncated = true; + } + } + } + + break; + } + + if (isMatch) { + matchPostBoundary = 1; + + if (this._fileStream) { + // End the active file stream if the previous part was a file + this._fileStream.push(null); + this._fileStream = null; + } else if (field !== undefined) { + let data; + switch (field.length) { + case 0: + data = ''; + break; + case 1: + data = convertToUTF8(field[0], partCharset, 0); + break; + default: + data = convertToUTF8( + Buffer.concat(field, fieldSize), + partCharset, + 0 + ); + } + field = undefined; + fieldSize = 0; + this.emit( + 'field', + partName, + data, + { nameTruncated: false, + valueTruncated: partTruncated, + encoding: partEncoding, + mimeType: partType } + ); + } + + if (++parts === partsLimit) + this.emit('partsLimit'); + } + }; + this._bparser = new StreamSearch(`\r\n--${boundary}`, ssCb); + + this._writecb = null; + this._finalcb = null; + + // Just in case there is no preamble + this.write(BUF_CRLF); + } + + static detect(conType) { + return (conType.type === 'multipart' && conType.subtype === 'form-data'); + } + + _write(chunk, enc, cb) { + this._writecb = cb; + this._bparser.push(chunk, 0); + if (this._writecb) + callAndUnsetCb(this); + } + + _destroy(err, cb) { + this._hparser = null; + this._bparser = ignoreData; + if (!err) + err = checkEndState(this); + const fileStream = this._fileStream; + if (fileStream) { + this._fileStream = null; + fileStream.destroy(err); + } + cb(err); + } + + _final(cb) { + this._bparser.destroy(); + if (!this._complete) + return cb(new Error('Unexpected end of form')); + if (this._fileEndsLeft) + this._finalcb = finalcb.bind(null, this, cb); + else + finalcb(this, cb); + } +} + +function finalcb(self, cb, err) { + if (err) + return cb(err); + err = checkEndState(self); + cb(err); +} + +function checkEndState(self) { + if (self._hparser) + return new Error('Malformed part header'); + const fileStream = self._fileStream; + if (fileStream) { + self._fileStream = null; + fileStream.destroy(new Error('Unexpected end of file'));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 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +]; + +module.exports = Multipart; diff --git a/src/hello/server/node_modules/busboy/lib/types/urlencoded.js b/src/hello/server/node_modules/busboy/lib/types/urlencoded.js new file mode 100644 index 00000000..5c463a25 --- /dev/null +++ b/src/hello/server/node_modules/busboy/lib/types/urlencoded.js @@ -0,0 +1,350 @@ +'use strict'; + +const { Writable } = require('stream'); + +const { getDecoder } = require('../utils.js'); + +class URLEncoded extends Writable { + constructor(cfg) { + const streamOpts = { + autoDestroy: true, + emitClose: true, + highWaterMark: (typeof cfg.highWaterMark === 'number' + ? cfg.highWaterMark + : undefined), + }; + super(streamOpts); + + let charset = (cfg.defCharset || 'utf8'); + if (cfg.conType.params && typeof cfg.conType.params.charset === 'string') + charset = cfg.conType.params.charset; + + this.charset = charset; + + const limits = cfg.limits; + this.fieldSizeLimit = (limits && typeof limits.fieldSize === 'number' + ? limits.fieldSize + : 1 * 1024 * 1024); + this.fieldsLimit = (limits && typeof limits.fields === 'number' + ? limits.fields + : Infinity); + this.fieldNameSizeLimit = ( + limits && typeof limits.fieldNameSize === 'number' + ? limits.fieldNameSize + : 100 + ); + + this._inKey = true; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + this._fields = 0; + this._key = ''; + this._val = ''; + this._byte = -2; + this._lastPos = 0; + this._encode = 0; + this._decoder = getDecoder(charset); + } + + static detect(conType) { + return (conType.type === 'application' + && conType.subtype === 'x-www-form-urlencoded'); + } + + _write(chunk, enc, cb) { + if (this._fields >= this.fieldsLimit) + return cb(); + + let i = 0; + const len = chunk.length; + this._lastPos = 0; + + // Check if we last ended mid-percent-encoded byte + if (this._byte !== -2) { + i = readPctEnc(this, chunk, i, len); + if (i === -1) + return cb(new Error('Malformed urlencoded form')); + if (i >= len) + return cb(); + if (this._inKey) + ++this._bytesKey; + else + ++this._bytesVal; + } + +main: + while (i < len) { + if (this._inKey) { + // Parsing key + + i = skipKeyBytes(this, chunk, i, len); + + while (i < len) { + switch (chunk[i]) { + case 61: // '=' + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._key = this._decoder(this._key, this._encode); + this._encode = 0; + this._inKey = false; + continue main; + case 38: // '&' + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._key = this._decoder(this._key, this._encode); + this._encode = 0; + if (this._bytesKey > 0) { + this.emit( + 'field', + this._key, + '', + { nameTruncated: this._keyTrunc, + valueTruncated: false, + encoding: this.charset, + mimeType: 'text/plain' } + ); + } + this._key = ''; + this._val = ''; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + if (++this._fields >= this.fieldsLimit) { + this.emit('fieldsLimit'); + return cb(); + } + continue; + case 43: // '+' + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._key += ' '; + this._lastPos = i + 1; + break; + case 37: // '%' + if (this._encode === 0) + this._encode = 1; + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + this._lastPos = i + 1; + this._byte = -1; + i = readPctEnc(this, chunk, i + 1, len); + if (i === -1) + return cb(new Error('Malformed urlencoded form')); + if (i >= len) + return cb(); + ++this._bytesKey; + i = skipKeyBytes(this, chunk, i, len); + continue; + } + ++i; + ++this._bytesKey; + i = skipKeyBytes(this, chunk, i, len); + } + if (this._lastPos < i) + this._key += chunk.latin1Slice(this._lastPos, i); + } else { + // Parsing value + + i = skipValBytes(this, chunk, i, len); + + while (i < len) { + switch (chunk[i]) { + case 38: // '&' + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._lastPos = ++i; + this._inKey = true; + this._val = this._decoder(this._val, this._encode); + this._encode = 0; + if (this._bytesKey > 0 || this._bytesVal > 0) { + this.emit( + 'field', + this._key, + this._val, + { nameTruncated: this._keyTrunc, + valueTruncated: this._valTrunc, + encoding: this.charset, + mimeType: 'text/plain' } + ); + } + this._key = ''; + this._val = ''; + this._keyTrunc = false; + this._valTrunc = false; + this._bytesKey = 0; + this._bytesVal = 0; + if (++this._fields >= this.fieldsLimit) { + this.emit('fieldsLimit'); + return cb(); + } + continue main; + case 43: // '+' + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._val += ' '; + this._lastPos = i + 1; + break; + case 37: // '%' + if (this._encode === 0) + this._encode = 1; + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + this._lastPos = i + 1; + this._byte = -1; + i = readPctEnc(this, chunk, i + 1, len); + if (i === -1) + return cb(new Error('Malformed urlencoded form')); + if (i >= len) + return cb(); + ++this._bytesVal; + i = skipValBytes(this, chunk, i, len); + continue; + } + ++i; + ++this._bytesVal; + i = skipValBytes(this, chunk, i, len); + } + if (this._lastPos < i) + this._val += chunk.latin1Slice(this._lastPos, i); + } + } + + cb(); + } + + _final(cb) { + if (this._byte !== -2) + return cb(new Error('Malformed urlencoded form')); + if (!this._inKey || this._bytesKey > 0 || this._bytesVal > 0) { + if (this._inKey) + this._key = this._decoder(this._key, this._encode); + else + this._val = this._decoder(this._val, this._encode); + this.emit( + 'field', + this._key, + this._val, + { nameTruncated: this._keyTrunc, + valueTruncated: this._valTrunc, + encoding: this.charset, + mimeType: 'text/plain' } + ); + } + cb(); + } +} + +function readPctEnc(self, chunk, pos, len) { + if (pos >= len) + return len; + + if (self._byte === -1) { + // We saw a '%' but no hex characters yet + const hexUpper = HEX_VALUES[chunk[pos++]]; + if (hexUpper === -1) + return -1; + + if (hexUpper >= 8) + self._encode = 2; // Indicate high bits detected + + if (pos < len) { + // Both hex characters are in this chunk + const hexLower = HEX_VALUES[chunk[pos++]]; + if (hexLower === -1) + return -1; + + if (self._inKey) + self._key += String.fromCharCode((hexUpper << 4) + hexLower); + else + self._val += String.fromCharCode((hexUpper << 4) + hexLower); + + self._byte = -2; + self._lastPos = pos; + } else { + // Only one hex character was available in this chunk + self._byte = hexUpper; + } + } else { + // We saw only one hex character so far + const hexLower = HEX_VALUES[chunk[pos++]]; + if (hexLower === -1) + return -1; + + if (self._inKey) + self._key += String.fromCharCode((self._byte << 4) + hexLower); + else + self._val += String.fromCharCode((self._byte << 4) + hexLower); + + self._byte = -2; + self._lastPos = pos; + } + + return pos; +} + +function skipKeyBytes(self, chunk, pos, len) { + // Skip bytes if we've truncated + if (self._bytesKey > self.fieldNameSizeLimit) { + if (!self._keyTrunc) { + if (self._lastPos < pos) + self._key += chunk.latin1Slice(self._lastPos, pos - 1); + } + self._keyTrunc = true; + for (; pos < len; ++pos) { + const code = chunk[pos]; + if (code === 61/* '=' */ || code === 38/* '&' */) + break; + ++self._bytesKey; + } + self._lastPos = pos; + } + + return pos; +} + +function skipValBytes(self, chunk, pos, len) { + // Skip bytes if we've truncated + if (self._bytesVal > self.fieldSizeLimit) { + if (!self._valTrunc) { + if (self._lastPos < pos) + self._val += chunk.latin1Slice(self._lastPos, pos - 1); + } + self._valTrunc = true; + for (; pos < len; ++pos) { + if (chunk[pos] === 38/* '&' */) + break; + ++self._bytesVal; + } + self._lastPos = pos; + } + + return pos; +} + +/* eslint-disable no-multi-spaces */ +const HEX_VALUES = [ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +]; +/* eslint-enable no-multi-spaces */ + +module.exports = URLEncoded; diff --git a/src/hello/server/node_modules/busboy/lib/utils.js b/src/hello/server/node_modules/busboy/lib/utils.js new file mode 100644 index 00000000..8274f6c3 --- /dev/null +++ b/src/hello/server/node_modules/busboy/lib/utils.js @@ -0,0 +1,596 @@ +'use strict'; + +function parseContentType(str) { + if (str.length === 0) + return; + + const params = Object.create(null); + let i = 0; + + // Parse type + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code !== 47/* '/' */ || i === 0) + return; + break; + } + } + // Check for type without subtype + if (i === str.length) + return; + + const type = str.slice(0, i).toLowerCase(); + + // Parse subtype + const subtypeStart = ++i; + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + // Make sure we have a subtype + if (i === subtypeStart) + return; + + if (parseContentTypeParams(str, i, params) === undefined) + return; + break; + } + } + // Make sure we have a subtype + if (i === subtypeStart) + return; + + const subtype = str.slice(subtypeStart, i).toLowerCase(); + + return { type, subtype, params }; +} + +function parseContentTypeParams(str, i, params) { + while (i < str.length) { + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; + } + + // Ended on whitespace + if (i === str.length) + break; + + // Check for malformed parameter + if (str.charCodeAt(i++) !== 59/* ';' */) + return; + + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; + } + + // Ended on whitespace (malformed) + if (i === str.length) + return; + + let name; + const nameStart = i; + // Parse parameter name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code !== 61/* '=' */) + return; + break; + } + } + + // No value (malformed) + if (i === str.length) + return; + + name = str.slice(nameStart, i); + ++i; // Skip over '=' + + // No value (malformed) + if (i === str.length) + return; + + let value = ''; + let valueStart; + if (str.charCodeAt(i) === 34/* '"' */) { + valueStart = ++i; + let escaping = false; + // Parse quoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 92/* '\\' */) { + if (escaping) { + valueStart = i; + escaping = false; + } else { + value += str.slice(valueStart, i); + escaping = true; + } + continue; + } + if (code === 34/* '"' */) { + if (escaping) { + valueStart = i; + escaping = false; + continue; + } + value += str.slice(valueStart, i); + break; + } + if (escaping) { + valueStart = i - 1; + escaping = false; + } + // Invalid unescaped quoted character (malformed) + if (QDTEXT[code] !== 1) + return; + } + + // No end quote (malformed) + if (i === str.length) + return; + + ++i; // Skip over double quote + } else { + valueStart = i; + // Parse unquoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + // No value (malformed) + if (i === valueStart) + return; + break; + } + } + value = str.slice(valueStart, i); + } + + name = name.toLowerCase(); + if (params[name] === undefined) + params[name] = value; + } + + return params; +} + +function parseDisposition(str, defDecoder) { + if (str.length === 0) + return; + + const params = Object.create(null); + let i = 0; + + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (parseDispositionParams(str, i, params, defDecoder) === undefined) + return; + break; + } + } + + const type = str.slice(0, i).toLowerCase(); + + return { type, params }; +} + +function parseDispositionParams(str, i, params, defDecoder) { + while (i < str.length) { + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; + } + + // Ended on whitespace + if (i === str.length) + break; + + // Check for malformed parameter + if (str.charCodeAt(i++) !== 59/* ';' */) + return; + + // Consume whitespace + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code !== 32/* ' ' */ && code !== 9/* '\t' */) + break; + } + + // Ended on whitespace (malformed) + if (i === str.length) + return; + + let name; + const nameStart = i; + // Parse parameter name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + if (code === 61/* '=' */) + break; + return; + } + } + + // No value (malformed) + if (i === str.length) + return; + + let value = ''; + let valueStart; + let charset; + //~ let lang; + name = str.slice(nameStart, i); + if (name.charCodeAt(name.length - 1) === 42/* '*' */) { + // Extended value + + const charsetStart = ++i; + // Parse charset name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (CHARSET[code] !== 1) { + if (code !== 39/* '\'' */) + return; + break; + } + } + + // Incomplete charset (malformed) + if (i === str.length) + return; + + charset = str.slice(charsetStart, i); + ++i; // Skip over the '\'' + + //~ const langStart = ++i; + // Parse language name + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 39/* '\'' */) + break; + } + + // Incomplete language (malformed) + if (i === str.length) + return; + + //~ lang = str.slice(langStart, i); + ++i; // Skip over the '\'' + + // No value (malformed) + if (i === str.length) + return; + + valueStart = i; + + let encode = 0; + // Parse value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (EXTENDED_VALUE[code] !== 1) { + if (code === 37/* '%' */) { + let hexUpper; + let hexLower; + if (i + 2 < str.length + && (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 + && (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { + const byteVal = (hexUpper << 4) + hexLower; + value += str.slice(valueStart, i); + value += String.fromCharCode(byteVal); + i += 2; + valueStart = i + 1; + if (byteVal >= 128) + encode = 2; + else if (encode === 0) + encode = 1; + continue; + } + // '%' disallowed in non-percent encoded contexts (malformed) + return; + } + break; + } + } + + value += str.slice(valueStart, i); + value = convertToUTF8(value, charset, encode); + if (value === undefined) + return; + } else { + // Non-extended value + + ++i; // Skip over '=' + + // No value (malformed) + if (i === str.length) + return; + + if (str.charCodeAt(i) === 34/* '"' */) { + valueStart = ++i; + let escaping = false; + // Parse quoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (code === 92/* '\\' */) { + if (escaping) { + valueStart = i; + escaping = false; + } else { + value += str.slice(valueStart, i); + escaping = true; + } + continue; + } + if (code === 34/* '"' */) { + if (escaping) { + valueStart = i; + escaping = false; + continue; + } + value += str.slice(valueStart, i); + break; + } + if (escaping) { + valueStart = i - 1; + escaping = false; + } + // Invalid unescaped quoted character (malformed) + if (QDTEXT[code] !== 1) + return; + } + + // No end quote (malformed) + if (i === str.length) + return; + + ++i; // Skip over double quote + } else { + valueStart = i; + // Parse unquoted value + for (; i < str.length; ++i) { + const code = str.charCodeAt(i); + if (TOKEN[code] !== 1) { + // No value (malformed) + if (i === valueStart) + return; + break; + } + } + value = str.slice(valueStart, i); + } + + value = defDecoder(value, 2); + if (value === undefined) + return; + } + + name = name.toLowerCase(); + if (params[name] === undefined) + params[name] = value; + } + + return params; +} + +function getDecoder(charset) { + let lc; + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8; + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1; + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le; + case 'base64': + return decoders.base64; + default: + if (lc === undefined) { + lc = true; + charset = charset.toLowerCase(); + continue; + } + return decoders.other.bind(charset); + } + } +} + +const decoders = { + utf8: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') { + // If `data` never had any percent-encoded bytes or never had any that + // were outside of the ASCII range, then we can safely just return the + // input since UTF-8 is ASCII compatible + if (hint < 2) + return data; + + data = Buffer.from(data, 'latin1'); + } + return data.utf8Slice(0, data.length); + }, + + latin1: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + return data; + return data.latin1Slice(0, data.length); + }, + + utf16le: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + data = Buffer.from(data, 'latin1'); + return data.ucs2Slice(0, data.length); + }, + + base64: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + data = Buffer.from(data, 'latin1'); + return data.base64Slice(0, data.length); + }, + + other: (data, hint) => { + if (data.length === 0) + return ''; + if (typeof data === 'string') + data = Buffer.from(data, 'latin1'); + try { + const decoder = new TextDecoder(this); + return decoder.decode(data); + } catch {} + }, +}; + +function convertToUTF8(data, charset, hint) { + const decode = getDecoder(charset); + if (decode) + return decode(data, hint); +} + +function basename(path) { + if (typeof path !== 'string') + return ''; + for (let i = path.length - 1; i >= 0; --i) { + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1); + return (path === '..' || path === '.' ? '' : path); + } + } + return (path === '..' || path === '.' ? '' : path); +} + +const TOKEN = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]; + +const QDTEXT = [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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +]; + +/* eslint-disable no-multi-spaces */ +const HEX_VALUES = [ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +]; +/* eslint-enable no-multi-spaces */ + +module.exports = { + basename, + convertToUTF8, + getDecoder, + parseContentType, + parseDisposition, +}; diff --git a/src/hello/server/node_modules/busboy/package.json b/src/hello/server/node_modules/busboy/package.json new file mode 100644 index 00000000..ac2577fe --- /dev/null +++ b/src/hello/server/node_modules/busboy/package.json @@ -0,0 +1,22 @@ +{ "name": "busboy", + "version": "1.6.0", + "author": "Brian White ", + "description": "A streaming parser for HTML form data for node.js", + "main": "./lib/index.js", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "devDependencies": { + "@mscdex/eslint-config": "^1.1.0", + "eslint": "^7.32.0" + }, + "scripts": { + "test": "node test/test.js", + "lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test bench", + "lint:fix": "npm run lint -- --fix" + }, + "engines": { "node": ">=10.16.0" }, + "keywords": [ "uploads", "forms", "multipart", "form-data" ], + "licenses": [ { "type": "MIT", "url": "http://github.com/mscdex/busboy/raw/master/LICENSE" } ], + "repository": { "type": "git", "url": "http://github.com/mscdex/busboy.git" } +} diff --git a/src/hello/server/node_modules/busboy/test/common.js b/src/hello/server/node_modules/busboy/test/common.js new file mode 100644 index 00000000..fb82ad81 --- /dev/null +++ b/src/hello/server/node_modules/busboy/test/common.js @@ -0,0 +1,109 @@ +'use strict'; + +const assert = require('assert'); +const { inspect } = require('util'); + +const mustCallChecks = []; + +function noop() {} + +function runCallChecks(exitCode) { + if (exitCode !== 0) return; + + const failed = mustCallChecks.filter((context) => { + if ('minimum' in context) { + context.messageSegment = `at least ${context.minimum}`; + return context.actual < context.minimum; + } + context.messageSegment = `exactly ${context.exact}`; + return context.actual !== context.exact; + }); + + failed.forEach((context) => { + console.error('Mismatched %s function calls. Expected %s, actual %d.', + context.name, + context.messageSegment, + context.actual); + console.error(context.stack.split('\n').slice(2).join('\n')); + }); + + if (failed.length) + process.exit(1); +} + +function mustCall(fn, exact) { + return _mustCallInner(fn, exact, 'exact'); +} + +function mustCallAtLeast(fn, minimum) { + return _mustCallInner(fn, minimum, 'minimum'); +} + +function _mustCallInner(fn, criteria = 1, field) { + if (process._exiting) + throw new Error('Cannot use common.mustCall*() in process exit handler'); + + if (typeof fn === 'number') { + criteria = fn; + fn = noop; + } else if (fn === undefined) { + fn = noop; + } + + if (typeof criteria !== 'number') + throw new TypeError(`Invalid ${field} value: ${criteria}`); + + const context = { + [field]: criteria, + actual: 0, + stack: inspect(new Error()), + name: fn.name || '' + }; + + // Add the exit listener only once to avoid listener leak warnings + if (mustCallChecks.length === 0) + process.on('exit', runCallChecks); + + mustCallChecks.push(context); + + function wrapped(...args) { + ++context.actual; + return fn.call(this, ...args); + } + // TODO: remove origFn? + wrapped.origFn = fn; + + return wrapped; +} + +function getCallSite(top) { + const originalStackFormatter = Error.prepareStackTrace; + Error.prepareStackTrace = (err, stack) => + `${stack[0].getFileName()}:${stack[0].getLineNumber()}`; + const err = new Error(); + Error.captureStackTrace(err, top); + // With the V8 Error API, the stack is not formatted until it is accessed + // eslint-disable-next-line no-unused-expressions + err.stack; + Error.prepareStackTrace = originalStackFormatter; + return err.stack; +} + +function mustNotCall(msg) { + const callSite = getCallSite(mustNotCall); + return function mustNotCall(...args) { + args = args.map(inspect).join(', '); + const argsInfo = (args.length > 0 + ? `\ncalled with arguments: ${args}` + : ''); + assert.fail( + `${msg || 'function should not have been called'} at ${callSite}` + + argsInfo); + }; +} + +module.exports = { + mustCall, + mustCallAtLeast, + mustNotCall, +}; diff --git a/src/hello/server/node_modules/busboy/test/test-types-multipart-charsets.js b/src/hello/server/node_modules/busboy/test/test-types-multipart-charsets.js new file mode 100644 index 00000000..ed9c38ae --- /dev/null +++ b/src/hello/server/node_modules/busboy/test/test-types-multipart-charsets.js @@ -0,0 +1,94 @@ +'use strict'; + +const assert = require('assert'); +const { inspect } = require('util'); + +const { mustCall } = require(`${__dirname}/common.js`); + +const busboy = require('..'); + +const input = Buffer.from([ + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="テスト.dat"', + 'Content-Type: application/octet-stream', + '', + 'A'.repeat(1023), + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' +].join('\r\n')); +const boundary = '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k'; +const expected = [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('A'.repeat(1023)), + info: { + filename: 'テスト.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, +]; +const bb = busboy({ + defParamCharset: 'utf8', + headers: { + 'content-type': `multipart/form-data; boundary=${boundary}`, + } +}); +const results = []; + +bb.on('field', (name, val, info) => { + results.push({ type: 'field', name, val, info }); +}); + +bb.on('file', (name, stream, info) => { + const data = []; + let nb = 0; + const file = { + type: 'file', + name, + data: null, + info, + limited: false, + }; + results.push(file); + stream.on('data', (d) => { + data.push(d); + nb += d.length; + }).on('limit', () => { + file.limited = true; + }).on('close', () => { + file.data = Buffer.concat(data, nb); + assert.strictEqual(stream.truncated, file.limited); + }).once('error', (err) => { + file.err = err.message; + }); +}); + +bb.on('error', (err) => { + results.push({ error: err.message }); +}); + +bb.on('partsLimit', () => { + results.push('partsLimit'); +}); + +bb.on('filesLimit', () => { + results.push('filesLimit'); +}); + +bb.on('fieldsLimit', () => { + results.push('fieldsLimit'); +}); + +bb.on('close', mustCall(() => { + assert.deepStrictEqual( + results, + expected, + 'Results mismatch.\n' + + `Parsed: ${inspect(results)}\n` + + `Expected: ${inspect(expected)}` + ); +})); + +bb.end(input); diff --git a/src/hello/server/node_modules/busboy/test/test-types-multipart-stream-pause.js b/src/hello/server/node_modules/busboy/test/test-types-multipart-stream-pause.js new file mode 100644 index 00000000..df7268a4 --- /dev/null +++ b/src/hello/server/node_modules/busboy/test/test-types-multipart-stream-pause.js @@ -0,0 +1,102 @@ +'use strict'; + +const assert = require('assert'); +const { randomFillSync } = require('crypto'); +const { inspect } = require('util'); + +const busboy = require('..'); + +const { mustCall } = require('./common.js'); + +const BOUNDARY = 'u2KxIV5yF1y+xUspOQCCZopaVgeV6Jxihv35XQJmuTx8X3sh'; + +function formDataSection(key, value) { + return Buffer.from( + `\r\n--${BOUNDARY}` + + `\r\nContent-Disposition: form-data; name="${key}"` + + `\r\n\r\n${value}` + ); +} + +function formDataFile(key, filename, contentType) { + const buf = Buffer.allocUnsafe(100000); + return Buffer.concat([ + Buffer.from(`\r\n--${BOUNDARY}\r\n`), + Buffer.from(`Content-Disposition: form-data; name="${key}"` + + `; filename="${filename}"\r\n`), + Buffer.from(`Content-Type: ${contentType}\r\n\r\n`), + randomFillSync(buf) + ]); +} + +const reqChunks = [ + Buffer.concat([ + formDataFile('file', 'file.bin', 'application/octet-stream'), + formDataSection('foo', 'foo value'), + ]), + formDataSection('bar', 'bar value'), + Buffer.from(`\r\n--${BOUNDARY}--\r\n`) +]; +const bb = busboy({ + headers: { + 'content-type': `multipart/form-data; boundary=${BOUNDARY}` + } +}); +const expected = [ + { type: 'file', + name: 'file', + info: { + filename: 'file.bin', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + }, + { type: 'field', + name: 'foo', + val: 'foo value', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + { type: 'field', + name: 'bar', + val: 'bar value', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, +]; +const results = []; + +bb.on('field', (name, val, info) => { + results.push({ type: 'field', name, val, info }); +}); + +bb.on('file', (name, stream, info) => { + results.push({ type: 'file', name, info }); + // Simulate a pipe where the destination is pausing (perhaps due to waiting + // for file system write to finish) + setTimeout(() => { + stream.resume(); + }, 10); +}); + +bb.on('close', mustCall(() => { + assert.deepStrictEqual( + results, + expected, + 'Results mismatch.\n' + + `Parsed: ${inspect(results)}\n` + + `Expected: ${inspect(expected)}` + ); +})); + +for (const chunk of reqChunks) + bb.write(chunk); +bb.end(); diff --git a/src/hello/server/node_modules/busboy/test/test-types-multipart.js b/src/hello/server/node_modules/busboy/test/test-types-multipart.js new file mode 100644 index 00000000..9755642a --- /dev/null +++ b/src/hello/server/node_modules/busboy/test/test-types-multipart.js @@ -0,0 +1,1053 @@ +'use strict'; + +const assert = require('assert'); +const { inspect } = require('util'); + +const busboy = require('..'); + +const active = new Map(); + +const tests = [ + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_0"', + '', + 'super alpha file', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_1"', + '', + 'super beta file', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="1k_a.dat"', + 'Content-Type: application/octet-stream', + '', + 'A'.repeat(1023), + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_1"; filename="1k_b.dat"', + 'Content-Type: application/octet-stream', + '', + 'B'.repeat(1023), + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'field', + name: 'file_name_0', + val: 'super alpha file', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + { type: 'field', + name: 'file_name_1', + val: 'super beta file', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('A'.repeat(1023)), + info: { + filename: '1k_a.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + { type: 'file', + name: 'upload_file_1', + data: Buffer.from('B'.repeat(1023)), + info: { + filename: '1k_b.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + ], + what: 'Fields and files' + }, + { source: [ + ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', + 'Content-Disposition: form-data; name="cont"', + '', + 'some random content', + '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', + 'Content-Disposition: form-data; name="pass"', + '', + 'some random pass', + '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', + 'Content-Disposition: form-data; name=bit', + '', + '2', + '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--' + ].join('\r\n') + ], + boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', + expected: [ + { type: 'field', + name: 'cont', + val: 'some random content', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + { type: 'field', + name: 'pass', + val: 'some random pass', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + { type: 'field', + name: 'bit', + val: '2', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + ], + what: 'Fields only' + }, + { source: [ + '' + ], + boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', + expected: [ + { error: 'Unexpected end of form' }, + ], + what: 'No fields and no files' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_0"', + '', + 'super alpha file', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="1k_a.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + limits: { + fileSize: 13, + fieldSize: 5 + }, + expected: [ + { type: 'field', + name: 'file_name_0', + val: 'super', + info: { + nameTruncated: false, + valueTruncated: true, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('ABCDEFGHIJKLM'), + info: { + filename: '1k_a.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: true, + }, + ], + what: 'Fields and files (limits)' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_0"', + '', + 'super alpha file', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="1k_a.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + limits: { + files: 0 + }, + expected: [ + { type: 'field', + name: 'file_name_0', + val: 'super alpha file', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + 'filesLimit', + ], + what: 'Fields and files (limits: 0 files)' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_0"', + '', + 'super alpha file', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_1"', + '', + 'super beta file', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="1k_a.dat"', + 'Content-Type: application/octet-stream', + '', + 'A'.repeat(1023), + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_1"; filename="1k_b.dat"', + 'Content-Type: application/octet-stream', + '', + 'B'.repeat(1023), + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'field', + name: 'file_name_0', + val: 'super alpha file', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + { type: 'field', + name: 'file_name_1', + val: 'super beta file', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + ], + events: ['field'], + what: 'Fields and (ignored) files' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="/tmp/1k_a.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_1"; filename="C:\\files\\1k_b.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_2"; filename="relative/1k_c.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + info: { + filename: '1k_a.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + { type: 'file', + name: 'upload_file_1', + data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + info: { + filename: '1k_b.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + { type: 'file', + name: 'upload_file_2', + data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + info: { + filename: '1k_c.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + ], + what: 'Files with filenames containing paths' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="/absolute/1k_a.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_1"; filename="C:\\absolute\\1k_b.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_2"; filename="relative/1k_c.dat"', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + preservePath: true, + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + info: { + filename: '/absolute/1k_a.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + { type: 'file', + name: 'upload_file_1', + data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + info: { + filename: 'C:\\absolute\\1k_b.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + { type: 'file', + name: 'upload_file_2', + data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + info: { + filename: 'relative/1k_c.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + ], + what: 'Paths to be preserved through the preservePath option' + }, + { source: [ + ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', + 'Content-Disposition: form-data; name="cont"', + 'Content-Type: ', + '', + 'some random content', + '------WebKitFormBoundaryTB2MiQ36fnSJlrhY', + 'Content-Disposition: ', + '', + 'some random pass', + '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--' + ].join('\r\n') + ], + boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', + expected: [ + { type: 'field', + name: 'cont', + val: 'some random content', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + ], + what: 'Empty content-type and empty content-disposition' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="file"; filename*=utf-8\'\'n%C3%A4me.txt', + 'Content-Type: application/octet-stream', + '', + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--' + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'file', + name: 'file', + data: Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), + info: { + filename: 'näme.txt', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + }, + ], + what: 'Unicode filenames' + }, + { source: [ + ['--asdasdasdasd\r\n', + 'Content-Type: text/plain\r\n', + 'Content-Disposition: form-data; name="foo"\r\n', + '\r\n', + 'asd\r\n', + '--asdasdasdasd--' + ].join(':)') + ], + boundary: 'asdasdasdasd', + expected: [ + { error: 'Malformed part header' }, + { error: 'Unexpected end of form' }, + ], + what: 'Stopped mid-header' + }, + { source: [ + ['------WebKitFormBoundaryTB2MiQ36fnSJlrhY', + 'Content-Disposition: form-data; name="cont"', + 'Content-Type: application/json', + '', + '{}', + '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--', + ].join('\r\n') + ], + boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', + expected: [ + { type: 'field', + name: 'cont', + val: '{}', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'application/json', + }, + }, + ], + what: 'content-type for fields' + }, + { source: [ + '------WebKitFormBoundaryTB2MiQ36fnSJlrhY--', + ], + boundary: '----WebKitFormBoundaryTB2MiQ36fnSJlrhY', + expected: [], + what: 'empty form' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name=upload_file_0; filename="1k_a.dat"', + 'Content-Type: application/octet-stream', + 'Content-Transfer-Encoding: binary', + '', + '', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.alloc(0), + info: { + filename: '1k_a.dat', + encoding: 'binary', + mimeType: 'application/octet-stream', + }, + limited: false, + err: 'Unexpected end of form', + }, + { error: 'Unexpected end of form' }, + ], + what: 'Stopped mid-file #1' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name=upload_file_0; filename="1k_a.dat"', + 'Content-Type: application/octet-stream', + '', + 'a', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('a'), + info: { + filename: '1k_a.dat', + encoding: '7bit', + mimeType: 'application/octet-stream', + }, + limited: false, + err: 'Unexpected end of form', + }, + { error: 'Unexpected end of form' }, + ], + what: 'Stopped mid-file #2' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="notes.txt"', + 'Content-Type: text/plain; charset=utf8', + '', + 'a', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('a'), + info: { + filename: 'notes.txt', + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + ], + what: 'Text file with charset' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="notes.txt"', + 'Content-Type: ', + ' text/plain; charset=utf8', + '', + 'a', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('a'), + info: { + filename: 'notes.txt', + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + ], + what: 'Folded header value' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Type: text/plain; charset=utf8', + '', + 'a', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [], + what: 'No Content-Disposition' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_0"', + '', + 'a'.repeat(64 * 1024), + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="notes.txt"', + 'Content-Type: ', + ' text/plain; charset=utf8', + '', + 'bc', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + limits: { + fieldSize: Infinity, + }, + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('bc'), + info: { + filename: 'notes.txt', + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + ], + events: [ 'file' ], + what: 'Skip field parts if no listener' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_0"', + '', + 'a', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="notes.txt"', + 'Content-Type: ', + ' text/plain; charset=utf8', + '', + 'bc', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + limits: { + parts: 1, + }, + expected: [ + { type: 'field', + name: 'file_name_0', + val: 'a', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + 'partsLimit', + ], + what: 'Parts limit' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_0"', + '', + 'a', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; name="file_name_1"', + '', + 'b', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + limits: { + fields: 1, + }, + expected: [ + { type: 'field', + name: 'file_name_0', + val: 'a', + info: { + nameTruncated: false, + valueTruncated: false, + encoding: '7bit', + mimeType: 'text/plain', + }, + }, + 'fieldsLimit', + ], + what: 'Fields limit' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="notes.txt"', + 'Content-Type: text/plain; charset=utf8', + '', + 'ab', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_1"; filename="notes2.txt"', + 'Content-Type: text/plain; charset=utf8', + '', + 'cd', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + limits: { + files: 1, + }, + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('ab'), + info: { + filename: 'notes.txt', + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + 'filesLimit', + ], + what: 'Files limit' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + `name="upload_file_0"; filename="${'a'.repeat(64 * 1024)}.txt"`, + 'Content-Type: text/plain; charset=utf8', + '', + 'ab', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_1"; filename="notes2.txt"', + 'Content-Type: text/plain; charset=utf8', + '', + 'cd', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { error: 'Malformed part header' }, + { type: 'file', + name: 'upload_file_1', + data: Buffer.from('cd'), + info: { + filename: 'notes2.txt', + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + ], + what: 'Oversized part header' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + 'name="upload_file_0"; filename="notes.txt"', + 'Content-Type: text/plain; charset=utf8', + '', + 'a'.repeat(31) + '\r', + ].join('\r\n'), + 'b'.repeat(40), + '\r\n-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + fileHwm: 32, + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('a'.repeat(31) + '\r' + 'b'.repeat(40)), + info: { + filename: 'notes.txt', + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + ], + what: 'Lookbehind data should not stall file streams' + }, + { source: [ + ['-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + `name="upload_file_0"; filename="${'a'.repeat(8 * 1024)}.txt"`, + 'Content-Type: text/plain; charset=utf8', + '', + 'ab', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + `name="upload_file_1"; filename="${'b'.repeat(8 * 1024)}.txt"`, + 'Content-Type: text/plain; charset=utf8', + '', + 'cd', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + 'Content-Disposition: form-data; ' + + `name="upload_file_2"; filename="${'c'.repeat(8 * 1024)}.txt"`, + 'Content-Type: text/plain; charset=utf8', + '', + 'ef', + '-----------------------------paZqsnEHRufoShdX6fh0lUhXBP4k--', + ].join('\r\n') + ], + boundary: '---------------------------paZqsnEHRufoShdX6fh0lUhXBP4k', + expected: [ + { type: 'file', + name: 'upload_file_0', + data: Buffer.from('ab'), + info: { + filename: `${'a'.repeat(8 * 1024)}.txt`, + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + { type: 'file', + name: 'upload_file_1', + data: Buffer.from('cd'), + info: { + filename: `${'b'.repeat(8 * 1024)}.txt`, + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + { type: 'file', + name: 'upload_file_2', + data: Buffer.from('ef'), + info: { + filename: `${'c'.repeat(8 * 1024)}.txt`, + encoding: '7bit', + mimeType: 'text/plain', + }, + limited: false, + }, + ], + what: 'Header size limit should be per part' + }, + { source: [ + '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee\r\n', + 'Content-Type: application/gzip\r\n' + + 'Content-Encoding: gzip\r\n' + + 'Content-Disposition: form-data; name=batch-1; filename=batch-1' + + '\r\n\r\n', + '\r\n--d1bf46b3-aa33-4061-b28d-6c5ced8b08ee--', + ], + boundary: 'd1bf46b3-aa33-4061-b28d-6c5ced8b08ee', + expected: [ + { type: 'file', + name: 'batch-1', + data: Buffer.alloc(0), + info: { + filename: 'batch-1', + encoding: '7bit', + mimeType: 'application/gzip', + }, + limited: false, + }, + ], + what: 'Empty part' + }, +]; + +for (const test of tests) { + active.set(test, 1); + + const { what, boundary, events, limits, preservePath, fileHwm } = test; + const bb = busboy({ + fileHwm, + limits, + preservePath, + headers: { + 'content-type': `multipart/form-data; boundary=${boundary}`, + } + }); + const results = []; + + if (events === undefined || events.includes('field')) { + bb.on('field', (name, val, info) => { + results.push({ type: 'field', name, val, info }); + }); + } + + if (events === undefined || events.includes('file')) { + bb.on('file', (name, stream, info) => { + const data = []; + let nb = 0; + const file = { + type: 'file', + name, + data: null, + info, + limited: false, + }; + results.push(file); + stream.on('data', (d) => { + data.push(d); + nb += d.length; + }).on('limit', () => { + file.limited = true; + }).on('close', () => { + file.data = Buffer.concat(data, nb); + assert.strictEqual(stream.truncated, file.limited); + }).once('error', (err) => { + file.err = err.message; + }); + }); + } + + bb.on('error', (err) => { + results.push({ error: err.message }); + }); + + bb.on('partsLimit', () => { + results.push('partsLimit'); + }); + + bb.on('filesLimit', () => { + results.push('filesLimit'); + }); + + bb.on('fieldsLimit', () => { + results.push('fieldsLimit'); + }); + + bb.on('close', () => { + active.delete(test); + + assert.deepStrictEqual( + results, + test.expected, + `[${what}] Results mismatch.\n` + + `Parsed: ${inspect(results)}\n` + + `Expected: ${inspect(test.expected)}` + ); + }); + + for (const src of test.source) { + const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); + bb.write(buf); + } + bb.end(); +} + +// Byte-by-byte versions +for (let test of tests) { + test = { ...test }; + test.what += ' (byte-by-byte)'; + active.set(test, 1); + + const { what, boundary, events, limits, preservePath, fileHwm } = test; + const bb = busboy({ + fileHwm, + limits, + preservePath, + headers: { + 'content-type': `multipart/form-data; boundary=${boundary}`, + } + }); + const results = []; + + if (events === undefined || events.includes('field')) { + bb.on('field', (name, val, info) => { + results.push({ type: 'field', name, val, info }); + }); + } + + if (events === undefined || events.includes('file')) { + bb.on('file', (name, stream, info) => { + const data = []; + let nb = 0; + const file = { + type: 'file', + name, + data: null, + info, + limited: false, + }; + results.push(file); + stream.on('data', (d) => { + data.push(d); + nb += d.length; + }).on('limit', () => { + file.limited = true; + }).on('close', () => { + file.data = Buffer.concat(data, nb); + assert.strictEqual(stream.truncated, file.limited); + }).once('error', (err) => { + file.err = err.message; + }); + }); + } + + bb.on('error', (err) => { + results.push({ error: err.message }); + }); + + bb.on('partsLimit', () => { + results.push('partsLimit'); + }); + + bb.on('filesLimit', () => { + results.push('filesLimit'); + }); + + bb.on('fieldsLimit', () => { + results.push('fieldsLimit'); + }); + + bb.on('close', () => { + active.delete(test); + + assert.deepStrictEqual( + results, + test.expected, + `[${what}] Results mismatch.\n` + + `Parsed: ${inspect(results)}\n` + + `Expected: ${inspect(test.expected)}` + ); + }); + + for (const src of test.source) { + const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); + for (let i = 0; i < buf.length; ++i) + bb.write(buf.slice(i, i + 1)); + } + bb.end(); +} + +{ + let exception = false; + process.once('uncaughtException', (ex) => { + exception = true; + throw ex; + }); + process.on('exit', () => { + if (exception || active.size === 0) + return; + process.exitCode = 1; + console.error('=========================='); + console.error(`${active.size} test(s) did not finish:`); + console.error('=========================='); + console.error(Array.from(active.keys()).map((v) => v.what).join('\n')); + }); +} diff --git a/src/hello/server/node_modules/busboy/test/test-types-urlencoded.js b/src/hello/server/node_modules/busboy/test/test-types-urlencoded.js new file mode 100644 index 00000000..c35962b9 --- /dev/null +++ b/src/hello/server/node_modules/busboy/test/test-types-urlencoded.js @@ -0,0 +1,488 @@ +'use strict'; + +const assert = require('assert'); +const { transcode } = require('buffer'); +const { inspect } = require('util'); + +const busboy = require('..'); + +const active = new Map(); + +const tests = [ + { source: ['foo'], + expected: [ + ['foo', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Unassigned value' + }, + { source: ['foo=bar'], + expected: [ + ['foo', + 'bar', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Assigned value' + }, + { source: ['foo&bar=baz'], + expected: [ + ['foo', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['bar', + 'baz', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Unassigned and assigned value' + }, + { source: ['foo=bar&baz'], + expected: [ + ['foo', + 'bar', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['baz', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Assigned and unassigned value' + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['foo', + 'bar', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['baz', + 'bla', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Two assigned values' + }, + { source: ['foo&bar'], + expected: [ + ['foo', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['bar', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Two unassigned values' + }, + { source: ['foo&bar&'], + expected: [ + ['foo', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['bar', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Two unassigned values and ampersand' + }, + { source: ['foo+1=bar+baz%2Bquux'], + expected: [ + ['foo 1', + 'bar baz+quux', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Assigned key and value with (plus) space' + }, + { source: ['foo=bar%20baz%21'], + expected: [ + ['foo', + 'bar baz!', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Assigned value with encoded bytes' + }, + { source: ['foo%20bar=baz%20bla%21'], + expected: [ + ['foo bar', + 'baz bla!', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Assigned value with encoded bytes #2' + }, + { source: ['foo=bar%20baz%21&num=1000'], + expected: [ + ['foo', + 'bar baz!', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['num', + '1000', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Two assigned values, one with encoded bytes' + }, + { source: [ + Array.from(transcode(Buffer.from('foo'), 'utf8', 'utf16le')).map( + (n) => `%${n.toString(16).padStart(2, '0')}` + ).join(''), + '=', + Array.from(transcode(Buffer.from('😀!'), 'utf8', 'utf16le')).map( + (n) => `%${n.toString(16).padStart(2, '0')}` + ).join(''), + ], + expected: [ + ['foo', + '😀!', + { nameTruncated: false, + valueTruncated: false, + encoding: 'UTF-16LE', + mimeType: 'text/plain' }, + ], + ], + charset: 'UTF-16LE', + what: 'Encoded value with multi-byte charset' + }, + { source: [ + 'foo=<', + Array.from(transcode(Buffer.from('©:^þ'), 'utf8', 'latin1')).map( + (n) => `%${n.toString(16).padStart(2, '0')}` + ).join(''), + ], + expected: [ + ['foo', + '<©:^þ', + { nameTruncated: false, + valueTruncated: false, + encoding: 'ISO-8859-1', + mimeType: 'text/plain' }, + ], + ], + charset: 'ISO-8859-1', + what: 'Encoded value with single-byte, ASCII-compatible, non-UTF8 charset' + }, + { source: ['foo=bar&baz=bla'], + expected: [], + what: 'Limits: zero fields', + limits: { fields: 0 } + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['foo', + 'bar', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Limits: one field', + limits: { fields: 1 } + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['foo', + 'bar', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['baz', + 'bla', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Limits: field part lengths match limits', + limits: { fieldNameSize: 3, fieldSize: 3 } + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['fo', + 'bar', + { nameTruncated: true, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['ba', + 'bla', + { nameTruncated: true, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Limits: truncated field name', + limits: { fieldNameSize: 2 } + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['foo', + 'ba', + { nameTruncated: false, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['baz', + 'bl', + { nameTruncated: false, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Limits: truncated field value', + limits: { fieldSize: 2 } + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['fo', + 'ba', + { nameTruncated: true, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['ba', + 'bl', + { nameTruncated: true, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Limits: truncated field name and value', + limits: { fieldNameSize: 2, fieldSize: 2 } + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['fo', + '', + { nameTruncated: true, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['ba', + '', + { nameTruncated: true, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Limits: truncated field name and zero value limit', + limits: { fieldNameSize: 2, fieldSize: 0 } + }, + { source: ['foo=bar&baz=bla'], + expected: [ + ['', + '', + { nameTruncated: true, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ['', + '', + { nameTruncated: true, + valueTruncated: true, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Limits: truncated zero field name and zero value limit', + limits: { fieldNameSize: 0, fieldSize: 0 } + }, + { source: ['&'], + expected: [], + what: 'Ampersand' + }, + { source: ['&&&&&'], + expected: [], + what: 'Many ampersands' + }, + { source: ['='], + expected: [ + ['', + '', + { nameTruncated: false, + valueTruncated: false, + encoding: 'utf-8', + mimeType: 'text/plain' }, + ], + ], + what: 'Assigned value, empty name and value' + }, + { source: [''], + expected: [], + what: 'Nothing' + }, +]; + +for (const test of tests) { + active.set(test, 1); + + const { what } = test; + const charset = test.charset || 'utf-8'; + const bb = busboy({ + limits: test.limits, + headers: { + 'content-type': `application/x-www-form-urlencoded; charset=${charset}`, + }, + }); + const results = []; + + bb.on('field', (key, val, info) => { + results.push([key, val, info]); + }); + + bb.on('file', () => { + throw new Error(`[${what}] Unexpected file`); + }); + + bb.on('close', () => { + active.delete(test); + + assert.deepStrictEqual( + results, + test.expected, + `[${what}] Results mismatch.\n` + + `Parsed: ${inspect(results)}\n` + + `Expected: ${inspect(test.expected)}` + ); + }); + + for (const src of test.source) { + const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); + bb.write(buf); + } + bb.end(); +} + +// Byte-by-byte versions +for (let test of tests) { + test = { ...test }; + test.what += ' (byte-by-byte)'; + active.set(test, 1); + + const { what } = test; + const charset = test.charset || 'utf-8'; + const bb = busboy({ + limits: test.limits, + headers: { + 'content-type': `application/x-www-form-urlencoded; charset="${charset}"`, + }, + }); + const results = []; + + bb.on('field', (key, val, info) => { + results.push([key, val, info]); + }); + + bb.on('file', () => { + throw new Error(`[${what}] Unexpected file`); + }); + + bb.on('close', () => { + active.delete(test); + + assert.deepStrictEqual( + results, + test.expected, + `[${what}] Results mismatch.\n` + + `Parsed: ${inspect(results)}\n` + + `Expected: ${inspect(test.expected)}` + ); + }); + + for (const src of test.source) { + const buf = (typeof src === 'string' ? Buffer.from(src, 'utf8') : src); + for (let i = 0; i < buf.length; ++i) + bb.write(buf.slice(i, i + 1)); + } + bb.end(); +} + +{ + let exception = false; + process.once('uncaughtException', (ex) => { + exception = true; + throw ex; + }); + process.on('exit', () => { + if (exception || active.size === 0) + return; + process.exitCode = 1; + console.error('=========================='); + console.error(`${active.size} test(s) did not finish:`); + console.error('=========================='); + console.error(Array.from(active.keys()).map((v) => v.what).join('\n')); + }); +} diff --git a/src/hello/server/node_modules/busboy/test/test.js b/src/hello/server/node_modules/busboy/test/test.js new file mode 100644 index 00000000..d0380f29 --- /dev/null +++ b/src/hello/server/node_modules/busboy/test/test.js @@ -0,0 +1,20 @@ +'use strict'; + +const { spawnSync } = require('child_process'); +const { readdirSync } = require('fs'); +const { join } = require('path'); + +const files = readdirSync(__dirname).sort(); +for (const filename of files) { + if (filename.startsWith('test-')) { + const path = join(__dirname, filename); + console.log(`> Running ${filename} ...`); + const result = spawnSync(`${process.argv0} ${path}`, { + shell: true, + stdio: 'inherit', + windowsHide: true + }); + if (result.status !== 0) + process.exitCode = 1; + } +} diff --git a/src/hello/backend/node_modules/bytes/History.md b/src/hello/server/node_modules/bytes/History.md similarity index 100% rename from src/hello/backend/node_modules/bytes/History.md rename to src/hello/server/node_modules/bytes/History.md diff --git a/src/hello/backend/node_modules/bytes/LICENSE b/src/hello/server/node_modules/bytes/LICENSE similarity index 100% rename from src/hello/backend/node_modules/bytes/LICENSE rename to src/hello/server/node_modules/bytes/LICENSE diff --git a/src/hello/backend/node_modules/bytes/Readme.md b/src/hello/server/node_modules/bytes/Readme.md similarity index 100% rename from src/hello/backend/node_modules/bytes/Readme.md rename to src/hello/server/node_modules/bytes/Readme.md diff --git a/src/hello/backend/node_modules/bytes/index.js b/src/hello/server/node_modules/bytes/index.js similarity index 100% rename from src/hello/backend/node_modules/bytes/index.js rename to src/hello/server/node_modules/bytes/index.js diff --git a/src/hello/backend/node_modules/bytes/package.json b/src/hello/server/node_modules/bytes/package.json similarity index 100% rename from src/hello/backend/node_modules/bytes/package.json rename to src/hello/server/node_modules/bytes/package.json diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/.eslintrc b/src/hello/server/node_modules/call-bind-apply-helpers/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/.eslintrc rename to src/hello/server/node_modules/call-bind-apply-helpers/.eslintrc diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/.github/FUNDING.yml b/src/hello/server/node_modules/call-bind-apply-helpers/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/.github/FUNDING.yml rename to src/hello/server/node_modules/call-bind-apply-helpers/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/.nycrc b/src/hello/server/node_modules/call-bind-apply-helpers/.nycrc similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/.nycrc rename to src/hello/server/node_modules/call-bind-apply-helpers/.nycrc diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/CHANGELOG.md b/src/hello/server/node_modules/call-bind-apply-helpers/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/CHANGELOG.md rename to src/hello/server/node_modules/call-bind-apply-helpers/CHANGELOG.md diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/LICENSE b/src/hello/server/node_modules/call-bind-apply-helpers/LICENSE similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/LICENSE rename to src/hello/server/node_modules/call-bind-apply-helpers/LICENSE diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/README.md b/src/hello/server/node_modules/call-bind-apply-helpers/README.md similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/README.md rename to src/hello/server/node_modules/call-bind-apply-helpers/README.md diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/actualApply.d.ts b/src/hello/server/node_modules/call-bind-apply-helpers/actualApply.d.ts similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/actualApply.d.ts rename to src/hello/server/node_modules/call-bind-apply-helpers/actualApply.d.ts diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/actualApply.js b/src/hello/server/node_modules/call-bind-apply-helpers/actualApply.js similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/actualApply.js rename to src/hello/server/node_modules/call-bind-apply-helpers/actualApply.js diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/applyBind.d.ts b/src/hello/server/node_modules/call-bind-apply-helpers/applyBind.d.ts similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/applyBind.d.ts rename to src/hello/server/node_modules/call-bind-apply-helpers/applyBind.d.ts diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/applyBind.js b/src/hello/server/node_modules/call-bind-apply-helpers/applyBind.js similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/applyBind.js rename to src/hello/server/node_modules/call-bind-apply-helpers/applyBind.js diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/functionApply.d.ts b/src/hello/server/node_modules/call-bind-apply-helpers/functionApply.d.ts similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/functionApply.d.ts rename to src/hello/server/node_modules/call-bind-apply-helpers/functionApply.d.ts diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/functionApply.js b/src/hello/server/node_modules/call-bind-apply-helpers/functionApply.js similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/functionApply.js rename to src/hello/server/node_modules/call-bind-apply-helpers/functionApply.js diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/functionCall.d.ts b/src/hello/server/node_modules/call-bind-apply-helpers/functionCall.d.ts similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/functionCall.d.ts rename to src/hello/server/node_modules/call-bind-apply-helpers/functionCall.d.ts diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/functionCall.js b/src/hello/server/node_modules/call-bind-apply-helpers/functionCall.js similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/functionCall.js rename to src/hello/server/node_modules/call-bind-apply-helpers/functionCall.js diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/index.d.ts b/src/hello/server/node_modules/call-bind-apply-helpers/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/index.d.ts rename to src/hello/server/node_modules/call-bind-apply-helpers/index.d.ts diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/index.js b/src/hello/server/node_modules/call-bind-apply-helpers/index.js similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/index.js rename to src/hello/server/node_modules/call-bind-apply-helpers/index.js diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/package.json b/src/hello/server/node_modules/call-bind-apply-helpers/package.json similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/package.json rename to src/hello/server/node_modules/call-bind-apply-helpers/package.json diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/reflectApply.d.ts b/src/hello/server/node_modules/call-bind-apply-helpers/reflectApply.d.ts similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/reflectApply.d.ts rename to src/hello/server/node_modules/call-bind-apply-helpers/reflectApply.d.ts diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/reflectApply.js b/src/hello/server/node_modules/call-bind-apply-helpers/reflectApply.js similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/reflectApply.js rename to src/hello/server/node_modules/call-bind-apply-helpers/reflectApply.js diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/test/index.js b/src/hello/server/node_modules/call-bind-apply-helpers/test/index.js similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/test/index.js rename to src/hello/server/node_modules/call-bind-apply-helpers/test/index.js diff --git a/src/hello/backend/node_modules/call-bind-apply-helpers/tsconfig.json b/src/hello/server/node_modules/call-bind-apply-helpers/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/call-bind-apply-helpers/tsconfig.json rename to src/hello/server/node_modules/call-bind-apply-helpers/tsconfig.json diff --git a/src/hello/backend/node_modules/call-bound/.eslintrc b/src/hello/server/node_modules/call-bound/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/call-bound/.eslintrc rename to src/hello/server/node_modules/call-bound/.eslintrc diff --git a/src/hello/backend/node_modules/call-bound/.github/FUNDING.yml b/src/hello/server/node_modules/call-bound/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/call-bound/.github/FUNDING.yml rename to src/hello/server/node_modules/call-bound/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/call-bound/.nycrc b/src/hello/server/node_modules/call-bound/.nycrc similarity index 100% rename from src/hello/backend/node_modules/call-bound/.nycrc rename to src/hello/server/node_modules/call-bound/.nycrc diff --git a/src/hello/backend/node_modules/call-bound/CHANGELOG.md b/src/hello/server/node_modules/call-bound/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/call-bound/CHANGELOG.md rename to src/hello/server/node_modules/call-bound/CHANGELOG.md diff --git a/src/hello/backend/node_modules/call-bound/LICENSE b/src/hello/server/node_modules/call-bound/LICENSE similarity index 100% rename from src/hello/backend/node_modules/call-bound/LICENSE rename to src/hello/server/node_modules/call-bound/LICENSE diff --git a/src/hello/backend/node_modules/call-bound/README.md b/src/hello/server/node_modules/call-bound/README.md similarity index 100% rename from src/hello/backend/node_modules/call-bound/README.md rename to src/hello/server/node_modules/call-bound/README.md diff --git a/src/hello/backend/node_modules/call-bound/index.d.ts b/src/hello/server/node_modules/call-bound/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/call-bound/index.d.ts rename to src/hello/server/node_modules/call-bound/index.d.ts diff --git a/src/hello/backend/node_modules/call-bound/index.js b/src/hello/server/node_modules/call-bound/index.js similarity index 100% rename from src/hello/backend/node_modules/call-bound/index.js rename to src/hello/server/node_modules/call-bound/index.js diff --git a/src/hello/backend/node_modules/call-bound/package.json b/src/hello/server/node_modules/call-bound/package.json similarity index 100% rename from src/hello/backend/node_modules/call-bound/package.json rename to src/hello/server/node_modules/call-bound/package.json diff --git a/src/hello/backend/node_modules/call-bound/test/index.js b/src/hello/server/node_modules/call-bound/test/index.js similarity index 100% rename from src/hello/backend/node_modules/call-bound/test/index.js rename to src/hello/server/node_modules/call-bound/test/index.js diff --git a/src/hello/backend/node_modules/call-bound/tsconfig.json b/src/hello/server/node_modules/call-bound/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/call-bound/tsconfig.json rename to src/hello/server/node_modules/call-bound/tsconfig.json diff --git a/src/hello/backend/node_modules/callsites/index.d.ts b/src/hello/server/node_modules/callsites/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/callsites/index.d.ts rename to src/hello/server/node_modules/callsites/index.d.ts diff --git a/src/hello/backend/node_modules/callsites/index.js b/src/hello/server/node_modules/callsites/index.js similarity index 100% rename from src/hello/backend/node_modules/callsites/index.js rename to src/hello/server/node_modules/callsites/index.js diff --git a/src/hello/backend/node_modules/callsites/license b/src/hello/server/node_modules/callsites/license similarity index 100% rename from src/hello/backend/node_modules/callsites/license rename to src/hello/server/node_modules/callsites/license diff --git a/src/hello/backend/node_modules/callsites/package.json b/src/hello/server/node_modules/callsites/package.json similarity index 100% rename from src/hello/backend/node_modules/callsites/package.json rename to src/hello/server/node_modules/callsites/package.json diff --git a/src/hello/backend/node_modules/callsites/readme.md b/src/hello/server/node_modules/callsites/readme.md similarity index 100% rename from src/hello/backend/node_modules/callsites/readme.md rename to src/hello/server/node_modules/callsites/readme.md diff --git a/src/hello/backend/node_modules/cfb/LICENSE b/src/hello/server/node_modules/cfb/LICENSE similarity index 100% rename from src/hello/backend/node_modules/cfb/LICENSE rename to src/hello/server/node_modules/cfb/LICENSE diff --git a/src/hello/backend/node_modules/cfb/README.md b/src/hello/server/node_modules/cfb/README.md similarity index 100% rename from src/hello/backend/node_modules/cfb/README.md rename to src/hello/server/node_modules/cfb/README.md diff --git a/src/hello/backend/node_modules/cfb/cfb.js b/src/hello/server/node_modules/cfb/cfb.js similarity index 100% rename from src/hello/backend/node_modules/cfb/cfb.js rename to src/hello/server/node_modules/cfb/cfb.js diff --git a/src/hello/backend/node_modules/cfb/dist/LICENSE b/src/hello/server/node_modules/cfb/dist/LICENSE similarity index 100% rename from src/hello/backend/node_modules/cfb/dist/LICENSE rename to src/hello/server/node_modules/cfb/dist/LICENSE diff --git a/src/hello/backend/node_modules/cfb/dist/cfb.js b/src/hello/server/node_modules/cfb/dist/cfb.js similarity index 100% rename from src/hello/backend/node_modules/cfb/dist/cfb.js rename to src/hello/server/node_modules/cfb/dist/cfb.js diff --git a/src/hello/backend/node_modules/cfb/dist/cfb.min.js b/src/hello/server/node_modules/cfb/dist/cfb.min.js similarity index 100% rename from src/hello/backend/node_modules/cfb/dist/cfb.min.js rename to src/hello/server/node_modules/cfb/dist/cfb.min.js diff --git a/src/hello/backend/node_modules/cfb/dist/cfb.min.map b/src/hello/server/node_modules/cfb/dist/cfb.min.map similarity index 100% rename from src/hello/backend/node_modules/cfb/dist/cfb.min.map rename to src/hello/server/node_modules/cfb/dist/cfb.min.map diff --git a/src/hello/backend/node_modules/cfb/dist/xlscfb.js b/src/hello/server/node_modules/cfb/dist/xlscfb.js similarity index 100% rename from src/hello/backend/node_modules/cfb/dist/xlscfb.js rename to src/hello/server/node_modules/cfb/dist/xlscfb.js diff --git a/src/hello/backend/node_modules/cfb/package.json b/src/hello/server/node_modules/cfb/package.json similarity index 100% rename from src/hello/backend/node_modules/cfb/package.json rename to src/hello/server/node_modules/cfb/package.json diff --git a/src/hello/backend/node_modules/cfb/types/index.d.ts b/src/hello/server/node_modules/cfb/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/cfb/types/index.d.ts rename to src/hello/server/node_modules/cfb/types/index.d.ts diff --git a/src/hello/backend/node_modules/cfb/types/tsconfig.json b/src/hello/server/node_modules/cfb/types/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/cfb/types/tsconfig.json rename to src/hello/server/node_modules/cfb/types/tsconfig.json diff --git a/src/hello/backend/node_modules/cfb/xlscfb.flow.js b/src/hello/server/node_modules/cfb/xlscfb.flow.js similarity index 100% rename from src/hello/backend/node_modules/cfb/xlscfb.flow.js rename to src/hello/server/node_modules/cfb/xlscfb.flow.js diff --git a/src/hello/backend/node_modules/chalk/index.d.ts b/src/hello/server/node_modules/chalk/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/chalk/index.d.ts rename to src/hello/server/node_modules/chalk/index.d.ts diff --git a/src/hello/backend/node_modules/chalk/license b/src/hello/server/node_modules/chalk/license similarity index 100% rename from src/hello/backend/node_modules/chalk/license rename to src/hello/server/node_modules/chalk/license diff --git a/src/hello/backend/node_modules/chalk/package.json b/src/hello/server/node_modules/chalk/package.json similarity index 100% rename from src/hello/backend/node_modules/chalk/package.json rename to src/hello/server/node_modules/chalk/package.json diff --git a/src/hello/backend/node_modules/chalk/readme.md b/src/hello/server/node_modules/chalk/readme.md similarity index 100% rename from src/hello/backend/node_modules/chalk/readme.md rename to src/hello/server/node_modules/chalk/readme.md diff --git a/src/hello/backend/node_modules/chalk/source/index.js b/src/hello/server/node_modules/chalk/source/index.js similarity index 100% rename from src/hello/backend/node_modules/chalk/source/index.js rename to src/hello/server/node_modules/chalk/source/index.js diff --git a/src/hello/backend/node_modules/chalk/source/templates.js b/src/hello/server/node_modules/chalk/source/templates.js similarity index 100% rename from src/hello/backend/node_modules/chalk/source/templates.js rename to src/hello/server/node_modules/chalk/source/templates.js diff --git a/src/hello/backend/node_modules/chalk/source/util.js b/src/hello/server/node_modules/chalk/source/util.js similarity index 100% rename from src/hello/backend/node_modules/chalk/source/util.js rename to src/hello/server/node_modules/chalk/source/util.js diff --git a/src/hello/backend/node_modules/child_process/README.md b/src/hello/server/node_modules/child_process/README.md similarity index 100% rename from src/hello/backend/node_modules/child_process/README.md rename to src/hello/server/node_modules/child_process/README.md diff --git a/src/hello/backend/node_modules/child_process/package.json b/src/hello/server/node_modules/child_process/package.json similarity index 100% rename from src/hello/backend/node_modules/child_process/package.json rename to src/hello/server/node_modules/child_process/package.json diff --git a/src/hello/backend/node_modules/chokidar/LICENSE b/src/hello/server/node_modules/chokidar/LICENSE similarity index 100% rename from src/hello/backend/node_modules/chokidar/LICENSE rename to src/hello/server/node_modules/chokidar/LICENSE diff --git a/src/hello/backend/node_modules/chokidar/README.md b/src/hello/server/node_modules/chokidar/README.md similarity index 100% rename from src/hello/backend/node_modules/chokidar/README.md rename to src/hello/server/node_modules/chokidar/README.md diff --git a/src/hello/backend/node_modules/chokidar/index.js b/src/hello/server/node_modules/chokidar/index.js similarity index 100% rename from src/hello/backend/node_modules/chokidar/index.js rename to src/hello/server/node_modules/chokidar/index.js diff --git a/src/hello/backend/node_modules/chokidar/lib/constants.js b/src/hello/server/node_modules/chokidar/lib/constants.js similarity index 100% rename from src/hello/backend/node_modules/chokidar/lib/constants.js rename to src/hello/server/node_modules/chokidar/lib/constants.js diff --git a/src/hello/backend/node_modules/chokidar/lib/fsevents-handler.js b/src/hello/server/node_modules/chokidar/lib/fsevents-handler.js similarity index 100% rename from src/hello/backend/node_modules/chokidar/lib/fsevents-handler.js rename to src/hello/server/node_modules/chokidar/lib/fsevents-handler.js diff --git a/src/hello/backend/node_modules/chokidar/lib/nodefs-handler.js b/src/hello/server/node_modules/chokidar/lib/nodefs-handler.js similarity index 100% rename from src/hello/backend/node_modules/chokidar/lib/nodefs-handler.js rename to src/hello/server/node_modules/chokidar/lib/nodefs-handler.js diff --git a/src/hello/backend/node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md b/src/hello/server/node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md rename to src/hello/server/node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md diff --git a/src/hello/backend/node_modules/chokidar/node_modules/glob-parent/LICENSE b/src/hello/server/node_modules/chokidar/node_modules/glob-parent/LICENSE similarity index 100% rename from src/hello/backend/node_modules/chokidar/node_modules/glob-parent/LICENSE rename to src/hello/server/node_modules/chokidar/node_modules/glob-parent/LICENSE diff --git a/src/hello/backend/node_modules/chokidar/node_modules/glob-parent/README.md b/src/hello/server/node_modules/chokidar/node_modules/glob-parent/README.md similarity index 100% rename from src/hello/backend/node_modules/chokidar/node_modules/glob-parent/README.md rename to src/hello/server/node_modules/chokidar/node_modules/glob-parent/README.md diff --git a/src/hello/backend/node_modules/chokidar/node_modules/glob-parent/index.js b/src/hello/server/node_modules/chokidar/node_modules/glob-parent/index.js similarity index 100% rename from src/hello/backend/node_modules/chokidar/node_modules/glob-parent/index.js rename to src/hello/server/node_modules/chokidar/node_modules/glob-parent/index.js diff --git a/src/hello/backend/node_modules/chokidar/node_modules/glob-parent/package.json b/src/hello/server/node_modules/chokidar/node_modules/glob-parent/package.json similarity index 100% rename from src/hello/backend/node_modules/chokidar/node_modules/glob-parent/package.json rename to src/hello/server/node_modules/chokidar/node_modules/glob-parent/package.json diff --git a/src/hello/backend/node_modules/chokidar/package.json b/src/hello/server/node_modules/chokidar/package.json similarity index 100% rename from src/hello/backend/node_modules/chokidar/package.json rename to src/hello/server/node_modules/chokidar/package.json diff --git a/src/hello/backend/node_modules/chokidar/types/index.d.ts b/src/hello/server/node_modules/chokidar/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/chokidar/types/index.d.ts rename to src/hello/server/node_modules/chokidar/types/index.d.ts diff --git a/src/hello/backend/node_modules/codepage/LICENSE b/src/hello/server/node_modules/codepage/LICENSE similarity index 100% rename from src/hello/backend/node_modules/codepage/LICENSE rename to src/hello/server/node_modules/codepage/LICENSE diff --git a/src/hello/backend/node_modules/codepage/README.md b/src/hello/server/node_modules/codepage/README.md similarity index 100% rename from src/hello/backend/node_modules/codepage/README.md rename to src/hello/server/node_modules/codepage/README.md diff --git a/src/hello/backend/node_modules/codepage/bits/10000.js b/src/hello/server/node_modules/codepage/bits/10000.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10000.js rename to src/hello/server/node_modules/codepage/bits/10000.js diff --git a/src/hello/backend/node_modules/codepage/bits/10001.js b/src/hello/server/node_modules/codepage/bits/10001.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10001.js rename to src/hello/server/node_modules/codepage/bits/10001.js diff --git a/src/hello/backend/node_modules/codepage/bits/10002.js b/src/hello/server/node_modules/codepage/bits/10002.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10002.js rename to src/hello/server/node_modules/codepage/bits/10002.js diff --git a/src/hello/backend/node_modules/codepage/bits/10003.js b/src/hello/server/node_modules/codepage/bits/10003.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10003.js rename to src/hello/server/node_modules/codepage/bits/10003.js diff --git a/src/hello/backend/node_modules/codepage/bits/10004.js b/src/hello/server/node_modules/codepage/bits/10004.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10004.js rename to src/hello/server/node_modules/codepage/bits/10004.js diff --git a/src/hello/backend/node_modules/codepage/bits/10005.js b/src/hello/server/node_modules/codepage/bits/10005.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10005.js rename to src/hello/server/node_modules/codepage/bits/10005.js diff --git a/src/hello/backend/node_modules/codepage/bits/10006.js b/src/hello/server/node_modules/codepage/bits/10006.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10006.js rename to src/hello/server/node_modules/codepage/bits/10006.js diff --git a/src/hello/backend/node_modules/codepage/bits/10007.js b/src/hello/server/node_modules/codepage/bits/10007.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10007.js rename to src/hello/server/node_modules/codepage/bits/10007.js diff --git a/src/hello/backend/node_modules/codepage/bits/10008.js b/src/hello/server/node_modules/codepage/bits/10008.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10008.js rename to src/hello/server/node_modules/codepage/bits/10008.js diff --git a/src/hello/backend/node_modules/codepage/bits/10010.js b/src/hello/server/node_modules/codepage/bits/10010.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10010.js rename to src/hello/server/node_modules/codepage/bits/10010.js diff --git a/src/hello/backend/node_modules/codepage/bits/10017.js b/src/hello/server/node_modules/codepage/bits/10017.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10017.js rename to src/hello/server/node_modules/codepage/bits/10017.js diff --git a/src/hello/backend/node_modules/codepage/bits/10021.js b/src/hello/server/node_modules/codepage/bits/10021.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10021.js rename to src/hello/server/node_modules/codepage/bits/10021.js diff --git a/src/hello/backend/node_modules/codepage/bits/10029.js b/src/hello/server/node_modules/codepage/bits/10029.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10029.js rename to src/hello/server/node_modules/codepage/bits/10029.js diff --git a/src/hello/backend/node_modules/codepage/bits/10079.js b/src/hello/server/node_modules/codepage/bits/10079.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10079.js rename to src/hello/server/node_modules/codepage/bits/10079.js diff --git a/src/hello/backend/node_modules/codepage/bits/10081.js b/src/hello/server/node_modules/codepage/bits/10081.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10081.js rename to src/hello/server/node_modules/codepage/bits/10081.js diff --git a/src/hello/backend/node_modules/codepage/bits/10082.js b/src/hello/server/node_modules/codepage/bits/10082.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/10082.js rename to src/hello/server/node_modules/codepage/bits/10082.js diff --git a/src/hello/backend/node_modules/codepage/bits/1010.js b/src/hello/server/node_modules/codepage/bits/1010.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1010.js rename to src/hello/server/node_modules/codepage/bits/1010.js diff --git a/src/hello/backend/node_modules/codepage/bits/1026.js b/src/hello/server/node_modules/codepage/bits/1026.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1026.js rename to src/hello/server/node_modules/codepage/bits/1026.js diff --git a/src/hello/backend/node_modules/codepage/bits/1047.js b/src/hello/server/node_modules/codepage/bits/1047.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1047.js rename to src/hello/server/node_modules/codepage/bits/1047.js diff --git a/src/hello/backend/node_modules/codepage/bits/1132.js b/src/hello/server/node_modules/codepage/bits/1132.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1132.js rename to src/hello/server/node_modules/codepage/bits/1132.js diff --git a/src/hello/backend/node_modules/codepage/bits/1140.js b/src/hello/server/node_modules/codepage/bits/1140.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1140.js rename to src/hello/server/node_modules/codepage/bits/1140.js diff --git a/src/hello/backend/node_modules/codepage/bits/1141.js b/src/hello/server/node_modules/codepage/bits/1141.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1141.js rename to src/hello/server/node_modules/codepage/bits/1141.js diff --git a/src/hello/backend/node_modules/codepage/bits/1142.js b/src/hello/server/node_modules/codepage/bits/1142.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1142.js rename to src/hello/server/node_modules/codepage/bits/1142.js diff --git a/src/hello/backend/node_modules/codepage/bits/1143.js b/src/hello/server/node_modules/codepage/bits/1143.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1143.js rename to src/hello/server/node_modules/codepage/bits/1143.js diff --git a/src/hello/backend/node_modules/codepage/bits/1144.js b/src/hello/server/node_modules/codepage/bits/1144.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1144.js rename to src/hello/server/node_modules/codepage/bits/1144.js diff --git a/src/hello/backend/node_modules/codepage/bits/1145.js b/src/hello/server/node_modules/codepage/bits/1145.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1145.js rename to src/hello/server/node_modules/codepage/bits/1145.js diff --git a/src/hello/backend/node_modules/codepage/bits/1146.js b/src/hello/server/node_modules/codepage/bits/1146.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1146.js rename to src/hello/server/node_modules/codepage/bits/1146.js diff --git a/src/hello/backend/node_modules/codepage/bits/1147.js b/src/hello/server/node_modules/codepage/bits/1147.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1147.js rename to src/hello/server/node_modules/codepage/bits/1147.js diff --git a/src/hello/backend/node_modules/codepage/bits/1148.js b/src/hello/server/node_modules/codepage/bits/1148.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1148.js rename to src/hello/server/node_modules/codepage/bits/1148.js diff --git a/src/hello/backend/node_modules/codepage/bits/1149.js b/src/hello/server/node_modules/codepage/bits/1149.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1149.js rename to src/hello/server/node_modules/codepage/bits/1149.js diff --git a/src/hello/backend/node_modules/codepage/bits/1250.js b/src/hello/server/node_modules/codepage/bits/1250.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1250.js rename to src/hello/server/node_modules/codepage/bits/1250.js diff --git a/src/hello/backend/node_modules/codepage/bits/1251.js b/src/hello/server/node_modules/codepage/bits/1251.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1251.js rename to src/hello/server/node_modules/codepage/bits/1251.js diff --git a/src/hello/backend/node_modules/codepage/bits/1252.js b/src/hello/server/node_modules/codepage/bits/1252.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1252.js rename to src/hello/server/node_modules/codepage/bits/1252.js diff --git a/src/hello/backend/node_modules/codepage/bits/1253.js b/src/hello/server/node_modules/codepage/bits/1253.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1253.js rename to src/hello/server/node_modules/codepage/bits/1253.js diff --git a/src/hello/backend/node_modules/codepage/bits/1254.js b/src/hello/server/node_modules/codepage/bits/1254.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1254.js rename to src/hello/server/node_modules/codepage/bits/1254.js diff --git a/src/hello/backend/node_modules/codepage/bits/1255.js b/src/hello/server/node_modules/codepage/bits/1255.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1255.js rename to src/hello/server/node_modules/codepage/bits/1255.js diff --git a/src/hello/backend/node_modules/codepage/bits/1256.js b/src/hello/server/node_modules/codepage/bits/1256.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1256.js rename to src/hello/server/node_modules/codepage/bits/1256.js diff --git a/src/hello/backend/node_modules/codepage/bits/1257.js b/src/hello/server/node_modules/codepage/bits/1257.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1257.js rename to src/hello/server/node_modules/codepage/bits/1257.js diff --git a/src/hello/backend/node_modules/codepage/bits/1258.js b/src/hello/server/node_modules/codepage/bits/1258.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1258.js rename to src/hello/server/node_modules/codepage/bits/1258.js diff --git a/src/hello/backend/node_modules/codepage/bits/1361.js b/src/hello/server/node_modules/codepage/bits/1361.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/1361.js rename to src/hello/server/node_modules/codepage/bits/1361.js diff --git a/src/hello/backend/node_modules/codepage/bits/20000.js b/src/hello/server/node_modules/codepage/bits/20000.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20000.js rename to src/hello/server/node_modules/codepage/bits/20000.js diff --git a/src/hello/backend/node_modules/codepage/bits/20001.js b/src/hello/server/node_modules/codepage/bits/20001.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20001.js rename to src/hello/server/node_modules/codepage/bits/20001.js diff --git a/src/hello/backend/node_modules/codepage/bits/20002.js b/src/hello/server/node_modules/codepage/bits/20002.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20002.js rename to src/hello/server/node_modules/codepage/bits/20002.js diff --git a/src/hello/backend/node_modules/codepage/bits/20003.js b/src/hello/server/node_modules/codepage/bits/20003.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20003.js rename to src/hello/server/node_modules/codepage/bits/20003.js diff --git a/src/hello/backend/node_modules/codepage/bits/20004.js b/src/hello/server/node_modules/codepage/bits/20004.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20004.js rename to src/hello/server/node_modules/codepage/bits/20004.js diff --git a/src/hello/backend/node_modules/codepage/bits/20005.js b/src/hello/server/node_modules/codepage/bits/20005.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20005.js rename to src/hello/server/node_modules/codepage/bits/20005.js diff --git a/src/hello/backend/node_modules/codepage/bits/20105.js b/src/hello/server/node_modules/codepage/bits/20105.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20105.js rename to src/hello/server/node_modules/codepage/bits/20105.js diff --git a/src/hello/backend/node_modules/codepage/bits/20106.js b/src/hello/server/node_modules/codepage/bits/20106.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20106.js rename to src/hello/server/node_modules/codepage/bits/20106.js diff --git a/src/hello/backend/node_modules/codepage/bits/20107.js b/src/hello/server/node_modules/codepage/bits/20107.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20107.js rename to src/hello/server/node_modules/codepage/bits/20107.js diff --git a/src/hello/backend/node_modules/codepage/bits/20108.js b/src/hello/server/node_modules/codepage/bits/20108.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20108.js rename to src/hello/server/node_modules/codepage/bits/20108.js diff --git a/src/hello/backend/node_modules/codepage/bits/20261.js b/src/hello/server/node_modules/codepage/bits/20261.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20261.js rename to src/hello/server/node_modules/codepage/bits/20261.js diff --git a/src/hello/backend/node_modules/codepage/bits/20269.js b/src/hello/server/node_modules/codepage/bits/20269.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20269.js rename to src/hello/server/node_modules/codepage/bits/20269.js diff --git a/src/hello/backend/node_modules/codepage/bits/20273.js b/src/hello/server/node_modules/codepage/bits/20273.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20273.js rename to src/hello/server/node_modules/codepage/bits/20273.js diff --git a/src/hello/backend/node_modules/codepage/bits/20277.js b/src/hello/server/node_modules/codepage/bits/20277.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20277.js rename to src/hello/server/node_modules/codepage/bits/20277.js diff --git a/src/hello/backend/node_modules/codepage/bits/20278.js b/src/hello/server/node_modules/codepage/bits/20278.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20278.js rename to src/hello/server/node_modules/codepage/bits/20278.js diff --git a/src/hello/backend/node_modules/codepage/bits/20280.js b/src/hello/server/node_modules/codepage/bits/20280.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20280.js rename to src/hello/server/node_modules/codepage/bits/20280.js diff --git a/src/hello/backend/node_modules/codepage/bits/20284.js b/src/hello/server/node_modules/codepage/bits/20284.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20284.js rename to src/hello/server/node_modules/codepage/bits/20284.js diff --git a/src/hello/backend/node_modules/codepage/bits/20285.js b/src/hello/server/node_modules/codepage/bits/20285.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20285.js rename to src/hello/server/node_modules/codepage/bits/20285.js diff --git a/src/hello/backend/node_modules/codepage/bits/20290.js b/src/hello/server/node_modules/codepage/bits/20290.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20290.js rename to src/hello/server/node_modules/codepage/bits/20290.js diff --git a/src/hello/backend/node_modules/codepage/bits/20297.js b/src/hello/server/node_modules/codepage/bits/20297.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20297.js rename to src/hello/server/node_modules/codepage/bits/20297.js diff --git a/src/hello/backend/node_modules/codepage/bits/20420.js b/src/hello/server/node_modules/codepage/bits/20420.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20420.js rename to src/hello/server/node_modules/codepage/bits/20420.js diff --git a/src/hello/backend/node_modules/codepage/bits/20423.js b/src/hello/server/node_modules/codepage/bits/20423.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20423.js rename to src/hello/server/node_modules/codepage/bits/20423.js diff --git a/src/hello/backend/node_modules/codepage/bits/20424.js b/src/hello/server/node_modules/codepage/bits/20424.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20424.js rename to src/hello/server/node_modules/codepage/bits/20424.js diff --git a/src/hello/backend/node_modules/codepage/bits/20833.js b/src/hello/server/node_modules/codepage/bits/20833.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20833.js rename to src/hello/server/node_modules/codepage/bits/20833.js diff --git a/src/hello/backend/node_modules/codepage/bits/20838.js b/src/hello/server/node_modules/codepage/bits/20838.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20838.js rename to src/hello/server/node_modules/codepage/bits/20838.js diff --git a/src/hello/backend/node_modules/codepage/bits/20866.js b/src/hello/server/node_modules/codepage/bits/20866.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20866.js rename to src/hello/server/node_modules/codepage/bits/20866.js diff --git a/src/hello/backend/node_modules/codepage/bits/20871.js b/src/hello/server/node_modules/codepage/bits/20871.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20871.js rename to src/hello/server/node_modules/codepage/bits/20871.js diff --git a/src/hello/backend/node_modules/codepage/bits/20880.js b/src/hello/server/node_modules/codepage/bits/20880.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20880.js rename to src/hello/server/node_modules/codepage/bits/20880.js diff --git a/src/hello/backend/node_modules/codepage/bits/20905.js b/src/hello/server/node_modules/codepage/bits/20905.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20905.js rename to src/hello/server/node_modules/codepage/bits/20905.js diff --git a/src/hello/backend/node_modules/codepage/bits/20924.js b/src/hello/server/node_modules/codepage/bits/20924.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20924.js rename to src/hello/server/node_modules/codepage/bits/20924.js diff --git a/src/hello/backend/node_modules/codepage/bits/20932.js b/src/hello/server/node_modules/codepage/bits/20932.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20932.js rename to src/hello/server/node_modules/codepage/bits/20932.js diff --git a/src/hello/backend/node_modules/codepage/bits/20936.js b/src/hello/server/node_modules/codepage/bits/20936.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20936.js rename to src/hello/server/node_modules/codepage/bits/20936.js diff --git a/src/hello/backend/node_modules/codepage/bits/20949.js b/src/hello/server/node_modules/codepage/bits/20949.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/20949.js rename to src/hello/server/node_modules/codepage/bits/20949.js diff --git a/src/hello/backend/node_modules/codepage/bits/21025.js b/src/hello/server/node_modules/codepage/bits/21025.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/21025.js rename to src/hello/server/node_modules/codepage/bits/21025.js diff --git a/src/hello/backend/node_modules/codepage/bits/21027.js b/src/hello/server/node_modules/codepage/bits/21027.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/21027.js rename to src/hello/server/node_modules/codepage/bits/21027.js diff --git a/src/hello/backend/node_modules/codepage/bits/21866.js b/src/hello/server/node_modules/codepage/bits/21866.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/21866.js rename to src/hello/server/node_modules/codepage/bits/21866.js diff --git a/src/hello/backend/node_modules/codepage/bits/28591.js b/src/hello/server/node_modules/codepage/bits/28591.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28591.js rename to src/hello/server/node_modules/codepage/bits/28591.js diff --git a/src/hello/backend/node_modules/codepage/bits/28592.js b/src/hello/server/node_modules/codepage/bits/28592.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28592.js rename to src/hello/server/node_modules/codepage/bits/28592.js diff --git a/src/hello/backend/node_modules/codepage/bits/28593.js b/src/hello/server/node_modules/codepage/bits/28593.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28593.js rename to src/hello/server/node_modules/codepage/bits/28593.js diff --git a/src/hello/backend/node_modules/codepage/bits/28594.js b/src/hello/server/node_modules/codepage/bits/28594.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28594.js rename to src/hello/server/node_modules/codepage/bits/28594.js diff --git a/src/hello/backend/node_modules/codepage/bits/28595.js b/src/hello/server/node_modules/codepage/bits/28595.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28595.js rename to src/hello/server/node_modules/codepage/bits/28595.js diff --git a/src/hello/backend/node_modules/codepage/bits/28596.js b/src/hello/server/node_modules/codepage/bits/28596.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28596.js rename to src/hello/server/node_modules/codepage/bits/28596.js diff --git a/src/hello/backend/node_modules/codepage/bits/28597.js b/src/hello/server/node_modules/codepage/bits/28597.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28597.js rename to src/hello/server/node_modules/codepage/bits/28597.js diff --git a/src/hello/backend/node_modules/codepage/bits/28598.js b/src/hello/server/node_modules/codepage/bits/28598.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28598.js rename to src/hello/server/node_modules/codepage/bits/28598.js diff --git a/src/hello/backend/node_modules/codepage/bits/28599.js b/src/hello/server/node_modules/codepage/bits/28599.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28599.js rename to src/hello/server/node_modules/codepage/bits/28599.js diff --git a/src/hello/backend/node_modules/codepage/bits/28600.js b/src/hello/server/node_modules/codepage/bits/28600.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28600.js rename to src/hello/server/node_modules/codepage/bits/28600.js diff --git a/src/hello/backend/node_modules/codepage/bits/28601.js b/src/hello/server/node_modules/codepage/bits/28601.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28601.js rename to src/hello/server/node_modules/codepage/bits/28601.js diff --git a/src/hello/backend/node_modules/codepage/bits/28603.js b/src/hello/server/node_modules/codepage/bits/28603.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28603.js rename to src/hello/server/node_modules/codepage/bits/28603.js diff --git a/src/hello/backend/node_modules/codepage/bits/28604.js b/src/hello/server/node_modules/codepage/bits/28604.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28604.js rename to src/hello/server/node_modules/codepage/bits/28604.js diff --git a/src/hello/backend/node_modules/codepage/bits/28605.js b/src/hello/server/node_modules/codepage/bits/28605.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28605.js rename to src/hello/server/node_modules/codepage/bits/28605.js diff --git a/src/hello/backend/node_modules/codepage/bits/28606.js b/src/hello/server/node_modules/codepage/bits/28606.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/28606.js rename to src/hello/server/node_modules/codepage/bits/28606.js diff --git a/src/hello/backend/node_modules/codepage/bits/29001.js b/src/hello/server/node_modules/codepage/bits/29001.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/29001.js rename to src/hello/server/node_modules/codepage/bits/29001.js diff --git a/src/hello/backend/node_modules/codepage/bits/37.js b/src/hello/server/node_modules/codepage/bits/37.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/37.js rename to src/hello/server/node_modules/codepage/bits/37.js diff --git a/src/hello/backend/node_modules/codepage/bits/38598.js b/src/hello/server/node_modules/codepage/bits/38598.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/38598.js rename to src/hello/server/node_modules/codepage/bits/38598.js diff --git a/src/hello/backend/node_modules/codepage/bits/437.js b/src/hello/server/node_modules/codepage/bits/437.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/437.js rename to src/hello/server/node_modules/codepage/bits/437.js diff --git a/src/hello/backend/node_modules/codepage/bits/47451.js b/src/hello/server/node_modules/codepage/bits/47451.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/47451.js rename to src/hello/server/node_modules/codepage/bits/47451.js diff --git a/src/hello/backend/node_modules/codepage/bits/500.js b/src/hello/server/node_modules/codepage/bits/500.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/500.js rename to src/hello/server/node_modules/codepage/bits/500.js diff --git a/src/hello/backend/node_modules/codepage/bits/50220.js b/src/hello/server/node_modules/codepage/bits/50220.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/50220.js rename to src/hello/server/node_modules/codepage/bits/50220.js diff --git a/src/hello/backend/node_modules/codepage/bits/50221.js b/src/hello/server/node_modules/codepage/bits/50221.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/50221.js rename to src/hello/server/node_modules/codepage/bits/50221.js diff --git a/src/hello/backend/node_modules/codepage/bits/50222.js b/src/hello/server/node_modules/codepage/bits/50222.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/50222.js rename to src/hello/server/node_modules/codepage/bits/50222.js diff --git a/src/hello/backend/node_modules/codepage/bits/50225.js b/src/hello/server/node_modules/codepage/bits/50225.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/50225.js rename to src/hello/server/node_modules/codepage/bits/50225.js diff --git a/src/hello/backend/node_modules/codepage/bits/50227.js b/src/hello/server/node_modules/codepage/bits/50227.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/50227.js rename to src/hello/server/node_modules/codepage/bits/50227.js diff --git a/src/hello/backend/node_modules/codepage/bits/51932.js b/src/hello/server/node_modules/codepage/bits/51932.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/51932.js rename to src/hello/server/node_modules/codepage/bits/51932.js diff --git a/src/hello/backend/node_modules/codepage/bits/51936.js b/src/hello/server/node_modules/codepage/bits/51936.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/51936.js rename to src/hello/server/node_modules/codepage/bits/51936.js diff --git a/src/hello/backend/node_modules/codepage/bits/51949.js b/src/hello/server/node_modules/codepage/bits/51949.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/51949.js rename to src/hello/server/node_modules/codepage/bits/51949.js diff --git a/src/hello/backend/node_modules/codepage/bits/52936.js b/src/hello/server/node_modules/codepage/bits/52936.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/52936.js rename to src/hello/server/node_modules/codepage/bits/52936.js diff --git a/src/hello/backend/node_modules/codepage/bits/54936.js b/src/hello/server/node_modules/codepage/bits/54936.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/54936.js rename to src/hello/server/node_modules/codepage/bits/54936.js diff --git a/src/hello/backend/node_modules/codepage/bits/57002.js b/src/hello/server/node_modules/codepage/bits/57002.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57002.js rename to src/hello/server/node_modules/codepage/bits/57002.js diff --git a/src/hello/backend/node_modules/codepage/bits/57003.js b/src/hello/server/node_modules/codepage/bits/57003.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57003.js rename to src/hello/server/node_modules/codepage/bits/57003.js diff --git a/src/hello/backend/node_modules/codepage/bits/57004.js b/src/hello/server/node_modules/codepage/bits/57004.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57004.js rename to src/hello/server/node_modules/codepage/bits/57004.js diff --git a/src/hello/backend/node_modules/codepage/bits/57005.js b/src/hello/server/node_modules/codepage/bits/57005.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57005.js rename to src/hello/server/node_modules/codepage/bits/57005.js diff --git a/src/hello/backend/node_modules/codepage/bits/57006.js b/src/hello/server/node_modules/codepage/bits/57006.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57006.js rename to src/hello/server/node_modules/codepage/bits/57006.js diff --git a/src/hello/backend/node_modules/codepage/bits/57007.js b/src/hello/server/node_modules/codepage/bits/57007.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57007.js rename to src/hello/server/node_modules/codepage/bits/57007.js diff --git a/src/hello/backend/node_modules/codepage/bits/57008.js b/src/hello/server/node_modules/codepage/bits/57008.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57008.js rename to src/hello/server/node_modules/codepage/bits/57008.js diff --git a/src/hello/backend/node_modules/codepage/bits/57009.js b/src/hello/server/node_modules/codepage/bits/57009.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57009.js rename to src/hello/server/node_modules/codepage/bits/57009.js diff --git a/src/hello/backend/node_modules/codepage/bits/57010.js b/src/hello/server/node_modules/codepage/bits/57010.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57010.js rename to src/hello/server/node_modules/codepage/bits/57010.js diff --git a/src/hello/backend/node_modules/codepage/bits/57011.js b/src/hello/server/node_modules/codepage/bits/57011.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/57011.js rename to src/hello/server/node_modules/codepage/bits/57011.js diff --git a/src/hello/backend/node_modules/codepage/bits/620.js b/src/hello/server/node_modules/codepage/bits/620.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/620.js rename to src/hello/server/node_modules/codepage/bits/620.js diff --git a/src/hello/backend/node_modules/codepage/bits/708.js b/src/hello/server/node_modules/codepage/bits/708.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/708.js rename to src/hello/server/node_modules/codepage/bits/708.js diff --git a/src/hello/backend/node_modules/codepage/bits/720.js b/src/hello/server/node_modules/codepage/bits/720.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/720.js rename to src/hello/server/node_modules/codepage/bits/720.js diff --git a/src/hello/backend/node_modules/codepage/bits/737.js b/src/hello/server/node_modules/codepage/bits/737.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/737.js rename to src/hello/server/node_modules/codepage/bits/737.js diff --git a/src/hello/backend/node_modules/codepage/bits/775.js b/src/hello/server/node_modules/codepage/bits/775.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/775.js rename to src/hello/server/node_modules/codepage/bits/775.js diff --git a/src/hello/backend/node_modules/codepage/bits/808.js b/src/hello/server/node_modules/codepage/bits/808.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/808.js rename to src/hello/server/node_modules/codepage/bits/808.js diff --git a/src/hello/backend/node_modules/codepage/bits/850.js b/src/hello/server/node_modules/codepage/bits/850.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/850.js rename to src/hello/server/node_modules/codepage/bits/850.js diff --git a/src/hello/backend/node_modules/codepage/bits/852.js b/src/hello/server/node_modules/codepage/bits/852.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/852.js rename to src/hello/server/node_modules/codepage/bits/852.js diff --git a/src/hello/backend/node_modules/codepage/bits/855.js b/src/hello/server/node_modules/codepage/bits/855.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/855.js rename to src/hello/server/node_modules/codepage/bits/855.js diff --git a/src/hello/backend/node_modules/codepage/bits/857.js b/src/hello/server/node_modules/codepage/bits/857.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/857.js rename to src/hello/server/node_modules/codepage/bits/857.js diff --git a/src/hello/backend/node_modules/codepage/bits/858.js b/src/hello/server/node_modules/codepage/bits/858.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/858.js rename to src/hello/server/node_modules/codepage/bits/858.js diff --git a/src/hello/backend/node_modules/codepage/bits/860.js b/src/hello/server/node_modules/codepage/bits/860.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/860.js rename to src/hello/server/node_modules/codepage/bits/860.js diff --git a/src/hello/backend/node_modules/codepage/bits/861.js b/src/hello/server/node_modules/codepage/bits/861.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/861.js rename to src/hello/server/node_modules/codepage/bits/861.js diff --git a/src/hello/backend/node_modules/codepage/bits/862.js b/src/hello/server/node_modules/codepage/bits/862.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/862.js rename to src/hello/server/node_modules/codepage/bits/862.js diff --git a/src/hello/backend/node_modules/codepage/bits/863.js b/src/hello/server/node_modules/codepage/bits/863.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/863.js rename to src/hello/server/node_modules/codepage/bits/863.js diff --git a/src/hello/backend/node_modules/codepage/bits/864.js b/src/hello/server/node_modules/codepage/bits/864.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/864.js rename to src/hello/server/node_modules/codepage/bits/864.js diff --git a/src/hello/backend/node_modules/codepage/bits/865.js b/src/hello/server/node_modules/codepage/bits/865.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/865.js rename to src/hello/server/node_modules/codepage/bits/865.js diff --git a/src/hello/backend/node_modules/codepage/bits/866.js b/src/hello/server/node_modules/codepage/bits/866.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/866.js rename to src/hello/server/node_modules/codepage/bits/866.js diff --git a/src/hello/backend/node_modules/codepage/bits/869.js b/src/hello/server/node_modules/codepage/bits/869.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/869.js rename to src/hello/server/node_modules/codepage/bits/869.js diff --git a/src/hello/backend/node_modules/codepage/bits/870.js b/src/hello/server/node_modules/codepage/bits/870.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/870.js rename to src/hello/server/node_modules/codepage/bits/870.js diff --git a/src/hello/backend/node_modules/codepage/bits/872.js b/src/hello/server/node_modules/codepage/bits/872.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/872.js rename to src/hello/server/node_modules/codepage/bits/872.js diff --git a/src/hello/backend/node_modules/codepage/bits/874.js b/src/hello/server/node_modules/codepage/bits/874.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/874.js rename to src/hello/server/node_modules/codepage/bits/874.js diff --git a/src/hello/backend/node_modules/codepage/bits/875.js b/src/hello/server/node_modules/codepage/bits/875.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/875.js rename to src/hello/server/node_modules/codepage/bits/875.js diff --git a/src/hello/backend/node_modules/codepage/bits/895.js b/src/hello/server/node_modules/codepage/bits/895.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/895.js rename to src/hello/server/node_modules/codepage/bits/895.js diff --git a/src/hello/backend/node_modules/codepage/bits/932.js b/src/hello/server/node_modules/codepage/bits/932.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/932.js rename to src/hello/server/node_modules/codepage/bits/932.js diff --git a/src/hello/backend/node_modules/codepage/bits/936.js b/src/hello/server/node_modules/codepage/bits/936.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/936.js rename to src/hello/server/node_modules/codepage/bits/936.js diff --git a/src/hello/backend/node_modules/codepage/bits/949.js b/src/hello/server/node_modules/codepage/bits/949.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/949.js rename to src/hello/server/node_modules/codepage/bits/949.js diff --git a/src/hello/backend/node_modules/codepage/bits/950.js b/src/hello/server/node_modules/codepage/bits/950.js similarity index 100% rename from src/hello/backend/node_modules/codepage/bits/950.js rename to src/hello/server/node_modules/codepage/bits/950.js diff --git a/src/hello/backend/node_modules/codepage/cptable.js b/src/hello/server/node_modules/codepage/cptable.js similarity index 100% rename from src/hello/backend/node_modules/codepage/cptable.js rename to src/hello/server/node_modules/codepage/cptable.js diff --git a/src/hello/backend/node_modules/codepage/cputils.js b/src/hello/server/node_modules/codepage/cputils.js similarity index 100% rename from src/hello/backend/node_modules/codepage/cputils.js rename to src/hello/server/node_modules/codepage/cputils.js diff --git a/src/hello/backend/node_modules/codepage/dist/cpexcel.full.js b/src/hello/server/node_modules/codepage/dist/cpexcel.full.js similarity index 100% rename from src/hello/backend/node_modules/codepage/dist/cpexcel.full.js rename to src/hello/server/node_modules/codepage/dist/cpexcel.full.js diff --git a/src/hello/backend/node_modules/codepage/dist/sbcs.full.js b/src/hello/server/node_modules/codepage/dist/sbcs.full.js similarity index 100% rename from src/hello/backend/node_modules/codepage/dist/sbcs.full.js rename to src/hello/server/node_modules/codepage/dist/sbcs.full.js diff --git a/src/hello/backend/node_modules/codepage/package.json b/src/hello/server/node_modules/codepage/package.json similarity index 100% rename from src/hello/backend/node_modules/codepage/package.json rename to src/hello/server/node_modules/codepage/package.json diff --git a/src/hello/backend/node_modules/codepage/types/index.d.ts b/src/hello/server/node_modules/codepage/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/codepage/types/index.d.ts rename to src/hello/server/node_modules/codepage/types/index.d.ts diff --git a/src/hello/backend/node_modules/codepage/types/tsconfig.json b/src/hello/server/node_modules/codepage/types/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/codepage/types/tsconfig.json rename to src/hello/server/node_modules/codepage/types/tsconfig.json diff --git a/src/hello/backend/node_modules/codepage/types/tslint.json b/src/hello/server/node_modules/codepage/types/tslint.json similarity index 100% rename from src/hello/backend/node_modules/codepage/types/tslint.json rename to src/hello/server/node_modules/codepage/types/tslint.json diff --git a/src/hello/backend/node_modules/color-convert/CHANGELOG.md b/src/hello/server/node_modules/color-convert/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/color-convert/CHANGELOG.md rename to src/hello/server/node_modules/color-convert/CHANGELOG.md diff --git a/src/hello/backend/node_modules/color-convert/LICENSE b/src/hello/server/node_modules/color-convert/LICENSE similarity index 100% rename from src/hello/backend/node_modules/color-convert/LICENSE rename to src/hello/server/node_modules/color-convert/LICENSE diff --git a/src/hello/backend/node_modules/color-convert/README.md b/src/hello/server/node_modules/color-convert/README.md similarity index 100% rename from src/hello/backend/node_modules/color-convert/README.md rename to src/hello/server/node_modules/color-convert/README.md diff --git a/src/hello/backend/node_modules/color-convert/conversions.js b/src/hello/server/node_modules/color-convert/conversions.js similarity index 100% rename from src/hello/backend/node_modules/color-convert/conversions.js rename to src/hello/server/node_modules/color-convert/conversions.js diff --git a/src/hello/backend/node_modules/color-convert/index.js b/src/hello/server/node_modules/color-convert/index.js similarity index 100% rename from src/hello/backend/node_modules/color-convert/index.js rename to src/hello/server/node_modules/color-convert/index.js diff --git a/src/hello/backend/node_modules/color-convert/package.json b/src/hello/server/node_modules/color-convert/package.json similarity index 100% rename from src/hello/backend/node_modules/color-convert/package.json rename to src/hello/server/node_modules/color-convert/package.json diff --git a/src/hello/backend/node_modules/color-convert/route.js b/src/hello/server/node_modules/color-convert/route.js similarity index 100% rename from src/hello/backend/node_modules/color-convert/route.js rename to src/hello/server/node_modules/color-convert/route.js diff --git a/src/hello/backend/node_modules/color-name/LICENSE b/src/hello/server/node_modules/color-name/LICENSE similarity index 100% rename from src/hello/backend/node_modules/color-name/LICENSE rename to src/hello/server/node_modules/color-name/LICENSE diff --git a/src/hello/backend/node_modules/color-name/README.md b/src/hello/server/node_modules/color-name/README.md similarity index 100% rename from src/hello/backend/node_modules/color-name/README.md rename to src/hello/server/node_modules/color-name/README.md diff --git a/src/hello/backend/node_modules/color-name/index.js b/src/hello/server/node_modules/color-name/index.js similarity index 100% rename from src/hello/backend/node_modules/color-name/index.js rename to src/hello/server/node_modules/color-name/index.js diff --git a/src/hello/backend/node_modules/color-name/package.json b/src/hello/server/node_modules/color-name/package.json similarity index 100% rename from src/hello/backend/node_modules/color-name/package.json rename to src/hello/server/node_modules/color-name/package.json diff --git a/src/hello/backend/node_modules/combined-stream/License b/src/hello/server/node_modules/combined-stream/License similarity index 100% rename from src/hello/backend/node_modules/combined-stream/License rename to src/hello/server/node_modules/combined-stream/License diff --git a/src/hello/backend/node_modules/combined-stream/Readme.md b/src/hello/server/node_modules/combined-stream/Readme.md similarity index 100% rename from src/hello/backend/node_modules/combined-stream/Readme.md rename to src/hello/server/node_modules/combined-stream/Readme.md diff --git a/src/hello/backend/node_modules/combined-stream/lib/combined_stream.js b/src/hello/server/node_modules/combined-stream/lib/combined_stream.js similarity index 100% rename from src/hello/backend/node_modules/combined-stream/lib/combined_stream.js rename to src/hello/server/node_modules/combined-stream/lib/combined_stream.js diff --git a/src/hello/backend/node_modules/combined-stream/package.json b/src/hello/server/node_modules/combined-stream/package.json similarity index 100% rename from src/hello/backend/node_modules/combined-stream/package.json rename to src/hello/server/node_modules/combined-stream/package.json diff --git a/src/hello/backend/node_modules/combined-stream/yarn.lock b/src/hello/server/node_modules/combined-stream/yarn.lock similarity index 100% rename from src/hello/backend/node_modules/combined-stream/yarn.lock rename to src/hello/server/node_modules/combined-stream/yarn.lock diff --git a/src/hello/backend/node_modules/concat-map/.travis.yml b/src/hello/server/node_modules/concat-map/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/concat-map/.travis.yml rename to src/hello/server/node_modules/concat-map/.travis.yml diff --git a/src/hello/backend/node_modules/concat-map/LICENSE b/src/hello/server/node_modules/concat-map/LICENSE similarity index 100% rename from src/hello/backend/node_modules/concat-map/LICENSE rename to src/hello/server/node_modules/concat-map/LICENSE diff --git a/src/hello/backend/node_modules/concat-map/README.markdown b/src/hello/server/node_modules/concat-map/README.markdown similarity index 100% rename from src/hello/backend/node_modules/concat-map/README.markdown rename to src/hello/server/node_modules/concat-map/README.markdown diff --git a/src/hello/backend/node_modules/concat-map/example/map.js b/src/hello/server/node_modules/concat-map/example/map.js similarity index 100% rename from src/hello/backend/node_modules/concat-map/example/map.js rename to src/hello/server/node_modules/concat-map/example/map.js diff --git a/src/hello/backend/node_modules/concat-map/index.js b/src/hello/server/node_modules/concat-map/index.js similarity index 100% rename from src/hello/backend/node_modules/concat-map/index.js rename to src/hello/server/node_modules/concat-map/index.js diff --git a/src/hello/backend/node_modules/concat-map/package.json b/src/hello/server/node_modules/concat-map/package.json similarity index 100% rename from src/hello/backend/node_modules/concat-map/package.json rename to src/hello/server/node_modules/concat-map/package.json diff --git a/src/hello/backend/node_modules/concat-map/test/map.js b/src/hello/server/node_modules/concat-map/test/map.js similarity index 100% rename from src/hello/backend/node_modules/concat-map/test/map.js rename to src/hello/server/node_modules/concat-map/test/map.js diff --git a/src/hello/server/node_modules/concat-stream/LICENSE b/src/hello/server/node_modules/concat-stream/LICENSE new file mode 100644 index 00000000..99c130e1 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 Max Ogden + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/index.js b/src/hello/server/node_modules/concat-stream/index.js new file mode 100644 index 00000000..dd672a76 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/index.js @@ -0,0 +1,144 @@ +var Writable = require('readable-stream').Writable +var inherits = require('inherits') +var bufferFrom = require('buffer-from') + +if (typeof Uint8Array === 'undefined') { + var U8 = require('typedarray').Uint8Array +} else { + var U8 = Uint8Array +} + +function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) + + if (typeof opts === 'function') { + cb = opts + opts = {} + } + if (!opts) opts = {} + + var encoding = opts.encoding + var shouldInferEncoding = false + + if (!encoding) { + shouldInferEncoding = true + } else { + encoding = String(encoding).toLowerCase() + if (encoding === 'u8' || encoding === 'uint8') { + encoding = 'uint8array' + } + } + + Writable.call(this, { objectMode: true }) + + this.encoding = encoding + this.shouldInferEncoding = shouldInferEncoding + + if (cb) this.on('finish', function () { cb(this.getBody()) }) + this.body = [] +} + +module.exports = ConcatStream +inherits(ConcatStream, Writable) + +ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk) + next() +} + +ConcatStream.prototype.inferEncoding = function (buff) { + var firstBuffer = buff === undefined ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) return 'buffer' + if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' + if (Array.isArray(firstBuffer)) return 'array' + if (typeof firstBuffer === 'string') return 'string' + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' + return 'buffer' +} + +ConcatStream.prototype.getBody = function () { + if (!this.encoding && this.body.length === 0) return [] + if (this.shouldInferEncoding) this.encoding = this.inferEncoding() + if (this.encoding === 'array') return arrayConcat(this.body) + if (this.encoding === 'string') return stringConcat(this.body) + if (this.encoding === 'buffer') return bufferConcat(this.body) + if (this.encoding === 'uint8array') return u8Concat(this.body) + return this.body +} + +var isArray = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]' +} + +function isArrayish (arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)) +} + +function isBufferish (p) { + return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function') +} + +function stringConcat (parts) { + var strings = [] + var needsToString = false + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (typeof p === 'string') { + strings.push(p) + } else if (Buffer.isBuffer(p)) { + strings.push(p) + } else if (isBufferish(p)) { + strings.push(bufferFrom(p)) + } else { + strings.push(bufferFrom(String(p))) + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings) + strings = strings.toString('utf8') + } else { + strings = strings.join('') + } + return strings +} + +function bufferConcat (parts) { + var bufs = [] + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (Buffer.isBuffer(p)) { + bufs.push(p) + } else if (isBufferish(p)) { + bufs.push(bufferFrom(p)) + } else { + bufs.push(bufferFrom(String(p))) + } + } + return Buffer.concat(bufs) +} + +function arrayConcat (parts) { + var res = [] + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]) + } + return res +} + +function u8Concat (parts) { + var len = 0 + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === 'string') { + parts[i] = bufferFrom(parts[i]) + } + len += parts[i].length + } + var u8 = new U8(len) + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i] + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j] + } + } + return u8 +} diff --git a/src/hello/backend/node_modules/readable-stream/CONTRIBUTING.md b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md similarity index 100% rename from src/hello/backend/node_modules/readable-stream/CONTRIBUTING.md rename to src/hello/server/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md diff --git a/src/hello/backend/node_modules/readable-stream/GOVERNANCE.md b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md similarity index 100% rename from src/hello/backend/node_modules/readable-stream/GOVERNANCE.md rename to src/hello/server/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md diff --git a/src/hello/backend/node_modules/readable-stream/LICENSE b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/LICENSE similarity index 100% rename from src/hello/backend/node_modules/readable-stream/LICENSE rename to src/hello/server/node_modules/concat-stream/node_modules/readable-stream/LICENSE diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/README.md b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/README.md new file mode 100644 index 00000000..19117c1a --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/README.md @@ -0,0 +1,106 @@ +# readable-stream + +***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream) + +```bash +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.18.1/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). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +## Version 3.x.x + +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, + https://github.com/nodejs/node/pull/16589, + https://github.com/nodejs/node/pull/15042, + https://github.com/nodejs/node/pull/15665, + https://github.com/nodejs/readable-stream/pull/344 +2. 'readable' have precedence over flowing + https://github.com/nodejs/node/pull/18994 +3. make virtual methods errors consistent + https://github.com/nodejs/node/pull/18813 +4. updated streams error handling + https://github.com/nodejs/node/pull/18438 +5. writable.end should return this. + https://github.com/nodejs/node/pull/18780 +6. readable continues to read when push('') + https://github.com/nodejs/node/pull/18211 +7. add custom inspect to BufferList + https://github.com/nodejs/node/pull/17907 +8. always defer 'readable' with nextTick + https://github.com/nodejs/node/pull/17979 + +## Version 2.x.x +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 + +Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce] + +# Usage + +You can swap your `require('stream')` with `require('readable-stream')` +without any changes, if you are just using one of the main classes and +functions. + +```js +const { + Readable, + Writable, + Transform, + Duplex, + pipeline, + finished +} = require('readable-stream') +```` + +Note that `require('stream')` will return `Stream`, while +`require('readable-stream')` will return `Readable`. We discourage using +whatever is exported directly, but rather use one of the properties as +shown in the example above. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> +* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com> + +[sauce]: https://saucelabs.com diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/errors-browser.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/errors-browser.js new file mode 100644 index 00000000..fb8e73e1 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/errors-browser.js @@ -0,0 +1,127 @@ +'use strict'; + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var codes = {}; + +function createErrorType(code, message, Base) { + if (!Base) { + Base = Error; + } + + function getMessage(arg1, arg2, arg3) { + if (typeof message === 'string') { + return message; + } else { + return message(arg1, arg2, arg3); + } + } + + var NodeError = + /*#__PURE__*/ + function (_Base) { + _inheritsLoose(NodeError, _Base); + + function NodeError(arg1, arg2, arg3) { + return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; + } + + return NodeError; + }(Base); + + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + codes[code] = NodeError; +} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js + + +function oneOf(expected, thing) { + if (Array.isArray(expected)) { + var len = expected.length; + expected = expected.map(function (i) { + return String(i); + }); + + if (len > 2) { + return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; + } else if (len === 2) { + return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); + } else { + return "of ".concat(thing, " ").concat(expected[0]); + } + } else { + return "of ".concat(thing, " ").concat(String(expected)); + } +} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith + + +function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; +} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith + + +function endsWith(str, search, this_len) { + if (this_len === undefined || this_len > str.length) { + this_len = str.length; + } + + return str.substring(this_len - search.length, this_len) === search; +} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes + + +function includes(str, search, start) { + if (typeof start !== 'number') { + start = 0; + } + + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } +} + +createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"'; +}, TypeError); +createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { + // determiner: 'must be' or 'must not be' + var determiner; + + if (typeof expected === 'string' && startsWith(expected, 'not ')) { + determiner = 'must not be'; + expected = expected.replace(/^not /, ''); + } else { + determiner = 'must be'; + } + + var msg; + + if (endsWith(name, ' argument')) { + // For cases like 'first argument' + msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); + } else { + var type = includes(name, '.') ? 'property' : 'argument'; + msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); + } + + msg += ". Received type ".concat(typeof actual); + return msg; +}, TypeError); +createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); +createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { + return 'The ' + name + ' method is not implemented'; +}); +createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); +createErrorType('ERR_STREAM_DESTROYED', function (name) { + return 'Cannot call ' + name + ' after a stream was destroyed'; +}); +createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); +createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); +createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); +createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); +createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { + return 'Unknown encoding: ' + arg; +}, TypeError); +createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); +module.exports.codes = codes; diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/errors.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/errors.js new file mode 100644 index 00000000..8471526d --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/errors.js @@ -0,0 +1,116 @@ +'use strict'; + +const codes = {}; + +function createErrorType(code, message, Base) { + if (!Base) { + Base = Error + } + + function getMessage (arg1, arg2, arg3) { + if (typeof message === 'string') { + return message + } else { + return message(arg1, arg2, arg3) + } + } + + class NodeError extends Base { + constructor (arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + + codes[code] = NodeError; +} + +// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js +function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; + } + } else { + return `of ${thing} ${String(expected)}`; + } +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith +function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith +function endsWith(str, search, this_len) { + if (this_len === undefined || this_len > str.length) { + this_len = str.length; + } + return str.substring(this_len - search.length, this_len) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes +function includes(str, search, start) { + if (typeof start !== 'number') { + start = 0; + } + + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } +} + +createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"' +}, TypeError); +createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { + // determiner: 'must be' or 'must not be' + let determiner; + if (typeof expected === 'string' && startsWith(expected, 'not ')) { + determiner = 'must not be'; + expected = expected.replace(/^not /, ''); + } else { + determiner = 'must be'; + } + + let msg; + if (endsWith(name, ' argument')) { + // For cases like 'first argument' + msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; + } else { + const type = includes(name, '.') ? 'property' : 'argument'; + msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; + } + + msg += `. Received type ${typeof actual}`; + return msg; +}, TypeError); +createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); +createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { + return 'The ' + name + ' method is not implemented' +}); +createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); +createErrorType('ERR_STREAM_DESTROYED', function (name) { + return 'Cannot call ' + name + ' after a stream was destroyed'; +}); +createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); +createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); +createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); +createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); +createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { + return 'Unknown encoding: ' + arg +}, TypeError); +createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); + +module.exports.codes = codes; diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/experimentalWarning.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/experimentalWarning.js new file mode 100644 index 00000000..78e84149 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/experimentalWarning.js @@ -0,0 +1,17 @@ +'use strict' + +var experimentalWarnings = new Set(); + +function emitExperimentalWarning(feature) { + if (experimentalWarnings.has(feature)) return; + var msg = feature + ' is an experimental feature. This feature could ' + + 'change at any time'; + experimentalWarnings.add(feature); + process.emitWarning(msg, 'ExperimentalWarning'); +} + +function noop() {} + +module.exports.emitExperimentalWarning = process.emitWarning + ? emitExperimentalWarning + : noop; diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000..19abfa60 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,126 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +}; +/**/ + +module.exports = Duplex; +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); +require('inherits')(Duplex, Readable); +{ + // Allow the keys array to be GC'ed. + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + if (options) { + if (options.readable === false) this.readable = false; + if (options.writable === false) this.writable = false; + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once('end', onend); + } + } +} +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); +Object.defineProperty(Duplex.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +Object.defineProperty(Duplex.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); + +// the no-half-open enforcer +function onend() { + // If the writable side ended, then we're ok. + if (this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(onEndNT, this); +} +function onEndNT(self) { + self.end(); +} +Object.defineProperty(Duplex.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000..24a6bdde --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,37 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; +var Transform = require('./_stream_transform'); +require('inherits')(PassThrough, Transform); +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); +} +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000..df1f608d --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1027 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +module.exports = Readable; + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; +var EElistenerCount = function EElistenerCount(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ +var debugUtil = require('util'); +var debug; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function debug() {}; +} +/**/ + +var BufferList = require('./internal/streams/buffer_list'); +var destroyImpl = require('./internal/streams/destroy'); +var _require = require('./internal/streams/state'), + getHighWaterMark = _require.getHighWaterMark; +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; + +// 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) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} +function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || require('./_stream_duplex'); + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + + // Should close be emitted on destroy. Defaults to true. + 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. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + if (!(this instanceof Readable)) return new Readable(options); + + // Checking for a Stream.Duplex instance is faster here instead of inside + // the ReadableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); + + // legacy + this.readable = true; + if (options) { + if (typeof options.read === 'function') this._read = options.read; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + Stream.call(this); +} +Object.defineProperty(Readable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug('readableAddChunk', chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (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) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); + } + } + + // We can push more data if we are below the highWaterMark. + // Also, if we have no data yet, we can stand some more bytes. + // This is to work around cases where hwm=0, such as the repl. + return !state.ended && (state.length < state.highWaterMark || state.length === 0); +} +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit('data', chunk); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); + } + return er; +} +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + 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(); + if (content !== '') this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; +}; + +// Don't raise the hwm > 1GB +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 + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret !== null) this.emit('data', ret); + return ret; +}; +function onEofChunk(stream, state) { + debug('onEofChunk'); + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + if (state.sync) { + // if we are sync, wait until next tick to emit the data. + // Otherwise we risk emitting data in the flow() + // the readable code triggers during a read() call + emitReadable(stream); + } else { + // emit 'readable' now to make sure it gets picked up. + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); + } + } +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + debug('emitReadable', state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } +} +function emitReadable_(stream) { + var state = stream._readableState; + debug('emitReadable_', state.destroyed, state.length, state.ended); + 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. + // 2. It is not ended. + // 3. It is below the highWaterMark, so we can schedule + // another readable later. + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } +} +function maybeReadMore_(stream, state) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); +}; +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + debug('dest.write', ret); + if (ret === false) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + return dest; +}; +function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { + hasUnpiped: false + }); + return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit('unpipe', this, unpipeInfo); + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + var state = this._readableState; + if (ev === 'data') { + // update readableListening so that resume() may be a no-op + // a few lines down. This is needed to support once('readable'). + state.readableListening = this.listenerCount('readable') > 0; + + // Try start flowing on next tick if stream isn't explicitly paused + if (state.flowing !== false) this.resume(); + } else if (ev === 'readable') { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug('on readable', state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } + } + } + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; +Readable.prototype.removeListener = function (ev, fn) { + var res = Stream.prototype.removeListener.call(this, ev, fn); + if (ev === 'readable') { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +Readable.prototype.removeAllListeners = function (ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === 'readable' || ev === undefined) { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +function updateReadableListening(self) { + var state = self._readableState; + state.readableListening = self.listenerCount('readable') > 0; + if (state.resumeScheduled && !state.paused) { + // flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true; + + // crude way to check if we should resume + } else if (self.listenerCount('data') > 0) { + self.resume(); + } +} +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + // we flow only if there is no one listening + // for readable, but we still have to call + // resume() + state.flowing = !state.readableListening; + resume(this, state); + } + state.paused = false; + return this; +}; +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } +} +function resume_(stream, state) { + debug('resume', state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + this._readableState.paused = true; + return this; +}; +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + _this.push(null); + }); + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; +}; +if (typeof Symbol === 'function') { + Readable.prototype[Symbol.asyncIterator] = function () { + if (createReadableStreamAsyncIterator === undefined) { + createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); + } + return createReadableStreamAsyncIterator(this); + }; +} +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } +}); +Object.defineProperty(Readable.prototype, 'readableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } +}); +Object.defineProperty(Readable.prototype, 'readableFlowing', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; + } + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; +Object.defineProperty(Readable.prototype, 'readableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.length; + } +}); + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = state.buffer.consume(n, state.decoder); + } + return ret; +} +function endReadable(stream) { + var state = stream._readableState; + debug('endReadable', state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } +} +function endReadableNT(state, stream) { + debug('endReadableNT', state.endEmitted, state.length); + + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + 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; + } + return -1; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000..1ccb7157 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,190 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; +var _require$codes = require('../errors').codes, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, + ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; +var Duplex = require('./_stream_duplex'); +require('inherits')(Transform, Duplex); +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit('error', new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + // single equals check for both `null` and `undefined` + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} +function prefinish() { + var _this = this; + if (typeof this._flush === 'function' && !this._readableState.destroyed) { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); +}; +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; +Transform.prototype._destroy = function (err, cb) { + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + }); +}; +function done(stream, er, data) { + if (er) return stream.emit('error', er); + if (data != null) + // single equals check for both `null` and `undefined` + stream.push(data); + + // TODO(BridgeAR): Write a test for these two error cases + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000..292415e2 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,641 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} +var destroyImpl = require('./internal/streams/destroy'); +var _require = require('./internal/streams/state'), + getHighWaterMark = _require.getHighWaterMark; +var _require$codes = require('../errors').codes, + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, + ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, + 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() {} +function WritableState(options, stream, isDuplex) { + Duplex = Duplex || require('./_stream_duplex'); + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // Should close be emitted on destroy. Defaults to true. + 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 + this.corkedRequestsFree = new CorkedRequest(this); +} +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function realHasInstance(object) { + return object instanceof this; + }; +} +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + + // Checking for a Stream.Duplex instance is faster here instead of inside + // the WritableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); + + // legacy. + this.writable = true; + if (options) { + if (typeof options.write === 'function') this._write = options.write; + if (typeof options.writev === 'function') this._writev = options.writev; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + if (typeof options.final === 'function') this._final = options.final; + } + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + 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 + 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 +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== 'string' && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); + } + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + return true; +} +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== 'function') cb = nop; + if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; +}; +Writable.prototype.cork = function () { + this._writableState.corked++; +}; +Writable.prototype.uncork = function () { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; +Object.defineProperty(Writable.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; +} +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + process.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } +} +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; +} +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); +}; +Writable.prototype._writev = null; +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); + return this; +}; +Object.defineProperty(Writable.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function' && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(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(); + } + } + } + } + return need; +} +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) process.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; +} +Object.defineProperty(Writable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + cb(err); +}; \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/async_iterator.js new file mode 100644 index 00000000..742c5a46 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/async_iterator.js @@ -0,0 +1,180 @@ +'use strict'; + +var _Object$setPrototypeO; +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var finished = require('./end-of-stream'); +var kLastResolve = Symbol('lastResolve'); +var kLastReject = Symbol('lastReject'); +var kError = Symbol('error'); +var kEnded = Symbol('ended'); +var kLastPromise = Symbol('lastPromise'); +var kHandlePromise = Symbol('handlePromise'); +var kStream = Symbol('stream'); +function createIterResult(value, done) { + return { + value: value, + done: done + }; +} +function readAndResolve(iter) { + var resolve = iter[kLastResolve]; + if (resolve !== null) { + var data = iter[kStream].read(); + // we defer if data is null + // we can be expecting either 'end' or + // 'error' + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve(createIterResult(data, false)); + } + } +} +function onReadable(iter) { + // we wait for the next tick, because it might + // emit an error with process.nextTick + process.nextTick(readAndResolve, iter); +} +function wrapForNext(lastPromise, iter) { + return function (resolve, reject) { + lastPromise.then(function () { + if (iter[kEnded]) { + resolve(createIterResult(undefined, true)); + return; + } + iter[kHandlePromise](resolve, reject); + }, reject); + }; +} +var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); +var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + // if we have detected an error in the meanwhile + // reject straight away + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); + } + if (this[kEnded]) { + return Promise.resolve(createIterResult(undefined, true)); + } + if (this[kStream].destroyed) { + // We need to defer via nextTick because if .destroy(err) is + // called, the error will be emitted via nextTick, and + // we cannot guarantee that there is no error lingering around + // waiting to be emitted. + return new Promise(function (resolve, reject) { + process.nextTick(function () { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve(createIterResult(undefined, true)); + } + }); + }); + } + + // if we have multiple next() calls + // we will wait for the previous Promise to finish + // this logic is optimized to support for await loops, + // where next() is only called once at a time + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); + } else { + // fast path needed to support multiple this.push() + // without triggering the next() queue + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); + } + this[kLastPromise] = promise; + return promise; + } +}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { + return this; +}), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + // destroy(err, cb) is a private API + // we can guarantee we have that here, because we control the + // Readable class this is attached to + return new Promise(function (resolve, reject) { + _this2[kStream].destroy(null, function (err) { + if (err) { + reject(err); + return; + } + resolve(createIterResult(undefined, true)); + }); + }); +}), _Object$setPrototypeO), AsyncIteratorPrototype); +var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { + var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve, reject) { + var data = iterator[kStream].read(); + if (data) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(data, false)); + } else { + iterator[kLastResolve] = resolve; + iterator[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator[kLastPromise] = null; + finished(stream, function (err) { + if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { + var reject = iterator[kLastReject]; + // reject if we are waiting for data in the Promise + // returned by next() and store the error + if (reject !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + reject(err); + } + iterator[kError] = err; + return; + } + var resolve = iterator[kLastResolve]; + if (resolve !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(undefined, true)); + } + iterator[kEnded] = true; + }); + stream.on('readable', onReadable.bind(null, iterator)); + return iterator; +}; +module.exports = createReadableStreamAsyncIterator; \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js new file mode 100644 index 00000000..69bda497 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js @@ -0,0 +1,183 @@ +'use strict'; + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); 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, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var _require = require('buffer'), + Buffer = _require.Buffer; +var _require2 = require('util'), + inspect = _require2.inspect; +var custom = inspect && inspect.custom || 'inspect'; +function copyBuffer(src, target, offset) { + Buffer.prototype.copy.call(src, target, offset); +} +module.exports = /*#__PURE__*/function () { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _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; + } + }, { + 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; + } + }, { + 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; + } + }, { + 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; + } + 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); + } + 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; + } + ++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; + } + ++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(_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/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 00000000..31a17c4d --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,96 @@ +'use strict'; + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(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; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function (err) { + if (!cb && err) { + 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); + cb(err); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + return this; +} +function emitErrorAndCloseNT(self, err) { + emitErrorNT(self, err); + emitCloseNT(self); +} +function emitCloseNT(self) { + if (self._writableState && !self._writableState.emitClose) return; + if (self._readableState && !self._readableState.emitClose) return; + self.emit('close'); +} +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} +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, + errorOrDestroy: errorOrDestroy +}; \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js new file mode 100644 index 00000000..59c671b5 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js @@ -0,0 +1,86 @@ +// Ported from https://github.com/mafintosh/end-of-stream with +// permission from the author, Mathias Buus (@mafintosh). + +'use strict'; + +var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + callback.apply(this, args); + }; +} +function noop() {} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} +function eos(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish() { + if (!stream.writable) onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; + var onerror = function onerror(err) { + callback.call(stream, err); + }; + var onclose = function onclose() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + var onrequest = function onrequest() { + stream.req.on('finish', onfinish); + }; + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest();else stream.on('request', onrequest); + } else if (writable && !stream._writableState) { + // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + return function () { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +} +module.exports = eos; \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from-browser.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from-browser.js new file mode 100644 index 00000000..a4ce56f3 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/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/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from.js new file mode 100644 index 00000000..0a34ee92 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from.js @@ -0,0 +1,52 @@ +'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); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +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 _yield$iterator$next = yield iterator.next(), + value = _yield$iterator$next.value, + done = _yield$iterator$next.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; diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js new file mode 100644 index 00000000..e6f39241 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js @@ -0,0 +1,86 @@ +// Ported from https://github.com/mafintosh/pump with +// permission from the author, Mathias Buus (@mafintosh). + +'use strict'; + +var eos; +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + callback.apply(void 0, arguments); + }; +} +var _require$codes = require('../../../errors').codes, + ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; +function noop(err) { + // Rethrow the error if it exists to avoid swallowing it + if (err) throw err; +} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} +function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on('close', function () { + closed = true; + }); + if (eos === undefined) eos = require('./end-of-stream'); + eos(stream, { + readable: reading, + writable: writing + }, function (err) { + if (err) return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function (err) { + if (closed) return; + if (destroyed) return; + destroyed = true; + + // request.destroy just do .end - .abort is what we want + if (isRequest(stream)) return stream.abort(); + if (typeof stream.destroy === 'function') return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED('pipe')); + }; +} +function call(fn) { + fn(); +} +function pipe(from, to) { + return from.pipe(to); +} +function popCallback(streams) { + if (!streams.length) return noop; + if (typeof streams[streams.length - 1] !== 'function') return noop; + return streams.pop(); +} +function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS('streams'); + } + var error; + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err; + if (err) destroys.forEach(call); + if (reading) return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); +} +module.exports = pipeline; \ No newline at end of file diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/state.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/state.js new file mode 100644 index 00000000..3fbf8927 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/state.js @@ -0,0 +1,22 @@ +'use strict'; + +var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; +function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; +} +function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : 'highWaterMark'; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + return Math.floor(hwm); + } + + // Default value + return state.objectMode ? 16 : 16 * 1024; +} +module.exports = { + getHighWaterMark: getHighWaterMark +}; \ No newline at end of file diff --git a/src/hello/backend/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js similarity index 100% rename from src/hello/backend/node_modules/readable-stream/lib/internal/streams/stream-browser.js rename to src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js diff --git a/src/hello/backend/node_modules/readable-stream/lib/internal/streams/stream.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js similarity index 100% rename from src/hello/backend/node_modules/readable-stream/lib/internal/streams/stream.js rename to src/hello/server/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/package.json b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/package.json new file mode 100644 index 00000000..ade59e71 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/package.json @@ -0,0 +1,68 @@ +{ + "name": "readable-stream", + "version": "3.6.2", + "description": "Streams3, a user-land copy of the stream library from Node.js", + "main": "readable.js", + "engines": { + "node": ">= 6" + }, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "devDependencies": { + "@babel/cli": "^7.2.0", + "@babel/core": "^7.2.0", + "@babel/polyfill": "^7.0.0", + "@babel/preset-env": "^7.2.0", + "airtap": "0.0.9", + "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", + "lolex": "^2.6.0", + "nyc": "^11.0.0", + "pump": "^3.0.0", + "rimraf": "^2.6.2", + "tap": "^12.0.0", + "tape": "^4.9.0", + "tar-fs": "^1.16.2", + "util-promisify": "^2.1.0" + }, + "scripts": { + "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", + "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", + "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", + "test-browser-local": "airtap --open --local -- test/browser.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov", + "update-browser-errors": "babel -o errors-browser.js errors.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "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" + }, + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "license": "MIT" +} diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js new file mode 100644 index 00000000..adbf60de --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,9 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); +exports.finished = require('./lib/internal/streams/end-of-stream.js'); +exports.pipeline = require('./lib/internal/streams/pipeline.js'); diff --git a/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/readable.js b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/readable.js new file mode 100644 index 00000000..9e0ca120 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/node_modules/readable-stream/readable.js @@ -0,0 +1,16 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream.Readable; + Object.assign(module.exports, Stream); + module.exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); + exports.finished = require('./lib/internal/streams/end-of-stream.js'); + exports.pipeline = require('./lib/internal/streams/pipeline.js'); +} diff --git a/src/hello/server/node_modules/concat-stream/package.json b/src/hello/server/node_modules/concat-stream/package.json new file mode 100644 index 00000000..37978286 --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/package.json @@ -0,0 +1,55 @@ +{ + "name": "concat-stream", + "version": "2.0.0", + "description": "writable stream that concatenates strings or binary data and calls a callback with the result", + "tags": [ + "stream", + "simple", + "util", + "utility" + ], + "author": "Max Ogden ", + "repository": { + "type": "git", + "url": "http://github.com/maxogden/concat-stream.git" + }, + "bugs": { + "url": "http://github.com/maxogden/concat-stream/issues" + }, + "engines": [ + "node >= 6.0" + ], + "main": "index.js", + "files": [ + "index.js" + ], + "scripts": { + "test": "tape test/*.js test/server/*.js" + }, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + }, + "devDependencies": { + "tape": "^4.6.3" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/src/hello/server/node_modules/concat-stream/readme.md b/src/hello/server/node_modules/concat-stream/readme.md new file mode 100644 index 00000000..7aa19c4f --- /dev/null +++ b/src/hello/server/node_modules/concat-stream/readme.md @@ -0,0 +1,102 @@ +# concat-stream + +Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer. + +[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream) + +[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/) + +### description + +Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you. + +Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM). + +There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details. + +## Related + +`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. + +### examples + +#### Buffers + +```js +var fs = require('fs') +var concat = require('concat-stream') + +var readStream = fs.createReadStream('cat.png') +var concatStream = concat(gotPicture) + +readStream.on('error', handleError) +readStream.pipe(concatStream) + +function gotPicture(imageBuffer) { + // imageBuffer is all of `cat.png` as a node.js Buffer +} + +function handleError(err) { + // handle your error appropriately here, e.g.: + console.error(err) // print the error to STDERR + process.exit(1) // exit program with non-zero exit code +} + +``` + +#### Arrays + +```js +var write = concat(function(data) {}) +write.write([1,2,3]) +write.write([4,5,6]) +write.end() +// data will be [1,2,3,4,5,6] in the above callback +``` + +#### Uint8Arrays + +```js +var write = concat(function(data) {}) +var a = new Uint8Array(3) +a[0] = 97; a[1] = 98; a[2] = 99 +write.write(a) +write.write('!') +write.end(Buffer.from('!!1')) +``` + +See `test/` for more examples + +# methods + +```js +var concat = require('concat-stream') +``` + +## var writable = concat(opts={}, cb) + +Return a `writable` stream that will fire `cb(data)` with all of the data that +was written to the stream. Data can be written to `writable` as strings, +Buffers, arrays of byte integers, and Uint8Arrays. + +By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason. + +* `string` - get a string +* `buffer` - get back a Buffer +* `array` - get an array of byte integers +* `uint8array`, `u8`, `uint8` - get back a Uint8Array +* `object`, get back an array of Objects + +If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`. + +If nothing is written to `writable` then `data` will be an empty array `[]`. + +# error handling + +`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors. + +We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code. + +# license + +MIT LICENSE diff --git a/src/hello/backend/node_modules/content-disposition/HISTORY.md b/src/hello/server/node_modules/content-disposition/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/content-disposition/HISTORY.md rename to src/hello/server/node_modules/content-disposition/HISTORY.md diff --git a/src/hello/backend/node_modules/content-disposition/LICENSE b/src/hello/server/node_modules/content-disposition/LICENSE similarity index 100% rename from src/hello/backend/node_modules/content-disposition/LICENSE rename to src/hello/server/node_modules/content-disposition/LICENSE diff --git a/src/hello/backend/node_modules/content-disposition/README.md b/src/hello/server/node_modules/content-disposition/README.md similarity index 100% rename from src/hello/backend/node_modules/content-disposition/README.md rename to src/hello/server/node_modules/content-disposition/README.md diff --git a/src/hello/backend/node_modules/content-disposition/index.js b/src/hello/server/node_modules/content-disposition/index.js similarity index 100% rename from src/hello/backend/node_modules/content-disposition/index.js rename to src/hello/server/node_modules/content-disposition/index.js diff --git a/src/hello/backend/node_modules/content-disposition/package.json b/src/hello/server/node_modules/content-disposition/package.json similarity index 100% rename from src/hello/backend/node_modules/content-disposition/package.json rename to src/hello/server/node_modules/content-disposition/package.json diff --git a/src/hello/backend/node_modules/content-type/HISTORY.md b/src/hello/server/node_modules/content-type/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/content-type/HISTORY.md rename to src/hello/server/node_modules/content-type/HISTORY.md diff --git a/src/hello/backend/node_modules/content-type/LICENSE b/src/hello/server/node_modules/content-type/LICENSE similarity index 100% rename from src/hello/backend/node_modules/content-type/LICENSE rename to src/hello/server/node_modules/content-type/LICENSE diff --git a/src/hello/backend/node_modules/content-type/README.md b/src/hello/server/node_modules/content-type/README.md similarity index 100% rename from src/hello/backend/node_modules/content-type/README.md rename to src/hello/server/node_modules/content-type/README.md diff --git a/src/hello/backend/node_modules/content-type/index.js b/src/hello/server/node_modules/content-type/index.js similarity index 100% rename from src/hello/backend/node_modules/content-type/index.js rename to src/hello/server/node_modules/content-type/index.js diff --git a/src/hello/backend/node_modules/content-type/package.json b/src/hello/server/node_modules/content-type/package.json similarity index 100% rename from src/hello/backend/node_modules/content-type/package.json rename to src/hello/server/node_modules/content-type/package.json diff --git a/src/hello/backend/node_modules/cookie-signature/History.md b/src/hello/server/node_modules/cookie-signature/History.md similarity index 100% rename from src/hello/backend/node_modules/cookie-signature/History.md rename to src/hello/server/node_modules/cookie-signature/History.md diff --git a/src/hello/backend/node_modules/cookie-signature/Readme.md b/src/hello/server/node_modules/cookie-signature/Readme.md similarity index 100% rename from src/hello/backend/node_modules/cookie-signature/Readme.md rename to src/hello/server/node_modules/cookie-signature/Readme.md diff --git a/src/hello/backend/node_modules/cookie-signature/index.js b/src/hello/server/node_modules/cookie-signature/index.js similarity index 100% rename from src/hello/backend/node_modules/cookie-signature/index.js rename to src/hello/server/node_modules/cookie-signature/index.js diff --git a/src/hello/backend/node_modules/cookie-signature/package.json b/src/hello/server/node_modules/cookie-signature/package.json similarity index 100% rename from src/hello/backend/node_modules/cookie-signature/package.json rename to src/hello/server/node_modules/cookie-signature/package.json diff --git a/src/hello/backend/node_modules/cookie/LICENSE b/src/hello/server/node_modules/cookie/LICENSE similarity index 100% rename from src/hello/backend/node_modules/cookie/LICENSE rename to src/hello/server/node_modules/cookie/LICENSE diff --git a/src/hello/backend/node_modules/cookie/README.md b/src/hello/server/node_modules/cookie/README.md similarity index 100% rename from src/hello/backend/node_modules/cookie/README.md rename to src/hello/server/node_modules/cookie/README.md diff --git a/src/hello/backend/node_modules/cookie/SECURITY.md b/src/hello/server/node_modules/cookie/SECURITY.md similarity index 100% rename from src/hello/backend/node_modules/cookie/SECURITY.md rename to src/hello/server/node_modules/cookie/SECURITY.md diff --git a/src/hello/backend/node_modules/cookie/index.js b/src/hello/server/node_modules/cookie/index.js similarity index 100% rename from src/hello/backend/node_modules/cookie/index.js rename to src/hello/server/node_modules/cookie/index.js diff --git a/src/hello/backend/node_modules/cookie/package.json b/src/hello/server/node_modules/cookie/package.json similarity index 100% rename from src/hello/backend/node_modules/cookie/package.json rename to src/hello/server/node_modules/cookie/package.json diff --git a/src/hello/backend/node_modules/core-util-is/LICENSE b/src/hello/server/node_modules/core-util-is/LICENSE similarity index 100% rename from src/hello/backend/node_modules/core-util-is/LICENSE rename to src/hello/server/node_modules/core-util-is/LICENSE diff --git a/src/hello/backend/node_modules/core-util-is/README.md b/src/hello/server/node_modules/core-util-is/README.md similarity index 100% rename from src/hello/backend/node_modules/core-util-is/README.md rename to src/hello/server/node_modules/core-util-is/README.md diff --git a/src/hello/backend/node_modules/core-util-is/lib/util.js b/src/hello/server/node_modules/core-util-is/lib/util.js similarity index 100% rename from src/hello/backend/node_modules/core-util-is/lib/util.js rename to src/hello/server/node_modules/core-util-is/lib/util.js diff --git a/src/hello/backend/node_modules/core-util-is/package.json b/src/hello/server/node_modules/core-util-is/package.json similarity index 100% rename from src/hello/backend/node_modules/core-util-is/package.json rename to src/hello/server/node_modules/core-util-is/package.json diff --git a/src/hello/server/node_modules/cors/CONTRIBUTING.md b/src/hello/server/node_modules/cors/CONTRIBUTING.md new file mode 100644 index 00000000..591b09a1 --- /dev/null +++ b/src/hello/server/node_modules/cors/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# contributing to `cors` + +CORS is a node.js package for providing a [connect](http://www.senchalabs.org/connect/)/[express](http://expressjs.com/) middleware that can be used to enable [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) with various options. Learn more about the project in [the README](README.md). + +## The CORS Spec + +[http://www.w3.org/TR/cors/](http://www.w3.org/TR/cors/) + +## Pull Requests Welcome + +* Include `'use strict';` in every javascript file. +* 2 space indentation. +* Please run the testing steps below before submitting. + +## Testing + +```bash +$ npm install +$ npm test +``` + +## Interactive Testing Harness + +[http://node-cors-client.herokuapp.com](http://node-cors-client.herokuapp.com) + +Related git repositories: + +* [https://github.com/TroyGoode/node-cors-server](https://github.com/TroyGoode/node-cors-server) +* [https://github.com/TroyGoode/node-cors-client](https://github.com/TroyGoode/node-cors-client) + +## License + +[MIT License](http://www.opensource.org/licenses/mit-license.php) diff --git a/src/hello/server/node_modules/cors/HISTORY.md b/src/hello/server/node_modules/cors/HISTORY.md new file mode 100644 index 00000000..5762bce9 --- /dev/null +++ b/src/hello/server/node_modules/cors/HISTORY.md @@ -0,0 +1,58 @@ +2.8.5 / 2018-11-04 +================== + + * Fix setting `maxAge` option to `0` + +2.8.4 / 2017-07-12 +================== + + * Work-around Safari bug in default pre-flight response + +2.8.3 / 2017-03-29 +================== + + * Fix error when options delegate missing `methods` option + +2.8.2 / 2017-03-28 +================== + + * Fix error when frozen options are passed + * Send "Vary: Origin" when using regular expressions + * Send "Vary: Access-Control-Request-Headers" when dynamic `allowedHeaders` + +2.8.1 / 2016-09-08 +================== + +This release only changed documentation. + +2.8.0 / 2016-08-23 +================== + + * Add `optionsSuccessStatus` option + +2.7.2 / 2016-08-23 +================== + + * Fix error when Node.js running in strict mode + +2.7.1 / 2015-05-28 +================== + + * Move module into expressjs organization + +2.7.0 / 2015-05-28 +================== + + * Allow array of matching condition as `origin` option + * Allow regular expression as `origin` option + +2.6.1 / 2015-05-28 +================== + + * Update `license` in package.json + +2.6.0 / 2015-04-27 +================== + + * Add `preflightContinue` option + * Fix "Vary: Origin" header added for "*" diff --git a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/LICENSE b/src/hello/server/node_modules/cors/LICENSE similarity index 95% rename from src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/LICENSE rename to src/hello/server/node_modules/cors/LICENSE index 8812229b..fd10c843 100644 --- a/src/hello/backend/node_modules/serve-static/node_modules/send/node_modules/encodeurl/LICENSE +++ b/src/hello/server/node_modules/cors/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2016 Douglas Christopher Wilson +Copyright (c) 2013 Troy Goode Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/src/hello/server/node_modules/cors/README.md b/src/hello/server/node_modules/cors/README.md new file mode 100644 index 00000000..732b847e --- /dev/null +++ b/src/hello/server/node_modules/cors/README.md @@ -0,0 +1,243 @@ +# cors + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +CORS is a node.js package for providing a [Connect](http://www.senchalabs.org/connect/)/[Express](http://expressjs.com/) middleware that can be used to enable [CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) with various options. + +**[Follow me (@troygoode) on Twitter!](https://twitter.com/intent/user?screen_name=troygoode)** + +* [Installation](#installation) +* [Usage](#usage) + * [Simple Usage](#simple-usage-enable-all-cors-requests) + * [Enable CORS for a Single Route](#enable-cors-for-a-single-route) + * [Configuring CORS](#configuring-cors) + * [Configuring CORS Asynchronously](#configuring-cors-asynchronously) + * [Enabling CORS Pre-Flight](#enabling-cors-pre-flight) +* [Configuration Options](#configuration-options) +* [Demo](#demo) +* [License](#license) +* [Author](#author) + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install cors +``` + +## Usage + +### Simple Usage (Enable *All* CORS Requests) + +```javascript +var express = require('express') +var cors = require('cors') +var app = express() + +app.use(cors()) + +app.get('/products/:id', function (req, res, next) { + res.json({msg: 'This is CORS-enabled for all origins!'}) +}) + +app.listen(80, function () { + console.log('CORS-enabled web server listening on port 80') +}) +``` + +### Enable CORS for a Single Route + +```javascript +var express = require('express') +var cors = require('cors') +var app = express() + +app.get('/products/:id', cors(), function (req, res, next) { + res.json({msg: 'This is CORS-enabled for a Single Route'}) +}) + +app.listen(80, function () { + console.log('CORS-enabled web server listening on port 80') +}) +``` + +### Configuring CORS + +```javascript +var express = require('express') +var cors = require('cors') +var app = express() + +var corsOptions = { + origin: 'http://example.com', + optionsSuccessStatus: 200 // some legacy browsers (IE11, various SmartTVs) choke on 204 +} + +app.get('/products/:id', cors(corsOptions), function (req, res, next) { + res.json({msg: 'This is CORS-enabled for only example.com.'}) +}) + +app.listen(80, function () { + console.log('CORS-enabled web server listening on port 80') +}) +``` + +### Configuring CORS w/ Dynamic Origin + +```javascript +var express = require('express') +var cors = require('cors') +var app = express() + +var whitelist = ['http://example1.com', 'http://example2.com'] +var corsOptions = { + origin: function (origin, callback) { + if (whitelist.indexOf(origin) !== -1) { + callback(null, true) + } else { + callback(new Error('Not allowed by CORS')) + } + } +} + +app.get('/products/:id', cors(corsOptions), function (req, res, next) { + res.json({msg: 'This is CORS-enabled for a whitelisted domain.'}) +}) + +app.listen(80, function () { + console.log('CORS-enabled web server listening on port 80') +}) +``` + +If you do not want to block REST tools or server-to-server requests, +add a `!origin` check in the origin function like so: + +```javascript +var corsOptions = { + origin: function (origin, callback) { + if (whitelist.indexOf(origin) !== -1 || !origin) { + callback(null, true) + } else { + callback(new Error('Not allowed by CORS')) + } + } +} +``` + +### Enabling CORS Pre-Flight + +Certain CORS requests are considered 'complex' and require an initial +`OPTIONS` request (called the "pre-flight request"). An example of a +'complex' CORS request is one that uses an HTTP verb other than +GET/HEAD/POST (such as DELETE) or that uses custom headers. To enable +pre-flighting, you must add a new OPTIONS handler for the route you want +to support: + +```javascript +var express = require('express') +var cors = require('cors') +var app = express() + +app.options('/products/:id', cors()) // enable pre-flight request for DELETE request +app.del('/products/:id', cors(), function (req, res, next) { + res.json({msg: 'This is CORS-enabled for all origins!'}) +}) + +app.listen(80, function () { + console.log('CORS-enabled web server listening on port 80') +}) +``` + +You can also enable pre-flight across-the-board like so: + +```javascript +app.options('*', cors()) // include before other routes +``` + +### Configuring CORS Asynchronously + +```javascript +var express = require('express') +var cors = require('cors') +var app = express() + +var whitelist = ['http://example1.com', 'http://example2.com'] +var corsOptionsDelegate = function (req, callback) { + var corsOptions; + if (whitelist.indexOf(req.header('Origin')) !== -1) { + corsOptions = { origin: true } // reflect (enable) the requested origin in the CORS response + } else { + corsOptions = { origin: false } // disable CORS for this request + } + callback(null, corsOptions) // callback expects two parameters: error and options +} + +app.get('/products/:id', cors(corsOptionsDelegate), function (req, res, next) { + res.json({msg: 'This is CORS-enabled for a whitelisted domain.'}) +}) + +app.listen(80, function () { + console.log('CORS-enabled web server listening on port 80') +}) +``` + +## Configuration Options + +* `origin`: Configures the **Access-Control-Allow-Origin** CORS header. Possible values: + - `Boolean` - set `origin` to `true` to reflect the [request origin](http://tools.ietf.org/html/draft-abarth-origin-09), as defined by `req.header('Origin')`, or set it to `false` to disable CORS. + - `String` - set `origin` to a specific origin. For example if you set it to `"http://example.com"` only requests from "http://example.com" will be allowed. + - `RegExp` - set `origin` to a regular expression pattern which will be used to test the request origin. If it's a match, the request origin will be reflected. For example the pattern `/example\.com$/` will reflect any request that is coming from an origin ending with "example.com". + - `Array` - set `origin` to an array of valid origins. Each origin can be a `String` or a `RegExp`. For example `["http://example1.com", /\.example2\.com$/]` will accept any request from "http://example1.com" or from a subdomain of "example2.com". + - `Function` - set `origin` to a function implementing some custom logic. The function takes the request origin as the first parameter and a callback (which expects the signature `err [object], allow [bool]`) as the second. +* `methods`: Configures the **Access-Control-Allow-Methods** CORS header. Expects a comma-delimited string (ex: 'GET,PUT,POST') or an array (ex: `['GET', 'PUT', 'POST']`). +* `allowedHeaders`: Configures the **Access-Control-Allow-Headers** CORS header. Expects a comma-delimited string (ex: 'Content-Type,Authorization') or an array (ex: `['Content-Type', 'Authorization']`). If not specified, defaults to reflecting the headers specified in the request's **Access-Control-Request-Headers** header. +* `exposedHeaders`: Configures the **Access-Control-Expose-Headers** CORS header. Expects a comma-delimited string (ex: 'Content-Range,X-Content-Range') or an array (ex: `['Content-Range', 'X-Content-Range']`). If not specified, no custom headers are exposed. +* `credentials`: Configures the **Access-Control-Allow-Credentials** CORS header. Set to `true` to pass the header, otherwise it is omitted. +* `maxAge`: Configures the **Access-Control-Max-Age** CORS header. Set to an integer to pass the header, otherwise it is omitted. +* `preflightContinue`: Pass the CORS preflight response to the next handler. +* `optionsSuccessStatus`: Provides a status code to use for successful `OPTIONS` requests, since some legacy browsers (IE11, various SmartTVs) choke on `204`. + +The default configuration is the equivalent of: + +```json +{ + "origin": "*", + "methods": "GET,HEAD,PUT,PATCH,POST,DELETE", + "preflightContinue": false, + "optionsSuccessStatus": 204 +} +``` + +For details on the effect of each CORS header, read [this](http://www.html5rocks.com/en/tutorials/cors/) article on HTML5 Rocks. + +## Demo + +A demo that illustrates CORS working (and not working) using jQuery is available here: [http://node-cors-client.herokuapp.com/](http://node-cors-client.herokuapp.com/) + +Code for that demo can be found here: + +* Client: [https://github.com/TroyGoode/node-cors-client](https://github.com/TroyGoode/node-cors-client) +* Server: [https://github.com/TroyGoode/node-cors-server](https://github.com/TroyGoode/node-cors-server) + +## License + +[MIT License](http://www.opensource.org/licenses/mit-license.php) + +## Author + +[Troy Goode](https://github.com/TroyGoode) ([troygoode@gmail.com](mailto:troygoode@gmail.com)) + +[coveralls-image]: https://img.shields.io/coveralls/expressjs/cors/master.svg +[coveralls-url]: https://coveralls.io/r/expressjs/cors?branch=master +[downloads-image]: https://img.shields.io/npm/dm/cors.svg +[downloads-url]: https://npmjs.org/package/cors +[npm-image]: https://img.shields.io/npm/v/cors.svg +[npm-url]: https://npmjs.org/package/cors +[travis-image]: https://img.shields.io/travis/expressjs/cors/master.svg +[travis-url]: https://travis-ci.org/expressjs/cors diff --git a/src/hello/server/node_modules/cors/lib/index.js b/src/hello/server/node_modules/cors/lib/index.js new file mode 100644 index 00000000..5475aecd --- /dev/null +++ b/src/hello/server/node_modules/cors/lib/index.js @@ -0,0 +1,238 @@ +(function () { + + 'use strict'; + + var assign = require('object-assign'); + var vary = require('vary'); + + var defaults = { + origin: '*', + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', + preflightContinue: false, + optionsSuccessStatus: 204 + }; + + function isString(s) { + return typeof s === 'string' || s instanceof String; + } + + function isOriginAllowed(origin, allowedOrigin) { + if (Array.isArray(allowedOrigin)) { + for (var i = 0; i < allowedOrigin.length; ++i) { + if (isOriginAllowed(origin, allowedOrigin[i])) { + return true; + } + } + return false; + } else if (isString(allowedOrigin)) { + return origin === allowedOrigin; + } else if (allowedOrigin instanceof RegExp) { + return allowedOrigin.test(origin); + } else { + return !!allowedOrigin; + } + } + + function configureOrigin(options, req) { + var requestOrigin = req.headers.origin, + headers = [], + isAllowed; + + if (!options.origin || options.origin === '*') { + // allow any origin + headers.push([{ + key: 'Access-Control-Allow-Origin', + value: '*' + }]); + } else if (isString(options.origin)) { + // fixed origin + headers.push([{ + key: 'Access-Control-Allow-Origin', + value: options.origin + }]); + headers.push([{ + key: 'Vary', + value: 'Origin' + }]); + } else { + isAllowed = isOriginAllowed(requestOrigin, options.origin); + // reflect origin + headers.push([{ + key: 'Access-Control-Allow-Origin', + value: isAllowed ? requestOrigin : false + }]); + headers.push([{ + key: 'Vary', + value: 'Origin' + }]); + } + + return headers; + } + + function configureMethods(options) { + var methods = options.methods; + if (methods.join) { + methods = options.methods.join(','); // .methods is an array, so turn it into a string + } + return { + key: 'Access-Control-Allow-Methods', + value: methods + }; + } + + function configureCredentials(options) { + if (options.credentials === true) { + return { + key: 'Access-Control-Allow-Credentials', + value: 'true' + }; + } + return null; + } + + function configureAllowedHeaders(options, req) { + var allowedHeaders = options.allowedHeaders || options.headers; + var headers = []; + + if (!allowedHeaders) { + allowedHeaders = req.headers['access-control-request-headers']; // .headers wasn't specified, so reflect the request headers + headers.push([{ + key: 'Vary', + value: 'Access-Control-Request-Headers' + }]); + } else if (allowedHeaders.join) { + allowedHeaders = allowedHeaders.join(','); // .headers is an array, so turn it into a string + } + if (allowedHeaders && allowedHeaders.length) { + headers.push([{ + key: 'Access-Control-Allow-Headers', + value: allowedHeaders + }]); + } + + return headers; + } + + function configureExposedHeaders(options) { + var headers = options.exposedHeaders; + if (!headers) { + return null; + } else if (headers.join) { + headers = headers.join(','); // .headers is an array, so turn it into a string + } + if (headers && headers.length) { + return { + key: 'Access-Control-Expose-Headers', + value: headers + }; + } + return null; + } + + function configureMaxAge(options) { + var maxAge = (typeof options.maxAge === 'number' || options.maxAge) && options.maxAge.toString() + if (maxAge && maxAge.length) { + return { + key: 'Access-Control-Max-Age', + value: maxAge + }; + } + return null; + } + + function applyHeaders(headers, res) { + for (var i = 0, n = headers.length; i < n; i++) { + var header = headers[i]; + if (header) { + if (Array.isArray(header)) { + applyHeaders(header, res); + } else if (header.key === 'Vary' && header.value) { + vary(res, header.value); + } else if (header.value) { + res.setHeader(header.key, header.value); + } + } + } + } + + function cors(options, req, res, next) { + var headers = [], + method = req.method && req.method.toUpperCase && req.method.toUpperCase(); + + if (method === 'OPTIONS') { + // preflight + headers.push(configureOrigin(options, req)); + headers.push(configureCredentials(options, req)); + headers.push(configureMethods(options, req)); + headers.push(configureAllowedHeaders(options, req)); + headers.push(configureMaxAge(options, req)); + headers.push(configureExposedHeaders(options, req)); + applyHeaders(headers, res); + + if (options.preflightContinue) { + next(); + } else { + // Safari (and potentially other browsers) need content-length 0, + // for 204 or they just hang waiting for a body + res.statusCode = options.optionsSuccessStatus; + res.setHeader('Content-Length', '0'); + res.end(); + } + } else { + // actual response + headers.push(configureOrigin(options, req)); + headers.push(configureCredentials(options, req)); + headers.push(configureExposedHeaders(options, req)); + applyHeaders(headers, res); + next(); + } + } + + function middlewareWrapper(o) { + // if options are static (either via defaults or custom options passed in), wrap in a function + var optionsCallback = null; + if (typeof o === 'function') { + optionsCallback = o; + } else { + optionsCallback = function (req, cb) { + cb(null, o); + }; + } + + return function corsMiddleware(req, res, next) { + optionsCallback(req, function (err, options) { + if (err) { + next(err); + } else { + var corsOptions = assign({}, defaults, options); + var originCallback = null; + if (corsOptions.origin && typeof corsOptions.origin === 'function') { + originCallback = corsOptions.origin; + } else if (corsOptions.origin) { + originCallback = function (origin, cb) { + cb(null, corsOptions.origin); + }; + } + + if (originCallback) { + originCallback(req.headers.origin, function (err2, origin) { + if (err2 || !origin) { + next(err2); + } else { + corsOptions.origin = origin; + cors(corsOptions, req, res, next); + } + }); + } else { + next(); + } + } + }); + }; + } + + // can pass either an options hash, an options delegate, or nothing + module.exports = middlewareWrapper; + +}()); diff --git a/src/hello/server/node_modules/cors/package.json b/src/hello/server/node_modules/cors/package.json new file mode 100644 index 00000000..ff37d984 --- /dev/null +++ b/src/hello/server/node_modules/cors/package.json @@ -0,0 +1,41 @@ +{ + "name": "cors", + "description": "Node.js CORS middleware", + "version": "2.8.5", + "author": "Troy Goode (https://github.com/troygoode/)", + "license": "MIT", + "keywords": [ + "cors", + "express", + "connect", + "middleware" + ], + "repository": "expressjs/cors", + "main": "./lib/index.js", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "devDependencies": { + "after": "0.8.2", + "eslint": "2.13.1", + "express": "4.16.3", + "mocha": "5.2.0", + "nyc": "13.1.0", + "supertest": "3.3.0" + }, + "files": [ + "lib/index.js", + "CONTRIBUTING.md", + "HISTORY.md", + "LICENSE", + "README.md" + ], + "engines": { + "node": ">= 0.10" + }, + "scripts": { + "test": "npm run lint && nyc --reporter=html --reporter=text mocha --require test/support/env", + "lint": "eslint lib test" + } +} diff --git a/src/hello/backend/node_modules/crc-32/LICENSE b/src/hello/server/node_modules/crc-32/LICENSE similarity index 100% rename from src/hello/backend/node_modules/crc-32/LICENSE rename to src/hello/server/node_modules/crc-32/LICENSE diff --git a/src/hello/backend/node_modules/crc-32/README.md b/src/hello/server/node_modules/crc-32/README.md similarity index 100% rename from src/hello/backend/node_modules/crc-32/README.md rename to src/hello/server/node_modules/crc-32/README.md diff --git a/src/hello/server/node_modules/crc-32/bin/crc32.njs b/src/hello/server/node_modules/crc-32/bin/crc32.njs new file mode 100644 index 00000000..334e7d2c --- /dev/null +++ b/src/hello/server/node_modules/crc-32/bin/crc32.njs @@ -0,0 +1,105 @@ +#!/usr/bin/env node +/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */ +/* eslint-env node */ +/* vim: set ts=2 ft=javascript: */ +/*jshint node:true */ + +var X/*:CRC32Module*/; +try { X = require('../'); } catch(e) { X = require('crc-32'); } + +function help()/*:number*/ { +[ +"usage: crc32 [options] [filename]", +"", +"Options:", +" -h, --help output usage information", +" -V, --version output the version number", +" -S, --seed= use integer seed as starting value (rolling CRC)", +" -H, --hex-seed= use hex seed as starting value (rolling CRC)", +" -d, --signed print result with format `%d` (default)", +" -u, --unsigned print result with format `%u`", +" -x, --hex print result with format `%0.8x`", +" -X, --HEX print result with format `%0.8X`", +" -c, --crc32c use CRC32C (Castagnoli)", +" -F, --format= use specified printf format", +"", +"Set filename = '-' or pipe data into crc32 to read from stdin", +"Default output mode is signed (-d)", +"" +].forEach(function(l) { console.log(l); }); + return 0; +} + +function version()/*:number*/ { console.log(X.version); return 0; } + +var fs = require('fs'); +try { require('exit-on-epipe'); } catch(e) {} + +function die(msg/*:string*/, ec/*:?number*/)/*:void*/ { console.error(msg); process.exit(ec || 0); } + +var args/*:Array*/ = process.argv.slice(2); +var filename/*:string*/ = ""; +var fmt/*:string*/ = ""; +var seed = 0, r = 10; + +for(var i = 0; i < args.length; ++i) { + var arg = args[i]; + if(arg.charCodeAt(0) != 45) { if(filename === "") filename = arg; continue; } + var m = arg.indexOf("=") == -1 ? arg : arg.substr(0, arg.indexOf("=")); + switch(m) { + case "-": filename = "-"; break; + + case "--help": case "-h": process.exit(help()); break; + case "--version": case "-V": process.exit(version()); break; + + case "--crc32c": case "-c": try { X = require('../crc32c'); } catch(e) { X = require('crc-32/crc32c'); } break; + + case "--signed": case "-d": fmt = "%d"; break; + case "--unsigned": case "-u": fmt = "%u"; break; + case "--hex": case "-x": fmt = "%0.8x"; break; + case "--HEX": case "-X": fmt = "%0.8X"; break; + case "--format": case "-F": + try { + require("printj"); + fmt = ((m!=arg) ? arg.substr(m.length+1) : args[++i])||""; + } catch(e) { + console.error("The `crc-32` module removed the `printj` dependency for formatting"); + console.error("Use the `crc32-cli` module instead:"); + console.error(" $ npx crc32-cli [options] [filename]"); + } break; + + case "--hex-seed": case "-H": r = 16; + /* falls through */ + case "--seed": case "-S": + seed=parseInt((m!=arg) ? arg.substr(m.length+1) : args[++i], r)||0; break; + + default: die("crc32: unrecognized option `" + arg + "'", 22); + } +} + +if(!process.stdin.isTTY) filename = filename || "-"; +if(filename.length===0) die("crc32: must specify a filename ('-' for stdin)",1); + +var crc32 = seed; +// $FlowIgnore -- Writable is callable but type sig disagrees +var writable = require('stream').Writable(); +writable._write = function(chunk, e, cb) { crc32 = X.buf(chunk, crc32); cb(); }; +writable._writev = function(chunks, cb) { + chunks.forEach(function(c) { crc32 = X.buf(c.chunk, crc32);}); + cb(); +}; +writable.on('finish', function() { + if(fmt === "") console.log(crc32); + else try { console.log(require("printj").sprintf(fmt, crc32)); } catch(e) { + switch(fmt) { + case "%d": console.log(crc32); break; + case "%u": console.log(crc32 >>> 0); break; + case "%0.8x": console.log((crc32 >>> 0).toString(16).padStart(8, "0").toLowerCase()); break; + case "%0.8X": console.log((crc32 >>> 0).toString(16).padStart(8, "0").toUpperCase()); break; + } + } +}); + +if(filename === "-") process.stdin.pipe(writable); +else if(fs.existsSync(filename)) fs.createReadStream(filename).pipe(writable); +else die("crc32: " + filename + ": No such file or directory", 2); diff --git a/src/hello/backend/node_modules/crc-32/crc32.js b/src/hello/server/node_modules/crc-32/crc32.js similarity index 100% rename from src/hello/backend/node_modules/crc-32/crc32.js rename to src/hello/server/node_modules/crc-32/crc32.js diff --git a/src/hello/backend/node_modules/crc-32/crc32c.js b/src/hello/server/node_modules/crc-32/crc32c.js similarity index 100% rename from src/hello/backend/node_modules/crc-32/crc32c.js rename to src/hello/server/node_modules/crc-32/crc32c.js diff --git a/src/hello/backend/node_modules/crc-32/package.json b/src/hello/server/node_modules/crc-32/package.json similarity index 100% rename from src/hello/backend/node_modules/crc-32/package.json rename to src/hello/server/node_modules/crc-32/package.json diff --git a/src/hello/backend/node_modules/crc-32/types/index.d.ts b/src/hello/server/node_modules/crc-32/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/crc-32/types/index.d.ts rename to src/hello/server/node_modules/crc-32/types/index.d.ts diff --git a/src/hello/backend/node_modules/crc-32/types/tsconfig.json b/src/hello/server/node_modules/crc-32/types/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/crc-32/types/tsconfig.json rename to src/hello/server/node_modules/crc-32/types/tsconfig.json diff --git a/src/hello/backend/node_modules/crc-32/types/tslint.json b/src/hello/server/node_modules/crc-32/types/tslint.json similarity index 100% rename from src/hello/backend/node_modules/crc-32/types/tslint.json rename to src/hello/server/node_modules/crc-32/types/tslint.json diff --git a/src/hello/backend/node_modules/cross-spawn/LICENSE b/src/hello/server/node_modules/cross-spawn/LICENSE similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/LICENSE rename to src/hello/server/node_modules/cross-spawn/LICENSE diff --git a/src/hello/backend/node_modules/cross-spawn/README.md b/src/hello/server/node_modules/cross-spawn/README.md similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/README.md rename to src/hello/server/node_modules/cross-spawn/README.md diff --git a/src/hello/backend/node_modules/cross-spawn/index.js b/src/hello/server/node_modules/cross-spawn/index.js similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/index.js rename to src/hello/server/node_modules/cross-spawn/index.js diff --git a/src/hello/backend/node_modules/cross-spawn/lib/enoent.js b/src/hello/server/node_modules/cross-spawn/lib/enoent.js similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/lib/enoent.js rename to src/hello/server/node_modules/cross-spawn/lib/enoent.js diff --git a/src/hello/backend/node_modules/cross-spawn/lib/parse.js b/src/hello/server/node_modules/cross-spawn/lib/parse.js similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/lib/parse.js rename to src/hello/server/node_modules/cross-spawn/lib/parse.js diff --git a/src/hello/backend/node_modules/cross-spawn/lib/util/escape.js b/src/hello/server/node_modules/cross-spawn/lib/util/escape.js similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/lib/util/escape.js rename to src/hello/server/node_modules/cross-spawn/lib/util/escape.js diff --git a/src/hello/backend/node_modules/cross-spawn/lib/util/readShebang.js b/src/hello/server/node_modules/cross-spawn/lib/util/readShebang.js similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/lib/util/readShebang.js rename to src/hello/server/node_modules/cross-spawn/lib/util/readShebang.js diff --git a/src/hello/backend/node_modules/cross-spawn/lib/util/resolveCommand.js b/src/hello/server/node_modules/cross-spawn/lib/util/resolveCommand.js similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/lib/util/resolveCommand.js rename to src/hello/server/node_modules/cross-spawn/lib/util/resolveCommand.js diff --git a/src/hello/backend/node_modules/cross-spawn/package.json b/src/hello/server/node_modules/cross-spawn/package.json similarity index 100% rename from src/hello/backend/node_modules/cross-spawn/package.json rename to src/hello/server/node_modules/cross-spawn/package.json diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/LICENSE b/src/hello/server/node_modules/debug/LICENSE similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/LICENSE rename to src/hello/server/node_modules/debug/LICENSE diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/README.md b/src/hello/server/node_modules/debug/README.md similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/README.md rename to src/hello/server/node_modules/debug/README.md diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/package.json b/src/hello/server/node_modules/debug/package.json similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/package.json rename to src/hello/server/node_modules/debug/package.json diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/browser.js b/src/hello/server/node_modules/debug/src/browser.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/browser.js rename to src/hello/server/node_modules/debug/src/browser.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/common.js b/src/hello/server/node_modules/debug/src/common.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/common.js rename to src/hello/server/node_modules/debug/src/common.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/index.js b/src/hello/server/node_modules/debug/src/index.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/index.js rename to src/hello/server/node_modules/debug/src/index.js diff --git a/src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/node.js b/src/hello/server/node_modules/debug/src/node.js similarity index 100% rename from src/hello/backend/node_modules/@eslint/eslintrc/node_modules/debug/src/node.js rename to src/hello/server/node_modules/debug/src/node.js diff --git a/src/hello/backend/node_modules/deep-is/.travis.yml b/src/hello/server/node_modules/deep-is/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/deep-is/.travis.yml rename to src/hello/server/node_modules/deep-is/.travis.yml diff --git a/src/hello/backend/node_modules/deep-is/LICENSE b/src/hello/server/node_modules/deep-is/LICENSE similarity index 100% rename from src/hello/backend/node_modules/deep-is/LICENSE rename to src/hello/server/node_modules/deep-is/LICENSE diff --git a/src/hello/backend/node_modules/deep-is/README.markdown b/src/hello/server/node_modules/deep-is/README.markdown similarity index 100% rename from src/hello/backend/node_modules/deep-is/README.markdown rename to src/hello/server/node_modules/deep-is/README.markdown diff --git a/src/hello/backend/node_modules/deep-is/example/cmp.js b/src/hello/server/node_modules/deep-is/example/cmp.js similarity index 100% rename from src/hello/backend/node_modules/deep-is/example/cmp.js rename to src/hello/server/node_modules/deep-is/example/cmp.js diff --git a/src/hello/backend/node_modules/deep-is/index.js b/src/hello/server/node_modules/deep-is/index.js similarity index 100% rename from src/hello/backend/node_modules/deep-is/index.js rename to src/hello/server/node_modules/deep-is/index.js diff --git a/src/hello/backend/node_modules/deep-is/package.json b/src/hello/server/node_modules/deep-is/package.json similarity index 100% rename from src/hello/backend/node_modules/deep-is/package.json rename to src/hello/server/node_modules/deep-is/package.json diff --git a/src/hello/backend/node_modules/deep-is/test/NaN.js b/src/hello/server/node_modules/deep-is/test/NaN.js similarity index 100% rename from src/hello/backend/node_modules/deep-is/test/NaN.js rename to src/hello/server/node_modules/deep-is/test/NaN.js diff --git a/src/hello/backend/node_modules/deep-is/test/cmp.js b/src/hello/server/node_modules/deep-is/test/cmp.js similarity index 100% rename from src/hello/backend/node_modules/deep-is/test/cmp.js rename to src/hello/server/node_modules/deep-is/test/cmp.js diff --git a/src/hello/backend/node_modules/deep-is/test/neg-vs-pos-0.js b/src/hello/server/node_modules/deep-is/test/neg-vs-pos-0.js similarity index 100% rename from src/hello/backend/node_modules/deep-is/test/neg-vs-pos-0.js rename to src/hello/server/node_modules/deep-is/test/neg-vs-pos-0.js diff --git a/src/hello/backend/node_modules/delayed-stream/.npmignore b/src/hello/server/node_modules/delayed-stream/.npmignore similarity index 100% rename from src/hello/backend/node_modules/delayed-stream/.npmignore rename to src/hello/server/node_modules/delayed-stream/.npmignore diff --git a/src/hello/backend/node_modules/delayed-stream/License b/src/hello/server/node_modules/delayed-stream/License similarity index 100% rename from src/hello/backend/node_modules/delayed-stream/License rename to src/hello/server/node_modules/delayed-stream/License diff --git a/src/hello/backend/node_modules/delayed-stream/Makefile b/src/hello/server/node_modules/delayed-stream/Makefile similarity index 100% rename from src/hello/backend/node_modules/delayed-stream/Makefile rename to src/hello/server/node_modules/delayed-stream/Makefile diff --git a/src/hello/backend/node_modules/delayed-stream/Readme.md b/src/hello/server/node_modules/delayed-stream/Readme.md similarity index 100% rename from src/hello/backend/node_modules/delayed-stream/Readme.md rename to src/hello/server/node_modules/delayed-stream/Readme.md diff --git a/src/hello/backend/node_modules/delayed-stream/lib/delayed_stream.js b/src/hello/server/node_modules/delayed-stream/lib/delayed_stream.js similarity index 100% rename from src/hello/backend/node_modules/delayed-stream/lib/delayed_stream.js rename to src/hello/server/node_modules/delayed-stream/lib/delayed_stream.js diff --git a/src/hello/backend/node_modules/delayed-stream/package.json b/src/hello/server/node_modules/delayed-stream/package.json similarity index 100% rename from src/hello/backend/node_modules/delayed-stream/package.json rename to src/hello/server/node_modules/delayed-stream/package.json diff --git a/src/hello/backend/node_modules/denque/CHANGELOG.md b/src/hello/server/node_modules/denque/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/denque/CHANGELOG.md rename to src/hello/server/node_modules/denque/CHANGELOG.md diff --git a/src/hello/backend/node_modules/denque/LICENSE b/src/hello/server/node_modules/denque/LICENSE similarity index 100% rename from src/hello/backend/node_modules/denque/LICENSE rename to src/hello/server/node_modules/denque/LICENSE diff --git a/src/hello/backend/node_modules/denque/README.md b/src/hello/server/node_modules/denque/README.md similarity index 100% rename from src/hello/backend/node_modules/denque/README.md rename to src/hello/server/node_modules/denque/README.md diff --git a/src/hello/backend/node_modules/denque/index.d.ts b/src/hello/server/node_modules/denque/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/denque/index.d.ts rename to src/hello/server/node_modules/denque/index.d.ts diff --git a/src/hello/backend/node_modules/denque/index.js b/src/hello/server/node_modules/denque/index.js similarity index 100% rename from src/hello/backend/node_modules/denque/index.js rename to src/hello/server/node_modules/denque/index.js diff --git a/src/hello/backend/node_modules/denque/package.json b/src/hello/server/node_modules/denque/package.json similarity index 100% rename from src/hello/backend/node_modules/denque/package.json rename to src/hello/server/node_modules/denque/package.json diff --git a/src/hello/backend/node_modules/depd/History.md b/src/hello/server/node_modules/depd/History.md similarity index 100% rename from src/hello/backend/node_modules/depd/History.md rename to src/hello/server/node_modules/depd/History.md diff --git a/src/hello/backend/node_modules/depd/LICENSE b/src/hello/server/node_modules/depd/LICENSE similarity index 100% rename from src/hello/backend/node_modules/depd/LICENSE rename to src/hello/server/node_modules/depd/LICENSE diff --git a/src/hello/backend/node_modules/depd/Readme.md b/src/hello/server/node_modules/depd/Readme.md similarity index 100% rename from src/hello/backend/node_modules/depd/Readme.md rename to src/hello/server/node_modules/depd/Readme.md diff --git a/src/hello/backend/node_modules/depd/index.js b/src/hello/server/node_modules/depd/index.js similarity index 100% rename from src/hello/backend/node_modules/depd/index.js rename to src/hello/server/node_modules/depd/index.js diff --git a/src/hello/backend/node_modules/depd/lib/browser/index.js b/src/hello/server/node_modules/depd/lib/browser/index.js similarity index 100% rename from src/hello/backend/node_modules/depd/lib/browser/index.js rename to src/hello/server/node_modules/depd/lib/browser/index.js diff --git a/src/hello/backend/node_modules/depd/package.json b/src/hello/server/node_modules/depd/package.json similarity index 100% rename from src/hello/backend/node_modules/depd/package.json rename to src/hello/server/node_modules/depd/package.json diff --git a/src/hello/backend/node_modules/destroy/LICENSE b/src/hello/server/node_modules/destroy/LICENSE similarity index 100% rename from src/hello/backend/node_modules/destroy/LICENSE rename to src/hello/server/node_modules/destroy/LICENSE diff --git a/src/hello/backend/node_modules/destroy/README.md b/src/hello/server/node_modules/destroy/README.md similarity index 100% rename from src/hello/backend/node_modules/destroy/README.md rename to src/hello/server/node_modules/destroy/README.md diff --git a/src/hello/backend/node_modules/destroy/index.js b/src/hello/server/node_modules/destroy/index.js similarity index 100% rename from src/hello/backend/node_modules/destroy/index.js rename to src/hello/server/node_modules/destroy/index.js diff --git a/src/hello/backend/node_modules/destroy/package.json b/src/hello/server/node_modules/destroy/package.json similarity index 100% rename from src/hello/backend/node_modules/destroy/package.json rename to src/hello/server/node_modules/destroy/package.json diff --git a/src/hello/backend/node_modules/doctrine/CHANGELOG.md b/src/hello/server/node_modules/doctrine/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/doctrine/CHANGELOG.md rename to src/hello/server/node_modules/doctrine/CHANGELOG.md diff --git a/src/hello/backend/node_modules/doctrine/LICENSE b/src/hello/server/node_modules/doctrine/LICENSE similarity index 100% rename from src/hello/backend/node_modules/doctrine/LICENSE rename to src/hello/server/node_modules/doctrine/LICENSE diff --git a/src/hello/backend/node_modules/doctrine/LICENSE.closure-compiler b/src/hello/server/node_modules/doctrine/LICENSE.closure-compiler similarity index 100% rename from src/hello/backend/node_modules/doctrine/LICENSE.closure-compiler rename to src/hello/server/node_modules/doctrine/LICENSE.closure-compiler diff --git a/src/hello/backend/node_modules/doctrine/LICENSE.esprima b/src/hello/server/node_modules/doctrine/LICENSE.esprima similarity index 100% rename from src/hello/backend/node_modules/doctrine/LICENSE.esprima rename to src/hello/server/node_modules/doctrine/LICENSE.esprima diff --git a/src/hello/backend/node_modules/doctrine/README.md b/src/hello/server/node_modules/doctrine/README.md similarity index 100% rename from src/hello/backend/node_modules/doctrine/README.md rename to src/hello/server/node_modules/doctrine/README.md diff --git a/src/hello/backend/node_modules/doctrine/lib/doctrine.js b/src/hello/server/node_modules/doctrine/lib/doctrine.js similarity index 100% rename from src/hello/backend/node_modules/doctrine/lib/doctrine.js rename to src/hello/server/node_modules/doctrine/lib/doctrine.js diff --git a/src/hello/backend/node_modules/doctrine/lib/typed.js b/src/hello/server/node_modules/doctrine/lib/typed.js similarity index 100% rename from src/hello/backend/node_modules/doctrine/lib/typed.js rename to src/hello/server/node_modules/doctrine/lib/typed.js diff --git a/src/hello/backend/node_modules/doctrine/lib/utility.js b/src/hello/server/node_modules/doctrine/lib/utility.js similarity index 100% rename from src/hello/backend/node_modules/doctrine/lib/utility.js rename to src/hello/server/node_modules/doctrine/lib/utility.js diff --git a/src/hello/backend/node_modules/doctrine/package.json b/src/hello/server/node_modules/doctrine/package.json similarity index 100% rename from src/hello/backend/node_modules/doctrine/package.json rename to src/hello/server/node_modules/doctrine/package.json diff --git a/src/hello/backend/node_modules/dotenv/CHANGELOG.md b/src/hello/server/node_modules/dotenv/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/dotenv/CHANGELOG.md rename to src/hello/server/node_modules/dotenv/CHANGELOG.md diff --git a/src/hello/backend/node_modules/dotenv/LICENSE b/src/hello/server/node_modules/dotenv/LICENSE similarity index 100% rename from src/hello/backend/node_modules/dotenv/LICENSE rename to src/hello/server/node_modules/dotenv/LICENSE diff --git a/src/hello/backend/node_modules/dotenv/README-es.md b/src/hello/server/node_modules/dotenv/README-es.md similarity index 100% rename from src/hello/backend/node_modules/dotenv/README-es.md rename to src/hello/server/node_modules/dotenv/README-es.md diff --git a/src/hello/backend/node_modules/dotenv/README.md b/src/hello/server/node_modules/dotenv/README.md similarity index 100% rename from src/hello/backend/node_modules/dotenv/README.md rename to src/hello/server/node_modules/dotenv/README.md diff --git a/src/hello/backend/node_modules/dotenv/SECURITY.md b/src/hello/server/node_modules/dotenv/SECURITY.md similarity index 100% rename from src/hello/backend/node_modules/dotenv/SECURITY.md rename to src/hello/server/node_modules/dotenv/SECURITY.md diff --git a/src/hello/backend/node_modules/dotenv/config.d.ts b/src/hello/server/node_modules/dotenv/config.d.ts similarity index 100% rename from src/hello/backend/node_modules/dotenv/config.d.ts rename to src/hello/server/node_modules/dotenv/config.d.ts diff --git a/src/hello/backend/node_modules/dotenv/config.js b/src/hello/server/node_modules/dotenv/config.js similarity index 100% rename from src/hello/backend/node_modules/dotenv/config.js rename to src/hello/server/node_modules/dotenv/config.js diff --git a/src/hello/backend/node_modules/dotenv/lib/cli-options.js b/src/hello/server/node_modules/dotenv/lib/cli-options.js similarity index 100% rename from src/hello/backend/node_modules/dotenv/lib/cli-options.js rename to src/hello/server/node_modules/dotenv/lib/cli-options.js diff --git a/src/hello/backend/node_modules/dotenv/lib/env-options.js b/src/hello/server/node_modules/dotenv/lib/env-options.js similarity index 100% rename from src/hello/backend/node_modules/dotenv/lib/env-options.js rename to src/hello/server/node_modules/dotenv/lib/env-options.js diff --git a/src/hello/backend/node_modules/dotenv/lib/main.d.ts b/src/hello/server/node_modules/dotenv/lib/main.d.ts similarity index 100% rename from src/hello/backend/node_modules/dotenv/lib/main.d.ts rename to src/hello/server/node_modules/dotenv/lib/main.d.ts diff --git a/src/hello/backend/node_modules/dotenv/lib/main.js b/src/hello/server/node_modules/dotenv/lib/main.js similarity index 100% rename from src/hello/backend/node_modules/dotenv/lib/main.js rename to src/hello/server/node_modules/dotenv/lib/main.js diff --git a/src/hello/backend/node_modules/dotenv/package.json b/src/hello/server/node_modules/dotenv/package.json similarity index 100% rename from src/hello/backend/node_modules/dotenv/package.json rename to src/hello/server/node_modules/dotenv/package.json diff --git a/src/hello/backend/node_modules/dunder-proto/.eslintrc b/src/hello/server/node_modules/dunder-proto/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/.eslintrc rename to src/hello/server/node_modules/dunder-proto/.eslintrc diff --git a/src/hello/backend/node_modules/dunder-proto/.github/FUNDING.yml b/src/hello/server/node_modules/dunder-proto/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/.github/FUNDING.yml rename to src/hello/server/node_modules/dunder-proto/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/dunder-proto/.nycrc b/src/hello/server/node_modules/dunder-proto/.nycrc similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/.nycrc rename to src/hello/server/node_modules/dunder-proto/.nycrc diff --git a/src/hello/backend/node_modules/dunder-proto/CHANGELOG.md b/src/hello/server/node_modules/dunder-proto/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/CHANGELOG.md rename to src/hello/server/node_modules/dunder-proto/CHANGELOG.md diff --git a/src/hello/backend/node_modules/dunder-proto/LICENSE b/src/hello/server/node_modules/dunder-proto/LICENSE similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/LICENSE rename to src/hello/server/node_modules/dunder-proto/LICENSE diff --git a/src/hello/backend/node_modules/dunder-proto/README.md b/src/hello/server/node_modules/dunder-proto/README.md similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/README.md rename to src/hello/server/node_modules/dunder-proto/README.md diff --git a/src/hello/backend/node_modules/dunder-proto/get.d.ts b/src/hello/server/node_modules/dunder-proto/get.d.ts similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/get.d.ts rename to src/hello/server/node_modules/dunder-proto/get.d.ts diff --git a/src/hello/backend/node_modules/dunder-proto/get.js b/src/hello/server/node_modules/dunder-proto/get.js similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/get.js rename to src/hello/server/node_modules/dunder-proto/get.js diff --git a/src/hello/backend/node_modules/dunder-proto/package.json b/src/hello/server/node_modules/dunder-proto/package.json similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/package.json rename to src/hello/server/node_modules/dunder-proto/package.json diff --git a/src/hello/backend/node_modules/dunder-proto/set.d.ts b/src/hello/server/node_modules/dunder-proto/set.d.ts similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/set.d.ts rename to src/hello/server/node_modules/dunder-proto/set.d.ts diff --git a/src/hello/backend/node_modules/dunder-proto/set.js b/src/hello/server/node_modules/dunder-proto/set.js similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/set.js rename to src/hello/server/node_modules/dunder-proto/set.js diff --git a/src/hello/backend/node_modules/dunder-proto/test/get.js b/src/hello/server/node_modules/dunder-proto/test/get.js similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/test/get.js rename to src/hello/server/node_modules/dunder-proto/test/get.js diff --git a/src/hello/backend/node_modules/dunder-proto/test/index.js b/src/hello/server/node_modules/dunder-proto/test/index.js similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/test/index.js rename to src/hello/server/node_modules/dunder-proto/test/index.js diff --git a/src/hello/backend/node_modules/dunder-proto/test/set.js b/src/hello/server/node_modules/dunder-proto/test/set.js similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/test/set.js rename to src/hello/server/node_modules/dunder-proto/test/set.js diff --git a/src/hello/backend/node_modules/dunder-proto/tsconfig.json b/src/hello/server/node_modules/dunder-proto/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/dunder-proto/tsconfig.json rename to src/hello/server/node_modules/dunder-proto/tsconfig.json diff --git a/src/hello/backend/node_modules/ecdsa-sig-formatter/CODEOWNERS b/src/hello/server/node_modules/ecdsa-sig-formatter/CODEOWNERS similarity index 100% rename from src/hello/backend/node_modules/ecdsa-sig-formatter/CODEOWNERS rename to src/hello/server/node_modules/ecdsa-sig-formatter/CODEOWNERS diff --git a/src/hello/backend/node_modules/ecdsa-sig-formatter/LICENSE b/src/hello/server/node_modules/ecdsa-sig-formatter/LICENSE similarity index 100% rename from src/hello/backend/node_modules/ecdsa-sig-formatter/LICENSE rename to src/hello/server/node_modules/ecdsa-sig-formatter/LICENSE diff --git a/src/hello/backend/node_modules/ecdsa-sig-formatter/README.md b/src/hello/server/node_modules/ecdsa-sig-formatter/README.md similarity index 100% rename from src/hello/backend/node_modules/ecdsa-sig-formatter/README.md rename to src/hello/server/node_modules/ecdsa-sig-formatter/README.md diff --git a/src/hello/backend/node_modules/ecdsa-sig-formatter/package.json b/src/hello/server/node_modules/ecdsa-sig-formatter/package.json similarity index 100% rename from src/hello/backend/node_modules/ecdsa-sig-formatter/package.json rename to src/hello/server/node_modules/ecdsa-sig-formatter/package.json diff --git a/src/hello/backend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts b/src/hello/server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts similarity index 100% rename from src/hello/backend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts rename to src/hello/server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts diff --git a/src/hello/backend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js b/src/hello/server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js similarity index 100% rename from src/hello/backend/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js rename to src/hello/server/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js diff --git a/src/hello/backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js b/src/hello/server/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js similarity index 100% rename from src/hello/backend/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js rename to src/hello/server/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js diff --git a/src/hello/backend/node_modules/ee-first/LICENSE b/src/hello/server/node_modules/ee-first/LICENSE similarity index 100% rename from src/hello/backend/node_modules/ee-first/LICENSE rename to src/hello/server/node_modules/ee-first/LICENSE diff --git a/src/hello/backend/node_modules/ee-first/README.md b/src/hello/server/node_modules/ee-first/README.md similarity index 100% rename from src/hello/backend/node_modules/ee-first/README.md rename to src/hello/server/node_modules/ee-first/README.md diff --git a/src/hello/backend/node_modules/ee-first/index.js b/src/hello/server/node_modules/ee-first/index.js similarity index 100% rename from src/hello/backend/node_modules/ee-first/index.js rename to src/hello/server/node_modules/ee-first/index.js diff --git a/src/hello/backend/node_modules/ee-first/package.json b/src/hello/server/node_modules/ee-first/package.json similarity index 100% rename from src/hello/backend/node_modules/ee-first/package.json rename to src/hello/server/node_modules/ee-first/package.json diff --git a/src/hello/backend/node_modules/encodeurl/LICENSE b/src/hello/server/node_modules/encodeurl/LICENSE similarity index 100% rename from src/hello/backend/node_modules/encodeurl/LICENSE rename to src/hello/server/node_modules/encodeurl/LICENSE diff --git a/src/hello/backend/node_modules/encodeurl/README.md b/src/hello/server/node_modules/encodeurl/README.md similarity index 100% rename from src/hello/backend/node_modules/encodeurl/README.md rename to src/hello/server/node_modules/encodeurl/README.md diff --git a/src/hello/backend/node_modules/encodeurl/index.js b/src/hello/server/node_modules/encodeurl/index.js similarity index 100% rename from src/hello/backend/node_modules/encodeurl/index.js rename to src/hello/server/node_modules/encodeurl/index.js diff --git a/src/hello/backend/node_modules/encodeurl/package.json b/src/hello/server/node_modules/encodeurl/package.json similarity index 100% rename from src/hello/backend/node_modules/encodeurl/package.json rename to src/hello/server/node_modules/encodeurl/package.json diff --git a/src/hello/backend/node_modules/es-define-property/.eslintrc b/src/hello/server/node_modules/es-define-property/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/es-define-property/.eslintrc rename to src/hello/server/node_modules/es-define-property/.eslintrc diff --git a/src/hello/backend/node_modules/es-define-property/.github/FUNDING.yml b/src/hello/server/node_modules/es-define-property/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/es-define-property/.github/FUNDING.yml rename to src/hello/server/node_modules/es-define-property/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/es-define-property/.nycrc b/src/hello/server/node_modules/es-define-property/.nycrc similarity index 100% rename from src/hello/backend/node_modules/es-define-property/.nycrc rename to src/hello/server/node_modules/es-define-property/.nycrc diff --git a/src/hello/backend/node_modules/es-define-property/CHANGELOG.md b/src/hello/server/node_modules/es-define-property/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/es-define-property/CHANGELOG.md rename to src/hello/server/node_modules/es-define-property/CHANGELOG.md diff --git a/src/hello/backend/node_modules/es-define-property/LICENSE b/src/hello/server/node_modules/es-define-property/LICENSE similarity index 100% rename from src/hello/backend/node_modules/es-define-property/LICENSE rename to src/hello/server/node_modules/es-define-property/LICENSE diff --git a/src/hello/backend/node_modules/es-define-property/README.md b/src/hello/server/node_modules/es-define-property/README.md similarity index 100% rename from src/hello/backend/node_modules/es-define-property/README.md rename to src/hello/server/node_modules/es-define-property/README.md diff --git a/src/hello/backend/node_modules/es-define-property/index.d.ts b/src/hello/server/node_modules/es-define-property/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-define-property/index.d.ts rename to src/hello/server/node_modules/es-define-property/index.d.ts diff --git a/src/hello/backend/node_modules/es-define-property/index.js b/src/hello/server/node_modules/es-define-property/index.js similarity index 100% rename from src/hello/backend/node_modules/es-define-property/index.js rename to src/hello/server/node_modules/es-define-property/index.js diff --git a/src/hello/backend/node_modules/es-define-property/package.json b/src/hello/server/node_modules/es-define-property/package.json similarity index 100% rename from src/hello/backend/node_modules/es-define-property/package.json rename to src/hello/server/node_modules/es-define-property/package.json diff --git a/src/hello/backend/node_modules/es-define-property/test/index.js b/src/hello/server/node_modules/es-define-property/test/index.js similarity index 100% rename from src/hello/backend/node_modules/es-define-property/test/index.js rename to src/hello/server/node_modules/es-define-property/test/index.js diff --git a/src/hello/backend/node_modules/es-define-property/tsconfig.json b/src/hello/server/node_modules/es-define-property/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/es-define-property/tsconfig.json rename to src/hello/server/node_modules/es-define-property/tsconfig.json diff --git a/src/hello/backend/node_modules/es-errors/.eslintrc b/src/hello/server/node_modules/es-errors/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/es-errors/.eslintrc rename to src/hello/server/node_modules/es-errors/.eslintrc diff --git a/src/hello/backend/node_modules/es-errors/.github/FUNDING.yml b/src/hello/server/node_modules/es-errors/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/es-errors/.github/FUNDING.yml rename to src/hello/server/node_modules/es-errors/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/es-errors/CHANGELOG.md b/src/hello/server/node_modules/es-errors/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/es-errors/CHANGELOG.md rename to src/hello/server/node_modules/es-errors/CHANGELOG.md diff --git a/src/hello/backend/node_modules/es-errors/LICENSE b/src/hello/server/node_modules/es-errors/LICENSE similarity index 100% rename from src/hello/backend/node_modules/es-errors/LICENSE rename to src/hello/server/node_modules/es-errors/LICENSE diff --git a/src/hello/backend/node_modules/es-errors/README.md b/src/hello/server/node_modules/es-errors/README.md similarity index 100% rename from src/hello/backend/node_modules/es-errors/README.md rename to src/hello/server/node_modules/es-errors/README.md diff --git a/src/hello/backend/node_modules/es-errors/eval.d.ts b/src/hello/server/node_modules/es-errors/eval.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-errors/eval.d.ts rename to src/hello/server/node_modules/es-errors/eval.d.ts diff --git a/src/hello/backend/node_modules/es-errors/eval.js b/src/hello/server/node_modules/es-errors/eval.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/eval.js rename to src/hello/server/node_modules/es-errors/eval.js diff --git a/src/hello/backend/node_modules/es-errors/index.d.ts b/src/hello/server/node_modules/es-errors/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-errors/index.d.ts rename to src/hello/server/node_modules/es-errors/index.d.ts diff --git a/src/hello/backend/node_modules/es-errors/index.js b/src/hello/server/node_modules/es-errors/index.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/index.js rename to src/hello/server/node_modules/es-errors/index.js diff --git a/src/hello/backend/node_modules/es-errors/package.json b/src/hello/server/node_modules/es-errors/package.json similarity index 100% rename from src/hello/backend/node_modules/es-errors/package.json rename to src/hello/server/node_modules/es-errors/package.json diff --git a/src/hello/backend/node_modules/es-errors/range.d.ts b/src/hello/server/node_modules/es-errors/range.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-errors/range.d.ts rename to src/hello/server/node_modules/es-errors/range.d.ts diff --git a/src/hello/backend/node_modules/es-errors/range.js b/src/hello/server/node_modules/es-errors/range.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/range.js rename to src/hello/server/node_modules/es-errors/range.js diff --git a/src/hello/backend/node_modules/es-errors/ref.d.ts b/src/hello/server/node_modules/es-errors/ref.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-errors/ref.d.ts rename to src/hello/server/node_modules/es-errors/ref.d.ts diff --git a/src/hello/backend/node_modules/es-errors/ref.js b/src/hello/server/node_modules/es-errors/ref.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/ref.js rename to src/hello/server/node_modules/es-errors/ref.js diff --git a/src/hello/backend/node_modules/es-errors/syntax.d.ts b/src/hello/server/node_modules/es-errors/syntax.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-errors/syntax.d.ts rename to src/hello/server/node_modules/es-errors/syntax.d.ts diff --git a/src/hello/backend/node_modules/es-errors/syntax.js b/src/hello/server/node_modules/es-errors/syntax.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/syntax.js rename to src/hello/server/node_modules/es-errors/syntax.js diff --git a/src/hello/backend/node_modules/es-errors/test/index.js b/src/hello/server/node_modules/es-errors/test/index.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/test/index.js rename to src/hello/server/node_modules/es-errors/test/index.js diff --git a/src/hello/backend/node_modules/es-errors/tsconfig.json b/src/hello/server/node_modules/es-errors/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/es-errors/tsconfig.json rename to src/hello/server/node_modules/es-errors/tsconfig.json diff --git a/src/hello/backend/node_modules/es-errors/type.d.ts b/src/hello/server/node_modules/es-errors/type.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-errors/type.d.ts rename to src/hello/server/node_modules/es-errors/type.d.ts diff --git a/src/hello/backend/node_modules/es-errors/type.js b/src/hello/server/node_modules/es-errors/type.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/type.js rename to src/hello/server/node_modules/es-errors/type.js diff --git a/src/hello/backend/node_modules/es-errors/uri.d.ts b/src/hello/server/node_modules/es-errors/uri.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-errors/uri.d.ts rename to src/hello/server/node_modules/es-errors/uri.d.ts diff --git a/src/hello/backend/node_modules/es-errors/uri.js b/src/hello/server/node_modules/es-errors/uri.js similarity index 100% rename from src/hello/backend/node_modules/es-errors/uri.js rename to src/hello/server/node_modules/es-errors/uri.js diff --git a/src/hello/backend/node_modules/es-object-atoms/.eslintrc b/src/hello/server/node_modules/es-object-atoms/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/.eslintrc rename to src/hello/server/node_modules/es-object-atoms/.eslintrc diff --git a/src/hello/backend/node_modules/es-object-atoms/.github/FUNDING.yml b/src/hello/server/node_modules/es-object-atoms/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/.github/FUNDING.yml rename to src/hello/server/node_modules/es-object-atoms/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/es-object-atoms/CHANGELOG.md b/src/hello/server/node_modules/es-object-atoms/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/CHANGELOG.md rename to src/hello/server/node_modules/es-object-atoms/CHANGELOG.md diff --git a/src/hello/backend/node_modules/es-object-atoms/LICENSE b/src/hello/server/node_modules/es-object-atoms/LICENSE similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/LICENSE rename to src/hello/server/node_modules/es-object-atoms/LICENSE diff --git a/src/hello/backend/node_modules/es-object-atoms/README.md b/src/hello/server/node_modules/es-object-atoms/README.md similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/README.md rename to src/hello/server/node_modules/es-object-atoms/README.md diff --git a/src/hello/backend/node_modules/es-object-atoms/RequireObjectCoercible.d.ts b/src/hello/server/node_modules/es-object-atoms/RequireObjectCoercible.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/RequireObjectCoercible.d.ts rename to src/hello/server/node_modules/es-object-atoms/RequireObjectCoercible.d.ts diff --git a/src/hello/backend/node_modules/es-object-atoms/RequireObjectCoercible.js b/src/hello/server/node_modules/es-object-atoms/RequireObjectCoercible.js similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/RequireObjectCoercible.js rename to src/hello/server/node_modules/es-object-atoms/RequireObjectCoercible.js diff --git a/src/hello/backend/node_modules/es-object-atoms/ToObject.d.ts b/src/hello/server/node_modules/es-object-atoms/ToObject.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/ToObject.d.ts rename to src/hello/server/node_modules/es-object-atoms/ToObject.d.ts diff --git a/src/hello/backend/node_modules/es-object-atoms/ToObject.js b/src/hello/server/node_modules/es-object-atoms/ToObject.js similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/ToObject.js rename to src/hello/server/node_modules/es-object-atoms/ToObject.js diff --git a/src/hello/backend/node_modules/es-object-atoms/index.d.ts b/src/hello/server/node_modules/es-object-atoms/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/index.d.ts rename to src/hello/server/node_modules/es-object-atoms/index.d.ts diff --git a/src/hello/backend/node_modules/es-object-atoms/index.js b/src/hello/server/node_modules/es-object-atoms/index.js similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/index.js rename to src/hello/server/node_modules/es-object-atoms/index.js diff --git a/src/hello/backend/node_modules/es-object-atoms/isObject.d.ts b/src/hello/server/node_modules/es-object-atoms/isObject.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/isObject.d.ts rename to src/hello/server/node_modules/es-object-atoms/isObject.d.ts diff --git a/src/hello/backend/node_modules/es-object-atoms/isObject.js b/src/hello/server/node_modules/es-object-atoms/isObject.js similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/isObject.js rename to src/hello/server/node_modules/es-object-atoms/isObject.js diff --git a/src/hello/backend/node_modules/es-object-atoms/package.json b/src/hello/server/node_modules/es-object-atoms/package.json similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/package.json rename to src/hello/server/node_modules/es-object-atoms/package.json diff --git a/src/hello/backend/node_modules/es-object-atoms/test/index.js b/src/hello/server/node_modules/es-object-atoms/test/index.js similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/test/index.js rename to src/hello/server/node_modules/es-object-atoms/test/index.js diff --git a/src/hello/backend/node_modules/es-object-atoms/tsconfig.json b/src/hello/server/node_modules/es-object-atoms/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/es-object-atoms/tsconfig.json rename to src/hello/server/node_modules/es-object-atoms/tsconfig.json diff --git a/src/hello/backend/node_modules/es-set-tostringtag/.eslintrc b/src/hello/server/node_modules/es-set-tostringtag/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/.eslintrc rename to src/hello/server/node_modules/es-set-tostringtag/.eslintrc diff --git a/src/hello/backend/node_modules/es-set-tostringtag/.nycrc b/src/hello/server/node_modules/es-set-tostringtag/.nycrc similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/.nycrc rename to src/hello/server/node_modules/es-set-tostringtag/.nycrc diff --git a/src/hello/backend/node_modules/es-set-tostringtag/CHANGELOG.md b/src/hello/server/node_modules/es-set-tostringtag/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/CHANGELOG.md rename to src/hello/server/node_modules/es-set-tostringtag/CHANGELOG.md diff --git a/src/hello/backend/node_modules/es-set-tostringtag/LICENSE b/src/hello/server/node_modules/es-set-tostringtag/LICENSE similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/LICENSE rename to src/hello/server/node_modules/es-set-tostringtag/LICENSE diff --git a/src/hello/backend/node_modules/es-set-tostringtag/README.md b/src/hello/server/node_modules/es-set-tostringtag/README.md similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/README.md rename to src/hello/server/node_modules/es-set-tostringtag/README.md diff --git a/src/hello/backend/node_modules/es-set-tostringtag/index.d.ts b/src/hello/server/node_modules/es-set-tostringtag/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/index.d.ts rename to src/hello/server/node_modules/es-set-tostringtag/index.d.ts diff --git a/src/hello/backend/node_modules/es-set-tostringtag/index.js b/src/hello/server/node_modules/es-set-tostringtag/index.js similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/index.js rename to src/hello/server/node_modules/es-set-tostringtag/index.js diff --git a/src/hello/backend/node_modules/es-set-tostringtag/package.json b/src/hello/server/node_modules/es-set-tostringtag/package.json similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/package.json rename to src/hello/server/node_modules/es-set-tostringtag/package.json diff --git a/src/hello/backend/node_modules/es-set-tostringtag/test/index.js b/src/hello/server/node_modules/es-set-tostringtag/test/index.js similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/test/index.js rename to src/hello/server/node_modules/es-set-tostringtag/test/index.js diff --git a/src/hello/backend/node_modules/es-set-tostringtag/tsconfig.json b/src/hello/server/node_modules/es-set-tostringtag/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/es-set-tostringtag/tsconfig.json rename to src/hello/server/node_modules/es-set-tostringtag/tsconfig.json diff --git a/src/hello/backend/node_modules/escape-html/LICENSE b/src/hello/server/node_modules/escape-html/LICENSE similarity index 100% rename from src/hello/backend/node_modules/escape-html/LICENSE rename to src/hello/server/node_modules/escape-html/LICENSE diff --git a/src/hello/backend/node_modules/escape-html/Readme.md b/src/hello/server/node_modules/escape-html/Readme.md similarity index 100% rename from src/hello/backend/node_modules/escape-html/Readme.md rename to src/hello/server/node_modules/escape-html/Readme.md diff --git a/src/hello/backend/node_modules/escape-html/index.js b/src/hello/server/node_modules/escape-html/index.js similarity index 100% rename from src/hello/backend/node_modules/escape-html/index.js rename to src/hello/server/node_modules/escape-html/index.js diff --git a/src/hello/backend/node_modules/escape-html/package.json b/src/hello/server/node_modules/escape-html/package.json similarity index 100% rename from src/hello/backend/node_modules/escape-html/package.json rename to src/hello/server/node_modules/escape-html/package.json diff --git a/src/hello/backend/node_modules/escape-string-regexp/index.d.ts b/src/hello/server/node_modules/escape-string-regexp/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/escape-string-regexp/index.d.ts rename to src/hello/server/node_modules/escape-string-regexp/index.d.ts diff --git a/src/hello/backend/node_modules/escape-string-regexp/index.js b/src/hello/server/node_modules/escape-string-regexp/index.js similarity index 100% rename from src/hello/backend/node_modules/escape-string-regexp/index.js rename to src/hello/server/node_modules/escape-string-regexp/index.js diff --git a/src/hello/backend/node_modules/escape-string-regexp/license b/src/hello/server/node_modules/escape-string-regexp/license similarity index 100% rename from src/hello/backend/node_modules/escape-string-regexp/license rename to src/hello/server/node_modules/escape-string-regexp/license diff --git a/src/hello/backend/node_modules/escape-string-regexp/package.json b/src/hello/server/node_modules/escape-string-regexp/package.json similarity index 100% rename from src/hello/backend/node_modules/escape-string-regexp/package.json rename to src/hello/server/node_modules/escape-string-regexp/package.json diff --git a/src/hello/backend/node_modules/escape-string-regexp/readme.md b/src/hello/server/node_modules/escape-string-regexp/readme.md similarity index 100% rename from src/hello/backend/node_modules/escape-string-regexp/readme.md rename to src/hello/server/node_modules/escape-string-regexp/readme.md diff --git a/src/hello/backend/node_modules/eslint-config-google/LICENSE b/src/hello/server/node_modules/eslint-config-google/LICENSE similarity index 100% rename from src/hello/backend/node_modules/eslint-config-google/LICENSE rename to src/hello/server/node_modules/eslint-config-google/LICENSE diff --git a/src/hello/backend/node_modules/eslint-config-google/README.md b/src/hello/server/node_modules/eslint-config-google/README.md similarity index 100% rename from src/hello/backend/node_modules/eslint-config-google/README.md rename to src/hello/server/node_modules/eslint-config-google/README.md diff --git a/src/hello/backend/node_modules/eslint-config-google/index.js b/src/hello/server/node_modules/eslint-config-google/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint-config-google/index.js rename to src/hello/server/node_modules/eslint-config-google/index.js diff --git a/src/hello/backend/node_modules/eslint-config-google/package.json b/src/hello/server/node_modules/eslint-config-google/package.json similarity index 100% rename from src/hello/backend/node_modules/eslint-config-google/package.json rename to src/hello/server/node_modules/eslint-config-google/package.json diff --git a/src/hello/backend/node_modules/eslint-scope/LICENSE b/src/hello/server/node_modules/eslint-scope/LICENSE similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/LICENSE rename to src/hello/server/node_modules/eslint-scope/LICENSE diff --git a/src/hello/backend/node_modules/eslint-scope/README.md b/src/hello/server/node_modules/eslint-scope/README.md similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/README.md rename to src/hello/server/node_modules/eslint-scope/README.md diff --git a/src/hello/backend/node_modules/eslint-scope/dist/eslint-scope.cjs b/src/hello/server/node_modules/eslint-scope/dist/eslint-scope.cjs similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/dist/eslint-scope.cjs rename to src/hello/server/node_modules/eslint-scope/dist/eslint-scope.cjs diff --git a/src/hello/backend/node_modules/eslint-scope/lib/definition.js b/src/hello/server/node_modules/eslint-scope/lib/definition.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/definition.js rename to src/hello/server/node_modules/eslint-scope/lib/definition.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/index.js b/src/hello/server/node_modules/eslint-scope/lib/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/index.js rename to src/hello/server/node_modules/eslint-scope/lib/index.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/pattern-visitor.js b/src/hello/server/node_modules/eslint-scope/lib/pattern-visitor.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/pattern-visitor.js rename to src/hello/server/node_modules/eslint-scope/lib/pattern-visitor.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/reference.js b/src/hello/server/node_modules/eslint-scope/lib/reference.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/reference.js rename to src/hello/server/node_modules/eslint-scope/lib/reference.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/referencer.js b/src/hello/server/node_modules/eslint-scope/lib/referencer.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/referencer.js rename to src/hello/server/node_modules/eslint-scope/lib/referencer.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/scope-manager.js b/src/hello/server/node_modules/eslint-scope/lib/scope-manager.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/scope-manager.js rename to src/hello/server/node_modules/eslint-scope/lib/scope-manager.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/scope.js b/src/hello/server/node_modules/eslint-scope/lib/scope.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/scope.js rename to src/hello/server/node_modules/eslint-scope/lib/scope.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/variable.js b/src/hello/server/node_modules/eslint-scope/lib/variable.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/variable.js rename to src/hello/server/node_modules/eslint-scope/lib/variable.js diff --git a/src/hello/backend/node_modules/eslint-scope/lib/version.js b/src/hello/server/node_modules/eslint-scope/lib/version.js similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/lib/version.js rename to src/hello/server/node_modules/eslint-scope/lib/version.js diff --git a/src/hello/backend/node_modules/eslint-scope/package.json b/src/hello/server/node_modules/eslint-scope/package.json similarity index 100% rename from src/hello/backend/node_modules/eslint-scope/package.json rename to src/hello/server/node_modules/eslint-scope/package.json diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/LICENSE b/src/hello/server/node_modules/eslint-visitor-keys/LICENSE similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/LICENSE rename to src/hello/server/node_modules/eslint-visitor-keys/LICENSE diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/README.md b/src/hello/server/node_modules/eslint-visitor-keys/README.md similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/README.md rename to src/hello/server/node_modules/eslint-visitor-keys/README.md diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs b/src/hello/server/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs rename to src/hello/server/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts b/src/hello/server/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts rename to src/hello/server/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/dist/index.d.ts b/src/hello/server/node_modules/eslint-visitor-keys/dist/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/dist/index.d.ts rename to src/hello/server/node_modules/eslint-visitor-keys/dist/index.d.ts diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts b/src/hello/server/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts rename to src/hello/server/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/lib/index.js b/src/hello/server/node_modules/eslint-visitor-keys/lib/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/lib/index.js rename to src/hello/server/node_modules/eslint-visitor-keys/lib/index.js diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/lib/visitor-keys.js b/src/hello/server/node_modules/eslint-visitor-keys/lib/visitor-keys.js similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/lib/visitor-keys.js rename to src/hello/server/node_modules/eslint-visitor-keys/lib/visitor-keys.js diff --git a/src/hello/backend/node_modules/eslint-visitor-keys/package.json b/src/hello/server/node_modules/eslint-visitor-keys/package.json similarity index 100% rename from src/hello/backend/node_modules/eslint-visitor-keys/package.json rename to src/hello/server/node_modules/eslint-visitor-keys/package.json diff --git a/src/hello/backend/node_modules/eslint/LICENSE b/src/hello/server/node_modules/eslint/LICENSE similarity index 100% rename from src/hello/backend/node_modules/eslint/LICENSE rename to src/hello/server/node_modules/eslint/LICENSE diff --git a/src/hello/backend/node_modules/eslint/README.md b/src/hello/server/node_modules/eslint/README.md similarity index 100% rename from src/hello/backend/node_modules/eslint/README.md rename to src/hello/server/node_modules/eslint/README.md diff --git a/src/hello/server/node_modules/eslint/bin/eslint.js b/src/hello/server/node_modules/eslint/bin/eslint.js new file mode 100644 index 00000000..eeb4647e --- /dev/null +++ b/src/hello/server/node_modules/eslint/bin/eslint.js @@ -0,0 +1,173 @@ +#!/usr/bin/env node + +/** + * @fileoverview Main CLI that is run via the eslint command. + * @author Nicholas C. Zakas + */ + +/* eslint no-console:off -- CLI */ + +"use strict"; + +// must do this initialization *before* other requires in order to work +if (process.argv.includes("--debug")) { + require("debug").enable("eslint:*,-eslint:code-path,eslintrc:*"); +} + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Read data from stdin til the end. + * + * Note: See + * - https://github.com/nodejs/node/blob/master/doc/api/process.md#processstdin + * - https://github.com/nodejs/node/blob/master/doc/api/process.md#a-note-on-process-io + * - https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-01/msg00419.html + * - https://github.com/nodejs/node/issues/7439 (historical) + * + * On Windows using `fs.readFileSync(STDIN_FILE_DESCRIPTOR, "utf8")` seems + * to read 4096 bytes before blocking and never drains to read further data. + * + * The investigation on the Emacs thread indicates: + * + * > Emacs on MS-Windows uses pipes to communicate with subprocesses; a + * > pipe on Windows has a 4K buffer. So as soon as Emacs writes more than + * > 4096 bytes to the pipe, the pipe becomes full, and Emacs then waits for + * > the subprocess to read its end of the pipe, at which time Emacs will + * > write the rest of the stuff. + * @returns {Promise} The read text. + */ +function readStdin() { + return new Promise((resolve, reject) => { + let content = ""; + let chunk = ""; + + process.stdin + .setEncoding("utf8") + .on("readable", () => { + while ((chunk = process.stdin.read()) !== null) { + content += chunk; + } + }) + .on("end", () => resolve(content)) + .on("error", reject); + }); +} + +/** + * Get the error message of a given value. + * @param {any} error The value to get. + * @returns {string} The error message. + */ +function getErrorMessage(error) { + + // Lazy loading because this is used only if an error happened. + const util = require("util"); + + // Foolproof -- third-party module might throw non-object. + if (typeof error !== "object" || error === null) { + return String(error); + } + + // Use templates if `error.messageTemplate` is present. + if (typeof error.messageTemplate === "string") { + try { + const template = require(`../messages/${error.messageTemplate}.js`); + + return template(error.messageData || {}); + } catch { + + // Ignore template error then fallback to use `error.stack`. + } + } + + // Use the stacktrace if it's an error object. + if (typeof error.stack === "string") { + return error.stack; + } + + // Otherwise, dump the object. + return util.format("%o", error); +} + +/** + * Tracks error messages that are shown to the user so we only ever show the + * same message once. + * @type {Set} + */ +const displayedErrors = new Set(); + +/** + * Tracks whether an unexpected error was caught + * @type {boolean} + */ +let hadFatalError = false; + +/** + * Catch and report unexpected error. + * @param {any} error The thrown error object. + * @returns {void} + */ +function onFatalError(error) { + process.exitCode = 2; + hadFatalError = true; + + const { version } = require("../package.json"); + const message = ` +Oops! Something went wrong! :( + +ESLint: ${version} + +${getErrorMessage(error)}`; + + if (!displayedErrors.has(message)) { + console.error(message); + displayedErrors.add(message); + } +} + +//------------------------------------------------------------------------------ +// Execution +//------------------------------------------------------------------------------ + +(async function main() { + process.on("uncaughtException", onFatalError); + process.on("unhandledRejection", onFatalError); + + // Call the config initializer if `--init` is present. + if (process.argv.includes("--init")) { + + // `eslint --init` has been moved to `@eslint/create-config` + console.warn("You can also run this command directly using 'npm init @eslint/config'."); + + const spawn = require("cross-spawn"); + + spawn.sync("npm", ["init", "@eslint/config"], { encoding: "utf8", stdio: "inherit" }); + return; + } + + // Otherwise, call the CLI. + const exitCode = await require("../lib/cli").execute( + process.argv, + process.argv.includes("--stdin") ? await readStdin() : null, + true + ); + + /* + * If an uncaught exception or unhandled rejection was detected in the meantime, + * keep the fatal exit code 2 that is already assigned to `process.exitCode`. + * Without this condition, exit code 2 (unsuccessful execution) could be overwritten with + * 1 (successful execution, lint problems found) or even 0 (successful execution, no lint problems found). + * This ensures that unexpected errors that seemingly don't affect the success + * of the execution will still cause a non-zero exit code, as it's a common + * practice and the default behavior of Node.js to exit with non-zero + * in case of an uncaught exception or unhandled rejection. + * + * Otherwise, assign the exit code returned from CLI. + */ + if (!hadFatalError) { + process.exitCode = exitCode; + } +}()).catch(onFatalError); diff --git a/src/hello/backend/node_modules/eslint/conf/config-schema.js b/src/hello/server/node_modules/eslint/conf/config-schema.js similarity index 100% rename from src/hello/backend/node_modules/eslint/conf/config-schema.js rename to src/hello/server/node_modules/eslint/conf/config-schema.js diff --git a/src/hello/backend/node_modules/eslint/conf/default-cli-options.js b/src/hello/server/node_modules/eslint/conf/default-cli-options.js similarity index 100% rename from src/hello/backend/node_modules/eslint/conf/default-cli-options.js rename to src/hello/server/node_modules/eslint/conf/default-cli-options.js diff --git a/src/hello/backend/node_modules/eslint/conf/globals.js b/src/hello/server/node_modules/eslint/conf/globals.js similarity index 100% rename from src/hello/backend/node_modules/eslint/conf/globals.js rename to src/hello/server/node_modules/eslint/conf/globals.js diff --git a/src/hello/backend/node_modules/eslint/conf/replacements.json b/src/hello/server/node_modules/eslint/conf/replacements.json similarity index 100% rename from src/hello/backend/node_modules/eslint/conf/replacements.json rename to src/hello/server/node_modules/eslint/conf/replacements.json diff --git a/src/hello/backend/node_modules/eslint/conf/rule-type-list.json b/src/hello/server/node_modules/eslint/conf/rule-type-list.json similarity index 100% rename from src/hello/backend/node_modules/eslint/conf/rule-type-list.json rename to src/hello/server/node_modules/eslint/conf/rule-type-list.json diff --git a/src/hello/backend/node_modules/eslint/lib/api.js b/src/hello/server/node_modules/eslint/lib/api.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/api.js rename to src/hello/server/node_modules/eslint/lib/api.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/cli-engine.js b/src/hello/server/node_modules/eslint/lib/cli-engine/cli-engine.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/cli-engine.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/cli-engine.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/file-enumerator.js b/src/hello/server/node_modules/eslint/lib/cli-engine/file-enumerator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/file-enumerator.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/file-enumerator.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/checkstyle.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/compact.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/compact.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/compact.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/compact.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/html.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/html.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/html.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/html.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/jslint-xml.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/json.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/json.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/json.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/json.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/junit.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/junit.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/junit.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/junit.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/stylish.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/stylish.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/stylish.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/stylish.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/tap.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/tap.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/tap.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/tap.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/unix.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/unix.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/unix.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/unix.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js b/src/hello/server/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/formatters/visualstudio.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/hash.js b/src/hello/server/node_modules/eslint/lib/cli-engine/hash.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/hash.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/hash.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/index.js b/src/hello/server/node_modules/eslint/lib/cli-engine/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/index.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/lint-result-cache.js b/src/hello/server/node_modules/eslint/lib/cli-engine/lint-result-cache.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/lint-result-cache.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/lint-result-cache.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/load-rules.js b/src/hello/server/node_modules/eslint/lib/cli-engine/load-rules.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/load-rules.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/load-rules.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli-engine/xml-escape.js b/src/hello/server/node_modules/eslint/lib/cli-engine/xml-escape.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli-engine/xml-escape.js rename to src/hello/server/node_modules/eslint/lib/cli-engine/xml-escape.js diff --git a/src/hello/backend/node_modules/eslint/lib/cli.js b/src/hello/server/node_modules/eslint/lib/cli.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/cli.js rename to src/hello/server/node_modules/eslint/lib/cli.js diff --git a/src/hello/backend/node_modules/eslint/lib/config/default-config.js b/src/hello/server/node_modules/eslint/lib/config/default-config.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/config/default-config.js rename to src/hello/server/node_modules/eslint/lib/config/default-config.js diff --git a/src/hello/backend/node_modules/eslint/lib/config/flat-config-array.js b/src/hello/server/node_modules/eslint/lib/config/flat-config-array.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/config/flat-config-array.js rename to src/hello/server/node_modules/eslint/lib/config/flat-config-array.js diff --git a/src/hello/backend/node_modules/eslint/lib/config/flat-config-helpers.js b/src/hello/server/node_modules/eslint/lib/config/flat-config-helpers.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/config/flat-config-helpers.js rename to src/hello/server/node_modules/eslint/lib/config/flat-config-helpers.js diff --git a/src/hello/backend/node_modules/eslint/lib/config/flat-config-schema.js b/src/hello/server/node_modules/eslint/lib/config/flat-config-schema.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/config/flat-config-schema.js rename to src/hello/server/node_modules/eslint/lib/config/flat-config-schema.js diff --git a/src/hello/backend/node_modules/eslint/lib/config/rule-validator.js b/src/hello/server/node_modules/eslint/lib/config/rule-validator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/config/rule-validator.js rename to src/hello/server/node_modules/eslint/lib/config/rule-validator.js diff --git a/src/hello/backend/node_modules/eslint/lib/eslint/eslint-helpers.js b/src/hello/server/node_modules/eslint/lib/eslint/eslint-helpers.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/eslint/eslint-helpers.js rename to src/hello/server/node_modules/eslint/lib/eslint/eslint-helpers.js diff --git a/src/hello/backend/node_modules/eslint/lib/eslint/eslint.js b/src/hello/server/node_modules/eslint/lib/eslint/eslint.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/eslint/eslint.js rename to src/hello/server/node_modules/eslint/lib/eslint/eslint.js diff --git a/src/hello/backend/node_modules/eslint/lib/eslint/flat-eslint.js b/src/hello/server/node_modules/eslint/lib/eslint/flat-eslint.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/eslint/flat-eslint.js rename to src/hello/server/node_modules/eslint/lib/eslint/flat-eslint.js diff --git a/src/hello/backend/node_modules/eslint/lib/eslint/index.js b/src/hello/server/node_modules/eslint/lib/eslint/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/eslint/index.js rename to src/hello/server/node_modules/eslint/lib/eslint/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/apply-disable-directives.js b/src/hello/server/node_modules/eslint/lib/linter/apply-disable-directives.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/apply-disable-directives.js rename to src/hello/server/node_modules/eslint/lib/linter/apply-disable-directives.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js b/src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js rename to src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js b/src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js rename to src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js b/src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js rename to src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path.js b/src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/code-path.js rename to src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/code-path.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js b/src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js rename to src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js b/src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js rename to src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js b/src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js rename to src/hello/server/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/config-comment-parser.js b/src/hello/server/node_modules/eslint/lib/linter/config-comment-parser.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/config-comment-parser.js rename to src/hello/server/node_modules/eslint/lib/linter/config-comment-parser.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/index.js b/src/hello/server/node_modules/eslint/lib/linter/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/index.js rename to src/hello/server/node_modules/eslint/lib/linter/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/interpolate.js b/src/hello/server/node_modules/eslint/lib/linter/interpolate.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/interpolate.js rename to src/hello/server/node_modules/eslint/lib/linter/interpolate.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/linter.js b/src/hello/server/node_modules/eslint/lib/linter/linter.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/linter.js rename to src/hello/server/node_modules/eslint/lib/linter/linter.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/node-event-generator.js b/src/hello/server/node_modules/eslint/lib/linter/node-event-generator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/node-event-generator.js rename to src/hello/server/node_modules/eslint/lib/linter/node-event-generator.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/report-translator.js b/src/hello/server/node_modules/eslint/lib/linter/report-translator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/report-translator.js rename to src/hello/server/node_modules/eslint/lib/linter/report-translator.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/rule-fixer.js b/src/hello/server/node_modules/eslint/lib/linter/rule-fixer.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/rule-fixer.js rename to src/hello/server/node_modules/eslint/lib/linter/rule-fixer.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/rules.js b/src/hello/server/node_modules/eslint/lib/linter/rules.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/rules.js rename to src/hello/server/node_modules/eslint/lib/linter/rules.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/safe-emitter.js b/src/hello/server/node_modules/eslint/lib/linter/safe-emitter.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/safe-emitter.js rename to src/hello/server/node_modules/eslint/lib/linter/safe-emitter.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/source-code-fixer.js b/src/hello/server/node_modules/eslint/lib/linter/source-code-fixer.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/source-code-fixer.js rename to src/hello/server/node_modules/eslint/lib/linter/source-code-fixer.js diff --git a/src/hello/backend/node_modules/eslint/lib/linter/timing.js b/src/hello/server/node_modules/eslint/lib/linter/timing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/linter/timing.js rename to src/hello/server/node_modules/eslint/lib/linter/timing.js diff --git a/src/hello/backend/node_modules/eslint/lib/options.js b/src/hello/server/node_modules/eslint/lib/options.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/options.js rename to src/hello/server/node_modules/eslint/lib/options.js diff --git a/src/hello/backend/node_modules/eslint/lib/rule-tester/flat-rule-tester.js b/src/hello/server/node_modules/eslint/lib/rule-tester/flat-rule-tester.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rule-tester/flat-rule-tester.js rename to src/hello/server/node_modules/eslint/lib/rule-tester/flat-rule-tester.js diff --git a/src/hello/backend/node_modules/eslint/lib/rule-tester/index.js b/src/hello/server/node_modules/eslint/lib/rule-tester/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rule-tester/index.js rename to src/hello/server/node_modules/eslint/lib/rule-tester/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/rule-tester/rule-tester.js b/src/hello/server/node_modules/eslint/lib/rule-tester/rule-tester.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rule-tester/rule-tester.js rename to src/hello/server/node_modules/eslint/lib/rule-tester/rule-tester.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/accessor-pairs.js b/src/hello/server/node_modules/eslint/lib/rules/accessor-pairs.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/accessor-pairs.js rename to src/hello/server/node_modules/eslint/lib/rules/accessor-pairs.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/array-bracket-newline.js b/src/hello/server/node_modules/eslint/lib/rules/array-bracket-newline.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/array-bracket-newline.js rename to src/hello/server/node_modules/eslint/lib/rules/array-bracket-newline.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/array-bracket-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/array-bracket-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/array-bracket-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/array-bracket-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/array-callback-return.js b/src/hello/server/node_modules/eslint/lib/rules/array-callback-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/array-callback-return.js rename to src/hello/server/node_modules/eslint/lib/rules/array-callback-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/array-element-newline.js b/src/hello/server/node_modules/eslint/lib/rules/array-element-newline.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/array-element-newline.js rename to src/hello/server/node_modules/eslint/lib/rules/array-element-newline.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/arrow-body-style.js b/src/hello/server/node_modules/eslint/lib/rules/arrow-body-style.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/arrow-body-style.js rename to src/hello/server/node_modules/eslint/lib/rules/arrow-body-style.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/arrow-parens.js b/src/hello/server/node_modules/eslint/lib/rules/arrow-parens.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/arrow-parens.js rename to src/hello/server/node_modules/eslint/lib/rules/arrow-parens.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/arrow-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/arrow-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/arrow-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/arrow-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/block-scoped-var.js b/src/hello/server/node_modules/eslint/lib/rules/block-scoped-var.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/block-scoped-var.js rename to src/hello/server/node_modules/eslint/lib/rules/block-scoped-var.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/block-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/block-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/block-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/block-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/brace-style.js b/src/hello/server/node_modules/eslint/lib/rules/brace-style.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/brace-style.js rename to src/hello/server/node_modules/eslint/lib/rules/brace-style.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/callback-return.js b/src/hello/server/node_modules/eslint/lib/rules/callback-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/callback-return.js rename to src/hello/server/node_modules/eslint/lib/rules/callback-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/camelcase.js b/src/hello/server/node_modules/eslint/lib/rules/camelcase.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/camelcase.js rename to src/hello/server/node_modules/eslint/lib/rules/camelcase.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/capitalized-comments.js b/src/hello/server/node_modules/eslint/lib/rules/capitalized-comments.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/capitalized-comments.js rename to src/hello/server/node_modules/eslint/lib/rules/capitalized-comments.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/class-methods-use-this.js b/src/hello/server/node_modules/eslint/lib/rules/class-methods-use-this.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/class-methods-use-this.js rename to src/hello/server/node_modules/eslint/lib/rules/class-methods-use-this.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/comma-dangle.js b/src/hello/server/node_modules/eslint/lib/rules/comma-dangle.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/comma-dangle.js rename to src/hello/server/node_modules/eslint/lib/rules/comma-dangle.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/comma-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/comma-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/comma-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/comma-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/comma-style.js b/src/hello/server/node_modules/eslint/lib/rules/comma-style.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/comma-style.js rename to src/hello/server/node_modules/eslint/lib/rules/comma-style.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/complexity.js b/src/hello/server/node_modules/eslint/lib/rules/complexity.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/complexity.js rename to src/hello/server/node_modules/eslint/lib/rules/complexity.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/computed-property-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/computed-property-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/computed-property-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/computed-property-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/consistent-return.js b/src/hello/server/node_modules/eslint/lib/rules/consistent-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/consistent-return.js rename to src/hello/server/node_modules/eslint/lib/rules/consistent-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/consistent-this.js b/src/hello/server/node_modules/eslint/lib/rules/consistent-this.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/consistent-this.js rename to src/hello/server/node_modules/eslint/lib/rules/consistent-this.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/constructor-super.js b/src/hello/server/node_modules/eslint/lib/rules/constructor-super.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/constructor-super.js rename to src/hello/server/node_modules/eslint/lib/rules/constructor-super.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/curly.js b/src/hello/server/node_modules/eslint/lib/rules/curly.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/curly.js rename to src/hello/server/node_modules/eslint/lib/rules/curly.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/default-case-last.js b/src/hello/server/node_modules/eslint/lib/rules/default-case-last.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/default-case-last.js rename to src/hello/server/node_modules/eslint/lib/rules/default-case-last.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/default-case.js b/src/hello/server/node_modules/eslint/lib/rules/default-case.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/default-case.js rename to src/hello/server/node_modules/eslint/lib/rules/default-case.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/default-param-last.js b/src/hello/server/node_modules/eslint/lib/rules/default-param-last.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/default-param-last.js rename to src/hello/server/node_modules/eslint/lib/rules/default-param-last.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/dot-location.js b/src/hello/server/node_modules/eslint/lib/rules/dot-location.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/dot-location.js rename to src/hello/server/node_modules/eslint/lib/rules/dot-location.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/dot-notation.js b/src/hello/server/node_modules/eslint/lib/rules/dot-notation.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/dot-notation.js rename to src/hello/server/node_modules/eslint/lib/rules/dot-notation.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/eol-last.js b/src/hello/server/node_modules/eslint/lib/rules/eol-last.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/eol-last.js rename to src/hello/server/node_modules/eslint/lib/rules/eol-last.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/eqeqeq.js b/src/hello/server/node_modules/eslint/lib/rules/eqeqeq.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/eqeqeq.js rename to src/hello/server/node_modules/eslint/lib/rules/eqeqeq.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/for-direction.js b/src/hello/server/node_modules/eslint/lib/rules/for-direction.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/for-direction.js rename to src/hello/server/node_modules/eslint/lib/rules/for-direction.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/func-call-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/func-call-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/func-call-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/func-call-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/func-name-matching.js b/src/hello/server/node_modules/eslint/lib/rules/func-name-matching.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/func-name-matching.js rename to src/hello/server/node_modules/eslint/lib/rules/func-name-matching.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/func-names.js b/src/hello/server/node_modules/eslint/lib/rules/func-names.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/func-names.js rename to src/hello/server/node_modules/eslint/lib/rules/func-names.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/func-style.js b/src/hello/server/node_modules/eslint/lib/rules/func-style.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/func-style.js rename to src/hello/server/node_modules/eslint/lib/rules/func-style.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/function-call-argument-newline.js b/src/hello/server/node_modules/eslint/lib/rules/function-call-argument-newline.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/function-call-argument-newline.js rename to src/hello/server/node_modules/eslint/lib/rules/function-call-argument-newline.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/function-paren-newline.js b/src/hello/server/node_modules/eslint/lib/rules/function-paren-newline.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/function-paren-newline.js rename to src/hello/server/node_modules/eslint/lib/rules/function-paren-newline.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/generator-star-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/generator-star-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/generator-star-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/generator-star-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/getter-return.js b/src/hello/server/node_modules/eslint/lib/rules/getter-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/getter-return.js rename to src/hello/server/node_modules/eslint/lib/rules/getter-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/global-require.js b/src/hello/server/node_modules/eslint/lib/rules/global-require.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/global-require.js rename to src/hello/server/node_modules/eslint/lib/rules/global-require.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/grouped-accessor-pairs.js b/src/hello/server/node_modules/eslint/lib/rules/grouped-accessor-pairs.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/grouped-accessor-pairs.js rename to src/hello/server/node_modules/eslint/lib/rules/grouped-accessor-pairs.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/guard-for-in.js b/src/hello/server/node_modules/eslint/lib/rules/guard-for-in.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/guard-for-in.js rename to src/hello/server/node_modules/eslint/lib/rules/guard-for-in.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/handle-callback-err.js b/src/hello/server/node_modules/eslint/lib/rules/handle-callback-err.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/handle-callback-err.js rename to src/hello/server/node_modules/eslint/lib/rules/handle-callback-err.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/id-blacklist.js b/src/hello/server/node_modules/eslint/lib/rules/id-blacklist.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/id-blacklist.js rename to src/hello/server/node_modules/eslint/lib/rules/id-blacklist.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/id-denylist.js b/src/hello/server/node_modules/eslint/lib/rules/id-denylist.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/id-denylist.js rename to src/hello/server/node_modules/eslint/lib/rules/id-denylist.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/id-length.js b/src/hello/server/node_modules/eslint/lib/rules/id-length.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/id-length.js rename to src/hello/server/node_modules/eslint/lib/rules/id-length.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/id-match.js b/src/hello/server/node_modules/eslint/lib/rules/id-match.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/id-match.js rename to src/hello/server/node_modules/eslint/lib/rules/id-match.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js b/src/hello/server/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js rename to src/hello/server/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/indent-legacy.js b/src/hello/server/node_modules/eslint/lib/rules/indent-legacy.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/indent-legacy.js rename to src/hello/server/node_modules/eslint/lib/rules/indent-legacy.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/indent.js b/src/hello/server/node_modules/eslint/lib/rules/indent.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/indent.js rename to src/hello/server/node_modules/eslint/lib/rules/indent.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/index.js b/src/hello/server/node_modules/eslint/lib/rules/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/index.js rename to src/hello/server/node_modules/eslint/lib/rules/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/init-declarations.js b/src/hello/server/node_modules/eslint/lib/rules/init-declarations.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/init-declarations.js rename to src/hello/server/node_modules/eslint/lib/rules/init-declarations.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/jsx-quotes.js b/src/hello/server/node_modules/eslint/lib/rules/jsx-quotes.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/jsx-quotes.js rename to src/hello/server/node_modules/eslint/lib/rules/jsx-quotes.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/key-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/key-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/key-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/key-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/keyword-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/keyword-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/keyword-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/keyword-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/line-comment-position.js b/src/hello/server/node_modules/eslint/lib/rules/line-comment-position.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/line-comment-position.js rename to src/hello/server/node_modules/eslint/lib/rules/line-comment-position.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/linebreak-style.js b/src/hello/server/node_modules/eslint/lib/rules/linebreak-style.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/linebreak-style.js rename to src/hello/server/node_modules/eslint/lib/rules/linebreak-style.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/lines-around-comment.js b/src/hello/server/node_modules/eslint/lib/rules/lines-around-comment.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/lines-around-comment.js rename to src/hello/server/node_modules/eslint/lib/rules/lines-around-comment.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/lines-around-directive.js b/src/hello/server/node_modules/eslint/lib/rules/lines-around-directive.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/lines-around-directive.js rename to src/hello/server/node_modules/eslint/lib/rules/lines-around-directive.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/lines-between-class-members.js b/src/hello/server/node_modules/eslint/lib/rules/lines-between-class-members.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/lines-between-class-members.js rename to src/hello/server/node_modules/eslint/lib/rules/lines-between-class-members.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/logical-assignment-operators.js b/src/hello/server/node_modules/eslint/lib/rules/logical-assignment-operators.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/logical-assignment-operators.js rename to src/hello/server/node_modules/eslint/lib/rules/logical-assignment-operators.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-classes-per-file.js b/src/hello/server/node_modules/eslint/lib/rules/max-classes-per-file.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-classes-per-file.js rename to src/hello/server/node_modules/eslint/lib/rules/max-classes-per-file.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-depth.js b/src/hello/server/node_modules/eslint/lib/rules/max-depth.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-depth.js rename to src/hello/server/node_modules/eslint/lib/rules/max-depth.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-len.js b/src/hello/server/node_modules/eslint/lib/rules/max-len.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-len.js rename to src/hello/server/node_modules/eslint/lib/rules/max-len.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-lines-per-function.js b/src/hello/server/node_modules/eslint/lib/rules/max-lines-per-function.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-lines-per-function.js rename to src/hello/server/node_modules/eslint/lib/rules/max-lines-per-function.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-lines.js b/src/hello/server/node_modules/eslint/lib/rules/max-lines.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-lines.js rename to src/hello/server/node_modules/eslint/lib/rules/max-lines.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-nested-callbacks.js b/src/hello/server/node_modules/eslint/lib/rules/max-nested-callbacks.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-nested-callbacks.js rename to src/hello/server/node_modules/eslint/lib/rules/max-nested-callbacks.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-params.js b/src/hello/server/node_modules/eslint/lib/rules/max-params.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-params.js rename to src/hello/server/node_modules/eslint/lib/rules/max-params.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-statements-per-line.js b/src/hello/server/node_modules/eslint/lib/rules/max-statements-per-line.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-statements-per-line.js rename to src/hello/server/node_modules/eslint/lib/rules/max-statements-per-line.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/max-statements.js b/src/hello/server/node_modules/eslint/lib/rules/max-statements.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/max-statements.js rename to src/hello/server/node_modules/eslint/lib/rules/max-statements.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/multiline-comment-style.js b/src/hello/server/node_modules/eslint/lib/rules/multiline-comment-style.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/multiline-comment-style.js rename to src/hello/server/node_modules/eslint/lib/rules/multiline-comment-style.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/multiline-ternary.js b/src/hello/server/node_modules/eslint/lib/rules/multiline-ternary.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/multiline-ternary.js rename to src/hello/server/node_modules/eslint/lib/rules/multiline-ternary.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/new-cap.js b/src/hello/server/node_modules/eslint/lib/rules/new-cap.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/new-cap.js rename to src/hello/server/node_modules/eslint/lib/rules/new-cap.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/new-parens.js b/src/hello/server/node_modules/eslint/lib/rules/new-parens.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/new-parens.js rename to src/hello/server/node_modules/eslint/lib/rules/new-parens.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/newline-after-var.js b/src/hello/server/node_modules/eslint/lib/rules/newline-after-var.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/newline-after-var.js rename to src/hello/server/node_modules/eslint/lib/rules/newline-after-var.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/newline-before-return.js b/src/hello/server/node_modules/eslint/lib/rules/newline-before-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/newline-before-return.js rename to src/hello/server/node_modules/eslint/lib/rules/newline-before-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/newline-per-chained-call.js b/src/hello/server/node_modules/eslint/lib/rules/newline-per-chained-call.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/newline-per-chained-call.js rename to src/hello/server/node_modules/eslint/lib/rules/newline-per-chained-call.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-alert.js b/src/hello/server/node_modules/eslint/lib/rules/no-alert.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-alert.js rename to src/hello/server/node_modules/eslint/lib/rules/no-alert.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-array-constructor.js b/src/hello/server/node_modules/eslint/lib/rules/no-array-constructor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-array-constructor.js rename to src/hello/server/node_modules/eslint/lib/rules/no-array-constructor.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-async-promise-executor.js b/src/hello/server/node_modules/eslint/lib/rules/no-async-promise-executor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-async-promise-executor.js rename to src/hello/server/node_modules/eslint/lib/rules/no-async-promise-executor.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-await-in-loop.js b/src/hello/server/node_modules/eslint/lib/rules/no-await-in-loop.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-await-in-loop.js rename to src/hello/server/node_modules/eslint/lib/rules/no-await-in-loop.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-bitwise.js b/src/hello/server/node_modules/eslint/lib/rules/no-bitwise.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-bitwise.js rename to src/hello/server/node_modules/eslint/lib/rules/no-bitwise.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-buffer-constructor.js b/src/hello/server/node_modules/eslint/lib/rules/no-buffer-constructor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-buffer-constructor.js rename to src/hello/server/node_modules/eslint/lib/rules/no-buffer-constructor.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-caller.js b/src/hello/server/node_modules/eslint/lib/rules/no-caller.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-caller.js rename to src/hello/server/node_modules/eslint/lib/rules/no-caller.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-case-declarations.js b/src/hello/server/node_modules/eslint/lib/rules/no-case-declarations.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-case-declarations.js rename to src/hello/server/node_modules/eslint/lib/rules/no-case-declarations.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-catch-shadow.js b/src/hello/server/node_modules/eslint/lib/rules/no-catch-shadow.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-catch-shadow.js rename to src/hello/server/node_modules/eslint/lib/rules/no-catch-shadow.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-class-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-class-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-class-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-class-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-compare-neg-zero.js b/src/hello/server/node_modules/eslint/lib/rules/no-compare-neg-zero.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-compare-neg-zero.js rename to src/hello/server/node_modules/eslint/lib/rules/no-compare-neg-zero.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-cond-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-cond-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-cond-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-cond-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-confusing-arrow.js b/src/hello/server/node_modules/eslint/lib/rules/no-confusing-arrow.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-confusing-arrow.js rename to src/hello/server/node_modules/eslint/lib/rules/no-confusing-arrow.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-console.js b/src/hello/server/node_modules/eslint/lib/rules/no-console.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-console.js rename to src/hello/server/node_modules/eslint/lib/rules/no-console.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-const-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-const-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-const-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-const-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-constant-binary-expression.js b/src/hello/server/node_modules/eslint/lib/rules/no-constant-binary-expression.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-constant-binary-expression.js rename to src/hello/server/node_modules/eslint/lib/rules/no-constant-binary-expression.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-constant-condition.js b/src/hello/server/node_modules/eslint/lib/rules/no-constant-condition.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-constant-condition.js rename to src/hello/server/node_modules/eslint/lib/rules/no-constant-condition.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-constructor-return.js b/src/hello/server/node_modules/eslint/lib/rules/no-constructor-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-constructor-return.js rename to src/hello/server/node_modules/eslint/lib/rules/no-constructor-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-continue.js b/src/hello/server/node_modules/eslint/lib/rules/no-continue.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-continue.js rename to src/hello/server/node_modules/eslint/lib/rules/no-continue.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-control-regex.js b/src/hello/server/node_modules/eslint/lib/rules/no-control-regex.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-control-regex.js rename to src/hello/server/node_modules/eslint/lib/rules/no-control-regex.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-debugger.js b/src/hello/server/node_modules/eslint/lib/rules/no-debugger.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-debugger.js rename to src/hello/server/node_modules/eslint/lib/rules/no-debugger.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-delete-var.js b/src/hello/server/node_modules/eslint/lib/rules/no-delete-var.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-delete-var.js rename to src/hello/server/node_modules/eslint/lib/rules/no-delete-var.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-div-regex.js b/src/hello/server/node_modules/eslint/lib/rules/no-div-regex.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-div-regex.js rename to src/hello/server/node_modules/eslint/lib/rules/no-div-regex.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-dupe-args.js b/src/hello/server/node_modules/eslint/lib/rules/no-dupe-args.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-dupe-args.js rename to src/hello/server/node_modules/eslint/lib/rules/no-dupe-args.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-dupe-class-members.js b/src/hello/server/node_modules/eslint/lib/rules/no-dupe-class-members.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-dupe-class-members.js rename to src/hello/server/node_modules/eslint/lib/rules/no-dupe-class-members.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-dupe-else-if.js b/src/hello/server/node_modules/eslint/lib/rules/no-dupe-else-if.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-dupe-else-if.js rename to src/hello/server/node_modules/eslint/lib/rules/no-dupe-else-if.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-dupe-keys.js b/src/hello/server/node_modules/eslint/lib/rules/no-dupe-keys.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-dupe-keys.js rename to src/hello/server/node_modules/eslint/lib/rules/no-dupe-keys.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-duplicate-case.js b/src/hello/server/node_modules/eslint/lib/rules/no-duplicate-case.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-duplicate-case.js rename to src/hello/server/node_modules/eslint/lib/rules/no-duplicate-case.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-duplicate-imports.js b/src/hello/server/node_modules/eslint/lib/rules/no-duplicate-imports.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-duplicate-imports.js rename to src/hello/server/node_modules/eslint/lib/rules/no-duplicate-imports.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-else-return.js b/src/hello/server/node_modules/eslint/lib/rules/no-else-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-else-return.js rename to src/hello/server/node_modules/eslint/lib/rules/no-else-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-empty-character-class.js b/src/hello/server/node_modules/eslint/lib/rules/no-empty-character-class.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-empty-character-class.js rename to src/hello/server/node_modules/eslint/lib/rules/no-empty-character-class.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-empty-function.js b/src/hello/server/node_modules/eslint/lib/rules/no-empty-function.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-empty-function.js rename to src/hello/server/node_modules/eslint/lib/rules/no-empty-function.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-empty-pattern.js b/src/hello/server/node_modules/eslint/lib/rules/no-empty-pattern.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-empty-pattern.js rename to src/hello/server/node_modules/eslint/lib/rules/no-empty-pattern.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-empty-static-block.js b/src/hello/server/node_modules/eslint/lib/rules/no-empty-static-block.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-empty-static-block.js rename to src/hello/server/node_modules/eslint/lib/rules/no-empty-static-block.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-empty.js b/src/hello/server/node_modules/eslint/lib/rules/no-empty.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-empty.js rename to src/hello/server/node_modules/eslint/lib/rules/no-empty.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-eq-null.js b/src/hello/server/node_modules/eslint/lib/rules/no-eq-null.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-eq-null.js rename to src/hello/server/node_modules/eslint/lib/rules/no-eq-null.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-eval.js b/src/hello/server/node_modules/eslint/lib/rules/no-eval.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-eval.js rename to src/hello/server/node_modules/eslint/lib/rules/no-eval.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-ex-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-ex-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-ex-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-ex-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-extend-native.js b/src/hello/server/node_modules/eslint/lib/rules/no-extend-native.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-extend-native.js rename to src/hello/server/node_modules/eslint/lib/rules/no-extend-native.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-extra-bind.js b/src/hello/server/node_modules/eslint/lib/rules/no-extra-bind.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-extra-bind.js rename to src/hello/server/node_modules/eslint/lib/rules/no-extra-bind.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-extra-boolean-cast.js b/src/hello/server/node_modules/eslint/lib/rules/no-extra-boolean-cast.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-extra-boolean-cast.js rename to src/hello/server/node_modules/eslint/lib/rules/no-extra-boolean-cast.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-extra-label.js b/src/hello/server/node_modules/eslint/lib/rules/no-extra-label.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-extra-label.js rename to src/hello/server/node_modules/eslint/lib/rules/no-extra-label.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-extra-parens.js b/src/hello/server/node_modules/eslint/lib/rules/no-extra-parens.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-extra-parens.js rename to src/hello/server/node_modules/eslint/lib/rules/no-extra-parens.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-extra-semi.js b/src/hello/server/node_modules/eslint/lib/rules/no-extra-semi.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-extra-semi.js rename to src/hello/server/node_modules/eslint/lib/rules/no-extra-semi.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-fallthrough.js b/src/hello/server/node_modules/eslint/lib/rules/no-fallthrough.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-fallthrough.js rename to src/hello/server/node_modules/eslint/lib/rules/no-fallthrough.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-floating-decimal.js b/src/hello/server/node_modules/eslint/lib/rules/no-floating-decimal.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-floating-decimal.js rename to src/hello/server/node_modules/eslint/lib/rules/no-floating-decimal.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-func-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-func-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-func-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-func-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-global-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-global-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-global-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-global-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-implicit-coercion.js b/src/hello/server/node_modules/eslint/lib/rules/no-implicit-coercion.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-implicit-coercion.js rename to src/hello/server/node_modules/eslint/lib/rules/no-implicit-coercion.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-implicit-globals.js b/src/hello/server/node_modules/eslint/lib/rules/no-implicit-globals.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-implicit-globals.js rename to src/hello/server/node_modules/eslint/lib/rules/no-implicit-globals.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-implied-eval.js b/src/hello/server/node_modules/eslint/lib/rules/no-implied-eval.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-implied-eval.js rename to src/hello/server/node_modules/eslint/lib/rules/no-implied-eval.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-import-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-import-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-import-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-import-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-inline-comments.js b/src/hello/server/node_modules/eslint/lib/rules/no-inline-comments.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-inline-comments.js rename to src/hello/server/node_modules/eslint/lib/rules/no-inline-comments.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-inner-declarations.js b/src/hello/server/node_modules/eslint/lib/rules/no-inner-declarations.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-inner-declarations.js rename to src/hello/server/node_modules/eslint/lib/rules/no-inner-declarations.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-invalid-regexp.js b/src/hello/server/node_modules/eslint/lib/rules/no-invalid-regexp.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-invalid-regexp.js rename to src/hello/server/node_modules/eslint/lib/rules/no-invalid-regexp.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-invalid-this.js b/src/hello/server/node_modules/eslint/lib/rules/no-invalid-this.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-invalid-this.js rename to src/hello/server/node_modules/eslint/lib/rules/no-invalid-this.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-irregular-whitespace.js b/src/hello/server/node_modules/eslint/lib/rules/no-irregular-whitespace.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-irregular-whitespace.js rename to src/hello/server/node_modules/eslint/lib/rules/no-irregular-whitespace.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-iterator.js b/src/hello/server/node_modules/eslint/lib/rules/no-iterator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-iterator.js rename to src/hello/server/node_modules/eslint/lib/rules/no-iterator.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-label-var.js b/src/hello/server/node_modules/eslint/lib/rules/no-label-var.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-label-var.js rename to src/hello/server/node_modules/eslint/lib/rules/no-label-var.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-labels.js b/src/hello/server/node_modules/eslint/lib/rules/no-labels.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-labels.js rename to src/hello/server/node_modules/eslint/lib/rules/no-labels.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-lone-blocks.js b/src/hello/server/node_modules/eslint/lib/rules/no-lone-blocks.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-lone-blocks.js rename to src/hello/server/node_modules/eslint/lib/rules/no-lone-blocks.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-lonely-if.js b/src/hello/server/node_modules/eslint/lib/rules/no-lonely-if.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-lonely-if.js rename to src/hello/server/node_modules/eslint/lib/rules/no-lonely-if.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-loop-func.js b/src/hello/server/node_modules/eslint/lib/rules/no-loop-func.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-loop-func.js rename to src/hello/server/node_modules/eslint/lib/rules/no-loop-func.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-loss-of-precision.js b/src/hello/server/node_modules/eslint/lib/rules/no-loss-of-precision.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-loss-of-precision.js rename to src/hello/server/node_modules/eslint/lib/rules/no-loss-of-precision.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-magic-numbers.js b/src/hello/server/node_modules/eslint/lib/rules/no-magic-numbers.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-magic-numbers.js rename to src/hello/server/node_modules/eslint/lib/rules/no-magic-numbers.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-misleading-character-class.js b/src/hello/server/node_modules/eslint/lib/rules/no-misleading-character-class.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-misleading-character-class.js rename to src/hello/server/node_modules/eslint/lib/rules/no-misleading-character-class.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-mixed-operators.js b/src/hello/server/node_modules/eslint/lib/rules/no-mixed-operators.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-mixed-operators.js rename to src/hello/server/node_modules/eslint/lib/rules/no-mixed-operators.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-mixed-requires.js b/src/hello/server/node_modules/eslint/lib/rules/no-mixed-requires.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-mixed-requires.js rename to src/hello/server/node_modules/eslint/lib/rules/no-mixed-requires.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js b/src/hello/server/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js rename to src/hello/server/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-multi-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-multi-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-multi-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-multi-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-multi-spaces.js b/src/hello/server/node_modules/eslint/lib/rules/no-multi-spaces.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-multi-spaces.js rename to src/hello/server/node_modules/eslint/lib/rules/no-multi-spaces.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-multi-str.js b/src/hello/server/node_modules/eslint/lib/rules/no-multi-str.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-multi-str.js rename to src/hello/server/node_modules/eslint/lib/rules/no-multi-str.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-multiple-empty-lines.js b/src/hello/server/node_modules/eslint/lib/rules/no-multiple-empty-lines.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-multiple-empty-lines.js rename to src/hello/server/node_modules/eslint/lib/rules/no-multiple-empty-lines.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-native-reassign.js b/src/hello/server/node_modules/eslint/lib/rules/no-native-reassign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-native-reassign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-native-reassign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-negated-condition.js b/src/hello/server/node_modules/eslint/lib/rules/no-negated-condition.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-negated-condition.js rename to src/hello/server/node_modules/eslint/lib/rules/no-negated-condition.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-negated-in-lhs.js b/src/hello/server/node_modules/eslint/lib/rules/no-negated-in-lhs.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-negated-in-lhs.js rename to src/hello/server/node_modules/eslint/lib/rules/no-negated-in-lhs.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-nested-ternary.js b/src/hello/server/node_modules/eslint/lib/rules/no-nested-ternary.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-nested-ternary.js rename to src/hello/server/node_modules/eslint/lib/rules/no-nested-ternary.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-new-func.js b/src/hello/server/node_modules/eslint/lib/rules/no-new-func.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-new-func.js rename to src/hello/server/node_modules/eslint/lib/rules/no-new-func.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js b/src/hello/server/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js rename to src/hello/server/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-new-object.js b/src/hello/server/node_modules/eslint/lib/rules/no-new-object.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-new-object.js rename to src/hello/server/node_modules/eslint/lib/rules/no-new-object.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-new-require.js b/src/hello/server/node_modules/eslint/lib/rules/no-new-require.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-new-require.js rename to src/hello/server/node_modules/eslint/lib/rules/no-new-require.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-new-symbol.js b/src/hello/server/node_modules/eslint/lib/rules/no-new-symbol.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-new-symbol.js rename to src/hello/server/node_modules/eslint/lib/rules/no-new-symbol.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-new-wrappers.js b/src/hello/server/node_modules/eslint/lib/rules/no-new-wrappers.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-new-wrappers.js rename to src/hello/server/node_modules/eslint/lib/rules/no-new-wrappers.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-new.js b/src/hello/server/node_modules/eslint/lib/rules/no-new.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-new.js rename to src/hello/server/node_modules/eslint/lib/rules/no-new.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js b/src/hello/server/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js rename to src/hello/server/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-obj-calls.js b/src/hello/server/node_modules/eslint/lib/rules/no-obj-calls.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-obj-calls.js rename to src/hello/server/node_modules/eslint/lib/rules/no-obj-calls.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-object-constructor.js b/src/hello/server/node_modules/eslint/lib/rules/no-object-constructor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-object-constructor.js rename to src/hello/server/node_modules/eslint/lib/rules/no-object-constructor.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-octal-escape.js b/src/hello/server/node_modules/eslint/lib/rules/no-octal-escape.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-octal-escape.js rename to src/hello/server/node_modules/eslint/lib/rules/no-octal-escape.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-octal.js b/src/hello/server/node_modules/eslint/lib/rules/no-octal.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-octal.js rename to src/hello/server/node_modules/eslint/lib/rules/no-octal.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-param-reassign.js b/src/hello/server/node_modules/eslint/lib/rules/no-param-reassign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-param-reassign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-param-reassign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-path-concat.js b/src/hello/server/node_modules/eslint/lib/rules/no-path-concat.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-path-concat.js rename to src/hello/server/node_modules/eslint/lib/rules/no-path-concat.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-plusplus.js b/src/hello/server/node_modules/eslint/lib/rules/no-plusplus.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-plusplus.js rename to src/hello/server/node_modules/eslint/lib/rules/no-plusplus.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-process-env.js b/src/hello/server/node_modules/eslint/lib/rules/no-process-env.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-process-env.js rename to src/hello/server/node_modules/eslint/lib/rules/no-process-env.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-process-exit.js b/src/hello/server/node_modules/eslint/lib/rules/no-process-exit.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-process-exit.js rename to src/hello/server/node_modules/eslint/lib/rules/no-process-exit.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-promise-executor-return.js b/src/hello/server/node_modules/eslint/lib/rules/no-promise-executor-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-promise-executor-return.js rename to src/hello/server/node_modules/eslint/lib/rules/no-promise-executor-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-proto.js b/src/hello/server/node_modules/eslint/lib/rules/no-proto.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-proto.js rename to src/hello/server/node_modules/eslint/lib/rules/no-proto.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-prototype-builtins.js b/src/hello/server/node_modules/eslint/lib/rules/no-prototype-builtins.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-prototype-builtins.js rename to src/hello/server/node_modules/eslint/lib/rules/no-prototype-builtins.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-redeclare.js b/src/hello/server/node_modules/eslint/lib/rules/no-redeclare.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-redeclare.js rename to src/hello/server/node_modules/eslint/lib/rules/no-redeclare.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-regex-spaces.js b/src/hello/server/node_modules/eslint/lib/rules/no-regex-spaces.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-regex-spaces.js rename to src/hello/server/node_modules/eslint/lib/rules/no-regex-spaces.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-restricted-exports.js b/src/hello/server/node_modules/eslint/lib/rules/no-restricted-exports.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-restricted-exports.js rename to src/hello/server/node_modules/eslint/lib/rules/no-restricted-exports.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-restricted-globals.js b/src/hello/server/node_modules/eslint/lib/rules/no-restricted-globals.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-restricted-globals.js rename to src/hello/server/node_modules/eslint/lib/rules/no-restricted-globals.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-restricted-imports.js b/src/hello/server/node_modules/eslint/lib/rules/no-restricted-imports.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-restricted-imports.js rename to src/hello/server/node_modules/eslint/lib/rules/no-restricted-imports.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-restricted-modules.js b/src/hello/server/node_modules/eslint/lib/rules/no-restricted-modules.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-restricted-modules.js rename to src/hello/server/node_modules/eslint/lib/rules/no-restricted-modules.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-restricted-properties.js b/src/hello/server/node_modules/eslint/lib/rules/no-restricted-properties.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-restricted-properties.js rename to src/hello/server/node_modules/eslint/lib/rules/no-restricted-properties.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-restricted-syntax.js b/src/hello/server/node_modules/eslint/lib/rules/no-restricted-syntax.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-restricted-syntax.js rename to src/hello/server/node_modules/eslint/lib/rules/no-restricted-syntax.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-return-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-return-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-return-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-return-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-return-await.js b/src/hello/server/node_modules/eslint/lib/rules/no-return-await.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-return-await.js rename to src/hello/server/node_modules/eslint/lib/rules/no-return-await.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-script-url.js b/src/hello/server/node_modules/eslint/lib/rules/no-script-url.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-script-url.js rename to src/hello/server/node_modules/eslint/lib/rules/no-script-url.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-self-assign.js b/src/hello/server/node_modules/eslint/lib/rules/no-self-assign.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-self-assign.js rename to src/hello/server/node_modules/eslint/lib/rules/no-self-assign.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-self-compare.js b/src/hello/server/node_modules/eslint/lib/rules/no-self-compare.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-self-compare.js rename to src/hello/server/node_modules/eslint/lib/rules/no-self-compare.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-sequences.js b/src/hello/server/node_modules/eslint/lib/rules/no-sequences.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-sequences.js rename to src/hello/server/node_modules/eslint/lib/rules/no-sequences.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-setter-return.js b/src/hello/server/node_modules/eslint/lib/rules/no-setter-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-setter-return.js rename to src/hello/server/node_modules/eslint/lib/rules/no-setter-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-shadow-restricted-names.js b/src/hello/server/node_modules/eslint/lib/rules/no-shadow-restricted-names.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-shadow-restricted-names.js rename to src/hello/server/node_modules/eslint/lib/rules/no-shadow-restricted-names.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-shadow.js b/src/hello/server/node_modules/eslint/lib/rules/no-shadow.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-shadow.js rename to src/hello/server/node_modules/eslint/lib/rules/no-shadow.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-spaced-func.js b/src/hello/server/node_modules/eslint/lib/rules/no-spaced-func.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-spaced-func.js rename to src/hello/server/node_modules/eslint/lib/rules/no-spaced-func.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-sparse-arrays.js b/src/hello/server/node_modules/eslint/lib/rules/no-sparse-arrays.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-sparse-arrays.js rename to src/hello/server/node_modules/eslint/lib/rules/no-sparse-arrays.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-sync.js b/src/hello/server/node_modules/eslint/lib/rules/no-sync.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-sync.js rename to src/hello/server/node_modules/eslint/lib/rules/no-sync.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-tabs.js b/src/hello/server/node_modules/eslint/lib/rules/no-tabs.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-tabs.js rename to src/hello/server/node_modules/eslint/lib/rules/no-tabs.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-template-curly-in-string.js b/src/hello/server/node_modules/eslint/lib/rules/no-template-curly-in-string.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-template-curly-in-string.js rename to src/hello/server/node_modules/eslint/lib/rules/no-template-curly-in-string.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-ternary.js b/src/hello/server/node_modules/eslint/lib/rules/no-ternary.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-ternary.js rename to src/hello/server/node_modules/eslint/lib/rules/no-ternary.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-this-before-super.js b/src/hello/server/node_modules/eslint/lib/rules/no-this-before-super.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-this-before-super.js rename to src/hello/server/node_modules/eslint/lib/rules/no-this-before-super.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-throw-literal.js b/src/hello/server/node_modules/eslint/lib/rules/no-throw-literal.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-throw-literal.js rename to src/hello/server/node_modules/eslint/lib/rules/no-throw-literal.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-trailing-spaces.js b/src/hello/server/node_modules/eslint/lib/rules/no-trailing-spaces.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-trailing-spaces.js rename to src/hello/server/node_modules/eslint/lib/rules/no-trailing-spaces.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-undef-init.js b/src/hello/server/node_modules/eslint/lib/rules/no-undef-init.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-undef-init.js rename to src/hello/server/node_modules/eslint/lib/rules/no-undef-init.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-undef.js b/src/hello/server/node_modules/eslint/lib/rules/no-undef.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-undef.js rename to src/hello/server/node_modules/eslint/lib/rules/no-undef.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-undefined.js b/src/hello/server/node_modules/eslint/lib/rules/no-undefined.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-undefined.js rename to src/hello/server/node_modules/eslint/lib/rules/no-undefined.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-underscore-dangle.js b/src/hello/server/node_modules/eslint/lib/rules/no-underscore-dangle.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-underscore-dangle.js rename to src/hello/server/node_modules/eslint/lib/rules/no-underscore-dangle.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unexpected-multiline.js b/src/hello/server/node_modules/eslint/lib/rules/no-unexpected-multiline.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unexpected-multiline.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unexpected-multiline.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js b/src/hello/server/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unneeded-ternary.js b/src/hello/server/node_modules/eslint/lib/rules/no-unneeded-ternary.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unneeded-ternary.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unneeded-ternary.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unreachable-loop.js b/src/hello/server/node_modules/eslint/lib/rules/no-unreachable-loop.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unreachable-loop.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unreachable-loop.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unreachable.js b/src/hello/server/node_modules/eslint/lib/rules/no-unreachable.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unreachable.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unreachable.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unsafe-finally.js b/src/hello/server/node_modules/eslint/lib/rules/no-unsafe-finally.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unsafe-finally.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unsafe-finally.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unsafe-negation.js b/src/hello/server/node_modules/eslint/lib/rules/no-unsafe-negation.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unsafe-negation.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unsafe-negation.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js b/src/hello/server/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unused-expressions.js b/src/hello/server/node_modules/eslint/lib/rules/no-unused-expressions.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unused-expressions.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unused-expressions.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unused-labels.js b/src/hello/server/node_modules/eslint/lib/rules/no-unused-labels.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unused-labels.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unused-labels.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unused-private-class-members.js b/src/hello/server/node_modules/eslint/lib/rules/no-unused-private-class-members.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unused-private-class-members.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unused-private-class-members.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-unused-vars.js b/src/hello/server/node_modules/eslint/lib/rules/no-unused-vars.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-unused-vars.js rename to src/hello/server/node_modules/eslint/lib/rules/no-unused-vars.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-use-before-define.js b/src/hello/server/node_modules/eslint/lib/rules/no-use-before-define.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-use-before-define.js rename to src/hello/server/node_modules/eslint/lib/rules/no-use-before-define.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-backreference.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-backreference.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-backreference.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-backreference.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-call.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-call.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-call.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-call.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-catch.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-catch.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-catch.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-catch.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-computed-key.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-computed-key.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-computed-key.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-computed-key.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-concat.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-concat.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-concat.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-concat.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-constructor.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-constructor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-constructor.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-constructor.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-escape.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-escape.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-escape.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-escape.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-rename.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-rename.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-rename.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-rename.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-useless-return.js b/src/hello/server/node_modules/eslint/lib/rules/no-useless-return.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-useless-return.js rename to src/hello/server/node_modules/eslint/lib/rules/no-useless-return.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-var.js b/src/hello/server/node_modules/eslint/lib/rules/no-var.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-var.js rename to src/hello/server/node_modules/eslint/lib/rules/no-var.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-void.js b/src/hello/server/node_modules/eslint/lib/rules/no-void.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-void.js rename to src/hello/server/node_modules/eslint/lib/rules/no-void.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-warning-comments.js b/src/hello/server/node_modules/eslint/lib/rules/no-warning-comments.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-warning-comments.js rename to src/hello/server/node_modules/eslint/lib/rules/no-warning-comments.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-whitespace-before-property.js b/src/hello/server/node_modules/eslint/lib/rules/no-whitespace-before-property.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-whitespace-before-property.js rename to src/hello/server/node_modules/eslint/lib/rules/no-whitespace-before-property.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/no-with.js b/src/hello/server/node_modules/eslint/lib/rules/no-with.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/no-with.js rename to src/hello/server/node_modules/eslint/lib/rules/no-with.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/nonblock-statement-body-position.js b/src/hello/server/node_modules/eslint/lib/rules/nonblock-statement-body-position.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/nonblock-statement-body-position.js rename to src/hello/server/node_modules/eslint/lib/rules/nonblock-statement-body-position.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/object-curly-newline.js b/src/hello/server/node_modules/eslint/lib/rules/object-curly-newline.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/object-curly-newline.js rename to src/hello/server/node_modules/eslint/lib/rules/object-curly-newline.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/object-curly-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/object-curly-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/object-curly-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/object-curly-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/object-property-newline.js b/src/hello/server/node_modules/eslint/lib/rules/object-property-newline.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/object-property-newline.js rename to src/hello/server/node_modules/eslint/lib/rules/object-property-newline.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/object-shorthand.js b/src/hello/server/node_modules/eslint/lib/rules/object-shorthand.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/object-shorthand.js rename to src/hello/server/node_modules/eslint/lib/rules/object-shorthand.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/one-var-declaration-per-line.js b/src/hello/server/node_modules/eslint/lib/rules/one-var-declaration-per-line.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/one-var-declaration-per-line.js rename to src/hello/server/node_modules/eslint/lib/rules/one-var-declaration-per-line.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/one-var.js b/src/hello/server/node_modules/eslint/lib/rules/one-var.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/one-var.js rename to src/hello/server/node_modules/eslint/lib/rules/one-var.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/operator-assignment.js b/src/hello/server/node_modules/eslint/lib/rules/operator-assignment.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/operator-assignment.js rename to src/hello/server/node_modules/eslint/lib/rules/operator-assignment.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/operator-linebreak.js b/src/hello/server/node_modules/eslint/lib/rules/operator-linebreak.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/operator-linebreak.js rename to src/hello/server/node_modules/eslint/lib/rules/operator-linebreak.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/padded-blocks.js b/src/hello/server/node_modules/eslint/lib/rules/padded-blocks.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/padded-blocks.js rename to src/hello/server/node_modules/eslint/lib/rules/padded-blocks.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/padding-line-between-statements.js b/src/hello/server/node_modules/eslint/lib/rules/padding-line-between-statements.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/padding-line-between-statements.js rename to src/hello/server/node_modules/eslint/lib/rules/padding-line-between-statements.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-arrow-callback.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-arrow-callback.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-arrow-callback.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-arrow-callback.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-const.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-const.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-const.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-const.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-destructuring.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-destructuring.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-destructuring.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-destructuring.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-named-capture-group.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-named-capture-group.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-named-capture-group.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-named-capture-group.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-numeric-literals.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-numeric-literals.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-numeric-literals.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-numeric-literals.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-object-has-own.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-object-has-own.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-object-has-own.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-object-has-own.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-object-spread.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-object-spread.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-object-spread.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-object-spread.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-reflect.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-reflect.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-reflect.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-reflect.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-regex-literals.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-regex-literals.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-regex-literals.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-regex-literals.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-rest-params.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-rest-params.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-rest-params.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-rest-params.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-spread.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-spread.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-spread.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-spread.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/prefer-template.js b/src/hello/server/node_modules/eslint/lib/rules/prefer-template.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/prefer-template.js rename to src/hello/server/node_modules/eslint/lib/rules/prefer-template.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/quote-props.js b/src/hello/server/node_modules/eslint/lib/rules/quote-props.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/quote-props.js rename to src/hello/server/node_modules/eslint/lib/rules/quote-props.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/quotes.js b/src/hello/server/node_modules/eslint/lib/rules/quotes.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/quotes.js rename to src/hello/server/node_modules/eslint/lib/rules/quotes.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/radix.js b/src/hello/server/node_modules/eslint/lib/rules/radix.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/radix.js rename to src/hello/server/node_modules/eslint/lib/rules/radix.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/require-atomic-updates.js b/src/hello/server/node_modules/eslint/lib/rules/require-atomic-updates.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/require-atomic-updates.js rename to src/hello/server/node_modules/eslint/lib/rules/require-atomic-updates.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/require-await.js b/src/hello/server/node_modules/eslint/lib/rules/require-await.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/require-await.js rename to src/hello/server/node_modules/eslint/lib/rules/require-await.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/require-jsdoc.js b/src/hello/server/node_modules/eslint/lib/rules/require-jsdoc.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/require-jsdoc.js rename to src/hello/server/node_modules/eslint/lib/rules/require-jsdoc.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/require-unicode-regexp.js b/src/hello/server/node_modules/eslint/lib/rules/require-unicode-regexp.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/require-unicode-regexp.js rename to src/hello/server/node_modules/eslint/lib/rules/require-unicode-regexp.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/require-yield.js b/src/hello/server/node_modules/eslint/lib/rules/require-yield.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/require-yield.js rename to src/hello/server/node_modules/eslint/lib/rules/require-yield.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/rest-spread-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/rest-spread-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/rest-spread-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/rest-spread-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/semi-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/semi-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/semi-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/semi-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/semi-style.js b/src/hello/server/node_modules/eslint/lib/rules/semi-style.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/semi-style.js rename to src/hello/server/node_modules/eslint/lib/rules/semi-style.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/semi.js b/src/hello/server/node_modules/eslint/lib/rules/semi.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/semi.js rename to src/hello/server/node_modules/eslint/lib/rules/semi.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/sort-imports.js b/src/hello/server/node_modules/eslint/lib/rules/sort-imports.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/sort-imports.js rename to src/hello/server/node_modules/eslint/lib/rules/sort-imports.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/sort-keys.js b/src/hello/server/node_modules/eslint/lib/rules/sort-keys.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/sort-keys.js rename to src/hello/server/node_modules/eslint/lib/rules/sort-keys.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/sort-vars.js b/src/hello/server/node_modules/eslint/lib/rules/sort-vars.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/sort-vars.js rename to src/hello/server/node_modules/eslint/lib/rules/sort-vars.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/space-before-blocks.js b/src/hello/server/node_modules/eslint/lib/rules/space-before-blocks.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/space-before-blocks.js rename to src/hello/server/node_modules/eslint/lib/rules/space-before-blocks.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/space-before-function-paren.js b/src/hello/server/node_modules/eslint/lib/rules/space-before-function-paren.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/space-before-function-paren.js rename to src/hello/server/node_modules/eslint/lib/rules/space-before-function-paren.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/space-in-parens.js b/src/hello/server/node_modules/eslint/lib/rules/space-in-parens.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/space-in-parens.js rename to src/hello/server/node_modules/eslint/lib/rules/space-in-parens.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/space-infix-ops.js b/src/hello/server/node_modules/eslint/lib/rules/space-infix-ops.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/space-infix-ops.js rename to src/hello/server/node_modules/eslint/lib/rules/space-infix-ops.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/space-unary-ops.js b/src/hello/server/node_modules/eslint/lib/rules/space-unary-ops.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/space-unary-ops.js rename to src/hello/server/node_modules/eslint/lib/rules/space-unary-ops.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/spaced-comment.js b/src/hello/server/node_modules/eslint/lib/rules/spaced-comment.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/spaced-comment.js rename to src/hello/server/node_modules/eslint/lib/rules/spaced-comment.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/strict.js b/src/hello/server/node_modules/eslint/lib/rules/strict.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/strict.js rename to src/hello/server/node_modules/eslint/lib/rules/strict.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/switch-colon-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/switch-colon-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/switch-colon-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/switch-colon-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/symbol-description.js b/src/hello/server/node_modules/eslint/lib/rules/symbol-description.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/symbol-description.js rename to src/hello/server/node_modules/eslint/lib/rules/symbol-description.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/template-curly-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/template-curly-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/template-curly-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/template-curly-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/template-tag-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/template-tag-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/template-tag-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/template-tag-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/unicode-bom.js b/src/hello/server/node_modules/eslint/lib/rules/unicode-bom.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/unicode-bom.js rename to src/hello/server/node_modules/eslint/lib/rules/unicode-bom.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/use-isnan.js b/src/hello/server/node_modules/eslint/lib/rules/use-isnan.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/use-isnan.js rename to src/hello/server/node_modules/eslint/lib/rules/use-isnan.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/ast-utils.js b/src/hello/server/node_modules/eslint/lib/rules/utils/ast-utils.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/ast-utils.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/ast-utils.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/fix-tracker.js b/src/hello/server/node_modules/eslint/lib/rules/utils/fix-tracker.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/fix-tracker.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/fix-tracker.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/keywords.js b/src/hello/server/node_modules/eslint/lib/rules/utils/keywords.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/keywords.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/keywords.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js b/src/hello/server/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/patterns/letters.js b/src/hello/server/node_modules/eslint/lib/rules/utils/patterns/letters.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/patterns/letters.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/patterns/letters.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/regular-expressions.js b/src/hello/server/node_modules/eslint/lib/rules/utils/regular-expressions.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/regular-expressions.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/regular-expressions.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/index.js b/src/hello/server/node_modules/eslint/lib/rules/utils/unicode/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/index.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/unicode/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js b/src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js b/src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js b/src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js b/src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js rename to src/hello/server/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/valid-jsdoc.js b/src/hello/server/node_modules/eslint/lib/rules/valid-jsdoc.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/valid-jsdoc.js rename to src/hello/server/node_modules/eslint/lib/rules/valid-jsdoc.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/valid-typeof.js b/src/hello/server/node_modules/eslint/lib/rules/valid-typeof.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/valid-typeof.js rename to src/hello/server/node_modules/eslint/lib/rules/valid-typeof.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/vars-on-top.js b/src/hello/server/node_modules/eslint/lib/rules/vars-on-top.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/vars-on-top.js rename to src/hello/server/node_modules/eslint/lib/rules/vars-on-top.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/wrap-iife.js b/src/hello/server/node_modules/eslint/lib/rules/wrap-iife.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/wrap-iife.js rename to src/hello/server/node_modules/eslint/lib/rules/wrap-iife.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/wrap-regex.js b/src/hello/server/node_modules/eslint/lib/rules/wrap-regex.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/wrap-regex.js rename to src/hello/server/node_modules/eslint/lib/rules/wrap-regex.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/yield-star-spacing.js b/src/hello/server/node_modules/eslint/lib/rules/yield-star-spacing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/yield-star-spacing.js rename to src/hello/server/node_modules/eslint/lib/rules/yield-star-spacing.js diff --git a/src/hello/backend/node_modules/eslint/lib/rules/yoda.js b/src/hello/server/node_modules/eslint/lib/rules/yoda.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/rules/yoda.js rename to src/hello/server/node_modules/eslint/lib/rules/yoda.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/ajv.js b/src/hello/server/node_modules/eslint/lib/shared/ajv.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/ajv.js rename to src/hello/server/node_modules/eslint/lib/shared/ajv.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/ast-utils.js b/src/hello/server/node_modules/eslint/lib/shared/ast-utils.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/ast-utils.js rename to src/hello/server/node_modules/eslint/lib/shared/ast-utils.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/config-validator.js b/src/hello/server/node_modules/eslint/lib/shared/config-validator.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/config-validator.js rename to src/hello/server/node_modules/eslint/lib/shared/config-validator.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/deprecation-warnings.js b/src/hello/server/node_modules/eslint/lib/shared/deprecation-warnings.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/deprecation-warnings.js rename to src/hello/server/node_modules/eslint/lib/shared/deprecation-warnings.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/directives.js b/src/hello/server/node_modules/eslint/lib/shared/directives.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/directives.js rename to src/hello/server/node_modules/eslint/lib/shared/directives.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/logging.js b/src/hello/server/node_modules/eslint/lib/shared/logging.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/logging.js rename to src/hello/server/node_modules/eslint/lib/shared/logging.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/relative-module-resolver.js b/src/hello/server/node_modules/eslint/lib/shared/relative-module-resolver.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/relative-module-resolver.js rename to src/hello/server/node_modules/eslint/lib/shared/relative-module-resolver.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/runtime-info.js b/src/hello/server/node_modules/eslint/lib/shared/runtime-info.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/runtime-info.js rename to src/hello/server/node_modules/eslint/lib/shared/runtime-info.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/severity.js b/src/hello/server/node_modules/eslint/lib/shared/severity.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/severity.js rename to src/hello/server/node_modules/eslint/lib/shared/severity.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/string-utils.js b/src/hello/server/node_modules/eslint/lib/shared/string-utils.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/string-utils.js rename to src/hello/server/node_modules/eslint/lib/shared/string-utils.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/traverser.js b/src/hello/server/node_modules/eslint/lib/shared/traverser.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/traverser.js rename to src/hello/server/node_modules/eslint/lib/shared/traverser.js diff --git a/src/hello/backend/node_modules/eslint/lib/shared/types.js b/src/hello/server/node_modules/eslint/lib/shared/types.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/shared/types.js rename to src/hello/server/node_modules/eslint/lib/shared/types.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/index.js b/src/hello/server/node_modules/eslint/lib/source-code/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/index.js rename to src/hello/server/node_modules/eslint/lib/source-code/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/source-code.js b/src/hello/server/node_modules/eslint/lib/source-code/source-code.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/source-code.js rename to src/hello/server/node_modules/eslint/lib/source-code/source-code.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/backward-token-comment-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/backward-token-comment-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/backward-token-comment-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/backward-token-comment-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/backward-token-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/cursors.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/cursors.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/cursors.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/cursors.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/decorative-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/decorative-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/decorative-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/decorative-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/filter-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/filter-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/filter-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/filter-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/forward-token-comment-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/forward-token-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/index.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/index.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/index.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/index.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/limit-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/limit-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/limit-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/limit-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/padded-token-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/padded-token-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/padded-token-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/padded-token-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/skip-cursor.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/skip-cursor.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/skip-cursor.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/skip-cursor.js diff --git a/src/hello/backend/node_modules/eslint/lib/source-code/token-store/utils.js b/src/hello/server/node_modules/eslint/lib/source-code/token-store/utils.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/source-code/token-store/utils.js rename to src/hello/server/node_modules/eslint/lib/source-code/token-store/utils.js diff --git a/src/hello/backend/node_modules/eslint/lib/unsupported-api.js b/src/hello/server/node_modules/eslint/lib/unsupported-api.js similarity index 100% rename from src/hello/backend/node_modules/eslint/lib/unsupported-api.js rename to src/hello/server/node_modules/eslint/lib/unsupported-api.js diff --git a/src/hello/backend/node_modules/eslint/messages/all-files-ignored.js b/src/hello/server/node_modules/eslint/messages/all-files-ignored.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/all-files-ignored.js rename to src/hello/server/node_modules/eslint/messages/all-files-ignored.js diff --git a/src/hello/backend/node_modules/eslint/messages/eslintrc-incompat.js b/src/hello/server/node_modules/eslint/messages/eslintrc-incompat.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/eslintrc-incompat.js rename to src/hello/server/node_modules/eslint/messages/eslintrc-incompat.js diff --git a/src/hello/backend/node_modules/eslint/messages/eslintrc-plugins.js b/src/hello/server/node_modules/eslint/messages/eslintrc-plugins.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/eslintrc-plugins.js rename to src/hello/server/node_modules/eslint/messages/eslintrc-plugins.js diff --git a/src/hello/backend/node_modules/eslint/messages/extend-config-missing.js b/src/hello/server/node_modules/eslint/messages/extend-config-missing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/extend-config-missing.js rename to src/hello/server/node_modules/eslint/messages/extend-config-missing.js diff --git a/src/hello/backend/node_modules/eslint/messages/failed-to-read-json.js b/src/hello/server/node_modules/eslint/messages/failed-to-read-json.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/failed-to-read-json.js rename to src/hello/server/node_modules/eslint/messages/failed-to-read-json.js diff --git a/src/hello/backend/node_modules/eslint/messages/file-not-found.js b/src/hello/server/node_modules/eslint/messages/file-not-found.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/file-not-found.js rename to src/hello/server/node_modules/eslint/messages/file-not-found.js diff --git a/src/hello/backend/node_modules/eslint/messages/invalid-rule-options.js b/src/hello/server/node_modules/eslint/messages/invalid-rule-options.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/invalid-rule-options.js rename to src/hello/server/node_modules/eslint/messages/invalid-rule-options.js diff --git a/src/hello/backend/node_modules/eslint/messages/invalid-rule-severity.js b/src/hello/server/node_modules/eslint/messages/invalid-rule-severity.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/invalid-rule-severity.js rename to src/hello/server/node_modules/eslint/messages/invalid-rule-severity.js diff --git a/src/hello/backend/node_modules/eslint/messages/no-config-found.js b/src/hello/server/node_modules/eslint/messages/no-config-found.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/no-config-found.js rename to src/hello/server/node_modules/eslint/messages/no-config-found.js diff --git a/src/hello/backend/node_modules/eslint/messages/plugin-conflict.js b/src/hello/server/node_modules/eslint/messages/plugin-conflict.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/plugin-conflict.js rename to src/hello/server/node_modules/eslint/messages/plugin-conflict.js diff --git a/src/hello/backend/node_modules/eslint/messages/plugin-invalid.js b/src/hello/server/node_modules/eslint/messages/plugin-invalid.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/plugin-invalid.js rename to src/hello/server/node_modules/eslint/messages/plugin-invalid.js diff --git a/src/hello/backend/node_modules/eslint/messages/plugin-missing.js b/src/hello/server/node_modules/eslint/messages/plugin-missing.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/plugin-missing.js rename to src/hello/server/node_modules/eslint/messages/plugin-missing.js diff --git a/src/hello/backend/node_modules/eslint/messages/print-config-with-directory-path.js b/src/hello/server/node_modules/eslint/messages/print-config-with-directory-path.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/print-config-with-directory-path.js rename to src/hello/server/node_modules/eslint/messages/print-config-with-directory-path.js diff --git a/src/hello/backend/node_modules/eslint/messages/shared.js b/src/hello/server/node_modules/eslint/messages/shared.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/shared.js rename to src/hello/server/node_modules/eslint/messages/shared.js diff --git a/src/hello/backend/node_modules/eslint/messages/whitespace-found.js b/src/hello/server/node_modules/eslint/messages/whitespace-found.js similarity index 100% rename from src/hello/backend/node_modules/eslint/messages/whitespace-found.js rename to src/hello/server/node_modules/eslint/messages/whitespace-found.js diff --git a/src/hello/backend/node_modules/eslint/package.json b/src/hello/server/node_modules/eslint/package.json similarity index 100% rename from src/hello/backend/node_modules/eslint/package.json rename to src/hello/server/node_modules/eslint/package.json diff --git a/src/hello/backend/node_modules/espree/LICENSE b/src/hello/server/node_modules/espree/LICENSE similarity index 100% rename from src/hello/backend/node_modules/espree/LICENSE rename to src/hello/server/node_modules/espree/LICENSE diff --git a/src/hello/backend/node_modules/espree/README.md b/src/hello/server/node_modules/espree/README.md similarity index 100% rename from src/hello/backend/node_modules/espree/README.md rename to src/hello/server/node_modules/espree/README.md diff --git a/src/hello/backend/node_modules/espree/dist/espree.cjs b/src/hello/server/node_modules/espree/dist/espree.cjs similarity index 100% rename from src/hello/backend/node_modules/espree/dist/espree.cjs rename to src/hello/server/node_modules/espree/dist/espree.cjs diff --git a/src/hello/backend/node_modules/espree/espree.js b/src/hello/server/node_modules/espree/espree.js similarity index 100% rename from src/hello/backend/node_modules/espree/espree.js rename to src/hello/server/node_modules/espree/espree.js diff --git a/src/hello/backend/node_modules/espree/lib/espree.js b/src/hello/server/node_modules/espree/lib/espree.js similarity index 100% rename from src/hello/backend/node_modules/espree/lib/espree.js rename to src/hello/server/node_modules/espree/lib/espree.js diff --git a/src/hello/backend/node_modules/espree/lib/features.js b/src/hello/server/node_modules/espree/lib/features.js similarity index 100% rename from src/hello/backend/node_modules/espree/lib/features.js rename to src/hello/server/node_modules/espree/lib/features.js diff --git a/src/hello/backend/node_modules/espree/lib/options.js b/src/hello/server/node_modules/espree/lib/options.js similarity index 100% rename from src/hello/backend/node_modules/espree/lib/options.js rename to src/hello/server/node_modules/espree/lib/options.js diff --git a/src/hello/backend/node_modules/espree/lib/token-translator.js b/src/hello/server/node_modules/espree/lib/token-translator.js similarity index 100% rename from src/hello/backend/node_modules/espree/lib/token-translator.js rename to src/hello/server/node_modules/espree/lib/token-translator.js diff --git a/src/hello/backend/node_modules/espree/lib/version.js b/src/hello/server/node_modules/espree/lib/version.js similarity index 100% rename from src/hello/backend/node_modules/espree/lib/version.js rename to src/hello/server/node_modules/espree/lib/version.js diff --git a/src/hello/backend/node_modules/espree/package.json b/src/hello/server/node_modules/espree/package.json similarity index 100% rename from src/hello/backend/node_modules/espree/package.json rename to src/hello/server/node_modules/espree/package.json diff --git a/src/hello/backend/node_modules/esquery/README.md b/src/hello/server/node_modules/esquery/README.md similarity index 97% rename from src/hello/backend/node_modules/esquery/README.md rename to src/hello/server/node_modules/esquery/README.md index 16809a79..6d5c39fd 100644 --- a/src/hello/backend/node_modules/esquery/README.md +++ b/src/hello/server/node_modules/esquery/README.md @@ -20,7 +20,7 @@ The following selectors are supported: * [adjacent sibling](http://dev.w3.org/csswg/selectors4/#adjacent-sibling-combinators): `node + adjacent` * [negation](http://dev.w3.org/csswg/selectors4/#negation-pseudo): `:not(ForStatement)` * [has](https://drafts.csswg.org/selectors-4/#has-pseudo): `:has(ForStatement)`, `:has(> ForStatement)` -* [matches-any](http://dev.w3.org/csswg/selectors4/#matches): `:matches([attr] > :first-child, :last-child)` +* [matches-any](http://dev.w3.org/csswg/selectors4/#matches): `:is([attr] > :first-child, :last-child)` * [subject indicator](http://dev.w3.org/csswg/selectors4/#subject): `!IfStatement > [name="foo"]` * class of AST node: `:statement`, `:expression`, `:declaration`, `:function`, or `:pattern` diff --git a/src/hello/backend/node_modules/esquery/dist/esquery.esm.js b/src/hello/server/node_modules/esquery/dist/esquery.esm.js similarity index 90% rename from src/hello/backend/node_modules/esquery/dist/esquery.esm.js rename to src/hello/server/node_modules/esquery/dist/esquery.esm.js index 61caabaf..70191dfa 100644 --- a/src/hello/backend/node_modules/esquery/dist/esquery.esm.js +++ b/src/hello/server/node_modules/esquery/dist/esquery.esm.js @@ -1,72 +1,71 @@ -function _iterableToArrayLimit(arr, i) { - var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; try { - if (_x = (_i = _i.call(arr)).next, 0 === i) { - if (Object(_i) !== _i) return; - _n = !1; - } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); - } catch (err) { - _d = !0, _e = err; + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; } finally { try { - if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { - if (_d) throw _e; + if (o) throw n; } } - return _arr; + return a; } } -function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); -} -function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); -} -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); -} -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); } -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -1071,15 +1070,26 @@ var parser = createCommonjsModule(function (module) { peg$c73 = peg$classExpectation(["i", "m", "s", "u"], false, false), peg$c74 = "/", peg$c75 = peg$literalExpectation("/", false), - peg$c76 = /^[^\/]/, - peg$c77 = peg$classExpectation(["/"], true, false), - peg$c78 = function peg$c78(d, flgs) { + peg$c76 = function peg$c76(pattern, flgs) { return { type: 'regexp', - value: new RegExp(d.join(''), flgs ? flgs.join('') : '') + value: new RegExp(pattern.join(''), flgs ? flgs.join('') : '') }; }, - peg$c79 = function peg$c79(i, is) { + peg$c77 = /^[^\]\\]/, + peg$c78 = peg$classExpectation(["]", "\\"], true, false), + peg$c79 = function peg$c79(cs) { + return '[' + cs.join('') + ']'; + }, + peg$c80 = function peg$c80(a) { + return '\\' + a; + }, + peg$c81 = /^[^\/\\[]/, + peg$c82 = peg$classExpectation(["/", "\\", "["], true, false), + peg$c83 = function peg$c83(cs) { + return cs.join(''); + }, + peg$c84 = function peg$c84(i, is) { return { type: 'field', name: is.reduce(function (memo, p) { @@ -1087,53 +1097,55 @@ var parser = createCommonjsModule(function (module) { }, i) }; }, - peg$c80 = ":not(", - peg$c81 = peg$literalExpectation(":not(", false), - peg$c82 = function peg$c82(ss) { + peg$c85 = ":not(", + peg$c86 = peg$literalExpectation(":not(", false), + peg$c87 = function peg$c87(ss) { return { type: 'not', selectors: ss }; }, - peg$c83 = ":matches(", - peg$c84 = peg$literalExpectation(":matches(", false), - peg$c85 = function peg$c85(ss) { + peg$c88 = ":matches(", + peg$c89 = peg$literalExpectation(":matches(", false), + peg$c90 = function peg$c90(ss) { return { type: 'matches', selectors: ss }; }, - peg$c86 = ":has(", - peg$c87 = peg$literalExpectation(":has(", false), - peg$c88 = function peg$c88(ss) { + peg$c91 = ":is(", + peg$c92 = peg$literalExpectation(":is(", false), + peg$c93 = ":has(", + peg$c94 = peg$literalExpectation(":has(", false), + peg$c95 = function peg$c95(ss) { return { type: 'has', selectors: ss }; }, - peg$c89 = ":first-child", - peg$c90 = peg$literalExpectation(":first-child", false), - peg$c91 = function peg$c91() { + peg$c96 = ":first-child", + peg$c97 = peg$literalExpectation(":first-child", false), + peg$c98 = function peg$c98() { return nth(1); }, - peg$c92 = ":last-child", - peg$c93 = peg$literalExpectation(":last-child", false), - peg$c94 = function peg$c94() { + peg$c99 = ":last-child", + peg$c100 = peg$literalExpectation(":last-child", false), + peg$c101 = function peg$c101() { return nthLast(1); }, - peg$c95 = ":nth-child(", - peg$c96 = peg$literalExpectation(":nth-child(", false), - peg$c97 = function peg$c97(n) { + peg$c102 = ":nth-child(", + peg$c103 = peg$literalExpectation(":nth-child(", false), + peg$c104 = function peg$c104(n) { return nth(parseInt(n.join(''), 10)); }, - peg$c98 = ":nth-last-child(", - peg$c99 = peg$literalExpectation(":nth-last-child(", false), - peg$c100 = function peg$c100(n) { + peg$c105 = ":nth-last-child(", + peg$c106 = peg$literalExpectation(":nth-last-child(", false), + peg$c107 = function peg$c107(n) { return nthLast(parseInt(n.join(''), 10)); }, - peg$c101 = ":", - peg$c102 = peg$literalExpectation(":", false), - peg$c103 = function peg$c103(c) { + peg$c108 = ":", + peg$c109 = peg$literalExpectation(":", false), + peg$c110 = function peg$c110(c) { return { type: 'class', name: c @@ -1238,7 +1250,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsestart() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 0, + var key = peg$currPos * 36 + 0, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1281,7 +1293,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parse_() { var s0, s1; - var key = peg$currPos * 32 + 1, + var key = peg$currPos * 36 + 1, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1317,7 +1329,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseidentifierName() { var s0, s1, s2; - var key = peg$currPos * 32 + 2, + var key = peg$currPos * 36 + 2, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1362,7 +1374,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsebinaryOp() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 3, + var key = peg$currPos * 36 + 3, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1492,7 +1504,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsehasSelectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 4, + var key = peg$currPos * 36 + 4, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1594,7 +1606,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseselectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 5, + var key = peg$currPos * 36 + 5, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1696,7 +1708,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsehasSelector() { var s0, s1, s2; - var key = peg$currPos * 32 + 6, + var key = peg$currPos * 36 + 6, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1728,7 +1740,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseselector() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 7, + var key = peg$currPos * 36 + 7, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1790,7 +1802,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsesequence() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 8, + var key = peg$currPos * 36 + 8, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1839,7 +1851,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseatom() { var s0; - var key = peg$currPos * 32 + 9, + var key = peg$currPos * 36 + 9, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1857,17 +1869,20 @@ var parser = createCommonjsModule(function (module) { if (s0 === peg$FAILED) { s0 = peg$parsematches(); if (s0 === peg$FAILED) { - s0 = peg$parsehas(); + s0 = peg$parseis(); if (s0 === peg$FAILED) { - s0 = peg$parsefirstChild(); + s0 = peg$parsehas(); if (s0 === peg$FAILED) { - s0 = peg$parselastChild(); + s0 = peg$parsefirstChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthChild(); + s0 = peg$parselastChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthLastChild(); + s0 = peg$parsenthChild(); if (s0 === peg$FAILED) { - s0 = peg$parseclass(); + s0 = peg$parsenthLastChild(); + if (s0 === peg$FAILED) { + s0 = peg$parseclass(); + } } } } @@ -1887,7 +1902,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsewildcard() { var s0, s1; - var key = peg$currPos * 32 + 10, + var key = peg$currPos * 36 + 10, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1915,7 +1930,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseidentifier() { var s0, s1, s2; - var key = peg$currPos * 32 + 11, + var key = peg$currPos * 36 + 11, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1955,7 +1970,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseattr() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 12, + var key = peg$currPos * 36 + 12, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2018,7 +2033,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseattrOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 13, + var key = peg$currPos * 36 + 13, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2077,7 +2092,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseattrEqOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 14, + var key = peg$currPos * 36 + 14, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2125,7 +2140,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseattrName() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 15, + var key = peg$currPos * 36 + 15, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2203,7 +2218,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseattrValue() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 16, + var key = peg$currPos * 36 + 16, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2302,7 +2317,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsestring() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 17, + var key = peg$currPos * 36 + 17, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2566,7 +2581,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsenumber() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 18, + var key = peg$currPos * 36 + 18, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2666,7 +2681,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsepath() { var s0, s1; - var key = peg$currPos * 32 + 19, + var key = peg$currPos * 36 + 19, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2686,7 +2701,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parsetype() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 20, + var key = peg$currPos * 36 + 20, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2774,7 +2789,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseflags() { var s0, s1; - var key = peg$currPos * 32 + 21, + var key = peg$currPos * 36 + 21, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2814,7 +2829,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseregex() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 32 + 22, + var key = peg$currPos * 36 + 22, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2832,25 +2847,21 @@ var parser = createCommonjsModule(function (module) { } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - { - peg$fail(peg$c77); + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - { - peg$fail(peg$c77); + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); } } } @@ -2873,7 +2884,7 @@ var parser = createCommonjsModule(function (module) { s4 = null; } if (s4 !== peg$FAILED) { - s1 = peg$c78(s2, s4); + s1 = peg$c76(s2, s4); s0 = s1; } else { peg$currPos = s0; @@ -2897,9 +2908,181 @@ var parser = createCommonjsModule(function (module) { }; return s0; } + function peg$parsere_character_class() { + var s0, s1, s2, s3; + var key = peg$currPos * 36 + 23, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c31; + peg$currPos++; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c32); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c78); + } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c78); + } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s3 = peg$c33; + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c34); + } + } + if (s3 !== peg$FAILED) { + s1 = peg$c79(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parsere_escape() { + var s0, s1, s2; + var key = peg$currPos * 36 + 24, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c52; + peg$currPos++; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c53); + } + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c54); + } + } + if (s2 !== peg$FAILED) { + s1 = peg$c80(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parsere_chars() { + var s0, s1, s2; + var key = peg$currPos * 36 + 25, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + s1 = []; + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c82); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c82); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s1 = peg$c83(s1); + } + s0 = s1; + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } function peg$parsefield() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 32 + 23, + var key = peg$currPos * 36 + 26, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2969,7 +3152,7 @@ var parser = createCommonjsModule(function (module) { } } if (s3 !== peg$FAILED) { - s1 = peg$c79(s2, s3); + s1 = peg$c84(s2, s3); s0 = s1; } else { peg$currPos = s0; @@ -2991,20 +3174,20 @@ var parser = createCommonjsModule(function (module) { } function peg$parsenegation() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 24, + var key = peg$currPos * 36 + 27, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c80) { - s1 = peg$c80; + if (input.substr(peg$currPos, 5) === peg$c85) { + s1 = peg$c85; peg$currPos += 5; } else { s1 = peg$FAILED; { - peg$fail(peg$c81); + peg$fail(peg$c86); } } if (s1 !== peg$FAILED) { @@ -3024,7 +3207,7 @@ var parser = createCommonjsModule(function (module) { } } if (s5 !== peg$FAILED) { - s1 = peg$c82(s3); + s1 = peg$c87(s3); s0 = s1; } else { peg$currPos = s0; @@ -3054,20 +3237,83 @@ var parser = createCommonjsModule(function (module) { } function peg$parsematches() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 25, + var key = peg$currPos * 36 + 28, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c83) { - s1 = peg$c83; + if (input.substr(peg$currPos, 9) === peg$c88) { + s1 = peg$c88; peg$currPos += 9; } else { s1 = peg$FAILED; { - peg$fail(peg$c84); + peg$fail(peg$c89); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseselectors(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s5 = peg$c69; + peg$currPos++; + } else { + s5 = peg$FAILED; + { + peg$fail(peg$c70); + } + } + if (s5 !== peg$FAILED) { + s1 = peg$c90(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parseis() { + var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 36 + 29, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c91) { + s1 = peg$c91; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c92); } } if (s1 !== peg$FAILED) { @@ -3087,7 +3333,7 @@ var parser = createCommonjsModule(function (module) { } } if (s5 !== peg$FAILED) { - s1 = peg$c85(s3); + s1 = peg$c90(s3); s0 = s1; } else { peg$currPos = s0; @@ -3117,20 +3363,20 @@ var parser = createCommonjsModule(function (module) { } function peg$parsehas() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 26, + var key = peg$currPos * 36 + 30, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c86) { - s1 = peg$c86; + if (input.substr(peg$currPos, 5) === peg$c93) { + s1 = peg$c93; peg$currPos += 5; } else { s1 = peg$FAILED; { - peg$fail(peg$c87); + peg$fail(peg$c94); } } if (s1 !== peg$FAILED) { @@ -3150,7 +3396,7 @@ var parser = createCommonjsModule(function (module) { } } if (s5 !== peg$FAILED) { - s1 = peg$c88(s3); + s1 = peg$c95(s3); s0 = s1; } else { peg$currPos = s0; @@ -3180,24 +3426,24 @@ var parser = createCommonjsModule(function (module) { } function peg$parsefirstChild() { var s0, s1; - var key = peg$currPos * 32 + 27, + var key = peg$currPos * 36 + 31, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 12) === peg$c89) { - s1 = peg$c89; + if (input.substr(peg$currPos, 12) === peg$c96) { + s1 = peg$c96; peg$currPos += 12; } else { s1 = peg$FAILED; { - peg$fail(peg$c90); + peg$fail(peg$c97); } } if (s1 !== peg$FAILED) { - s1 = peg$c91(); + s1 = peg$c98(); } s0 = s1; peg$resultsCache[key] = { @@ -3208,24 +3454,24 @@ var parser = createCommonjsModule(function (module) { } function peg$parselastChild() { var s0, s1; - var key = peg$currPos * 32 + 28, + var key = peg$currPos * 36 + 32, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c92) { - s1 = peg$c92; + if (input.substr(peg$currPos, 11) === peg$c99) { + s1 = peg$c99; peg$currPos += 11; } else { s1 = peg$FAILED; { - peg$fail(peg$c93); + peg$fail(peg$c100); } } if (s1 !== peg$FAILED) { - s1 = peg$c94(); + s1 = peg$c101(); } s0 = s1; peg$resultsCache[key] = { @@ -3236,20 +3482,20 @@ var parser = createCommonjsModule(function (module) { } function peg$parsenthChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 29, + var key = peg$currPos * 36 + 33, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c95) { - s1 = peg$c95; + if (input.substr(peg$currPos, 11) === peg$c102) { + s1 = peg$c102; peg$currPos += 11; } else { s1 = peg$FAILED; { - peg$fail(peg$c96); + peg$fail(peg$c103); } } if (s1 !== peg$FAILED) { @@ -3294,7 +3540,7 @@ var parser = createCommonjsModule(function (module) { } } if (s5 !== peg$FAILED) { - s1 = peg$c97(s3); + s1 = peg$c104(s3); s0 = s1; } else { peg$currPos = s0; @@ -3324,20 +3570,20 @@ var parser = createCommonjsModule(function (module) { } function peg$parsenthLastChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 30, + var key = peg$currPos * 36 + 34, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 16) === peg$c98) { - s1 = peg$c98; + if (input.substr(peg$currPos, 16) === peg$c105) { + s1 = peg$c105; peg$currPos += 16; } else { s1 = peg$FAILED; { - peg$fail(peg$c99); + peg$fail(peg$c106); } } if (s1 !== peg$FAILED) { @@ -3382,7 +3628,7 @@ var parser = createCommonjsModule(function (module) { } } if (s5 !== peg$FAILED) { - s1 = peg$c100(s3); + s1 = peg$c107(s3); s0 = s1; } else { peg$currPos = s0; @@ -3412,7 +3658,7 @@ var parser = createCommonjsModule(function (module) { } function peg$parseclass() { var s0, s1, s2; - var key = peg$currPos * 32 + 31, + var key = peg$currPos * 36 + 35, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -3420,18 +3666,18 @@ var parser = createCommonjsModule(function (module) { } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 58) { - s1 = peg$c101; + s1 = peg$c108; peg$currPos++; } else { s1 = peg$FAILED; { - peg$fail(peg$c102); + peg$fail(peg$c109); } } if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { - s1 = peg$c103(s2); + s1 = peg$c110(s2); s0 = s1; } else { peg$currPos = s0; diff --git a/src/hello/server/node_modules/esquery/dist/esquery.esm.min.js b/src/hello/server/node_modules/esquery/dist/esquery.esm.min.js new file mode 100644 index 00000000..39861882 --- /dev/null +++ b/src/hello/server/node_modules/esquery/dist/esquery.esm.min.js @@ -0,0 +1,2 @@ +function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--r)if(e[r].node===t)return!0;return!1}function d(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,o,a;for(n=e.length,o=0;n;)t(e[a=o+(r=n>>>1)])?n=r:(o=a+1,n-=r+1);return o}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},o={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:a={},Skip:i={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,o;function a(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!y(n,v[m])){if(h(u,x[d]))o=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;o=new c(v[m],[f,m],null,null)}r.push(o)}}else if(p(v)){if(y(n,v))continue;r.push(new c(v,f,null,null))}}}else if(o=n.pop(),l=this.__execute(t.leave,o),this.__state===a||l===a)return},f.prototype.replace=function(e,t){var r,n,o,u,f,y,d,m,x,v,g,A,E;function b(e){var t,n,o,a;if(e.ref.remove())for(n=e.ref.key,a=e.ref.parent,t=r.length;t--;)if((o=r[t]).ref&&o.ref.parent===a){if(o.ref.key=0;)if(v=o[E=x[d]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(u,x[d]))y=new c(v[m],[E,m],"Property",new l(v,m));else{if(!p(v[m]))continue;y=new c(v[m],[E,m],null,new l(v,m))}r.push(y)}}else p(v)&&r.push(new c(v,E,null,new l(o,E)))}}else if(y=n.pop(),void 0!==(f=this.__execute(t.leave,y))&&f!==a&&f!==i&&f!==s&&y.ref.replace(f),this.__state!==s&&f!==s||b(y),this.__state===a||f===a)return A.root;return A.root},t.Syntax=r,t.traverse=d,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var o,a,i,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,a=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?n.Break:l[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,d(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=o,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),s=a((function(e){e.exports&&(e.exports=function(){function e(t,r,n,o){this.message=t,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=me([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=de(">",!1),y=de("~",!1),d=de("+",!1),m=de(",",!1),x=function(e,t){return[e].concat(t.map((function(e){return e[3]})))},v=de("!",!1),g=de("*",!1),A=de("#",!1),E=de("[",!1),b=de("]",!1),S=/^[>","<","!"],!1,!1),C=de("=",!1),P=function(e){return(e||"")+"="},w=/^[><]/,k=me([">","<"],!1,!1),D=de(".",!1),I=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},j=de('"',!1),T=/^[^\\"]/,F=me(["\\",'"'],!0,!1),R=de("\\",!1),O={type:"any"},L=function(e,t){return e+t},M=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},B=de("'",!1),U=/^[^\\']/,K=me(["\\","'"],!0,!1),N=/^[0-9]/,W=me([["0","9"]],!1,!1),V=de("type(",!1),q=/^[^ )]/,G=me([" ",")"],!0,!1),z=de(")",!1),H=/^[imsu]/,Y=me(["i","m","s","u"],!1,!1),$=de("/",!1),J=/^[^\]\\]/,Q=me(["]","\\"],!0,!1),X=/^[^\/\\[]/,Z=me(["/","\\","["],!0,!1),ee=de(":not(",!1),te=de(":matches(",!1),re=function(e){return{type:"matches",selectors:e}},ne=de(":is(",!1),oe=de(":has(",!1),ae=de(":first-child",!1),ie=de(":last-child",!1),se=de(":nth-child(",!1),ue=de(":nth-last-child(",!1),le=de(":",!1),ce=0,fe=[{line:1,column:1}],pe=0,he=[],ye={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');l=u[r.startRule]}function de(e,t){return{type:"literal",text:e,ignoreCase:t}}function me(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function xe(e){var r,n=fe[e];if(n)return n;for(r=e-1;!fe[r];)r--;for(n={line:(n=fe[r]).line,column:n.column};rpe&&(pe=ce,he=[]),he.push(e))}function Ae(){var e,t,r,n,o=36*ce+0,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,(t=Ee())!==s&&(r=_e())!==s&&Ee()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ce=e,e=s),e===s&&(e=ce,(t=Ee())!==s&&(t=void 0),e=t),ye[o]={nextPos:ce,result:e},e)}function Ee(){var e,r,n=36*ce+1,o=ye[n];if(o)return ce=o.nextPos,o.result;for(e=[],32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));r!==s;)e.push(r),32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));return ye[n]={nextPos:ce,result:e},e}function be(){var e,r,n,o=36*ce+2,a=ye[o];if(a)return ce=a.nextPos,a.result;if(r=[],f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p));else r=s;return r!==s&&(r=r.join("")),e=r,ye[o]={nextPos:ce,result:e},e}function Se(){var e,r,n,o=36*ce+3,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,(r=Ee())!==s?(62===t.charCodeAt(ce)?(n=">",ce++):(n=s,ge(h)),n!==s&&Ee()!==s?e=r="child":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ee())!==s?(126===t.charCodeAt(ce)?(n="~",ce++):(n=s,ge(y)),n!==s&&Ee()!==s?e=r="sibling":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ee())!==s?(43===t.charCodeAt(ce)?(n="+",ce++):(n=s,ge(d)),n!==s&&Ee()!==s?e=r="adjacent":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c)),r!==s&&(n=Ee())!==s?e=r="descendant":(ce=e,e=s)))),ye[o]={nextPos:ce,result:e},e)}function _e(){var e,r,n,o,a,i,u,l,c=36*ce+5,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=Pe())!==s){for(n=[],o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Pe())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);o!==s;)n.push(o),o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Pe())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);n!==s?e=r=x(r,n):(ce=e,e=s)}else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}function Ce(){var e,t,r,n,o,a=36*ce+6,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,(t=Se())===s&&(t=null),t!==s&&(r=Pe())!==s?(o=r,e=t=(n=t)?{type:n,left:{type:"exactNode"},right:o}:o):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}function Pe(){var e,t,r,n,o,a,i,u=36*ce+7,l=ye[u];if(l)return ce=l.nextPos,l.result;if(e=ce,(t=we())!==s){for(r=[],n=ce,(o=Se())!==s&&(a=we())!==s?n=o=[o,a]:(ce=n,n=s);n!==s;)r.push(n),n=ce,(o=Se())!==s&&(a=we())!==s?n=o=[o,a]:(ce=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(ce=e,e=s)}else ce=e,e=s;return ye[u]={nextPos:ce,result:e},e}function we(){var e,r,n,o,a,i,u,l=36*ce+8,c=ye[l];if(c)return ce=c.nextPos,c.result;if(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(v)),r===s&&(r=null),r!==s){if(n=[],(o=ke())!==s)for(;o!==s;)n.push(o),o=ke();else n=s;n!==s?(a=r,u=1===(i=n).length?i[0]:{type:"compound",selectors:i},a&&(u.subject=!0),e=r=u):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}function ke(){var e,r=36*ce+9,n=ye[r];return n?(ce=n.nextPos,n.result):((e=function(){var e,r,n=36*ce+10,o=ye[n];return o?(ce=o.nextPos,o.result):(42===t.charCodeAt(ce)?(r="*",ce++):(r=s,ge(g)),r!==s&&(r={type:"wildcard",value:r}),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o=36*ce+11,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,35===t.charCodeAt(ce)?(r="#",ce++):(r=s,ge(A)),r===s&&(r=null),r!==s&&(n=be())!==s?e=r={type:"identifier",value:n}:(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+12,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,91===t.charCodeAt(ce)?(r="[",ce++):(r=s,ge(E)),r!==s&&Ee()!==s&&(n=function(){var e,r,n,o,a=36*ce+16,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,(r=De())!==s&&Ee()!==s&&(n=function(){var e,r,n,o=36*ce+14,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(v)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(C)),n!==s?(r=P(r),e=r):(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}())!==s&&Ee()!==s?((o=function(){var e,r,n,o,a,i=36*ce+20,u=ye[i];if(u)return ce=u.nextPos,u.result;if(e=ce,"type("===t.substr(ce,5)?(r="type(",ce+=5):(r=s,ge(V)),r!==s)if(Ee()!==s){if(n=[],q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(G)),o!==s)for(;o!==s;)n.push(o),q.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(G));else n=s;n!==s&&(o=Ee())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(z)),a!==s?(r={type:"type",value:n.join("")},e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u=36*ce+22,l=ye[u];if(l)return ce=l.nextPos,l.result;if(e=ce,47===t.charCodeAt(ce)?(r="/",ce++):(r=s,ge($)),r!==s){if(n=[],(o=Ie())===s&&(o=je())===s&&(o=Te()),o!==s)for(;o!==s;)n.push(o),(o=Ie())===s&&(o=je())===s&&(o=Te());else n=s;n!==s?(47===t.charCodeAt(ce)?(o="/",ce++):(o=s,ge($)),o!==s?((a=function(){var e,r,n=36*ce+21,o=ye[n];if(o)return ce=o.nextPos,o.result;if(e=[],H.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(Y)),r!==s)for(;r!==s;)e.push(r),H.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(Y));else e=s;return ye[n]={nextPos:ce,result:e},e}())===s&&(a=null),a!==s?(i=a,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(ce=e,e=s)):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return ye[u]={nextPos:ce,result:e},e}()),o!==s?(r=I(r,n,o),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=De())!==s&&Ee()!==s&&(n=function(){var e,r,n,o=36*ce+13,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,S.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(_)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(C)),n!==s?(r=P(r),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(w.test(t.charAt(ce))?(e=t.charAt(ce),ce++):(e=s,ge(k))),ye[o]={nextPos:ce,result:e},e)}())!==s&&Ee()!==s?((o=function(){var e,r,n,o,a,i,u=36*ce+17,l=ye[u];if(l)return ce=l.nextPos,l.result;if(e=ce,34===t.charCodeAt(ce)?(r='"',ce++):(r=s,ge(j)),r!==s){for(n=[],T.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(F)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));o!==s;)n.push(o),T.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(F)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));n!==s?(34===t.charCodeAt(ce)?(o='"',ce++):(o=s,ge(j)),o!==s?(r=M(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;if(e===s)if(e=ce,39===t.charCodeAt(ce)?(r="'",ce++):(r=s,ge(B)),r!==s){for(n=[],U.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(K)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));o!==s;)n.push(o),U.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(K)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));n!==s?(39===t.charCodeAt(ce)?(o="'",ce++):(o=s,ge(B)),o!==s?(r=M(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return ye[u]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u,l=36*ce+18,c=ye[l];if(c)return ce=c.nextPos,c.result;for(e=ce,r=ce,n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));if(n!==s?(46===t.charCodeAt(ce)?(o=".",ce++):(o=s,ge(D)),o!==s?r=n=[n,o]:(ce=r,r=s)):(ce=r,r=s),r===s&&(r=null),r!==s){if(n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));else n=s;n!==s?(i=n,u=(a=r)?[].concat.apply([],a).join(""):"",r={type:"literal",value:parseFloat(u+i.join(""))},e=r):(ce=e,e=s)}else ce=e,e=s;return ye[l]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,t,r=36*ce+19,n=ye[r];return n?(ce=n.nextPos,n.result):((t=be())!==s&&(t={type:"literal",value:t}),e=t,ye[r]={nextPos:ce,result:e},e)}()),o!==s?(r=I(r,n,o),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=De())!==s&&(r={type:"attribute",name:r}),e=r)),ye[a]={nextPos:ce,result:e},e)}())!==s&&Ee()!==s?(93===t.charCodeAt(ce)?(o="]",ce++):(o=s,ge(b)),o!==s?e=r=n:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i,u,l,c=36*ce+26,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,46===t.charCodeAt(ce)?(r=".",ce++):(r=s,ge(D)),r!==s)if((n=be())!==s){for(o=[],a=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(D)),i!==s&&(u=be())!==s?a=i=[i,u]:(ce=a,a=s);a!==s;)o.push(a),a=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(D)),i!==s&&(u=be())!==s?a=i=[i,u]:(ce=a,a=s);o!==s?(l=n,r={type:"field",name:o.reduce((function(e,t){return e+t[0]+t[1]}),l)},e=r):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o,a=36*ce+27,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,":not("===t.substr(ce,5)?(r=":not(",ce+=5):(r=s,ge(ee)),r!==s&&Ee()!==s&&(n=_e())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?e=r={type:"not",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+28,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,":matches("===t.substr(ce,9)?(r=":matches(",ce+=9):(r=s,ge(te)),r!==s&&Ee()!==s&&(n=_e())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?(r=re(n),e=r):(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+29,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,":is("===t.substr(ce,4)?(r=":is(",ce+=4):(r=s,ge(ne)),r!==s&&Ee()!==s&&(n=_e())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?(r=re(n),e=r):(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+30,i=ye[a];return i?(ce=i.nextPos,i.result):(e=ce,":has("===t.substr(ce,5)?(r=":has(",ce+=5):(r=s,ge(oe)),r!==s&&Ee()!==s&&(n=function(){var e,r,n,o,a,i,u,l,c=36*ce+4,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=Ce())!==s){for(n=[],o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Ce())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);o!==s;)n.push(o),o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Ce())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);n!==s?e=r=x(r,n):(ce=e,e=s)}else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?e=r={type:"has",selectors:n}:(ce=e,e=s)):(ce=e,e=s),ye[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=36*ce+31,o=ye[n];return o?(ce=o.nextPos,o.result):(":first-child"===t.substr(ce,12)?(r=":first-child",ce+=12):(r=s,ge(ae)),r!==s&&(r=Fe(1)),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=36*ce+32,o=ye[n];return o?(ce=o.nextPos,o.result):(":last-child"===t.substr(ce,11)?(r=":last-child",ce+=11):(r=s,ge(ie)),r!==s&&(r=Re(1)),e=r,ye[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i=36*ce+33,u=ye[i];if(u)return ce=u.nextPos,u.result;if(e=ce,":nth-child("===t.substr(ce,11)?(r=":nth-child(",ce+=11):(r=s,ge(se)),r!==s)if(Ee()!==s){if(n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));else n=s;n!==s&&(o=Ee())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(z)),a!==s?(r=Fe(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o,a,i=36*ce+34,u=ye[i];if(u)return ce=u.nextPos,u.result;if(e=ce,":nth-last-child("===t.substr(ce,16)?(r=":nth-last-child(",ce+=16):(r=s,ge(ue)),r!==s)if(Ee()!==s){if(n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));else n=s;n!==s&&(o=Ee())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(z)),a!==s?(r=Re(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return ye[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o=36*ce+35,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,58===t.charCodeAt(ce)?(r=":",ce++):(r=s,ge(le)),r!==s&&(n=be())!==s?e=r={type:"class",name:n}:(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}()),ye[r]={nextPos:ce,result:e},e)}function De(){var e,r,n,o,a,i,u,l,c=36*ce+15,f=ye[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=be())!==s){for(n=[],o=ce,46===t.charCodeAt(ce)?(a=".",ce++):(a=s,ge(D)),a!==s&&(i=be())!==s?o=a=[a,i]:(ce=o,o=s);o!==s;)n.push(o),o=ce,46===t.charCodeAt(ce)?(a=".",ce++):(a=s,ge(D)),a!==s&&(i=be())!==s?o=a=[a,i]:(ce=o,o=s);n!==s?(u=r,l=n,e=r=[].concat.apply([u],l).join("")):(ce=e,e=s)}else ce=e,e=s;return ye[c]={nextPos:ce,result:e},e}function Ie(){var e,r,n,o,a=36*ce+23,i=ye[a];if(i)return ce=i.nextPos,i.result;if(e=ce,91===t.charCodeAt(ce)?(r="[",ce++):(r=s,ge(E)),r!==s){if(n=[],J.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(Q)),o===s&&(o=je()),o!==s)for(;o!==s;)n.push(o),J.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(Q)),o===s&&(o=je());else n=s;n!==s?(93===t.charCodeAt(ce)?(o="]",ce++):(o=s,ge(b)),o!==s?e=r="["+n.join("")+"]":(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return ye[a]={nextPos:ce,result:e},e}function je(){var e,r,n,o=36*ce+24,a=ye[o];return a?(ce=a.nextPos,a.result):(e=ce,92===t.charCodeAt(ce)?(r="\\",ce++):(r=s,ge(R)),r!==s?(t.length>ce?(n=t.charAt(ce),ce++):(n=s,ge(O)),n!==s?e=r="\\"+n:(ce=e,e=s)):(ce=e,e=s),ye[o]={nextPos:ce,result:e},e)}function Te(){var e,r,n,o=36*ce+25,a=ye[o];if(a)return ce=a.nextPos,a.result;if(r=[],X.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(Z)),n!==s)for(;n!==s;)r.push(n),X.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(Z));else r=s;return r!==s&&(r=r.join("")),e=r,ye[o]={nextPos:ce,result:e},e}function Fe(e){return{type:"nth-child",index:{type:"literal",value:e}}}function Re(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=l())!==s&&ce===t.length)return n;throw n!==s&&ce0&&p(e,t,r))&&f(t[0],t.slice(1),r)};case"descendant":var h=c(e.left),x=c(e.right);return function(e,t,r){if(x(e,t,r))for(var n=0,o=t.length;n":return function(t){return u(t,v)>e.value.value};case">=":return function(t){return u(t,v)>=e.value.value}}throw new Error("Unknown operator: ".concat(e.operator));case"sibling":var E=c(e.left),b=c(e.right);return function(t,r,n){return b(t,r,n)&&y(t,E,r,"LEFT_SIDE",n)||e.left.subject&&E(t,r,n)&&y(t,b,r,"RIGHT_SIDE",n)};case"adjacent":var S=c(e.left),_=c(e.right);return function(t,r,n){return _(t,r,n)&&d(t,S,r,"LEFT_SIDE",n)||e.right.subject&&S(t,r,n)&&d(t,_,r,"RIGHT_SIDE",n)};case"nth-child":var C=e.index.value,P=c(e.right);return function(e,t,r){return P(e,t,r)&&m(e,t,C,r)};case"nth-last-child":var w=-e.index.value,k=c(e.right);return function(e,t,r){return k(e,t,r)&&m(e,t,w,r)};case"class":var D=e.name.toLowerCase();return function(t,r,n){if(n&&n.matchClass)return n.matchClass(e.name,t,r);if(n&&n.nodeTypeKey)return!1;switch(D){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(e.name))}}throw new Error("Unknown selector type: ".concat(e.type))}function p(e,t){var r=t&&t.nodeTypeKey||"type",n=e[r];return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:i.VisitorKeys[n]?i.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return e!==r}))}function h(e,t){var r=t&&t.nodeTypeKey||"type";return null!==e&&"object"===n(e)&&"string"==typeof e[r]}function y(e,r,n,o,a){var i=t(n,1)[0];if(!i)return!1;for(var s=p(i,a),u=0;u0&&h(l[c-1],a)&&r(l[c-1],n,a))return!0;if("RIGHT_SIDE"===o&&c=0&&l\n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n PrivateIdentifier: 'PrivateIdentifier',\n Program: 'Program',\n Property: 'Property',\n PropertyDefinition: 'PropertyDefinition',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n PrivateIdentifier: [],\n Program: ['body'],\n Property: ['key', 'value'],\n PropertyDefinition: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(op, s) {\n if (!op) return s;\n return { type: op, left: { type: 'exactNode' }, right: s };\n },\n peg$c21 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c22 = \"!\",\n peg$c23 = peg$literalExpectation(\"!\", false),\n peg$c24 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c25 = \"*\",\n peg$c26 = peg$literalExpectation(\"*\", false),\n peg$c27 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c28 = \"#\",\n peg$c29 = peg$literalExpectation(\"#\", false),\n peg$c30 = function(i) { return { type: 'identifier', value: i }; },\n peg$c31 = \"[\",\n peg$c32 = peg$literalExpectation(\"[\", false),\n peg$c33 = \"]\",\n peg$c34 = peg$literalExpectation(\"]\", false),\n peg$c35 = function(v) { return v; },\n peg$c36 = /^[>\", \"<\", \"!\"], false, false),\n peg$c38 = \"=\",\n peg$c39 = peg$literalExpectation(\"=\", false),\n peg$c40 = function(a) { return (a || '') + '='; },\n peg$c41 = /^[><]/,\n peg$c42 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c43 = \".\",\n peg$c44 = peg$literalExpectation(\".\", false),\n peg$c45 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c46 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c47 = function(name) { return { type: 'attribute', name: name }; },\n peg$c48 = \"\\\"\",\n peg$c49 = peg$literalExpectation(\"\\\"\", false),\n peg$c50 = /^[^\\\\\"]/,\n peg$c51 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c52 = \"\\\\\",\n peg$c53 = peg$literalExpectation(\"\\\\\", false),\n peg$c54 = peg$anyExpectation(),\n peg$c55 = function(a, b) { return a + b; },\n peg$c56 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c57 = \"'\",\n peg$c58 = peg$literalExpectation(\"'\", false),\n peg$c59 = /^[^\\\\']/,\n peg$c60 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c61 = /^[0-9]/,\n peg$c62 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c63 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c64 = function(i) { return { type: 'literal', value: i }; },\n peg$c65 = \"type(\",\n peg$c66 = peg$literalExpectation(\"type(\", false),\n peg$c67 = /^[^ )]/,\n peg$c68 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c69 = \")\",\n peg$c70 = peg$literalExpectation(\")\", false),\n peg$c71 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c72 = /^[imsu]/,\n peg$c73 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c74 = \"/\",\n peg$c75 = peg$literalExpectation(\"/\", false),\n peg$c76 = function(pattern, flgs) {\n return {\n type: 'regexp', value: new RegExp(pattern.join(''), flgs ? flgs.join('') : '')\n };\n },\n peg$c77 = /^[^\\]\\\\]/,\n peg$c78 = peg$classExpectation([\"]\", \"\\\\\"], true, false),\n peg$c79 = function(cs) { return '[' + cs.join('') + ']'; },\n peg$c80 = function(a) { return '\\\\' + a; },\n peg$c81 = /^[^\\/\\\\[]/,\n peg$c82 = peg$classExpectation([\"/\", \"\\\\\", \"[\"], true, false),\n peg$c83 = function(cs) { return cs.join(''); },\n peg$c84 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c85 = \":not(\",\n peg$c86 = peg$literalExpectation(\":not(\", false),\n peg$c87 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c88 = \":matches(\",\n peg$c89 = peg$literalExpectation(\":matches(\", false),\n peg$c90 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c91 = \":is(\",\n peg$c92 = peg$literalExpectation(\":is(\", false),\n peg$c93 = \":has(\",\n peg$c94 = peg$literalExpectation(\":has(\", false),\n peg$c95 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c96 = \":first-child\",\n peg$c97 = peg$literalExpectation(\":first-child\", false),\n peg$c98 = function() { return nth(1); },\n peg$c99 = \":last-child\",\n peg$c100 = peg$literalExpectation(\":last-child\", false),\n peg$c101 = function() { return nthLast(1); },\n peg$c102 = \":nth-child(\",\n peg$c103 = peg$literalExpectation(\":nth-child(\", false),\n peg$c104 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c105 = \":nth-last-child(\",\n peg$c106 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c107 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c108 = \":\",\n peg$c109 = peg$literalExpectation(\":\", false),\n peg$c110 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 36 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsehasSelector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 36 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelector() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsebinaryOp();\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 36 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parseis();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c25;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c27(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c28;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c33;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c35(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c48;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c48;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c57;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c57;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c43;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c64(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c71(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 36 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c74;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsere_character_class();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_chars();\n }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsere_character_class();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_chars();\n }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c74;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c76(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_character_class() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c77.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c78); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c77.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c78); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s3 = peg$c33;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c79(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_escape() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s1 = peg$c52;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s1 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c80(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_chars() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c81.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c82); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c81.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c82); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c83(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 36 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c43;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseis() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 4) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 30,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c93) {\n s1 = peg$c93;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c94); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsehasSelectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c95(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 31,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c96) {\n s1 = peg$c96;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c97); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c98();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 32,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c99) {\n s1 = peg$c99;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c100); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c101();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 33,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c102) {\n s1 = peg$c102;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c103); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c104(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 34,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c105) {\n s1 = peg$c105;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c106); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c107(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 35,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c108;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c109); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c110(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @callback SelectorMatcher\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @returns {void}\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'exactNode':\n return (node, ancestry) => {\n return ancestry.length === 0;\n };\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n \n const name = selector.name.toLowerCase();\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false; \n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","this","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c19","ss","concat","map","peg$c23","peg$c26","peg$c29","peg$c32","peg$c34","peg$c36","peg$c37","peg$c39","peg$c40","a","peg$c41","peg$c42","peg$c44","peg$c46","op","value","operator","peg$c49","peg$c50","peg$c51","peg$c53","peg$c54","peg$c55","b","peg$c56","d","match","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c66","peg$c67","peg$c68","peg$c70","peg$c72","peg$c73","peg$c75","peg$c77","peg$c78","peg$c81","peg$c82","peg$c86","peg$c89","peg$c90","selectors","peg$c92","peg$c94","peg$c97","peg$c100","peg$c103","peg$c106","peg$c109","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","peg$parsehasSelector","left","right","peg$parsesequence","reduce","memo","rhs","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parsere_character_class","peg$parsere_escape","peg$parsere_chars","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parseis","peg$parsehasSelectors","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","ancestry","nodeTypeKey","split","inPath","ancestor","fromPathIndex","field","k","matchers","estraverse","unshift","shift","visitorKeys","l","_typeof","sibling","adjacent","nthChild","matchClass","getVisitorKeys","filter","side","_slicedToArray","listProp","startIndex","indexOf","lowerBound","idx","ast","altSubjects","subjects","results","sel","_toConsumableArray","m","succeedingAncestry","parser","query","matches"],"mappings":"qzDA2BC,SAASA,EAAMC,GAGZ,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,EAASC,GACd,IAAcC,EAAKC,EAAfC,EAAM,GACV,IAAKF,KAAOD,EACJA,EAAII,eAAeH,KACnBC,EAAMF,EAAIC,GAENE,EAAIF,GADW,iBAARC,GAA4B,OAARA,EAChBH,EAASG,GAETA,GAIvB,OAAOC,EAgMX,SAASE,EAAUC,EAAQL,GACvBM,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/R,KAAKvH,KACd2M,GACI2M,EAQX,SAAS7M,EAAMwK,GACX,OAAO0C,EAAOlN,MAAMwK,GAUxB,SAAS2C,EAAMT,EAAKlC,EAAUtK,GAC1B,OAAO8C,EAAM0J,EAAK1M,EAAMwK,GAAWtK,GAGvCiN,EAAMnN,MAAQA,EACdmN,EAAMnK,MAAQA,EACdmK,EAAM5Y,SAAWA,EACjB4Y,EAAMC,QAvPN,SAAiB7Z,EAAMiX,EAAUM,EAAU5K,GACvC,OAAKsK,KACAjX,IACAuX,IAAYA,EAAW,IAErBP,EAAWC,EAAXD,CAAqBhX,EAAMuX,EAAU5K,KAmPhDiN,EAAMA,MAAQA"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/esquery/dist/esquery.js b/src/hello/server/node_modules/esquery/dist/esquery.js similarity index 90% rename from src/hello/backend/node_modules/esquery/dist/esquery.js rename to src/hello/server/node_modules/esquery/dist/esquery.js index ace60614..8f07f5b5 100644 --- a/src/hello/backend/node_modules/esquery/dist/esquery.js +++ b/src/hello/server/node_modules/esquery/dist/esquery.js @@ -4,75 +4,74 @@ (global = global || self, global.esquery = factory()); }(this, (function () { 'use strict'; - function _iterableToArrayLimit(arr, i) { - var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); + } + function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); + } + function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; try { - if (_x = (_i = _i.call(arr)).next, 0 === i) { - if (Object(_i) !== _i) return; - _n = !1; - } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); - } catch (err) { - _d = !0, _e = err; + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; } finally { try { - if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { - if (_d) throw _e; + if (o) throw n; } } - return _arr; + return a; } } - function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); - } - function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); - } - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; + function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); } - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -1077,15 +1076,26 @@ peg$c73 = peg$classExpectation(["i", "m", "s", "u"], false, false), peg$c74 = "/", peg$c75 = peg$literalExpectation("/", false), - peg$c76 = /^[^\/]/, - peg$c77 = peg$classExpectation(["/"], true, false), - peg$c78 = function peg$c78(d, flgs) { + peg$c76 = function peg$c76(pattern, flgs) { return { type: 'regexp', - value: new RegExp(d.join(''), flgs ? flgs.join('') : '') + value: new RegExp(pattern.join(''), flgs ? flgs.join('') : '') }; }, - peg$c79 = function peg$c79(i, is) { + peg$c77 = /^[^\]\\]/, + peg$c78 = peg$classExpectation(["]", "\\"], true, false), + peg$c79 = function peg$c79(cs) { + return '[' + cs.join('') + ']'; + }, + peg$c80 = function peg$c80(a) { + return '\\' + a; + }, + peg$c81 = /^[^\/\\[]/, + peg$c82 = peg$classExpectation(["/", "\\", "["], true, false), + peg$c83 = function peg$c83(cs) { + return cs.join(''); + }, + peg$c84 = function peg$c84(i, is) { return { type: 'field', name: is.reduce(function (memo, p) { @@ -1093,53 +1103,55 @@ }, i) }; }, - peg$c80 = ":not(", - peg$c81 = peg$literalExpectation(":not(", false), - peg$c82 = function peg$c82(ss) { + peg$c85 = ":not(", + peg$c86 = peg$literalExpectation(":not(", false), + peg$c87 = function peg$c87(ss) { return { type: 'not', selectors: ss }; }, - peg$c83 = ":matches(", - peg$c84 = peg$literalExpectation(":matches(", false), - peg$c85 = function peg$c85(ss) { + peg$c88 = ":matches(", + peg$c89 = peg$literalExpectation(":matches(", false), + peg$c90 = function peg$c90(ss) { return { type: 'matches', selectors: ss }; }, - peg$c86 = ":has(", - peg$c87 = peg$literalExpectation(":has(", false), - peg$c88 = function peg$c88(ss) { + peg$c91 = ":is(", + peg$c92 = peg$literalExpectation(":is(", false), + peg$c93 = ":has(", + peg$c94 = peg$literalExpectation(":has(", false), + peg$c95 = function peg$c95(ss) { return { type: 'has', selectors: ss }; }, - peg$c89 = ":first-child", - peg$c90 = peg$literalExpectation(":first-child", false), - peg$c91 = function peg$c91() { + peg$c96 = ":first-child", + peg$c97 = peg$literalExpectation(":first-child", false), + peg$c98 = function peg$c98() { return nth(1); }, - peg$c92 = ":last-child", - peg$c93 = peg$literalExpectation(":last-child", false), - peg$c94 = function peg$c94() { + peg$c99 = ":last-child", + peg$c100 = peg$literalExpectation(":last-child", false), + peg$c101 = function peg$c101() { return nthLast(1); }, - peg$c95 = ":nth-child(", - peg$c96 = peg$literalExpectation(":nth-child(", false), - peg$c97 = function peg$c97(n) { + peg$c102 = ":nth-child(", + peg$c103 = peg$literalExpectation(":nth-child(", false), + peg$c104 = function peg$c104(n) { return nth(parseInt(n.join(''), 10)); }, - peg$c98 = ":nth-last-child(", - peg$c99 = peg$literalExpectation(":nth-last-child(", false), - peg$c100 = function peg$c100(n) { + peg$c105 = ":nth-last-child(", + peg$c106 = peg$literalExpectation(":nth-last-child(", false), + peg$c107 = function peg$c107(n) { return nthLast(parseInt(n.join(''), 10)); }, - peg$c101 = ":", - peg$c102 = peg$literalExpectation(":", false), - peg$c103 = function peg$c103(c) { + peg$c108 = ":", + peg$c109 = peg$literalExpectation(":", false), + peg$c110 = function peg$c110(c) { return { type: 'class', name: c @@ -1244,7 +1256,7 @@ } function peg$parsestart() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 0, + var key = peg$currPos * 36 + 0, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1287,7 +1299,7 @@ } function peg$parse_() { var s0, s1; - var key = peg$currPos * 32 + 1, + var key = peg$currPos * 36 + 1, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1323,7 +1335,7 @@ } function peg$parseidentifierName() { var s0, s1, s2; - var key = peg$currPos * 32 + 2, + var key = peg$currPos * 36 + 2, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1368,7 +1380,7 @@ } function peg$parsebinaryOp() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 3, + var key = peg$currPos * 36 + 3, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1498,7 +1510,7 @@ } function peg$parsehasSelectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 4, + var key = peg$currPos * 36 + 4, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1600,7 +1612,7 @@ } function peg$parseselectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 5, + var key = peg$currPos * 36 + 5, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1702,7 +1714,7 @@ } function peg$parsehasSelector() { var s0, s1, s2; - var key = peg$currPos * 32 + 6, + var key = peg$currPos * 36 + 6, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1734,7 +1746,7 @@ } function peg$parseselector() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 7, + var key = peg$currPos * 36 + 7, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1796,7 +1808,7 @@ } function peg$parsesequence() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 8, + var key = peg$currPos * 36 + 8, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1845,7 +1857,7 @@ } function peg$parseatom() { var s0; - var key = peg$currPos * 32 + 9, + var key = peg$currPos * 36 + 9, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1863,17 +1875,20 @@ if (s0 === peg$FAILED) { s0 = peg$parsematches(); if (s0 === peg$FAILED) { - s0 = peg$parsehas(); + s0 = peg$parseis(); if (s0 === peg$FAILED) { - s0 = peg$parsefirstChild(); + s0 = peg$parsehas(); if (s0 === peg$FAILED) { - s0 = peg$parselastChild(); + s0 = peg$parsefirstChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthChild(); + s0 = peg$parselastChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthLastChild(); + s0 = peg$parsenthChild(); if (s0 === peg$FAILED) { - s0 = peg$parseclass(); + s0 = peg$parsenthLastChild(); + if (s0 === peg$FAILED) { + s0 = peg$parseclass(); + } } } } @@ -1893,7 +1908,7 @@ } function peg$parsewildcard() { var s0, s1; - var key = peg$currPos * 32 + 10, + var key = peg$currPos * 36 + 10, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1921,7 +1936,7 @@ } function peg$parseidentifier() { var s0, s1, s2; - var key = peg$currPos * 32 + 11, + var key = peg$currPos * 36 + 11, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1961,7 +1976,7 @@ } function peg$parseattr() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 12, + var key = peg$currPos * 36 + 12, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2024,7 +2039,7 @@ } function peg$parseattrOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 13, + var key = peg$currPos * 36 + 13, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2083,7 +2098,7 @@ } function peg$parseattrEqOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 14, + var key = peg$currPos * 36 + 14, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2131,7 +2146,7 @@ } function peg$parseattrName() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 15, + var key = peg$currPos * 36 + 15, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2209,7 +2224,7 @@ } function peg$parseattrValue() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 16, + var key = peg$currPos * 36 + 16, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2308,7 +2323,7 @@ } function peg$parsestring() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 17, + var key = peg$currPos * 36 + 17, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2572,7 +2587,7 @@ } function peg$parsenumber() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 18, + var key = peg$currPos * 36 + 18, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2672,7 +2687,7 @@ } function peg$parsepath() { var s0, s1; - var key = peg$currPos * 32 + 19, + var key = peg$currPos * 36 + 19, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2692,7 +2707,7 @@ } function peg$parsetype() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 20, + var key = peg$currPos * 36 + 20, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2780,7 +2795,7 @@ } function peg$parseflags() { var s0, s1; - var key = peg$currPos * 32 + 21, + var key = peg$currPos * 36 + 21, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2820,7 +2835,7 @@ } function peg$parseregex() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 32 + 22, + var key = peg$currPos * 36 + 22, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2838,25 +2853,21 @@ } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - { - peg$fail(peg$c77); + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - { - peg$fail(peg$c77); + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); } } } @@ -2879,7 +2890,7 @@ s4 = null; } if (s4 !== peg$FAILED) { - s1 = peg$c78(s2, s4); + s1 = peg$c76(s2, s4); s0 = s1; } else { peg$currPos = s0; @@ -2903,9 +2914,181 @@ }; return s0; } + function peg$parsere_character_class() { + var s0, s1, s2, s3; + var key = peg$currPos * 36 + 23, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c31; + peg$currPos++; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c32); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c78); + } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c78); + } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s3 = peg$c33; + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c34); + } + } + if (s3 !== peg$FAILED) { + s1 = peg$c79(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parsere_escape() { + var s0, s1, s2; + var key = peg$currPos * 36 + 24, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c52; + peg$currPos++; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c53); + } + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c54); + } + } + if (s2 !== peg$FAILED) { + s1 = peg$c80(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parsere_chars() { + var s0, s1, s2; + var key = peg$currPos * 36 + 25, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + s1 = []; + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c82); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c82); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s1 = peg$c83(s1); + } + s0 = s1; + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } function peg$parsefield() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 32 + 23, + var key = peg$currPos * 36 + 26, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2975,7 +3158,7 @@ } } if (s3 !== peg$FAILED) { - s1 = peg$c79(s2, s3); + s1 = peg$c84(s2, s3); s0 = s1; } else { peg$currPos = s0; @@ -2997,20 +3180,20 @@ } function peg$parsenegation() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 24, + var key = peg$currPos * 36 + 27, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c80) { - s1 = peg$c80; + if (input.substr(peg$currPos, 5) === peg$c85) { + s1 = peg$c85; peg$currPos += 5; } else { s1 = peg$FAILED; { - peg$fail(peg$c81); + peg$fail(peg$c86); } } if (s1 !== peg$FAILED) { @@ -3030,7 +3213,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c82(s3); + s1 = peg$c87(s3); s0 = s1; } else { peg$currPos = s0; @@ -3060,20 +3243,83 @@ } function peg$parsematches() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 25, + var key = peg$currPos * 36 + 28, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c83) { - s1 = peg$c83; + if (input.substr(peg$currPos, 9) === peg$c88) { + s1 = peg$c88; peg$currPos += 9; } else { s1 = peg$FAILED; { - peg$fail(peg$c84); + peg$fail(peg$c89); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseselectors(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s5 = peg$c69; + peg$currPos++; + } else { + s5 = peg$FAILED; + { + peg$fail(peg$c70); + } + } + if (s5 !== peg$FAILED) { + s1 = peg$c90(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parseis() { + var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 36 + 29, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c91) { + s1 = peg$c91; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c92); } } if (s1 !== peg$FAILED) { @@ -3093,7 +3339,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c85(s3); + s1 = peg$c90(s3); s0 = s1; } else { peg$currPos = s0; @@ -3123,20 +3369,20 @@ } function peg$parsehas() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 26, + var key = peg$currPos * 36 + 30, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c86) { - s1 = peg$c86; + if (input.substr(peg$currPos, 5) === peg$c93) { + s1 = peg$c93; peg$currPos += 5; } else { s1 = peg$FAILED; { - peg$fail(peg$c87); + peg$fail(peg$c94); } } if (s1 !== peg$FAILED) { @@ -3156,7 +3402,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c88(s3); + s1 = peg$c95(s3); s0 = s1; } else { peg$currPos = s0; @@ -3186,24 +3432,24 @@ } function peg$parsefirstChild() { var s0, s1; - var key = peg$currPos * 32 + 27, + var key = peg$currPos * 36 + 31, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 12) === peg$c89) { - s1 = peg$c89; + if (input.substr(peg$currPos, 12) === peg$c96) { + s1 = peg$c96; peg$currPos += 12; } else { s1 = peg$FAILED; { - peg$fail(peg$c90); + peg$fail(peg$c97); } } if (s1 !== peg$FAILED) { - s1 = peg$c91(); + s1 = peg$c98(); } s0 = s1; peg$resultsCache[key] = { @@ -3214,24 +3460,24 @@ } function peg$parselastChild() { var s0, s1; - var key = peg$currPos * 32 + 28, + var key = peg$currPos * 36 + 32, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c92) { - s1 = peg$c92; + if (input.substr(peg$currPos, 11) === peg$c99) { + s1 = peg$c99; peg$currPos += 11; } else { s1 = peg$FAILED; { - peg$fail(peg$c93); + peg$fail(peg$c100); } } if (s1 !== peg$FAILED) { - s1 = peg$c94(); + s1 = peg$c101(); } s0 = s1; peg$resultsCache[key] = { @@ -3242,20 +3488,20 @@ } function peg$parsenthChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 29, + var key = peg$currPos * 36 + 33, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c95) { - s1 = peg$c95; + if (input.substr(peg$currPos, 11) === peg$c102) { + s1 = peg$c102; peg$currPos += 11; } else { s1 = peg$FAILED; { - peg$fail(peg$c96); + peg$fail(peg$c103); } } if (s1 !== peg$FAILED) { @@ -3300,7 +3546,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c97(s3); + s1 = peg$c104(s3); s0 = s1; } else { peg$currPos = s0; @@ -3330,20 +3576,20 @@ } function peg$parsenthLastChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 30, + var key = peg$currPos * 36 + 34, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 16) === peg$c98) { - s1 = peg$c98; + if (input.substr(peg$currPos, 16) === peg$c105) { + s1 = peg$c105; peg$currPos += 16; } else { s1 = peg$FAILED; { - peg$fail(peg$c99); + peg$fail(peg$c106); } } if (s1 !== peg$FAILED) { @@ -3388,7 +3634,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c100(s3); + s1 = peg$c107(s3); s0 = s1; } else { peg$currPos = s0; @@ -3418,7 +3664,7 @@ } function peg$parseclass() { var s0, s1, s2; - var key = peg$currPos * 32 + 31, + var key = peg$currPos * 36 + 35, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -3426,18 +3672,18 @@ } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 58) { - s1 = peg$c101; + s1 = peg$c108; peg$currPos++; } else { s1 = peg$FAILED; { - peg$fail(peg$c102); + peg$fail(peg$c109); } } if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { - s1 = peg$c103(s2); + s1 = peg$c110(s2); s0 = s1; } else { peg$currPos = s0; diff --git a/src/hello/backend/node_modules/esquery/dist/esquery.lite.js b/src/hello/server/node_modules/esquery/dist/esquery.lite.js similarity index 88% rename from src/hello/backend/node_modules/esquery/dist/esquery.lite.js rename to src/hello/server/node_modules/esquery/dist/esquery.lite.js index 170c9336..43108768 100644 --- a/src/hello/backend/node_modules/esquery/dist/esquery.lite.js +++ b/src/hello/server/node_modules/esquery/dist/esquery.lite.js @@ -6,75 +6,74 @@ estraverse = estraverse && Object.prototype.hasOwnProperty.call(estraverse, 'default') ? estraverse['default'] : estraverse; - function _iterableToArrayLimit(arr, i) { - var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; - if (null != _i) { - var _s, - _e, - _x, - _r, - _arr = [], - _n = !0, - _d = !1; + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); + } + function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); + } + function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; try { - if (_x = (_i = _i.call(arr)).next, 0 === i) { - if (Object(_i) !== _i) return; - _n = !1; - } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); - } catch (err) { - _d = !0, _e = err; + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; } finally { try { - if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { - if (_d) throw _e; + if (o) throw n; } } - return _arr; + return a; } } - function _typeof(obj) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }, _typeof(obj); - } - function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); - } - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; + function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); } - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } } var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -367,15 +366,26 @@ peg$c73 = peg$classExpectation(["i", "m", "s", "u"], false, false), peg$c74 = "/", peg$c75 = peg$literalExpectation("/", false), - peg$c76 = /^[^\/]/, - peg$c77 = peg$classExpectation(["/"], true, false), - peg$c78 = function peg$c78(d, flgs) { + peg$c76 = function peg$c76(pattern, flgs) { return { type: 'regexp', - value: new RegExp(d.join(''), flgs ? flgs.join('') : '') + value: new RegExp(pattern.join(''), flgs ? flgs.join('') : '') }; }, - peg$c79 = function peg$c79(i, is) { + peg$c77 = /^[^\]\\]/, + peg$c78 = peg$classExpectation(["]", "\\"], true, false), + peg$c79 = function peg$c79(cs) { + return '[' + cs.join('') + ']'; + }, + peg$c80 = function peg$c80(a) { + return '\\' + a; + }, + peg$c81 = /^[^\/\\[]/, + peg$c82 = peg$classExpectation(["/", "\\", "["], true, false), + peg$c83 = function peg$c83(cs) { + return cs.join(''); + }, + peg$c84 = function peg$c84(i, is) { return { type: 'field', name: is.reduce(function (memo, p) { @@ -383,53 +393,55 @@ }, i) }; }, - peg$c80 = ":not(", - peg$c81 = peg$literalExpectation(":not(", false), - peg$c82 = function peg$c82(ss) { + peg$c85 = ":not(", + peg$c86 = peg$literalExpectation(":not(", false), + peg$c87 = function peg$c87(ss) { return { type: 'not', selectors: ss }; }, - peg$c83 = ":matches(", - peg$c84 = peg$literalExpectation(":matches(", false), - peg$c85 = function peg$c85(ss) { + peg$c88 = ":matches(", + peg$c89 = peg$literalExpectation(":matches(", false), + peg$c90 = function peg$c90(ss) { return { type: 'matches', selectors: ss }; }, - peg$c86 = ":has(", - peg$c87 = peg$literalExpectation(":has(", false), - peg$c88 = function peg$c88(ss) { + peg$c91 = ":is(", + peg$c92 = peg$literalExpectation(":is(", false), + peg$c93 = ":has(", + peg$c94 = peg$literalExpectation(":has(", false), + peg$c95 = function peg$c95(ss) { return { type: 'has', selectors: ss }; }, - peg$c89 = ":first-child", - peg$c90 = peg$literalExpectation(":first-child", false), - peg$c91 = function peg$c91() { + peg$c96 = ":first-child", + peg$c97 = peg$literalExpectation(":first-child", false), + peg$c98 = function peg$c98() { return nth(1); }, - peg$c92 = ":last-child", - peg$c93 = peg$literalExpectation(":last-child", false), - peg$c94 = function peg$c94() { + peg$c99 = ":last-child", + peg$c100 = peg$literalExpectation(":last-child", false), + peg$c101 = function peg$c101() { return nthLast(1); }, - peg$c95 = ":nth-child(", - peg$c96 = peg$literalExpectation(":nth-child(", false), - peg$c97 = function peg$c97(n) { + peg$c102 = ":nth-child(", + peg$c103 = peg$literalExpectation(":nth-child(", false), + peg$c104 = function peg$c104(n) { return nth(parseInt(n.join(''), 10)); }, - peg$c98 = ":nth-last-child(", - peg$c99 = peg$literalExpectation(":nth-last-child(", false), - peg$c100 = function peg$c100(n) { + peg$c105 = ":nth-last-child(", + peg$c106 = peg$literalExpectation(":nth-last-child(", false), + peg$c107 = function peg$c107(n) { return nthLast(parseInt(n.join(''), 10)); }, - peg$c101 = ":", - peg$c102 = peg$literalExpectation(":", false), - peg$c103 = function peg$c103(c) { + peg$c108 = ":", + peg$c109 = peg$literalExpectation(":", false), + peg$c110 = function peg$c110(c) { return { type: 'class', name: c @@ -534,7 +546,7 @@ } function peg$parsestart() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 0, + var key = peg$currPos * 36 + 0, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -577,7 +589,7 @@ } function peg$parse_() { var s0, s1; - var key = peg$currPos * 32 + 1, + var key = peg$currPos * 36 + 1, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -613,7 +625,7 @@ } function peg$parseidentifierName() { var s0, s1, s2; - var key = peg$currPos * 32 + 2, + var key = peg$currPos * 36 + 2, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -658,7 +670,7 @@ } function peg$parsebinaryOp() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 3, + var key = peg$currPos * 36 + 3, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -788,7 +800,7 @@ } function peg$parsehasSelectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 4, + var key = peg$currPos * 36 + 4, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -890,7 +902,7 @@ } function peg$parseselectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 5, + var key = peg$currPos * 36 + 5, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -992,7 +1004,7 @@ } function peg$parsehasSelector() { var s0, s1, s2; - var key = peg$currPos * 32 + 6, + var key = peg$currPos * 36 + 6, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1024,7 +1036,7 @@ } function peg$parseselector() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 7, + var key = peg$currPos * 36 + 7, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1086,7 +1098,7 @@ } function peg$parsesequence() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 8, + var key = peg$currPos * 36 + 8, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1135,7 +1147,7 @@ } function peg$parseatom() { var s0; - var key = peg$currPos * 32 + 9, + var key = peg$currPos * 36 + 9, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1153,17 +1165,20 @@ if (s0 === peg$FAILED) { s0 = peg$parsematches(); if (s0 === peg$FAILED) { - s0 = peg$parsehas(); + s0 = peg$parseis(); if (s0 === peg$FAILED) { - s0 = peg$parsefirstChild(); + s0 = peg$parsehas(); if (s0 === peg$FAILED) { - s0 = peg$parselastChild(); + s0 = peg$parsefirstChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthChild(); + s0 = peg$parselastChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthLastChild(); + s0 = peg$parsenthChild(); if (s0 === peg$FAILED) { - s0 = peg$parseclass(); + s0 = peg$parsenthLastChild(); + if (s0 === peg$FAILED) { + s0 = peg$parseclass(); + } } } } @@ -1183,7 +1198,7 @@ } function peg$parsewildcard() { var s0, s1; - var key = peg$currPos * 32 + 10, + var key = peg$currPos * 36 + 10, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1211,7 +1226,7 @@ } function peg$parseidentifier() { var s0, s1, s2; - var key = peg$currPos * 32 + 11, + var key = peg$currPos * 36 + 11, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1251,7 +1266,7 @@ } function peg$parseattr() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 12, + var key = peg$currPos * 36 + 12, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1314,7 +1329,7 @@ } function peg$parseattrOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 13, + var key = peg$currPos * 36 + 13, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1373,7 +1388,7 @@ } function peg$parseattrEqOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 14, + var key = peg$currPos * 36 + 14, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1421,7 +1436,7 @@ } function peg$parseattrName() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 15, + var key = peg$currPos * 36 + 15, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1499,7 +1514,7 @@ } function peg$parseattrValue() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 16, + var key = peg$currPos * 36 + 16, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1598,7 +1613,7 @@ } function peg$parsestring() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 17, + var key = peg$currPos * 36 + 17, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1862,7 +1877,7 @@ } function peg$parsenumber() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 18, + var key = peg$currPos * 36 + 18, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1962,7 +1977,7 @@ } function peg$parsepath() { var s0, s1; - var key = peg$currPos * 32 + 19, + var key = peg$currPos * 36 + 19, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -1982,7 +1997,7 @@ } function peg$parsetype() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 20, + var key = peg$currPos * 36 + 20, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2070,7 +2085,7 @@ } function peg$parseflags() { var s0, s1; - var key = peg$currPos * 32 + 21, + var key = peg$currPos * 36 + 21, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2110,7 +2125,7 @@ } function peg$parseregex() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 32 + 22, + var key = peg$currPos * 36 + 22, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2128,25 +2143,21 @@ } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - { - peg$fail(peg$c77); + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - { - peg$fail(peg$c77); + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); } } } @@ -2169,7 +2180,7 @@ s4 = null; } if (s4 !== peg$FAILED) { - s1 = peg$c78(s2, s4); + s1 = peg$c76(s2, s4); s0 = s1; } else { peg$currPos = s0; @@ -2193,9 +2204,181 @@ }; return s0; } + function peg$parsere_character_class() { + var s0, s1, s2, s3; + var key = peg$currPos * 36 + 23, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c31; + peg$currPos++; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c32); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c78); + } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c78); + } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s3 = peg$c33; + peg$currPos++; + } else { + s3 = peg$FAILED; + { + peg$fail(peg$c34); + } + } + if (s3 !== peg$FAILED) { + s1 = peg$c79(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parsere_escape() { + var s0, s1, s2; + var key = peg$currPos * 36 + 24, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c52; + peg$currPos++; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c53); + } + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c54); + } + } + if (s2 !== peg$FAILED) { + s1 = peg$c80(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parsere_chars() { + var s0, s1, s2; + var key = peg$currPos * 36 + 25, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + s1 = []; + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c82); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + { + peg$fail(peg$c82); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s1 = peg$c83(s1); + } + s0 = s1; + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } function peg$parsefield() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 32 + 23, + var key = peg$currPos * 36 + 26, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2265,7 +2448,7 @@ } } if (s3 !== peg$FAILED) { - s1 = peg$c79(s2, s3); + s1 = peg$c84(s2, s3); s0 = s1; } else { peg$currPos = s0; @@ -2287,20 +2470,20 @@ } function peg$parsenegation() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 24, + var key = peg$currPos * 36 + 27, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c80) { - s1 = peg$c80; + if (input.substr(peg$currPos, 5) === peg$c85) { + s1 = peg$c85; peg$currPos += 5; } else { s1 = peg$FAILED; { - peg$fail(peg$c81); + peg$fail(peg$c86); } } if (s1 !== peg$FAILED) { @@ -2320,7 +2503,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c82(s3); + s1 = peg$c87(s3); s0 = s1; } else { peg$currPos = s0; @@ -2350,20 +2533,83 @@ } function peg$parsematches() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 25, + var key = peg$currPos * 36 + 28, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c83) { - s1 = peg$c83; + if (input.substr(peg$currPos, 9) === peg$c88) { + s1 = peg$c88; peg$currPos += 9; } else { s1 = peg$FAILED; { - peg$fail(peg$c84); + peg$fail(peg$c89); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseselectors(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s5 = peg$c69; + peg$currPos++; + } else { + s5 = peg$FAILED; + { + peg$fail(peg$c70); + } + } + if (s5 !== peg$FAILED) { + s1 = peg$c90(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$resultsCache[key] = { + nextPos: peg$currPos, + result: s0 + }; + return s0; + } + function peg$parseis() { + var s0, s1, s2, s3, s4, s5; + var key = peg$currPos * 36 + 29, + cached = peg$resultsCache[key]; + if (cached) { + peg$currPos = cached.nextPos; + return cached.result; + } + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c91) { + s1 = peg$c91; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + { + peg$fail(peg$c92); } } if (s1 !== peg$FAILED) { @@ -2383,7 +2629,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c85(s3); + s1 = peg$c90(s3); s0 = s1; } else { peg$currPos = s0; @@ -2413,20 +2659,20 @@ } function peg$parsehas() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 26, + var key = peg$currPos * 36 + 30, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c86) { - s1 = peg$c86; + if (input.substr(peg$currPos, 5) === peg$c93) { + s1 = peg$c93; peg$currPos += 5; } else { s1 = peg$FAILED; { - peg$fail(peg$c87); + peg$fail(peg$c94); } } if (s1 !== peg$FAILED) { @@ -2446,7 +2692,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c88(s3); + s1 = peg$c95(s3); s0 = s1; } else { peg$currPos = s0; @@ -2476,24 +2722,24 @@ } function peg$parsefirstChild() { var s0, s1; - var key = peg$currPos * 32 + 27, + var key = peg$currPos * 36 + 31, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 12) === peg$c89) { - s1 = peg$c89; + if (input.substr(peg$currPos, 12) === peg$c96) { + s1 = peg$c96; peg$currPos += 12; } else { s1 = peg$FAILED; { - peg$fail(peg$c90); + peg$fail(peg$c97); } } if (s1 !== peg$FAILED) { - s1 = peg$c91(); + s1 = peg$c98(); } s0 = s1; peg$resultsCache[key] = { @@ -2504,24 +2750,24 @@ } function peg$parselastChild() { var s0, s1; - var key = peg$currPos * 32 + 28, + var key = peg$currPos * 36 + 32, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c92) { - s1 = peg$c92; + if (input.substr(peg$currPos, 11) === peg$c99) { + s1 = peg$c99; peg$currPos += 11; } else { s1 = peg$FAILED; { - peg$fail(peg$c93); + peg$fail(peg$c100); } } if (s1 !== peg$FAILED) { - s1 = peg$c94(); + s1 = peg$c101(); } s0 = s1; peg$resultsCache[key] = { @@ -2532,20 +2778,20 @@ } function peg$parsenthChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 29, + var key = peg$currPos * 36 + 33, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c95) { - s1 = peg$c95; + if (input.substr(peg$currPos, 11) === peg$c102) { + s1 = peg$c102; peg$currPos += 11; } else { s1 = peg$FAILED; { - peg$fail(peg$c96); + peg$fail(peg$c103); } } if (s1 !== peg$FAILED) { @@ -2590,7 +2836,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c97(s3); + s1 = peg$c104(s3); s0 = s1; } else { peg$currPos = s0; @@ -2620,20 +2866,20 @@ } function peg$parsenthLastChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 30, + var key = peg$currPos * 36 + 34, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; return cached.result; } s0 = peg$currPos; - if (input.substr(peg$currPos, 16) === peg$c98) { - s1 = peg$c98; + if (input.substr(peg$currPos, 16) === peg$c105) { + s1 = peg$c105; peg$currPos += 16; } else { s1 = peg$FAILED; { - peg$fail(peg$c99); + peg$fail(peg$c106); } } if (s1 !== peg$FAILED) { @@ -2678,7 +2924,7 @@ } } if (s5 !== peg$FAILED) { - s1 = peg$c100(s3); + s1 = peg$c107(s3); s0 = s1; } else { peg$currPos = s0; @@ -2708,7 +2954,7 @@ } function peg$parseclass() { var s0, s1, s2; - var key = peg$currPos * 32 + 31, + var key = peg$currPos * 36 + 35, cached = peg$resultsCache[key]; if (cached) { peg$currPos = cached.nextPos; @@ -2716,18 +2962,18 @@ } s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 58) { - s1 = peg$c101; + s1 = peg$c108; peg$currPos++; } else { s1 = peg$FAILED; { - peg$fail(peg$c102); + peg$fail(peg$c109); } } if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { - s1 = peg$c103(s2); + s1 = peg$c110(s2); s0 = s1; } else { peg$currPos = s0; diff --git a/src/hello/server/node_modules/esquery/dist/esquery.lite.min.js b/src/hello/server/node_modules/esquery/dist/esquery.lite.min.js new file mode 100644 index 00000000..9f19c09a --- /dev/null +++ b/src/hello/server/node_modules/esquery/dist/esquery.lite.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("estraverse")):"function"==typeof define&&define.amd?define(["estraverse"],e):(t=t||self).esquery=e(t.estraverse)}(this,(function(t){"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r0){for(e=1,n=1;e<~+.]/,h=yt([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),p=dt(">",!1),v=dt("~",!1),d=dt("+",!1),y=dt(",",!1),A=function(t,e){return[t].concat(e.map((function(t){return t[3]})))},x=dt("!",!1),g=dt("*",!1),P=dt("#",!1),m=dt("[",!1),b=dt("]",!1),C=/^[>","<","!"],!1,!1),j=dt("=",!1),E=function(t){return(t||"")+"="},S=/^[><]/,k=yt([">","<"],!1,!1),I=dt(".",!1),T=function(t,e,r){return{type:"attribute",name:t,operator:e,value:r}},F=dt('"',!1),K=/^[^\\"]/,D=yt(["\\",'"'],!0,!1),O=dt("\\",!1),L={type:"any"},R=function(t,e){return t+e},M=function(t){return{type:"literal",value:(e=t.join(""),e.replace(/\\(.)/g,(function(t,e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return e}})))};var e},U=dt("'",!1),_=/^[^\\']/,q=yt(["\\","'"],!0,!1),G=/^[0-9]/,H=yt([["0","9"]],!1,!1),N=dt("type(",!1),V=/^[^ )]/,W=yt([" ",")"],!0,!1),$=dt(")",!1),z=/^[imsu]/,B=yt(["i","m","s","u"],!1,!1),J=dt("/",!1),Q=/^[^\]\\]/,X=yt(["]","\\"],!0,!1),Y=/^[^\/\\[]/,Z=yt(["/","\\","["],!0,!1),tt=dt(":not(",!1),et=dt(":matches(",!1),rt=function(t){return{type:"matches",selectors:t}},nt=dt(":is(",!1),ut=dt(":has(",!1),ot=dt(":first-child",!1),at=dt(":last-child",!1),st=dt(":nth-child(",!1),ct=dt(":nth-last-child(",!1),it=dt(":",!1),lt=0,ft=[{line:1,column:1}],ht=0,pt=[],vt={};if("startRule"in r){if(!(r.startRule in c))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=c[r.startRule]}function dt(t,e){return{type:"literal",text:t,ignoreCase:e}}function yt(t,e,r){return{type:"class",parts:t,inverted:e,ignoreCase:r}}function At(t){var r,n=ft[t];if(n)return n;for(r=t-1;!ft[r];)r--;for(n={line:(n=ft[r]).line,column:n.column};rht&&(ht=lt,pt=[]),pt.push(t))}function Pt(){var t,e,r,n,u=36*lt+0,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,(e=mt())!==s&&(r=wt())!==s&&mt()!==s?t=e=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(lt=t,t=s),t===s&&(t=lt,(e=mt())!==s&&(e=void 0),t=e),vt[u]={nextPos:lt,result:t},t)}function mt(){var t,r,n=36*lt+1,u=vt[n];if(u)return lt=u.nextPos,u.result;for(t=[],32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l));r!==s;)t.push(r),32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l));return vt[n]={nextPos:lt,result:t},t}function bt(){var t,r,n,u=36*lt+2,o=vt[u];if(o)return lt=o.nextPos,o.result;if(r=[],f.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(h)),n!==s)for(;n!==s;)r.push(n),f.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(h));else r=s;return r!==s&&(r=r.join("")),t=r,vt[u]={nextPos:lt,result:t},t}function Ct(){var t,r,n,u=36*lt+3,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,(r=mt())!==s?(62===e.charCodeAt(lt)?(n=">",lt++):(n=s,gt(p)),n!==s&&mt()!==s?t=r="child":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=mt())!==s?(126===e.charCodeAt(lt)?(n="~",lt++):(n=s,gt(v)),n!==s&&mt()!==s?t=r="sibling":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=mt())!==s?(43===e.charCodeAt(lt)?(n="+",lt++):(n=s,gt(d)),n!==s&&mt()!==s?t=r="adjacent":(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,32===e.charCodeAt(lt)?(r=" ",lt++):(r=s,gt(l)),r!==s&&(n=mt())!==s?t=r="descendant":(lt=t,t=s)))),vt[u]={nextPos:lt,result:t},t)}function wt(){var t,r,n,u,o,a,c,i,l=36*lt+5,f=vt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,(r=Et())!==s){for(n=[],u=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(a=",",lt++):(a=s,gt(y)),a!==s&&(c=mt())!==s&&(i=Et())!==s?u=o=[o,a,c,i]:(lt=u,u=s)):(lt=u,u=s);u!==s;)n.push(u),u=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(a=",",lt++):(a=s,gt(y)),a!==s&&(c=mt())!==s&&(i=Et())!==s?u=o=[o,a,c,i]:(lt=u,u=s)):(lt=u,u=s);n!==s?t=r=A(r,n):(lt=t,t=s)}else lt=t,t=s;return vt[l]={nextPos:lt,result:t},t}function jt(){var t,e,r,n,u,o=36*lt+6,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,(e=Ct())===s&&(e=null),e!==s&&(r=Et())!==s?(u=r,t=e=(n=e)?{type:n,left:{type:"exactNode"},right:u}:u):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}function Et(){var t,e,r,n,u,o,a,c=36*lt+7,i=vt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,(e=St())!==s){for(r=[],n=lt,(u=Ct())!==s&&(o=St())!==s?n=u=[u,o]:(lt=n,n=s);n!==s;)r.push(n),n=lt,(u=Ct())!==s&&(o=St())!==s?n=u=[u,o]:(lt=n,n=s);r!==s?(a=e,t=e=r.reduce((function(t,e){return{type:e[0],left:t,right:e[1]}}),a)):(lt=t,t=s)}else lt=t,t=s;return vt[c]={nextPos:lt,result:t},t}function St(){var t,r,n,u,o,a,c,i=36*lt+8,l=vt[i];if(l)return lt=l.nextPos,l.result;if(t=lt,33===e.charCodeAt(lt)?(r="!",lt++):(r=s,gt(x)),r===s&&(r=null),r!==s){if(n=[],(u=kt())!==s)for(;u!==s;)n.push(u),u=kt();else n=s;n!==s?(o=r,c=1===(a=n).length?a[0]:{type:"compound",selectors:a},o&&(c.subject=!0),t=r=c):(lt=t,t=s)}else lt=t,t=s;return vt[i]={nextPos:lt,result:t},t}function kt(){var t,r=36*lt+9,n=vt[r];return n?(lt=n.nextPos,n.result):((t=function(){var t,r,n=36*lt+10,u=vt[n];return u?(lt=u.nextPos,u.result):(42===e.charCodeAt(lt)?(r="*",lt++):(r=s,gt(g)),r!==s&&(r={type:"wildcard",value:r}),t=r,vt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u=36*lt+11,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,35===e.charCodeAt(lt)?(r="#",lt++):(r=s,gt(P)),r===s&&(r=null),r!==s&&(n=bt())!==s?t=r={type:"identifier",value:n}:(lt=t,t=s),vt[u]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=36*lt+12,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,91===e.charCodeAt(lt)?(r="[",lt++):(r=s,gt(m)),r!==s&&mt()!==s&&(n=function(){var t,r,n,u,o=36*lt+16,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,(r=It())!==s&&mt()!==s&&(n=function(){var t,r,n,u=36*lt+14,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,33===e.charCodeAt(lt)?(r="!",lt++):(r=s,gt(x)),r===s&&(r=null),r!==s?(61===e.charCodeAt(lt)?(n="=",lt++):(n=s,gt(j)),n!==s?(r=E(r),t=r):(lt=t,t=s)):(lt=t,t=s),vt[u]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?((u=function(){var t,r,n,u,o,a=36*lt+20,c=vt[a];if(c)return lt=c.nextPos,c.result;if(t=lt,"type("===e.substr(lt,5)?(r="type(",lt+=5):(r=s,gt(N)),r!==s)if(mt()!==s){if(n=[],V.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(W)),u!==s)for(;u!==s;)n.push(u),V.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(W));else n=s;n!==s&&(u=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt($)),o!==s?(r={type:"type",value:n.join("")},t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[a]={nextPos:lt,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c=36*lt+22,i=vt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,47===e.charCodeAt(lt)?(r="/",lt++):(r=s,gt(J)),r!==s){if(n=[],(u=Tt())===s&&(u=Ft())===s&&(u=Kt()),u!==s)for(;u!==s;)n.push(u),(u=Tt())===s&&(u=Ft())===s&&(u=Kt());else n=s;n!==s?(47===e.charCodeAt(lt)?(u="/",lt++):(u=s,gt(J)),u!==s?((o=function(){var t,r,n=36*lt+21,u=vt[n];if(u)return lt=u.nextPos,u.result;if(t=[],z.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(B)),r!==s)for(;r!==s;)t.push(r),z.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(B));else t=s;return vt[n]={nextPos:lt,result:t},t}())===s&&(o=null),o!==s?(a=o,r={type:"regexp",value:new RegExp(n.join(""),a?a.join(""):"")},t=r):(lt=t,t=s)):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;return vt[c]={nextPos:lt,result:t},t}()),u!==s?(r=T(r,n,u),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=It())!==s&&mt()!==s&&(n=function(){var t,r,n,u=36*lt+13,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,C.test(e.charAt(lt))?(r=e.charAt(lt),lt++):(r=s,gt(w)),r===s&&(r=null),r!==s?(61===e.charCodeAt(lt)?(n="=",lt++):(n=s,gt(j)),n!==s?(r=E(r),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(S.test(e.charAt(lt))?(t=e.charAt(lt),lt++):(t=s,gt(k))),vt[u]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?((u=function(){var t,r,n,u,o,a,c=36*lt+17,i=vt[c];if(i)return lt=i.nextPos,i.result;if(t=lt,34===e.charCodeAt(lt)?(r='"',lt++):(r=s,gt(F)),r!==s){for(n=[],K.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(D)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(L)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));u!==s;)n.push(u),K.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(D)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(L)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));n!==s?(34===e.charCodeAt(lt)?(u='"',lt++):(u=s,gt(F)),u!==s?(r=M(n),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;if(t===s)if(t=lt,39===e.charCodeAt(lt)?(r="'",lt++):(r=s,gt(U)),r!==s){for(n=[],_.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(q)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(L)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));u!==s;)n.push(u),_.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(q)),u===s&&(u=lt,92===e.charCodeAt(lt)?(o="\\",lt++):(o=s,gt(O)),o!==s?(e.length>lt?(a=e.charAt(lt),lt++):(a=s,gt(L)),a!==s?(o=R(o,a),u=o):(lt=u,u=s)):(lt=u,u=s));n!==s?(39===e.charCodeAt(lt)?(u="'",lt++):(u=s,gt(U)),u!==s?(r=M(n),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;return vt[c]={nextPos:lt,result:t},t}())===s&&(u=function(){var t,r,n,u,o,a,c,i=36*lt+18,l=vt[i];if(l)return lt=l.nextPos,l.result;for(t=lt,r=lt,n=[],G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H));u!==s;)n.push(u),G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H));if(n!==s?(46===e.charCodeAt(lt)?(u=".",lt++):(u=s,gt(I)),u!==s?r=n=[n,u]:(lt=r,r=s)):(lt=r,r=s),r===s&&(r=null),r!==s){if(n=[],G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H)),u!==s)for(;u!==s;)n.push(u),G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H));else n=s;n!==s?(a=n,c=(o=r)?[].concat.apply([],o).join(""):"",r={type:"literal",value:parseFloat(c+a.join(""))},t=r):(lt=t,t=s)}else lt=t,t=s;return vt[i]={nextPos:lt,result:t},t}())===s&&(u=function(){var t,e,r=36*lt+19,n=vt[r];return n?(lt=n.nextPos,n.result):((e=bt())!==s&&(e={type:"literal",value:e}),t=e,vt[r]={nextPos:lt,result:t},t)}()),u!==s?(r=T(r,n,u),t=r):(lt=t,t=s)):(lt=t,t=s),t===s&&(t=lt,(r=It())!==s&&(r={type:"attribute",name:r}),t=r)),vt[o]={nextPos:lt,result:t},t)}())!==s&&mt()!==s?(93===e.charCodeAt(lt)?(u="]",lt++):(u=s,gt(b)),u!==s?t=r=n:(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a,c,i,l=36*lt+26,f=vt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,46===e.charCodeAt(lt)?(r=".",lt++):(r=s,gt(I)),r!==s)if((n=bt())!==s){for(u=[],o=lt,46===e.charCodeAt(lt)?(a=".",lt++):(a=s,gt(I)),a!==s&&(c=bt())!==s?o=a=[a,c]:(lt=o,o=s);o!==s;)u.push(o),o=lt,46===e.charCodeAt(lt)?(a=".",lt++):(a=s,gt(I)),a!==s&&(c=bt())!==s?o=a=[a,c]:(lt=o,o=s);u!==s?(i=n,r={type:"field",name:u.reduce((function(t,e){return t+e[0]+e[1]}),i)},t=r):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[l]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,u,o=36*lt+27,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,":not("===e.substr(lt,5)?(r=":not(",lt+=5):(r=s,gt(tt)),r!==s&&mt()!==s&&(n=wt())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(u=")",lt++):(u=s,gt($)),u!==s?t=r={type:"not",selectors:n}:(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=36*lt+28,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,":matches("===e.substr(lt,9)?(r=":matches(",lt+=9):(r=s,gt(et)),r!==s&&mt()!==s&&(n=wt())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(u=")",lt++):(u=s,gt($)),u!==s?(r=rt(n),t=r):(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=36*lt+29,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,":is("===e.substr(lt,4)?(r=":is(",lt+=4):(r=s,gt(nt)),r!==s&&mt()!==s&&(n=wt())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(u=")",lt++):(u=s,gt($)),u!==s?(r=rt(n),t=r):(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o=36*lt+30,a=vt[o];return a?(lt=a.nextPos,a.result):(t=lt,":has("===e.substr(lt,5)?(r=":has(",lt+=5):(r=s,gt(ut)),r!==s&&mt()!==s&&(n=function(){var t,r,n,u,o,a,c,i,l=36*lt+4,f=vt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,(r=jt())!==s){for(n=[],u=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(a=",",lt++):(a=s,gt(y)),a!==s&&(c=mt())!==s&&(i=jt())!==s?u=o=[o,a,c,i]:(lt=u,u=s)):(lt=u,u=s);u!==s;)n.push(u),u=lt,(o=mt())!==s?(44===e.charCodeAt(lt)?(a=",",lt++):(a=s,gt(y)),a!==s&&(c=mt())!==s&&(i=jt())!==s?u=o=[o,a,c,i]:(lt=u,u=s)):(lt=u,u=s);n!==s?t=r=A(r,n):(lt=t,t=s)}else lt=t,t=s;return vt[l]={nextPos:lt,result:t},t}())!==s&&mt()!==s?(41===e.charCodeAt(lt)?(u=")",lt++):(u=s,gt($)),u!==s?t=r={type:"has",selectors:n}:(lt=t,t=s)):(lt=t,t=s),vt[o]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n=36*lt+31,u=vt[n];return u?(lt=u.nextPos,u.result):(":first-child"===e.substr(lt,12)?(r=":first-child",lt+=12):(r=s,gt(ot)),r!==s&&(r=Dt(1)),t=r,vt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n=36*lt+32,u=vt[n];return u?(lt=u.nextPos,u.result):(":last-child"===e.substr(lt,11)?(r=":last-child",lt+=11):(r=s,gt(at)),r!==s&&(r=Ot(1)),t=r,vt[n]={nextPos:lt,result:t},t)}())===s&&(t=function(){var t,r,n,u,o,a=36*lt+33,c=vt[a];if(c)return lt=c.nextPos,c.result;if(t=lt,":nth-child("===e.substr(lt,11)?(r=":nth-child(",lt+=11):(r=s,gt(st)),r!==s)if(mt()!==s){if(n=[],G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H)),u!==s)for(;u!==s;)n.push(u),G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H));else n=s;n!==s&&(u=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt($)),o!==s?(r=Dt(parseInt(n.join(""),10)),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[a]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,u,o,a=36*lt+34,c=vt[a];if(c)return lt=c.nextPos,c.result;if(t=lt,":nth-last-child("===e.substr(lt,16)?(r=":nth-last-child(",lt+=16):(r=s,gt(ct)),r!==s)if(mt()!==s){if(n=[],G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H)),u!==s)for(;u!==s;)n.push(u),G.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(H));else n=s;n!==s&&(u=mt())!==s?(41===e.charCodeAt(lt)?(o=")",lt++):(o=s,gt($)),o!==s?(r=Ot(parseInt(n.join(""),10)),t=r):(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;else lt=t,t=s;return vt[a]={nextPos:lt,result:t},t}())===s&&(t=function(){var t,r,n,u=36*lt+35,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,58===e.charCodeAt(lt)?(r=":",lt++):(r=s,gt(it)),r!==s&&(n=bt())!==s?t=r={type:"class",name:n}:(lt=t,t=s),vt[u]={nextPos:lt,result:t},t)}()),vt[r]={nextPos:lt,result:t},t)}function It(){var t,r,n,u,o,a,c,i,l=36*lt+15,f=vt[l];if(f)return lt=f.nextPos,f.result;if(t=lt,(r=bt())!==s){for(n=[],u=lt,46===e.charCodeAt(lt)?(o=".",lt++):(o=s,gt(I)),o!==s&&(a=bt())!==s?u=o=[o,a]:(lt=u,u=s);u!==s;)n.push(u),u=lt,46===e.charCodeAt(lt)?(o=".",lt++):(o=s,gt(I)),o!==s&&(a=bt())!==s?u=o=[o,a]:(lt=u,u=s);n!==s?(c=r,i=n,t=r=[].concat.apply([c],i).join("")):(lt=t,t=s)}else lt=t,t=s;return vt[l]={nextPos:lt,result:t},t}function Tt(){var t,r,n,u,o=36*lt+23,a=vt[o];if(a)return lt=a.nextPos,a.result;if(t=lt,91===e.charCodeAt(lt)?(r="[",lt++):(r=s,gt(m)),r!==s){if(n=[],Q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(X)),u===s&&(u=Ft()),u!==s)for(;u!==s;)n.push(u),Q.test(e.charAt(lt))?(u=e.charAt(lt),lt++):(u=s,gt(X)),u===s&&(u=Ft());else n=s;n!==s?(93===e.charCodeAt(lt)?(u="]",lt++):(u=s,gt(b)),u!==s?t=r="["+n.join("")+"]":(lt=t,t=s)):(lt=t,t=s)}else lt=t,t=s;return vt[o]={nextPos:lt,result:t},t}function Ft(){var t,r,n,u=36*lt+24,o=vt[u];return o?(lt=o.nextPos,o.result):(t=lt,92===e.charCodeAt(lt)?(r="\\",lt++):(r=s,gt(O)),r!==s?(e.length>lt?(n=e.charAt(lt),lt++):(n=s,gt(L)),n!==s?t=r="\\"+n:(lt=t,t=s)):(lt=t,t=s),vt[u]={nextPos:lt,result:t},t)}function Kt(){var t,r,n,u=36*lt+25,o=vt[u];if(o)return lt=o.nextPos,o.result;if(r=[],Y.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(Z)),n!==s)for(;n!==s;)r.push(n),Y.test(e.charAt(lt))?(n=e.charAt(lt),lt++):(n=s,gt(Z));else r=s;return r!==s&&(r=r.join("")),t=r,vt[u]={nextPos:lt,result:t},t}function Dt(t){return{type:"nth-child",index:{type:"literal",value:t}}}function Ot(t){return{type:"nth-last-child",index:{type:"literal",value:t}}}if((n=i())!==s&<===e.length)return n;throw n!==s&<0&&h(t,e,r))&&f(e[0],e.slice(1),r)};case"descendant":var y=i(e.left),A=i(e.right);return function(t,e,r){if(A(t,e,r))for(var n=0,u=e.length;n":return function(t){return s(t,x)>e.value.value};case">=":return function(t){return s(t,x)>=e.value.value}}throw new Error("Unknown operator: ".concat(e.operator));case"sibling":var m=i(e.left),b=i(e.right);return function(t,r,n){return b(t,r,n)&&p(t,m,r,"LEFT_SIDE",n)||e.left.subject&&m(t,r,n)&&p(t,b,r,"RIGHT_SIDE",n)};case"adjacent":var C=i(e.left),w=i(e.right);return function(t,r,n){return w(t,r,n)&&v(t,C,r,"LEFT_SIDE",n)||e.right.subject&&C(t,r,n)&&v(t,w,r,"RIGHT_SIDE",n)};case"nth-child":var j=e.index.value,E=i(e.right);return function(t,e,r){return E(t,e,r)&&d(t,e,j,r)};case"nth-last-child":var S=-e.index.value,k=i(e.right);return function(t,e,r){return k(t,e,r)&&d(t,e,S,r)};case"class":var I=e.name.toLowerCase();return function(t,r,n){if(n&&n.matchClass)return n.matchClass(e.name,t,r);if(n&&n.nodeTypeKey)return!1;switch(I){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(e.name))}}throw new Error("Unknown selector type: ".concat(e.type))}function f(e,r){var n=r&&r.nodeTypeKey||"type",u=e[n];return r&&r.visitorKeys&&r.visitorKeys[u]?r.visitorKeys[u]:t.VisitorKeys[u]?t.VisitorKeys[u]:r&&"function"==typeof r.fallback?r.fallback(e):Object.keys(e).filter((function(t){return t!==n}))}function h(t,e){var r=e&&e.nodeTypeKey||"type";return null!==t&&"object"===u(t)&&"string"==typeof t[r]}function p(t,e,n,u,o){var a=r(n,1)[0];if(!a)return!1;for(var s=f(a,o),c=0;c0&&h(i[l-1],o)&&e(i[l-1],n,o))return!0;if("RIGHT_SIDE"===u&&l=0&&i 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(op, s) {\n if (!op) return s;\n return { type: op, left: { type: 'exactNode' }, right: s };\n },\n peg$c21 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c22 = \"!\",\n peg$c23 = peg$literalExpectation(\"!\", false),\n peg$c24 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c25 = \"*\",\n peg$c26 = peg$literalExpectation(\"*\", false),\n peg$c27 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c28 = \"#\",\n peg$c29 = peg$literalExpectation(\"#\", false),\n peg$c30 = function(i) { return { type: 'identifier', value: i }; },\n peg$c31 = \"[\",\n peg$c32 = peg$literalExpectation(\"[\", false),\n peg$c33 = \"]\",\n peg$c34 = peg$literalExpectation(\"]\", false),\n peg$c35 = function(v) { return v; },\n peg$c36 = /^[>\", \"<\", \"!\"], false, false),\n peg$c38 = \"=\",\n peg$c39 = peg$literalExpectation(\"=\", false),\n peg$c40 = function(a) { return (a || '') + '='; },\n peg$c41 = /^[><]/,\n peg$c42 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c43 = \".\",\n peg$c44 = peg$literalExpectation(\".\", false),\n peg$c45 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c46 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c47 = function(name) { return { type: 'attribute', name: name }; },\n peg$c48 = \"\\\"\",\n peg$c49 = peg$literalExpectation(\"\\\"\", false),\n peg$c50 = /^[^\\\\\"]/,\n peg$c51 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c52 = \"\\\\\",\n peg$c53 = peg$literalExpectation(\"\\\\\", false),\n peg$c54 = peg$anyExpectation(),\n peg$c55 = function(a, b) { return a + b; },\n peg$c56 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c57 = \"'\",\n peg$c58 = peg$literalExpectation(\"'\", false),\n peg$c59 = /^[^\\\\']/,\n peg$c60 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c61 = /^[0-9]/,\n peg$c62 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c63 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c64 = function(i) { return { type: 'literal', value: i }; },\n peg$c65 = \"type(\",\n peg$c66 = peg$literalExpectation(\"type(\", false),\n peg$c67 = /^[^ )]/,\n peg$c68 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c69 = \")\",\n peg$c70 = peg$literalExpectation(\")\", false),\n peg$c71 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c72 = /^[imsu]/,\n peg$c73 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c74 = \"/\",\n peg$c75 = peg$literalExpectation(\"/\", false),\n peg$c76 = function(pattern, flgs) {\n return {\n type: 'regexp', value: new RegExp(pattern.join(''), flgs ? flgs.join('') : '')\n };\n },\n peg$c77 = /^[^\\]\\\\]/,\n peg$c78 = peg$classExpectation([\"]\", \"\\\\\"], true, false),\n peg$c79 = function(cs) { return '[' + cs.join('') + ']'; },\n peg$c80 = function(a) { return '\\\\' + a; },\n peg$c81 = /^[^\\/\\\\[]/,\n peg$c82 = peg$classExpectation([\"/\", \"\\\\\", \"[\"], true, false),\n peg$c83 = function(cs) { return cs.join(''); },\n peg$c84 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c85 = \":not(\",\n peg$c86 = peg$literalExpectation(\":not(\", false),\n peg$c87 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c88 = \":matches(\",\n peg$c89 = peg$literalExpectation(\":matches(\", false),\n peg$c90 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c91 = \":is(\",\n peg$c92 = peg$literalExpectation(\":is(\", false),\n peg$c93 = \":has(\",\n peg$c94 = peg$literalExpectation(\":has(\", false),\n peg$c95 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c96 = \":first-child\",\n peg$c97 = peg$literalExpectation(\":first-child\", false),\n peg$c98 = function() { return nth(1); },\n peg$c99 = \":last-child\",\n peg$c100 = peg$literalExpectation(\":last-child\", false),\n peg$c101 = function() { return nthLast(1); },\n peg$c102 = \":nth-child(\",\n peg$c103 = peg$literalExpectation(\":nth-child(\", false),\n peg$c104 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c105 = \":nth-last-child(\",\n peg$c106 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c107 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c108 = \":\",\n peg$c109 = peg$literalExpectation(\":\", false),\n peg$c110 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 36 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsehasSelector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 36 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelector() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsebinaryOp();\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 36 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parseis();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c25;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c27(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c28;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c33;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c35(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c48;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c48;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c57;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c57;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c43;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c64(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c71(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 36 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c74;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsere_character_class();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_chars();\n }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsere_character_class();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_chars();\n }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c74;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c76(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_character_class() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c77.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c78); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c77.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c78); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s3 = peg$c33;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c79(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_escape() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s1 = peg$c52;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s1 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c80(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_chars() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c81.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c82); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c81.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c82); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c83(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 36 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c43;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseis() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 4) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 30,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c93) {\n s1 = peg$c93;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c94); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsehasSelectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c95(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 31,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c96) {\n s1 = peg$c96;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c97); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c98();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 32,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c99) {\n s1 = peg$c99;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c100); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c101();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 33,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c102) {\n s1 = peg$c102;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c103); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c104(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 34,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c105) {\n s1 = peg$c105;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c106); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c107(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 35,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c108;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c109); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c110(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @callback SelectorMatcher\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @returns {void}\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'exactNode':\n return (node, ancestry) => {\n return ancestry.length === 0;\n };\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n \n const name = selector.name.toLowerCase();\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false; \n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["module","exports","peg$SyntaxError","message","expected","found","location","this","name","Error","captureStackTrace","child","parent","ctor","constructor","prototype","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","i","escapedParts","parts","length","Array","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","replace","j","descriptions","type","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c19","ss","concat","map","peg$c23","peg$c26","peg$c29","peg$c32","peg$c34","peg$c36","peg$c37","peg$c39","peg$c40","a","peg$c41","peg$c42","peg$c44","peg$c46","op","value","operator","peg$c49","peg$c50","peg$c51","peg$c53","peg$c54","peg$c55","b","peg$c56","d","match","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c66","peg$c67","peg$c68","peg$c70","peg$c72","peg$c73","peg$c75","peg$c77","peg$c78","peg$c81","peg$c82","peg$c86","peg$c89","peg$c90","selectors","peg$c92","peg$c94","peg$c97","peg$c100","peg$c103","peg$c106","peg$c109","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$resultsCache","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","push","s0","s1","s2","key","cached","nextPos","result","peg$parse_","peg$parseselectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","peg$parsehasSelector","left","right","peg$parsesequence","reduce","memo","rhs","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parsere_character_class","peg$parsere_escape","peg$parsere_chars","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parseis","peg$parsehasSelectors","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","obj","keys","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","node","ancestry","nodeTypeKey","path","split","inPath","ancestor","fromPathIndex","current","field","isArray","k","matchers","estraverse","traverse","enter","unshift","leave","shift","visitorKeys","fallback","l","_typeof","sibling","adjacent","nthChild","matchClass","getVisitorKeys","nodeType","VisitorKeys","Object","filter","isNode","side","_slicedToArray","listProp","startIndex","indexOf","lowerBound","upperBound","idx","ast","visitor","altSubjects","subjects","results","sel","_toConsumableArray","m","succeedingAncestry","parser","query","matches"],"mappings":"imEAQ2CA,EAAOC,UAC9CD,UAEK,WASP,SAASE,EAAgBC,EAASC,EAAUC,EAAOC,GACjDC,KAAKJ,QAAWA,EAChBI,KAAKH,SAAWA,EAChBG,KAAKF,MAAWA,EAChBE,KAAKD,SAAWA,EAChBC,KAAKC,KAAW,cAEuB,mBAA5BC,MAAMC,mBACfD,MAAMC,kBAAkBH,KAAML,GA41FlC,OA12FA,SAAsBS,EAAOC,GAC3B,SAASC,IAASN,KAAKO,YAAcH,EACrCE,EAAKE,UAAYH,EAAOG,UACxBJ,EAAMI,UAAY,IAAIF,EAexBG,CAAad,EAAiBO,OAE9BP,EAAgBe,aAAe,SAASb,EAAUC,GAChD,IAAIa,EAA2B,CACzBC,QAAS,SAASC,GAChB,MAAO,IAAOC,EAAcD,EAAYE,MAAQ,KAGlDC,MAAS,SAASH,GAChB,IACII,EADAC,EAAe,GAGnB,IAAKD,EAAI,EAAGA,EAAIJ,EAAYM,MAAMC,OAAQH,IACxCC,GAAgBL,EAAYM,MAAMF,aAAcI,MAC5CC,EAAYT,E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AI/C,EAAS3M,OAAQqN,EAAIqC,IAAKrC,EAAG,CAC7C,IAAMsC,EAAqBhD,EAASxL,MAAMkM,EAAI,GAC1CgC,EAAYxP,GAAG8M,EAASU,GAAIsC,EAAoBjO,IAChD0N,EAAQzC,EAASU,GAAIpO,EAAQ0Q,SAKzCP,EAAQ1C,EAAMzN,EAAQ0N,IAIlCgB,iBAAWhB,EAASiB,SACpB5B,KAAMtK,GAAWA,EAAQmM,YACzBC,SAAUpM,GAAWA,EAAQoM,UAAY,eAajD,SAAStJ,EAAM2K,EAAK/C,EAAU1K,GAC1B,IAAM6N,EAAU,GAIhB,OAHA/B,EAAS2B,EAAK/C,GAAU,SAAUM,GAC9B6C,EAAQ/H,KAAKkF,KACdhL,GACI6N,EAQX,SAAS/N,EAAM4K,GACX,OAAOwD,EAAOpO,MAAM4K,GAUxB,SAASyD,EAAMV,EAAK/C,EAAU1K,GAC1B,OAAO8C,EAAM2K,EAAK3N,EAAM4K,GAAW1K,UAGvCmO,EAAMrO,MAAQA,EACdqO,EAAMrL,MAAQA,EACdqL,EAAMrC,SAAWA,EACjBqC,EAAMC,QAvPN,SAAiBpD,EAAMN,EAAUO,EAAUjL,GACvC,OAAK0K,KACAM,IACAC,IAAYA,EAAW,IAErBR,EAAWC,EAAXD,CAAqBO,EAAMC,EAAUjL,KAmPhDmO,EAAMA,MAAQA"} \ No newline at end of file diff --git a/src/hello/server/node_modules/esquery/dist/esquery.min.js b/src/hello/server/node_modules/esquery/dist/esquery.min.js new file mode 100644 index 00000000..a972bf74 --- /dev/null +++ b/src/hello/server/node_modules/esquery/dist/esquery.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).esquery=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--r)if(e[r].node===t)return!0;return!1}function y(e,t){return(new f).traverse(e,t)}function m(e,t){var r;return r=function(e,t){var r,n,o,a;for(n=e.length,o=0;n;)t(e[a=o+(r=n>>>1)])?n=r:(o=a+1,n-=r+1);return o}(t,(function(t){return t.range[0]>e.range[0]})),e.extendedRange=[e.range[0],e.range[1]],r!==t.length&&(e.extendedRange[1]=t[r].range[0]),(r-=1)>=0&&(e.extendedRange[0]=t[r].range[1]),e}return r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},o={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},n={Break:a={},Skip:i={},Remove:s={}},l.prototype.replace=function(e){this.parent[this.key]=e},l.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},f.prototype.path=function(){var e,t,r,n,o;function a(e,t){if(Array.isArray(t))for(r=0,n=t.length;r=0;)if(v=s[f=x[y]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]&&!d(n,v[m])){if(h(u,x[y]))o=new c(v[m],[f,m],"Property",null);else{if(!p(v[m]))continue;o=new c(v[m],[f,m],null,null)}r.push(o)}}else if(p(v)){if(d(n,v))continue;r.push(new c(v,f,null,null))}}}else if(o=n.pop(),l=this.__execute(t.leave,o),this.__state===a||l===a)return},f.prototype.replace=function(e,t){var r,n,o,u,f,d,y,m,x,v,g,A,E;function b(e){var t,n,o,a;if(e.ref.remove())for(n=e.ref.key,a=e.ref.parent,t=r.length;t--;)if((o=r[t]).ref&&o.ref.parent===a){if(o.ref.key=0;)if(v=o[E=x[y]])if(Array.isArray(v)){for(m=v.length;(m-=1)>=0;)if(v[m]){if(h(u,x[y]))d=new c(v[m],[E,m],"Property",new l(v,m));else{if(!p(v[m]))continue;d=new c(v[m],[E,m],null,new l(v,m))}r.push(d)}}else p(v)&&r.push(new c(v,E,null,new l(o,E)))}}else if(d=n.pop(),void 0!==(f=this.__execute(t.leave,d))&&f!==a&&f!==i&&f!==s&&d.ref.replace(f),this.__state!==s&&f!==s||b(d),this.__state===a||f===a)return A.root;return A.root},t.Syntax=r,t.traverse=y,t.replace=function(e,t){return(new f).replace(e,t)},t.attachComments=function(e,t,r){var o,a,i,s,l=[];if(!e.range)throw new Error("attachComments needs range information");if(!r.length){if(t.length){for(i=0,a=t.length;ie.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),l.splice(s,1)):s+=1;return s===l.length?n.Break:l[s].extendedRange[0]>e.range[1]?n.Skip:void 0}}),s=0,y(e,{leave:function(e){for(var t;se.range[1]?n.Skip:void 0}}),e},t.VisitorKeys=o,t.VisitorOption=n,t.Controller=f,t.cloneEnvironment=function(){return e({})},t}(t)})),s=a((function(e){e.exports&&(e.exports=function(){function e(t,r,n,o){this.message=t,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t<~+.]/,p=me([" ","[","]",",","(",")",":","#","!","=",">","<","~","+","."],!0,!1),h=ye(">",!1),d=ye("~",!1),y=ye("+",!1),m=ye(",",!1),x=function(e,t){return[e].concat(t.map((function(e){return e[3]})))},v=ye("!",!1),g=ye("*",!1),A=ye("#",!1),E=ye("[",!1),b=ye("]",!1),S=/^[>","<","!"],!1,!1),C=ye("=",!1),P=function(e){return(e||"")+"="},w=/^[><]/,k=me([">","<"],!1,!1),D=ye(".",!1),I=function(e,t,r){return{type:"attribute",name:e,operator:t,value:r}},j=ye('"',!1),T=/^[^\\"]/,F=me(["\\",'"'],!0,!1),R=ye("\\",!1),O={type:"any"},L=function(e,t){return e+t},M=function(e){return{type:"literal",value:(t=e.join(""),t.replace(/\\(.)/g,(function(e,t){switch(t){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";default:return t}})))};var t},B=ye("'",!1),U=/^[^\\']/,K=me(["\\","'"],!0,!1),N=/^[0-9]/,W=me([["0","9"]],!1,!1),q=ye("type(",!1),V=/^[^ )]/,G=me([" ",")"],!0,!1),z=ye(")",!1),H=/^[imsu]/,Y=me(["i","m","s","u"],!1,!1),$=ye("/",!1),J=/^[^\]\\]/,Q=me(["]","\\"],!0,!1),X=/^[^\/\\[]/,Z=me(["/","\\","["],!0,!1),ee=ye(":not(",!1),te=ye(":matches(",!1),re=function(e){return{type:"matches",selectors:e}},ne=ye(":is(",!1),oe=ye(":has(",!1),ae=ye(":first-child",!1),ie=ye(":last-child",!1),se=ye(":nth-child(",!1),ue=ye(":nth-last-child(",!1),le=ye(":",!1),ce=0,fe=[{line:1,column:1}],pe=0,he=[],de={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');l=u[r.startRule]}function ye(e,t){return{type:"literal",text:e,ignoreCase:t}}function me(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function xe(e){var r,n=fe[e];if(n)return n;for(r=e-1;!fe[r];)r--;for(n={line:(n=fe[r]).line,column:n.column};rpe&&(pe=ce,he=[]),he.push(e))}function Ae(){var e,t,r,n,o=36*ce+0,a=de[o];return a?(ce=a.nextPos,a.result):(e=ce,(t=Ee())!==s&&(r=_e())!==s&&Ee()!==s?e=t=1===(n=r).length?n[0]:{type:"matches",selectors:n}:(ce=e,e=s),e===s&&(e=ce,(t=Ee())!==s&&(t=void 0),e=t),de[o]={nextPos:ce,result:e},e)}function Ee(){var e,r,n=36*ce+1,o=de[n];if(o)return ce=o.nextPos,o.result;for(e=[],32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));r!==s;)e.push(r),32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c));return de[n]={nextPos:ce,result:e},e}function be(){var e,r,n,o=36*ce+2,a=de[o];if(a)return ce=a.nextPos,a.result;if(r=[],f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p)),n!==s)for(;n!==s;)r.push(n),f.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(p));else r=s;return r!==s&&(r=r.join("")),e=r,de[o]={nextPos:ce,result:e},e}function Se(){var e,r,n,o=36*ce+3,a=de[o];return a?(ce=a.nextPos,a.result):(e=ce,(r=Ee())!==s?(62===t.charCodeAt(ce)?(n=">",ce++):(n=s,ge(h)),n!==s&&Ee()!==s?e=r="child":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ee())!==s?(126===t.charCodeAt(ce)?(n="~",ce++):(n=s,ge(d)),n!==s&&Ee()!==s?e=r="sibling":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=Ee())!==s?(43===t.charCodeAt(ce)?(n="+",ce++):(n=s,ge(y)),n!==s&&Ee()!==s?e=r="adjacent":(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,32===t.charCodeAt(ce)?(r=" ",ce++):(r=s,ge(c)),r!==s&&(n=Ee())!==s?e=r="descendant":(ce=e,e=s)))),de[o]={nextPos:ce,result:e},e)}function _e(){var e,r,n,o,a,i,u,l,c=36*ce+5,f=de[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=Pe())!==s){for(n=[],o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Pe())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);o!==s;)n.push(o),o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Pe())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);n!==s?e=r=x(r,n):(ce=e,e=s)}else ce=e,e=s;return de[c]={nextPos:ce,result:e},e}function Ce(){var e,t,r,n,o,a=36*ce+6,i=de[a];return i?(ce=i.nextPos,i.result):(e=ce,(t=Se())===s&&(t=null),t!==s&&(r=Pe())!==s?(o=r,e=t=(n=t)?{type:n,left:{type:"exactNode"},right:o}:o):(ce=e,e=s),de[a]={nextPos:ce,result:e},e)}function Pe(){var e,t,r,n,o,a,i,u=36*ce+7,l=de[u];if(l)return ce=l.nextPos,l.result;if(e=ce,(t=we())!==s){for(r=[],n=ce,(o=Se())!==s&&(a=we())!==s?n=o=[o,a]:(ce=n,n=s);n!==s;)r.push(n),n=ce,(o=Se())!==s&&(a=we())!==s?n=o=[o,a]:(ce=n,n=s);r!==s?(i=t,e=t=r.reduce((function(e,t){return{type:t[0],left:e,right:t[1]}}),i)):(ce=e,e=s)}else ce=e,e=s;return de[u]={nextPos:ce,result:e},e}function we(){var e,r,n,o,a,i,u,l=36*ce+8,c=de[l];if(c)return ce=c.nextPos,c.result;if(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(v)),r===s&&(r=null),r!==s){if(n=[],(o=ke())!==s)for(;o!==s;)n.push(o),o=ke();else n=s;n!==s?(a=r,u=1===(i=n).length?i[0]:{type:"compound",selectors:i},a&&(u.subject=!0),e=r=u):(ce=e,e=s)}else ce=e,e=s;return de[l]={nextPos:ce,result:e},e}function ke(){var e,r=36*ce+9,n=de[r];return n?(ce=n.nextPos,n.result):((e=function(){var e,r,n=36*ce+10,o=de[n];return o?(ce=o.nextPos,o.result):(42===t.charCodeAt(ce)?(r="*",ce++):(r=s,ge(g)),r!==s&&(r={type:"wildcard",value:r}),e=r,de[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o=36*ce+11,a=de[o];return a?(ce=a.nextPos,a.result):(e=ce,35===t.charCodeAt(ce)?(r="#",ce++):(r=s,ge(A)),r===s&&(r=null),r!==s&&(n=be())!==s?e=r={type:"identifier",value:n}:(ce=e,e=s),de[o]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+12,i=de[a];return i?(ce=i.nextPos,i.result):(e=ce,91===t.charCodeAt(ce)?(r="[",ce++):(r=s,ge(E)),r!==s&&Ee()!==s&&(n=function(){var e,r,n,o,a=36*ce+16,i=de[a];return i?(ce=i.nextPos,i.result):(e=ce,(r=De())!==s&&Ee()!==s&&(n=function(){var e,r,n,o=36*ce+14,a=de[o];return a?(ce=a.nextPos,a.result):(e=ce,33===t.charCodeAt(ce)?(r="!",ce++):(r=s,ge(v)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(C)),n!==s?(r=P(r),e=r):(ce=e,e=s)):(ce=e,e=s),de[o]={nextPos:ce,result:e},e)}())!==s&&Ee()!==s?((o=function(){var e,r,n,o,a,i=36*ce+20,u=de[i];if(u)return ce=u.nextPos,u.result;if(e=ce,"type("===t.substr(ce,5)?(r="type(",ce+=5):(r=s,ge(q)),r!==s)if(Ee()!==s){if(n=[],V.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(G)),o!==s)for(;o!==s;)n.push(o),V.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(G));else n=s;n!==s&&(o=Ee())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(z)),a!==s?(r={type:"type",value:n.join("")},e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return de[i]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u=36*ce+22,l=de[u];if(l)return ce=l.nextPos,l.result;if(e=ce,47===t.charCodeAt(ce)?(r="/",ce++):(r=s,ge($)),r!==s){if(n=[],(o=Ie())===s&&(o=je())===s&&(o=Te()),o!==s)for(;o!==s;)n.push(o),(o=Ie())===s&&(o=je())===s&&(o=Te());else n=s;n!==s?(47===t.charCodeAt(ce)?(o="/",ce++):(o=s,ge($)),o!==s?((a=function(){var e,r,n=36*ce+21,o=de[n];if(o)return ce=o.nextPos,o.result;if(e=[],H.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(Y)),r!==s)for(;r!==s;)e.push(r),H.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(Y));else e=s;return de[n]={nextPos:ce,result:e},e}())===s&&(a=null),a!==s?(i=a,r={type:"regexp",value:new RegExp(n.join(""),i?i.join(""):"")},e=r):(ce=e,e=s)):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return de[u]={nextPos:ce,result:e},e}()),o!==s?(r=I(r,n,o),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=De())!==s&&Ee()!==s&&(n=function(){var e,r,n,o=36*ce+13,a=de[o];return a?(ce=a.nextPos,a.result):(e=ce,S.test(t.charAt(ce))?(r=t.charAt(ce),ce++):(r=s,ge(_)),r===s&&(r=null),r!==s?(61===t.charCodeAt(ce)?(n="=",ce++):(n=s,ge(C)),n!==s?(r=P(r),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(w.test(t.charAt(ce))?(e=t.charAt(ce),ce++):(e=s,ge(k))),de[o]={nextPos:ce,result:e},e)}())!==s&&Ee()!==s?((o=function(){var e,r,n,o,a,i,u=36*ce+17,l=de[u];if(l)return ce=l.nextPos,l.result;if(e=ce,34===t.charCodeAt(ce)?(r='"',ce++):(r=s,ge(j)),r!==s){for(n=[],T.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(F)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));o!==s;)n.push(o),T.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(F)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));n!==s?(34===t.charCodeAt(ce)?(o='"',ce++):(o=s,ge(j)),o!==s?(r=M(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;if(e===s)if(e=ce,39===t.charCodeAt(ce)?(r="'",ce++):(r=s,ge(B)),r!==s){for(n=[],U.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(K)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));o!==s;)n.push(o),U.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(K)),o===s&&(o=ce,92===t.charCodeAt(ce)?(a="\\",ce++):(a=s,ge(R)),a!==s?(t.length>ce?(i=t.charAt(ce),ce++):(i=s,ge(O)),i!==s?(a=L(a,i),o=a):(ce=o,o=s)):(ce=o,o=s));n!==s?(39===t.charCodeAt(ce)?(o="'",ce++):(o=s,ge(B)),o!==s?(r=M(n),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return de[u]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,r,n,o,a,i,u,l=36*ce+18,c=de[l];if(c)return ce=c.nextPos,c.result;for(e=ce,r=ce,n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));if(n!==s?(46===t.charCodeAt(ce)?(o=".",ce++):(o=s,ge(D)),o!==s?r=n=[n,o]:(ce=r,r=s)):(ce=r,r=s),r===s&&(r=null),r!==s){if(n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));else n=s;n!==s?(i=n,u=(a=r)?[].concat.apply([],a).join(""):"",r={type:"literal",value:parseFloat(u+i.join(""))},e=r):(ce=e,e=s)}else ce=e,e=s;return de[l]={nextPos:ce,result:e},e}())===s&&(o=function(){var e,t,r=36*ce+19,n=de[r];return n?(ce=n.nextPos,n.result):((t=be())!==s&&(t={type:"literal",value:t}),e=t,de[r]={nextPos:ce,result:e},e)}()),o!==s?(r=I(r,n,o),e=r):(ce=e,e=s)):(ce=e,e=s),e===s&&(e=ce,(r=De())!==s&&(r={type:"attribute",name:r}),e=r)),de[a]={nextPos:ce,result:e},e)}())!==s&&Ee()!==s?(93===t.charCodeAt(ce)?(o="]",ce++):(o=s,ge(b)),o!==s?e=r=n:(ce=e,e=s)):(ce=e,e=s),de[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i,u,l,c=36*ce+26,f=de[c];if(f)return ce=f.nextPos,f.result;if(e=ce,46===t.charCodeAt(ce)?(r=".",ce++):(r=s,ge(D)),r!==s)if((n=be())!==s){for(o=[],a=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(D)),i!==s&&(u=be())!==s?a=i=[i,u]:(ce=a,a=s);a!==s;)o.push(a),a=ce,46===t.charCodeAt(ce)?(i=".",ce++):(i=s,ge(D)),i!==s&&(u=be())!==s?a=i=[i,u]:(ce=a,a=s);o!==s?(l=n,r={type:"field",name:o.reduce((function(e,t){return e+t[0]+t[1]}),l)},e=r):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return de[c]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o,a=36*ce+27,i=de[a];return i?(ce=i.nextPos,i.result):(e=ce,":not("===t.substr(ce,5)?(r=":not(",ce+=5):(r=s,ge(ee)),r!==s&&Ee()!==s&&(n=_e())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?e=r={type:"not",selectors:n}:(ce=e,e=s)):(ce=e,e=s),de[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+28,i=de[a];return i?(ce=i.nextPos,i.result):(e=ce,":matches("===t.substr(ce,9)?(r=":matches(",ce+=9):(r=s,ge(te)),r!==s&&Ee()!==s&&(n=_e())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?(r=re(n),e=r):(ce=e,e=s)):(ce=e,e=s),de[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+29,i=de[a];return i?(ce=i.nextPos,i.result):(e=ce,":is("===t.substr(ce,4)?(r=":is(",ce+=4):(r=s,ge(ne)),r!==s&&Ee()!==s&&(n=_e())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?(r=re(n),e=r):(ce=e,e=s)):(ce=e,e=s),de[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a=36*ce+30,i=de[a];return i?(ce=i.nextPos,i.result):(e=ce,":has("===t.substr(ce,5)?(r=":has(",ce+=5):(r=s,ge(oe)),r!==s&&Ee()!==s&&(n=function(){var e,r,n,o,a,i,u,l,c=36*ce+4,f=de[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=Ce())!==s){for(n=[],o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Ce())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);o!==s;)n.push(o),o=ce,(a=Ee())!==s?(44===t.charCodeAt(ce)?(i=",",ce++):(i=s,ge(m)),i!==s&&(u=Ee())!==s&&(l=Ce())!==s?o=a=[a,i,u,l]:(ce=o,o=s)):(ce=o,o=s);n!==s?e=r=x(r,n):(ce=e,e=s)}else ce=e,e=s;return de[c]={nextPos:ce,result:e},e}())!==s&&Ee()!==s?(41===t.charCodeAt(ce)?(o=")",ce++):(o=s,ge(z)),o!==s?e=r={type:"has",selectors:n}:(ce=e,e=s)):(ce=e,e=s),de[a]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=36*ce+31,o=de[n];return o?(ce=o.nextPos,o.result):(":first-child"===t.substr(ce,12)?(r=":first-child",ce+=12):(r=s,ge(ae)),r!==s&&(r=Fe(1)),e=r,de[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n=36*ce+32,o=de[n];return o?(ce=o.nextPos,o.result):(":last-child"===t.substr(ce,11)?(r=":last-child",ce+=11):(r=s,ge(ie)),r!==s&&(r=Re(1)),e=r,de[n]={nextPos:ce,result:e},e)}())===s&&(e=function(){var e,r,n,o,a,i=36*ce+33,u=de[i];if(u)return ce=u.nextPos,u.result;if(e=ce,":nth-child("===t.substr(ce,11)?(r=":nth-child(",ce+=11):(r=s,ge(se)),r!==s)if(Ee()!==s){if(n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));else n=s;n!==s&&(o=Ee())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(z)),a!==s?(r=Fe(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return de[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o,a,i=36*ce+34,u=de[i];if(u)return ce=u.nextPos,u.result;if(e=ce,":nth-last-child("===t.substr(ce,16)?(r=":nth-last-child(",ce+=16):(r=s,ge(ue)),r!==s)if(Ee()!==s){if(n=[],N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W)),o!==s)for(;o!==s;)n.push(o),N.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(W));else n=s;n!==s&&(o=Ee())!==s?(41===t.charCodeAt(ce)?(a=")",ce++):(a=s,ge(z)),a!==s?(r=Re(parseInt(n.join(""),10)),e=r):(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;else ce=e,e=s;return de[i]={nextPos:ce,result:e},e}())===s&&(e=function(){var e,r,n,o=36*ce+35,a=de[o];return a?(ce=a.nextPos,a.result):(e=ce,58===t.charCodeAt(ce)?(r=":",ce++):(r=s,ge(le)),r!==s&&(n=be())!==s?e=r={type:"class",name:n}:(ce=e,e=s),de[o]={nextPos:ce,result:e},e)}()),de[r]={nextPos:ce,result:e},e)}function De(){var e,r,n,o,a,i,u,l,c=36*ce+15,f=de[c];if(f)return ce=f.nextPos,f.result;if(e=ce,(r=be())!==s){for(n=[],o=ce,46===t.charCodeAt(ce)?(a=".",ce++):(a=s,ge(D)),a!==s&&(i=be())!==s?o=a=[a,i]:(ce=o,o=s);o!==s;)n.push(o),o=ce,46===t.charCodeAt(ce)?(a=".",ce++):(a=s,ge(D)),a!==s&&(i=be())!==s?o=a=[a,i]:(ce=o,o=s);n!==s?(u=r,l=n,e=r=[].concat.apply([u],l).join("")):(ce=e,e=s)}else ce=e,e=s;return de[c]={nextPos:ce,result:e},e}function Ie(){var e,r,n,o,a=36*ce+23,i=de[a];if(i)return ce=i.nextPos,i.result;if(e=ce,91===t.charCodeAt(ce)?(r="[",ce++):(r=s,ge(E)),r!==s){if(n=[],J.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(Q)),o===s&&(o=je()),o!==s)for(;o!==s;)n.push(o),J.test(t.charAt(ce))?(o=t.charAt(ce),ce++):(o=s,ge(Q)),o===s&&(o=je());else n=s;n!==s?(93===t.charCodeAt(ce)?(o="]",ce++):(o=s,ge(b)),o!==s?e=r="["+n.join("")+"]":(ce=e,e=s)):(ce=e,e=s)}else ce=e,e=s;return de[a]={nextPos:ce,result:e},e}function je(){var e,r,n,o=36*ce+24,a=de[o];return a?(ce=a.nextPos,a.result):(e=ce,92===t.charCodeAt(ce)?(r="\\",ce++):(r=s,ge(R)),r!==s?(t.length>ce?(n=t.charAt(ce),ce++):(n=s,ge(O)),n!==s?e=r="\\"+n:(ce=e,e=s)):(ce=e,e=s),de[o]={nextPos:ce,result:e},e)}function Te(){var e,r,n,o=36*ce+25,a=de[o];if(a)return ce=a.nextPos,a.result;if(r=[],X.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(Z)),n!==s)for(;n!==s;)r.push(n),X.test(t.charAt(ce))?(n=t.charAt(ce),ce++):(n=s,ge(Z));else r=s;return r!==s&&(r=r.join("")),e=r,de[o]={nextPos:ce,result:e},e}function Fe(e){return{type:"nth-child",index:{type:"literal",value:e}}}function Re(e){return{type:"nth-last-child",index:{type:"literal",value:e}}}if((n=l())!==s&&ce===t.length)return n;throw n!==s&&ce0&&p(e,t,r))&&f(t[0],t.slice(1),r)};case"descendant":var h=c(e.left),x=c(e.right);return function(e,t,r){if(x(e,t,r))for(var n=0,o=t.length;n":return function(t){return u(t,v)>e.value.value};case">=":return function(t){return u(t,v)>=e.value.value}}throw new Error("Unknown operator: ".concat(e.operator));case"sibling":var E=c(e.left),b=c(e.right);return function(t,r,n){return b(t,r,n)&&d(t,E,r,"LEFT_SIDE",n)||e.left.subject&&E(t,r,n)&&d(t,b,r,"RIGHT_SIDE",n)};case"adjacent":var S=c(e.left),_=c(e.right);return function(t,r,n){return _(t,r,n)&&y(t,S,r,"LEFT_SIDE",n)||e.right.subject&&S(t,r,n)&&y(t,_,r,"RIGHT_SIDE",n)};case"nth-child":var C=e.index.value,P=c(e.right);return function(e,t,r){return P(e,t,r)&&m(e,t,C,r)};case"nth-last-child":var w=-e.index.value,k=c(e.right);return function(e,t,r){return k(e,t,r)&&m(e,t,w,r)};case"class":var D=e.name.toLowerCase();return function(t,r,n){if(n&&n.matchClass)return n.matchClass(e.name,t,r);if(n&&n.nodeTypeKey)return!1;switch(D){case"statement":if("Statement"===t.type.slice(-9))return!0;case"declaration":return"Declaration"===t.type.slice(-11);case"pattern":if("Pattern"===t.type.slice(-7))return!0;case"expression":return"Expression"===t.type.slice(-10)||"Literal"===t.type.slice(-7)||"Identifier"===t.type&&(0===r.length||"MetaProperty"!==r[0].type)||"MetaProperty"===t.type;case"function":return"FunctionDeclaration"===t.type||"FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type}throw new Error("Unknown class name: ".concat(e.name))}}throw new Error("Unknown selector type: ".concat(e.type))}function p(e,t){var r=t&&t.nodeTypeKey||"type",n=e[r];return t&&t.visitorKeys&&t.visitorKeys[n]?t.visitorKeys[n]:i.VisitorKeys[n]?i.VisitorKeys[n]:t&&"function"==typeof t.fallback?t.fallback(e):Object.keys(e).filter((function(e){return e!==r}))}function h(e,t){var r=t&&t.nodeTypeKey||"type";return null!==e&&"object"===n(e)&&"string"==typeof e[r]}function d(e,r,n,o,a){var i=t(n,1)[0];if(!i)return!1;for(var s=p(i,a),u=0;u0&&h(l[c-1],a)&&r(l[c-1],n,a))return!0;if("RIGHT_SIDE"===o&&c=0&&l\n Copyright (C) 2012 Ariya Hidayat \n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*jslint vars:false, bitwise:true*/\n/*jshint indent:4*/\n/*global exports:true*/\n(function clone(exports) {\n 'use strict';\n\n var Syntax,\n VisitorOption,\n VisitorKeys,\n BREAK,\n SKIP,\n REMOVE;\n\n function deepCopy(obj) {\n var ret = {}, key, val;\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n val = obj[key];\n if (typeof val === 'object' && val !== null) {\n ret[key] = deepCopy(val);\n } else {\n ret[key] = val;\n }\n }\n }\n return ret;\n }\n\n // based on LLVM libc++ upper_bound / lower_bound\n // MIT License\n\n function upperBound(array, func) {\n var diff, len, i, current;\n\n len = array.length;\n i = 0;\n\n while (len) {\n diff = len >>> 1;\n current = i + diff;\n if (func(array[current])) {\n len = diff;\n } else {\n i = current + 1;\n len -= diff + 1;\n }\n }\n return i;\n }\n\n Syntax = {\n AssignmentExpression: 'AssignmentExpression',\n AssignmentPattern: 'AssignmentPattern',\n ArrayExpression: 'ArrayExpression',\n ArrayPattern: 'ArrayPattern',\n ArrowFunctionExpression: 'ArrowFunctionExpression',\n AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7.\n BlockStatement: 'BlockStatement',\n BinaryExpression: 'BinaryExpression',\n BreakStatement: 'BreakStatement',\n CallExpression: 'CallExpression',\n CatchClause: 'CatchClause',\n ChainExpression: 'ChainExpression',\n ClassBody: 'ClassBody',\n ClassDeclaration: 'ClassDeclaration',\n ClassExpression: 'ClassExpression',\n ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7.\n ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7.\n ConditionalExpression: 'ConditionalExpression',\n ContinueStatement: 'ContinueStatement',\n DebuggerStatement: 'DebuggerStatement',\n DirectiveStatement: 'DirectiveStatement',\n DoWhileStatement: 'DoWhileStatement',\n EmptyStatement: 'EmptyStatement',\n ExportAllDeclaration: 'ExportAllDeclaration',\n ExportDefaultDeclaration: 'ExportDefaultDeclaration',\n ExportNamedDeclaration: 'ExportNamedDeclaration',\n ExportSpecifier: 'ExportSpecifier',\n ExpressionStatement: 'ExpressionStatement',\n ForStatement: 'ForStatement',\n ForInStatement: 'ForInStatement',\n ForOfStatement: 'ForOfStatement',\n FunctionDeclaration: 'FunctionDeclaration',\n FunctionExpression: 'FunctionExpression',\n GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7.\n Identifier: 'Identifier',\n IfStatement: 'IfStatement',\n ImportExpression: 'ImportExpression',\n ImportDeclaration: 'ImportDeclaration',\n ImportDefaultSpecifier: 'ImportDefaultSpecifier',\n ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',\n ImportSpecifier: 'ImportSpecifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n MetaProperty: 'MetaProperty',\n MethodDefinition: 'MethodDefinition',\n ModuleSpecifier: 'ModuleSpecifier',\n NewExpression: 'NewExpression',\n ObjectExpression: 'ObjectExpression',\n ObjectPattern: 'ObjectPattern',\n PrivateIdentifier: 'PrivateIdentifier',\n Program: 'Program',\n Property: 'Property',\n PropertyDefinition: 'PropertyDefinition',\n RestElement: 'RestElement',\n ReturnStatement: 'ReturnStatement',\n SequenceExpression: 'SequenceExpression',\n SpreadElement: 'SpreadElement',\n Super: 'Super',\n SwitchStatement: 'SwitchStatement',\n SwitchCase: 'SwitchCase',\n TaggedTemplateExpression: 'TaggedTemplateExpression',\n TemplateElement: 'TemplateElement',\n TemplateLiteral: 'TemplateLiteral',\n ThisExpression: 'ThisExpression',\n ThrowStatement: 'ThrowStatement',\n TryStatement: 'TryStatement',\n UnaryExpression: 'UnaryExpression',\n UpdateExpression: 'UpdateExpression',\n VariableDeclaration: 'VariableDeclaration',\n VariableDeclarator: 'VariableDeclarator',\n WhileStatement: 'WhileStatement',\n WithStatement: 'WithStatement',\n YieldExpression: 'YieldExpression'\n };\n\n VisitorKeys = {\n AssignmentExpression: ['left', 'right'],\n AssignmentPattern: ['left', 'right'],\n ArrayExpression: ['elements'],\n ArrayPattern: ['elements'],\n ArrowFunctionExpression: ['params', 'body'],\n AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7.\n BlockStatement: ['body'],\n BinaryExpression: ['left', 'right'],\n BreakStatement: ['label'],\n CallExpression: ['callee', 'arguments'],\n CatchClause: ['param', 'body'],\n ChainExpression: ['expression'],\n ClassBody: ['body'],\n ClassDeclaration: ['id', 'superClass', 'body'],\n ClassExpression: ['id', 'superClass', 'body'],\n ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7.\n ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n ConditionalExpression: ['test', 'consequent', 'alternate'],\n ContinueStatement: ['label'],\n DebuggerStatement: [],\n DirectiveStatement: [],\n DoWhileStatement: ['body', 'test'],\n EmptyStatement: [],\n ExportAllDeclaration: ['source'],\n ExportDefaultDeclaration: ['declaration'],\n ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],\n ExportSpecifier: ['exported', 'local'],\n ExpressionStatement: ['expression'],\n ForStatement: ['init', 'test', 'update', 'body'],\n ForInStatement: ['left', 'right', 'body'],\n ForOfStatement: ['left', 'right', 'body'],\n FunctionDeclaration: ['id', 'params', 'body'],\n FunctionExpression: ['id', 'params', 'body'],\n GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7.\n Identifier: [],\n IfStatement: ['test', 'consequent', 'alternate'],\n ImportExpression: ['source'],\n ImportDeclaration: ['specifiers', 'source'],\n ImportDefaultSpecifier: ['local'],\n ImportNamespaceSpecifier: ['local'],\n ImportSpecifier: ['imported', 'local'],\n Literal: [],\n LabeledStatement: ['label', 'body'],\n LogicalExpression: ['left', 'right'],\n MemberExpression: ['object', 'property'],\n MetaProperty: ['meta', 'property'],\n MethodDefinition: ['key', 'value'],\n ModuleSpecifier: [],\n NewExpression: ['callee', 'arguments'],\n ObjectExpression: ['properties'],\n ObjectPattern: ['properties'],\n PrivateIdentifier: [],\n Program: ['body'],\n Property: ['key', 'value'],\n PropertyDefinition: ['key', 'value'],\n RestElement: [ 'argument' ],\n ReturnStatement: ['argument'],\n SequenceExpression: ['expressions'],\n SpreadElement: ['argument'],\n Super: [],\n SwitchStatement: ['discriminant', 'cases'],\n SwitchCase: ['test', 'consequent'],\n TaggedTemplateExpression: ['tag', 'quasi'],\n TemplateElement: [],\n TemplateLiteral: ['quasis', 'expressions'],\n ThisExpression: [],\n ThrowStatement: ['argument'],\n TryStatement: ['block', 'handler', 'finalizer'],\n UnaryExpression: ['argument'],\n UpdateExpression: ['argument'],\n VariableDeclaration: ['declarations'],\n VariableDeclarator: ['id', 'init'],\n WhileStatement: ['test', 'body'],\n WithStatement: ['object', 'body'],\n YieldExpression: ['argument']\n };\n\n // unique id\n BREAK = {};\n SKIP = {};\n REMOVE = {};\n\n VisitorOption = {\n Break: BREAK,\n Skip: SKIP,\n Remove: REMOVE\n };\n\n function Reference(parent, key) {\n this.parent = parent;\n this.key = key;\n }\n\n Reference.prototype.replace = function replace(node) {\n this.parent[this.key] = node;\n };\n\n Reference.prototype.remove = function remove() {\n if (Array.isArray(this.parent)) {\n this.parent.splice(this.key, 1);\n return true;\n } else {\n this.replace(null);\n return false;\n }\n };\n\n function Element(node, path, wrap, ref) {\n this.node = node;\n this.path = path;\n this.wrap = wrap;\n this.ref = ref;\n }\n\n function Controller() { }\n\n // API:\n // return property path array from root to current node\n Controller.prototype.path = function path() {\n var i, iz, j, jz, result, element;\n\n function addToPath(result, path) {\n if (Array.isArray(path)) {\n for (j = 0, jz = path.length; j < jz; ++j) {\n result.push(path[j]);\n }\n } else {\n result.push(path);\n }\n }\n\n // root node\n if (!this.__current.path) {\n return null;\n }\n\n // first node is sentinel, second node is root element\n result = [];\n for (i = 2, iz = this.__leavelist.length; i < iz; ++i) {\n element = this.__leavelist[i];\n addToPath(result, element.path);\n }\n addToPath(result, this.__current.path);\n return result;\n };\n\n // API:\n // return type of current node\n Controller.prototype.type = function () {\n var node = this.current();\n return node.type || this.__current.wrap;\n };\n\n // API:\n // return array of parent elements\n Controller.prototype.parents = function parents() {\n var i, iz, result;\n\n // first node is sentinel\n result = [];\n for (i = 1, iz = this.__leavelist.length; i < iz; ++i) {\n result.push(this.__leavelist[i].node);\n }\n\n return result;\n };\n\n // API:\n // return current node\n Controller.prototype.current = function current() {\n return this.__current.node;\n };\n\n Controller.prototype.__execute = function __execute(callback, element) {\n var previous, result;\n\n result = undefined;\n\n previous = this.__current;\n this.__current = element;\n this.__state = null;\n if (callback) {\n result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node);\n }\n this.__current = previous;\n\n return result;\n };\n\n // API:\n // notify control skip / break\n Controller.prototype.notify = function notify(flag) {\n this.__state = flag;\n };\n\n // API:\n // skip child nodes of current node\n Controller.prototype.skip = function () {\n this.notify(SKIP);\n };\n\n // API:\n // break traversals\n Controller.prototype['break'] = function () {\n this.notify(BREAK);\n };\n\n // API:\n // remove node\n Controller.prototype.remove = function () {\n this.notify(REMOVE);\n };\n\n Controller.prototype.__initialize = function(root, visitor) {\n this.visitor = visitor;\n this.root = root;\n this.__worklist = [];\n this.__leavelist = [];\n this.__current = null;\n this.__state = null;\n this.__fallback = null;\n if (visitor.fallback === 'iteration') {\n this.__fallback = Object.keys;\n } else if (typeof visitor.fallback === 'function') {\n this.__fallback = visitor.fallback;\n }\n\n this.__keys = VisitorKeys;\n if (visitor.keys) {\n this.__keys = Object.assign(Object.create(this.__keys), visitor.keys);\n }\n };\n\n function isNode(node) {\n if (node == null) {\n return false;\n }\n return typeof node === 'object' && typeof node.type === 'string';\n }\n\n function isProperty(nodeType, key) {\n return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;\n }\n \n function candidateExistsInLeaveList(leavelist, candidate) {\n for (var i = leavelist.length - 1; i >= 0; --i) {\n if (leavelist[i].node === candidate) {\n return true;\n }\n }\n return false;\n }\n\n Controller.prototype.traverse = function traverse(root, visitor) {\n var worklist,\n leavelist,\n element,\n node,\n nodeType,\n ret,\n key,\n current,\n current2,\n candidates,\n candidate,\n sentinel;\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n worklist.push(new Element(root, null, null, null));\n leavelist.push(new Element(null, null, null, null));\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n ret = this.__execute(visitor.leave, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n continue;\n }\n\n if (element.node) {\n\n ret = this.__execute(visitor.enter, element);\n\n if (this.__state === BREAK || ret === BREAK) {\n return;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || ret === SKIP) {\n continue;\n }\n\n node = element.node;\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n\n if (candidateExistsInLeaveList(leavelist, candidate[current2])) {\n continue;\n }\n\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', null);\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, null);\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n if (candidateExistsInLeaveList(leavelist, candidate)) {\n continue;\n }\n\n worklist.push(new Element(candidate, key, null, null));\n }\n }\n }\n }\n };\n\n Controller.prototype.replace = function replace(root, visitor) {\n var worklist,\n leavelist,\n node,\n nodeType,\n target,\n element,\n current,\n current2,\n candidates,\n candidate,\n sentinel,\n outer,\n key;\n\n function removeElem(element) {\n var i,\n key,\n nextElem,\n parent;\n\n if (element.ref.remove()) {\n // When the reference is an element of an array.\n key = element.ref.key;\n parent = element.ref.parent;\n\n // If removed from array, then decrease following items' keys.\n i = worklist.length;\n while (i--) {\n nextElem = worklist[i];\n if (nextElem.ref && nextElem.ref.parent === parent) {\n if (nextElem.ref.key < key) {\n break;\n }\n --nextElem.ref.key;\n }\n }\n }\n }\n\n this.__initialize(root, visitor);\n\n sentinel = {};\n\n // reference\n worklist = this.__worklist;\n leavelist = this.__leavelist;\n\n // initialize\n outer = {\n root: root\n };\n element = new Element(root, null, null, new Reference(outer, 'root'));\n worklist.push(element);\n leavelist.push(element);\n\n while (worklist.length) {\n element = worklist.pop();\n\n if (element === sentinel) {\n element = leavelist.pop();\n\n target = this.__execute(visitor.leave, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n continue;\n }\n\n target = this.__execute(visitor.enter, element);\n\n // node may be replaced with null,\n // so distinguish between undefined and null in this place\n if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) {\n // replace\n element.ref.replace(target);\n element.node = target;\n }\n\n if (this.__state === REMOVE || target === REMOVE) {\n removeElem(element);\n element.node = null;\n }\n\n if (this.__state === BREAK || target === BREAK) {\n return outer.root;\n }\n\n // node may be null\n node = element.node;\n if (!node) {\n continue;\n }\n\n worklist.push(sentinel);\n leavelist.push(element);\n\n if (this.__state === SKIP || target === SKIP) {\n continue;\n }\n\n nodeType = node.type || element.wrap;\n candidates = this.__keys[nodeType];\n if (!candidates) {\n if (this.__fallback) {\n candidates = this.__fallback(node);\n } else {\n throw new Error('Unknown node type ' + nodeType + '.');\n }\n }\n\n current = candidates.length;\n while ((current -= 1) >= 0) {\n key = candidates[current];\n candidate = node[key];\n if (!candidate) {\n continue;\n }\n\n if (Array.isArray(candidate)) {\n current2 = candidate.length;\n while ((current2 -= 1) >= 0) {\n if (!candidate[current2]) {\n continue;\n }\n if (isProperty(nodeType, candidates[current])) {\n element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2));\n } else if (isNode(candidate[current2])) {\n element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2));\n } else {\n continue;\n }\n worklist.push(element);\n }\n } else if (isNode(candidate)) {\n worklist.push(new Element(candidate, key, null, new Reference(node, key)));\n }\n }\n }\n\n return outer.root;\n };\n\n function traverse(root, visitor) {\n var controller = new Controller();\n return controller.traverse(root, visitor);\n }\n\n function replace(root, visitor) {\n var controller = new Controller();\n return controller.replace(root, visitor);\n }\n\n function extendCommentRange(comment, tokens) {\n var target;\n\n target = upperBound(tokens, function search(token) {\n return token.range[0] > comment.range[0];\n });\n\n comment.extendedRange = [comment.range[0], comment.range[1]];\n\n if (target !== tokens.length) {\n comment.extendedRange[1] = tokens[target].range[0];\n }\n\n target -= 1;\n if (target >= 0) {\n comment.extendedRange[0] = tokens[target].range[1];\n }\n\n return comment;\n }\n\n function attachComments(tree, providedComments, tokens) {\n // At first, we should calculate extended comment ranges.\n var comments = [], comment, len, i, cursor;\n\n if (!tree.range) {\n throw new Error('attachComments needs range information');\n }\n\n // tokens array is empty, we attach comments to tree as 'leadingComments'\n if (!tokens.length) {\n if (providedComments.length) {\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comment = deepCopy(providedComments[i]);\n comment.extendedRange = [0, tree.range[0]];\n comments.push(comment);\n }\n tree.leadingComments = comments;\n }\n return tree;\n }\n\n for (i = 0, len = providedComments.length; i < len; i += 1) {\n comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens));\n }\n\n // This is based on John Freeman's implementation.\n cursor = 0;\n traverse(tree, {\n enter: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (comment.extendedRange[1] > node.range[0]) {\n break;\n }\n\n if (comment.extendedRange[1] === node.range[0]) {\n if (!node.leadingComments) {\n node.leadingComments = [];\n }\n node.leadingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n cursor = 0;\n traverse(tree, {\n leave: function (node) {\n var comment;\n\n while (cursor < comments.length) {\n comment = comments[cursor];\n if (node.range[1] < comment.extendedRange[0]) {\n break;\n }\n\n if (node.range[1] === comment.extendedRange[0]) {\n if (!node.trailingComments) {\n node.trailingComments = [];\n }\n node.trailingComments.push(comment);\n comments.splice(cursor, 1);\n } else {\n cursor += 1;\n }\n }\n\n // already out of owned node\n if (cursor === comments.length) {\n return VisitorOption.Break;\n }\n\n if (comments[cursor].extendedRange[0] > node.range[1]) {\n return VisitorOption.Skip;\n }\n }\n });\n\n return tree;\n }\n\n exports.Syntax = Syntax;\n exports.traverse = traverse;\n exports.replace = replace;\n exports.attachComments = attachComments;\n exports.VisitorKeys = VisitorKeys;\n exports.VisitorOption = VisitorOption;\n exports.Controller = Controller;\n exports.cloneEnvironment = function () { return clone({}); };\n\n return exports;\n}(exports));\n/* vim: set sw=4 ts=4 et tw=80 : */\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n(function(root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n }\n})(this, function() {\n \"use strict\";\n\n function peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n }\n\n function peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n }\n\n peg$subclass(peg$SyntaxError, Error);\n\n peg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n };\n\n function peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { start: peg$parsestart },\n peg$startRuleFunction = peg$parsestart,\n\n peg$c0 = function(ss) {\n return ss.length === 1 ? ss[0] : { type: 'matches', selectors: ss };\n },\n peg$c1 = function() { return void 0; },\n peg$c2 = \" \",\n peg$c3 = peg$literalExpectation(\" \", false),\n peg$c4 = /^[^ [\\],():#!=><~+.]/,\n peg$c5 = peg$classExpectation([\" \", \"[\", \"]\", \",\", \"(\", \")\", \":\", \"#\", \"!\", \"=\", \">\", \"<\", \"~\", \"+\", \".\"], true, false),\n peg$c6 = function(i) { return i.join(''); },\n peg$c7 = \">\",\n peg$c8 = peg$literalExpectation(\">\", false),\n peg$c9 = function() { return 'child'; },\n peg$c10 = \"~\",\n peg$c11 = peg$literalExpectation(\"~\", false),\n peg$c12 = function() { return 'sibling'; },\n peg$c13 = \"+\",\n peg$c14 = peg$literalExpectation(\"+\", false),\n peg$c15 = function() { return 'adjacent'; },\n peg$c16 = function() { return 'descendant'; },\n peg$c17 = \",\",\n peg$c18 = peg$literalExpectation(\",\", false),\n peg$c19 = function(s, ss) {\n return [s].concat(ss.map(function (s) { return s[3]; }));\n },\n peg$c20 = function(op, s) {\n if (!op) return s;\n return { type: op, left: { type: 'exactNode' }, right: s };\n },\n peg$c21 = function(a, ops) {\n return ops.reduce(function (memo, rhs) {\n return { type: rhs[0], left: memo, right: rhs[1] };\n }, a);\n },\n peg$c22 = \"!\",\n peg$c23 = peg$literalExpectation(\"!\", false),\n peg$c24 = function(subject, as) {\n const b = as.length === 1 ? as[0] : { type: 'compound', selectors: as };\n if(subject) b.subject = true;\n return b;\n },\n peg$c25 = \"*\",\n peg$c26 = peg$literalExpectation(\"*\", false),\n peg$c27 = function(a) { return { type: 'wildcard', value: a }; },\n peg$c28 = \"#\",\n peg$c29 = peg$literalExpectation(\"#\", false),\n peg$c30 = function(i) { return { type: 'identifier', value: i }; },\n peg$c31 = \"[\",\n peg$c32 = peg$literalExpectation(\"[\", false),\n peg$c33 = \"]\",\n peg$c34 = peg$literalExpectation(\"]\", false),\n peg$c35 = function(v) { return v; },\n peg$c36 = /^[>\", \"<\", \"!\"], false, false),\n peg$c38 = \"=\",\n peg$c39 = peg$literalExpectation(\"=\", false),\n peg$c40 = function(a) { return (a || '') + '='; },\n peg$c41 = /^[><]/,\n peg$c42 = peg$classExpectation([\">\", \"<\"], false, false),\n peg$c43 = \".\",\n peg$c44 = peg$literalExpectation(\".\", false),\n peg$c45 = function(a, as) {\n return [].concat.apply([a], as).join('');\n },\n peg$c46 = function(name, op, value) {\n return { type: 'attribute', name: name, operator: op, value: value };\n },\n peg$c47 = function(name) { return { type: 'attribute', name: name }; },\n peg$c48 = \"\\\"\",\n peg$c49 = peg$literalExpectation(\"\\\"\", false),\n peg$c50 = /^[^\\\\\"]/,\n peg$c51 = peg$classExpectation([\"\\\\\", \"\\\"\"], true, false),\n peg$c52 = \"\\\\\",\n peg$c53 = peg$literalExpectation(\"\\\\\", false),\n peg$c54 = peg$anyExpectation(),\n peg$c55 = function(a, b) { return a + b; },\n peg$c56 = function(d) {\n return { type: 'literal', value: strUnescape(d.join('')) };\n },\n peg$c57 = \"'\",\n peg$c58 = peg$literalExpectation(\"'\", false),\n peg$c59 = /^[^\\\\']/,\n peg$c60 = peg$classExpectation([\"\\\\\", \"'\"], true, false),\n peg$c61 = /^[0-9]/,\n peg$c62 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c63 = function(a, b) {\n // Can use `a.flat().join('')` once supported\n const leadingDecimals = a ? [].concat.apply([], a).join('') : '';\n return { type: 'literal', value: parseFloat(leadingDecimals + b.join('')) };\n },\n peg$c64 = function(i) { return { type: 'literal', value: i }; },\n peg$c65 = \"type(\",\n peg$c66 = peg$literalExpectation(\"type(\", false),\n peg$c67 = /^[^ )]/,\n peg$c68 = peg$classExpectation([\" \", \")\"], true, false),\n peg$c69 = \")\",\n peg$c70 = peg$literalExpectation(\")\", false),\n peg$c71 = function(t) { return { type: 'type', value: t.join('') }; },\n peg$c72 = /^[imsu]/,\n peg$c73 = peg$classExpectation([\"i\", \"m\", \"s\", \"u\"], false, false),\n peg$c74 = \"/\",\n peg$c75 = peg$literalExpectation(\"/\", false),\n peg$c76 = function(pattern, flgs) {\n return {\n type: 'regexp', value: new RegExp(pattern.join(''), flgs ? flgs.join('') : '')\n };\n },\n peg$c77 = /^[^\\]\\\\]/,\n peg$c78 = peg$classExpectation([\"]\", \"\\\\\"], true, false),\n peg$c79 = function(cs) { return '[' + cs.join('') + ']'; },\n peg$c80 = function(a) { return '\\\\' + a; },\n peg$c81 = /^[^\\/\\\\[]/,\n peg$c82 = peg$classExpectation([\"/\", \"\\\\\", \"[\"], true, false),\n peg$c83 = function(cs) { return cs.join(''); },\n peg$c84 = function(i, is) {\n return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)};\n },\n peg$c85 = \":not(\",\n peg$c86 = peg$literalExpectation(\":not(\", false),\n peg$c87 = function(ss) { return { type: 'not', selectors: ss }; },\n peg$c88 = \":matches(\",\n peg$c89 = peg$literalExpectation(\":matches(\", false),\n peg$c90 = function(ss) { return { type: 'matches', selectors: ss }; },\n peg$c91 = \":is(\",\n peg$c92 = peg$literalExpectation(\":is(\", false),\n peg$c93 = \":has(\",\n peg$c94 = peg$literalExpectation(\":has(\", false),\n peg$c95 = function(ss) { return { type: 'has', selectors: ss }; },\n peg$c96 = \":first-child\",\n peg$c97 = peg$literalExpectation(\":first-child\", false),\n peg$c98 = function() { return nth(1); },\n peg$c99 = \":last-child\",\n peg$c100 = peg$literalExpectation(\":last-child\", false),\n peg$c101 = function() { return nthLast(1); },\n peg$c102 = \":nth-child(\",\n peg$c103 = peg$literalExpectation(\":nth-child(\", false),\n peg$c104 = function(n) { return nth(parseInt(n.join(''), 10)); },\n peg$c105 = \":nth-last-child(\",\n peg$c106 = peg$literalExpectation(\":nth-last-child(\", false),\n peg$c107 = function(n) { return nthLast(parseInt(n.join(''), 10)); },\n peg$c108 = \":\",\n peg$c109 = peg$literalExpectation(\":\", false),\n peg$c110 = function(c) {\n return { type: 'class', name: c };\n },\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$resultsCache = {},\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 0,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselectors();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1();\n }\n s0 = s1;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 1,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifierName() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 2,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c4.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c5); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c6(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsebinaryOp() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 3,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s2 = peg$c7;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c8); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c9();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 126) {\n s2 = peg$c10;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c13;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c14); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c15();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 32) {\n s1 = peg$c2;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c3); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16();\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 36 + 4,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsehasSelector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsehasSelector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselectors() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n var key = peg$currPos * 36 + 5,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseselector();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 44) {\n s5 = peg$c17;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c18); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n s7 = peg$parseselector();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c19(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehasSelector() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 6,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsebinaryOp();\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseselector();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseselector() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 7,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parsesequence();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parsebinaryOp();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsesequence();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c21(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsesequence() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 8,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parseatom();\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parseatom();\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseatom() {\n var s0;\n\n var key = peg$currPos * 36 + 9,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$parsewildcard();\n if (s0 === peg$FAILED) {\n s0 = peg$parseidentifier();\n if (s0 === peg$FAILED) {\n s0 = peg$parseattr();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefield();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenegation();\n if (s0 === peg$FAILED) {\n s0 = peg$parsematches();\n if (s0 === peg$FAILED) {\n s0 = peg$parseis();\n if (s0 === peg$FAILED) {\n s0 = peg$parsehas();\n if (s0 === peg$FAILED) {\n s0 = peg$parsefirstChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parselastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parsenthLastChild();\n if (s0 === peg$FAILED) {\n s0 = peg$parseclass();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsewildcard() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 10,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 42) {\n s1 = peg$c25;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c26); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c27(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseidentifier() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 11,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c28;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c29); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattr() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 12,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrValue();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s5 = peg$c33;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c35(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 13,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (peg$c36.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c37); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrEqOps() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 14,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 33) {\n s1 = peg$c22;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c23); }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s2 = peg$c38;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c39); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c40(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrName() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 15,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c43;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parseidentifierName();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c45(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseattrValue() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 16,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrEqOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetype();\n if (s5 === peg$FAILED) {\n s5 = peg$parseregex();\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseattrOps();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsestring();\n if (s5 === peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 === peg$FAILED) {\n s5 = peg$parsepath();\n }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c46(s1, s3, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseattrName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c47(s1);\n }\n s0 = s1;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsestring() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 17,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 34) {\n s1 = peg$c48;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c50.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c51); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 34) {\n s3 = peg$c48;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c49); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 39) {\n s1 = peg$c57;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c59.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c60); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s4 = peg$c52;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s4 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s5 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s3;\n s4 = peg$c55(s4, s5);\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 39) {\n s3 = peg$c57;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c58); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c56(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 18,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s3 = peg$c43;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c63(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsepath() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 19,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = peg$parseidentifierName();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c64(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsetype() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 20,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c65) {\n s1 = peg$c65;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c66); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c67.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c68); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c71(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseflags() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 21,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = [];\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c72.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c73); }\n }\n }\n } else {\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseregex() {\n var s0, s1, s2, s3, s4;\n\n var key = peg$currPos * 36 + 22,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 47) {\n s1 = peg$c74;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsere_character_class();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_chars();\n }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsere_character_class();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_chars();\n }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 47) {\n s3 = peg$c74;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c75); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parseflags();\n if (s4 === peg$FAILED) {\n s4 = null;\n }\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c76(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_character_class() {\n var s0, s1, s2, s3;\n\n var key = peg$currPos * 36 + 23,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 91) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c77.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c78); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c77.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c78); }\n }\n if (s3 === peg$FAILED) {\n s3 = peg$parsere_escape();\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 93) {\n s3 = peg$c33;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c79(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_escape() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 24,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s1 = peg$c52;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c53); }\n }\n if (s1 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c54); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c80(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsere_chars() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 25,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c81.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c82); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c81.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c82); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c83(s1);\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefield() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n var key = peg$currPos * 36 + 26,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c43;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s5 = peg$c43;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c44); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parseidentifierName();\n if (s6 !== peg$FAILED) {\n s5 = [s5, s6];\n s4 = s5;\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n } else {\n peg$currPos = s4;\n s4 = peg$FAILED;\n }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c84(s2, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenegation() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 27,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c85) {\n s1 = peg$c85;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c86); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c87(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsematches() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 28,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c88) {\n s1 = peg$c88;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c89); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseis() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 29,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 4) === peg$c91) {\n s1 = peg$c91;\n peg$currPos += 4;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c92); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseselectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c90(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsehas() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 30,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c93) {\n s1 = peg$c93;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c94); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsehasSelectors();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c95(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsefirstChild() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 31,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 12) === peg$c96) {\n s1 = peg$c96;\n peg$currPos += 12;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c97); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c98();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parselastChild() {\n var s0, s1;\n\n var key = peg$currPos * 36 + 32,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c99) {\n s1 = peg$c99;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c100); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c101();\n }\n s0 = s1;\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 33,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 11) === peg$c102) {\n s1 = peg$c102;\n peg$currPos += 11;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c103); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c104(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parsenthLastChild() {\n var s0, s1, s2, s3, s4, s5;\n\n var key = peg$currPos * 36 + 34,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 16) === peg$c105) {\n s1 = peg$c105;\n peg$currPos += 16;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c106); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = [];\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n if (s4 !== peg$FAILED) {\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n if (peg$c61.test(input.charAt(peg$currPos))) {\n s4 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c62); }\n }\n }\n } else {\n s3 = peg$FAILED;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s5 = peg$c69;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c70); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c107(s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n function peg$parseclass() {\n var s0, s1, s2;\n\n var key = peg$currPos * 36 + 35,\n cached = peg$resultsCache[key];\n\n if (cached) {\n peg$currPos = cached.nextPos;\n\n return cached.result;\n }\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 58) {\n s1 = peg$c108;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c109); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseidentifierName();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c110(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };\n\n return s0;\n }\n\n\n function nth(n) { return { type: 'nth-child', index: { type: 'literal', value: n } }; }\n function nthLast(n) { return { type: 'nth-last-child', index: { type: 'literal', value: n } }; }\n function strUnescape(s) {\n return s.replace(/\\\\(.)/g, function(match, ch) {\n switch(ch) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n default: return ch;\n }\n });\n }\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n }\n\n return {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n };\n});\n","/* vim: set sw=4 sts=4 : */\nimport estraverse from 'estraverse';\nimport parser from './parser.js';\n\n/**\n* @typedef {\"LEFT_SIDE\"|\"RIGHT_SIDE\"} Side\n*/\n\nconst LEFT_SIDE = 'LEFT_SIDE';\nconst RIGHT_SIDE = 'RIGHT_SIDE';\n\n/**\n * @external AST\n * @see https://esprima.readthedocs.io/en/latest/syntax-tree-format.html\n */\n\n/**\n * One of the rules of `grammar.pegjs`\n * @typedef {PlainObject} SelectorAST\n * @see grammar.pegjs\n*/\n\n/**\n * The `sequence` production of `grammar.pegjs`\n * @typedef {PlainObject} SelectorSequenceAST\n*/\n\n/**\n * Get the value of a property which may be multiple levels down\n * in the object.\n * @param {?PlainObject} obj\n * @param {string[]} keys\n * @returns {undefined|boolean|string|number|external:AST}\n */\nfunction getPath(obj, keys) {\n for (let i = 0; i < keys.length; ++i) {\n if (obj == null) { return obj; }\n obj = obj[keys[i]];\n }\n return obj;\n}\n\n/**\n * Determine whether `node` can be reached by following `path`,\n * starting at `ancestor`.\n * @param {?external:AST} node\n * @param {?external:AST} ancestor\n * @param {string[]} path\n * @param {Integer} fromPathIndex\n * @returns {boolean}\n */\nfunction inPath(node, ancestor, path, fromPathIndex) {\n let current = ancestor;\n for (let i = fromPathIndex; i < path.length; ++i) {\n if (current == null) {\n return false;\n }\n const field = current[path[i]];\n if (Array.isArray(field)) {\n for (let k = 0; k < field.length; ++k) {\n if (inPath(node, field[k], path, i + 1)) {\n return true;\n }\n }\n return false;\n }\n current = field;\n }\n return node === current;\n}\n\n/**\n * A generated matcher function for a selector.\n * @callback SelectorMatcher\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @returns {void}\n*/\n\n/**\n * A WeakMap for holding cached matcher functions for selectors.\n * @type {WeakMap}\n*/\nconst MATCHER_CACHE = typeof WeakMap === 'function' ? new WeakMap : null;\n\n/**\n * Look up a matcher function for `selector` in the cache.\n * If it does not exist, generate it with `generateMatcher` and add it to the cache.\n * In engines without WeakMap, the caching is skipped and matchers are generated with every call.\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction getMatcher(selector) {\n if (selector == null) {\n return () => true;\n }\n\n if (MATCHER_CACHE != null) {\n let matcher = MATCHER_CACHE.get(selector);\n if (matcher != null) {\n return matcher;\n }\n matcher = generateMatcher(selector);\n MATCHER_CACHE.set(selector, matcher);\n return matcher;\n }\n\n return generateMatcher(selector);\n}\n\n/**\n * Create a matcher function for `selector`,\n * @param {?SelectorAST} selector\n * @returns {SelectorMatcher}\n */\nfunction generateMatcher(selector) {\n switch(selector.type) {\n case 'wildcard':\n return () => true;\n\n case 'identifier': {\n const value = selector.value.toLowerCase();\n return (node, ancestry, options) => {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return value === node[nodeTypeKey].toLowerCase();\n };\n }\n\n case 'exactNode':\n return (node, ancestry) => {\n return ancestry.length === 0;\n };\n\n case 'field': {\n const path = selector.name.split('.');\n return (node, ancestry) => {\n const ancestor = ancestry[path.length - 1];\n return inPath(node, ancestor, path, 0);\n };\n }\n\n case 'matches': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return true; }\n }\n return false;\n };\n }\n\n case 'compound': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (!matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'not': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, ancestry, options)) { return false; }\n }\n return true;\n };\n }\n\n case 'has': {\n const matchers = selector.selectors.map(getMatcher);\n return (node, ancestry, options) => {\n let result = false;\n\n const a = [];\n estraverse.traverse(node, {\n enter (node, parent) {\n if (parent != null) { a.unshift(parent); }\n\n for (let i = 0; i < matchers.length; ++i) {\n if (matchers[i](node, a, options)) {\n result = true;\n this.break();\n return;\n }\n }\n },\n leave () { a.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n\n return result;\n };\n }\n\n case 'child': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (ancestry.length > 0 && right(node, ancestry, options)) {\n return left(ancestry[0], ancestry.slice(1), options);\n }\n return false;\n };\n }\n\n case 'descendant': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) => {\n if (right(node, ancestry, options)) {\n for (let i = 0, l = ancestry.length; i < l; ++i) {\n if (left(ancestry[i], ancestry.slice(i + 1), options)) {\n return true;\n }\n }\n }\n return false;\n };\n }\n\n case 'attribute': {\n const path = selector.name.split('.');\n switch (selector.operator) {\n case void 0:\n return (node) => getPath(node, path) != null;\n case '=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => {\n const p = getPath(node, path);\n return typeof p === 'string' && selector.value.value.test(p);\n };\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal === `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value === typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '!=':\n switch (selector.value.type) {\n case 'regexp':\n return (node) => !selector.value.value.test(getPath(node, path));\n case 'literal': {\n const literal = `${selector.value.value}`;\n return (node) => literal !== `${getPath(node, path)}`;\n }\n case 'type':\n return (node) => selector.value.value !== typeof getPath(node, path);\n }\n throw new Error(`Unknown selector value type: ${selector.value.type}`);\n case '<=':\n return (node) => getPath(node, path) <= selector.value.value;\n case '<':\n return (node) => getPath(node, path) < selector.value.value;\n case '>':\n return (node) => getPath(node, path) > selector.value.value;\n case '>=':\n return (node) => getPath(node, path) >= selector.value.value;\n }\n throw new Error(`Unknown operator: ${selector.operator}`);\n }\n\n case 'sibling': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n sibling(node, left, ancestry, LEFT_SIDE, options) ||\n selector.left.subject &&\n left(node, ancestry, options) &&\n sibling(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'adjacent': {\n const left = getMatcher(selector.left);\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n adjacent(node, left, ancestry, LEFT_SIDE, options) ||\n selector.right.subject &&\n left(node, ancestry, options) &&\n adjacent(node, right, ancestry, RIGHT_SIDE, options);\n }\n\n case 'nth-child': {\n const nth = selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'nth-last-child': {\n const nth = -selector.index.value;\n const right = getMatcher(selector.right);\n return (node, ancestry, options) =>\n right(node, ancestry, options) &&\n nthChild(node, ancestry, nth, options);\n }\n\n case 'class': {\n \n const name = selector.name.toLowerCase();\n\n return (node, ancestry, options) => {\n \n if (options && options.matchClass) {\n return options.matchClass(selector.name, node, ancestry);\n }\n \n if (options && options.nodeTypeKey) return false; \n\n switch(name){\n case 'statement':\n if(node.type.slice(-9) === 'Statement') return true;\n // fallthrough: interface Declaration <: Statement { }\n case 'declaration':\n return node.type.slice(-11) === 'Declaration';\n case 'pattern':\n if(node.type.slice(-7) === 'Pattern') return true;\n // fallthrough: interface Expression <: Node, Pattern { }\n case 'expression':\n return node.type.slice(-10) === 'Expression' ||\n node.type.slice(-7) === 'Literal' ||\n (\n node.type === 'Identifier' &&\n (ancestry.length === 0 || ancestry[0].type !== 'MetaProperty')\n ) ||\n node.type === 'MetaProperty';\n case 'function':\n return node.type === 'FunctionDeclaration' ||\n node.type === 'FunctionExpression' ||\n node.type === 'ArrowFunctionExpression';\n }\n throw new Error(`Unknown class name: ${selector.name}`);\n };\n }\n }\n\n throw new Error(`Unknown selector type: ${selector.type}`);\n}\n\n/**\n * @callback TraverseOptionFallback\n * @param {external:AST} node The given node.\n * @returns {string[]} An array of visitor keys for the given node.\n */\n\n/**\n * @callback ClassMatcher\n * @param {string} className The name of the class to match.\n * @param {external:AST} node The node to match against.\n * @param {Array} ancestry The ancestry of the node.\n * @returns {boolean} True if the node matches the class, false if not.\n */\n\n/**\n * @typedef {object} ESQueryOptions\n * @property {string} [nodeTypeKey=\"type\"] By passing `nodeTypeKey`, we can allow other ASTs to use ESQuery.\n * @property { { [nodeType: string]: string[] } } [visitorKeys] By passing `visitorKeys` mapping, we can extend the properties of the nodes that traverse the node.\n * @property {TraverseOptionFallback} [fallback] By passing `fallback` option, we can control the properties of traversing nodes when encountering unknown nodes.\n * @property {ClassMatcher} [matchClass] By passing `matchClass` option, we can customize the interpretation of classes.\n */\n\n/**\n * Given a `node` and its ancestors, determine if `node` is matched\n * by `selector`.\n * @param {?external:AST} node\n * @param {?SelectorAST} selector\n * @param {external:AST[]} [ancestry=[]]\n * @param {ESQueryOptions} [options]\n * @throws {Error} Unknowns (operator, class name, selector type, or\n * selector value type)\n * @returns {boolean}\n */\nfunction matches(node, selector, ancestry, options) {\n if (!selector) { return true; }\n if (!node) { return false; }\n if (!ancestry) { ancestry = []; }\n\n return getMatcher(selector)(node, ancestry, options);\n}\n\n/**\n * Get visitor keys of a given node.\n * @param {external:AST} node The AST node to get keys.\n * @param {ESQueryOptions|undefined} options\n * @returns {string[]} Visitor keys of the node.\n */\nfunction getVisitorKeys(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n\n const nodeType = node[nodeTypeKey];\n if (options && options.visitorKeys && options.visitorKeys[nodeType]) {\n return options.visitorKeys[nodeType];\n }\n if (estraverse.VisitorKeys[nodeType]) {\n return estraverse.VisitorKeys[nodeType];\n }\n if (options && typeof options.fallback === 'function') {\n return options.fallback(node);\n }\n // 'iteration' fallback\n return Object.keys(node).filter(function (key) {\n return key !== nodeTypeKey;\n });\n}\n\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} node The value to check.\n * @param {ESQueryOptions|undefined} options The options to use.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(node, options) {\n const nodeTypeKey = (options && options.nodeTypeKey) || 'type';\n return node !== null && typeof node === 'object' && typeof node[nodeTypeKey] === 'string';\n}\n\n/**\n * Determines if the given node has a sibling that matches the\n * given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction sibling(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const startIndex = listProp.indexOf(node);\n if (startIndex < 0) { continue; }\n let lowerBound, upperBound;\n if (side === LEFT_SIDE) {\n lowerBound = 0;\n upperBound = startIndex;\n } else {\n lowerBound = startIndex + 1;\n upperBound = listProp.length;\n }\n for (let k = lowerBound; k < upperBound; ++k) {\n if (isNode(listProp[k], options) && matcher(listProp[k], ancestry, options)) {\n return true;\n }\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node has an adjacent sibling that matches\n * the given selector matcher.\n * @param {external:AST} node\n * @param {SelectorMatcher} matcher\n * @param {external:AST[]} ancestry\n * @param {Side} side\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction adjacent(node, matcher, ancestry, side, options) {\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)) {\n const idx = listProp.indexOf(node);\n if (idx < 0) { continue; }\n if (side === LEFT_SIDE && idx > 0 && isNode(listProp[idx - 1], options) && matcher(listProp[idx - 1], ancestry, options)) {\n return true;\n }\n if (side === RIGHT_SIDE && idx < listProp.length - 1 && isNode(listProp[idx + 1], options) && matcher(listProp[idx + 1], ancestry, options)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Determines if the given node is the `nth` child.\n * If `nth` is negative then the position is counted\n * from the end of the list of children.\n * @param {external:AST} node\n * @param {external:AST[]} ancestry\n * @param {Integer} nth\n * @param {ESQueryOptions|undefined} options\n * @returns {boolean}\n */\nfunction nthChild(node, ancestry, nth, options) {\n if (nth === 0) { return false; }\n const [parent] = ancestry;\n if (!parent) { return false; }\n const keys = getVisitorKeys(parent, options);\n for (let i = 0; i < keys.length; ++i) {\n const listProp = parent[keys[i]];\n if (Array.isArray(listProp)){\n const idx = nth < 0 ? listProp.length + nth : nth - 1;\n if (idx >= 0 && idx < listProp.length && listProp[idx] === node) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * For each selector node marked as a subject, find the portion of the\n * selector that the subject must match.\n * @param {SelectorAST} selector\n * @param {SelectorAST} [ancestor] Defaults to `selector`\n * @returns {SelectorAST[]}\n */\nfunction subjects(selector, ancestor) {\n if (selector == null || typeof selector != 'object') { return []; }\n if (ancestor == null) { ancestor = selector; }\n const results = selector.subject ? [ancestor] : [];\n const keys = Object.keys(selector);\n for (let i = 0; i < keys.length; ++i) {\n const p = keys[i];\n const sel = selector[p];\n results.push(...subjects(sel, p === 'left' ? sel : ancestor));\n }\n return results;\n}\n\n/**\n* @callback TraverseVisitor\n* @param {?external:AST} node\n* @param {?external:AST} parent\n* @param {external:AST[]} ancestry\n*/\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {TraverseVisitor} visitor\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction traverse(ast, selector, visitor, options) {\n if (!selector) { return; }\n const ancestry = [];\n const matcher = getMatcher(selector);\n const altSubjects = subjects(selector).map(getMatcher);\n estraverse.traverse(ast, {\n enter (node, parent) {\n if (parent != null) { ancestry.unshift(parent); }\n if (matcher(node, ancestry, options)) {\n if (altSubjects.length) {\n for (let i = 0, l = altSubjects.length; i < l; ++i) {\n if (altSubjects[i](node, ancestry, options)) {\n visitor(node, parent, ancestry);\n }\n for (let k = 0, m = ancestry.length; k < m; ++k) {\n const succeedingAncestry = ancestry.slice(k + 1);\n if (altSubjects[i](ancestry[k], succeedingAncestry, options)) {\n visitor(ancestry[k], parent, succeedingAncestry);\n }\n }\n }\n } else {\n visitor(node, parent, ancestry);\n }\n }\n },\n leave () { ancestry.shift(); },\n keys: options && options.visitorKeys,\n fallback: options && options.fallback || 'iteration'\n });\n}\n\n\n/**\n * From a JS AST and a selector AST, collect all JS AST nodes that\n * match the selector.\n * @param {external:AST} ast\n * @param {?SelectorAST} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction match(ast, selector, options) {\n const results = [];\n traverse(ast, selector, function (node) {\n results.push(node);\n }, options);\n return results;\n}\n\n/**\n * Parse a selector string and return its AST.\n * @param {string} selector\n * @returns {SelectorAST}\n */\nfunction parse(selector) {\n return parser.parse(selector);\n}\n\n/**\n * Query the code AST using the selector string.\n * @param {external:AST} ast\n * @param {string} selector\n * @param {ESQueryOptions} [options]\n * @returns {external:AST[]}\n */\nfunction query(ast, selector, options) {\n return match(ast, parse(selector), options);\n}\n\nquery.parse = parse;\nquery.match = match;\nquery.traverse = traverse;\nquery.matches = matches;\nquery.query = query;\n\nexport default query;\n"],"names":["clone","exports","Syntax","VisitorOption","VisitorKeys","BREAK","SKIP","REMOVE","deepCopy","obj","key","val","ret","hasOwnProperty","Reference","parent","this","Element","node","path","wrap","ref","Controller","isNode","type","isProperty","nodeType","ObjectExpression","ObjectPattern","candidateExistsInLeaveList","leavelist","candidate","i","length","traverse","root","visitor","extendCommentRange","comment","tokens","target","array","func","diff","len","current","upperBound","token","range","extendedRange","AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ComprehensionBlock","ComprehensionExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","DirectiveStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","GeneratorExpression","Identifier","IfStatement","ImportExpression","ImportDeclaration","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportSpecifier","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","ModuleSpecifier","NewExpression","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","Super","SwitchStatement","SwitchCase","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","Break","Skip","Remove","prototype","replace","remove","Array","isArray","splice","iz","j","jz","result","addToPath","push","__current","__leavelist","parents","__execute","callback","element","previous","undefined","__state","call","notify","flag","skip","__initialize","__worklist","__fallback","fallback","Object","keys","__keys","assign","create","worklist","current2","candidates","sentinel","pop","enter","Error","leave","outer","removeElem","nextElem","attachComments","tree","providedComments","cursor","comments","leadingComments","trailingComments","cloneEnvironment","module","peg$SyntaxError","message","expected","found","location","name","captureStackTrace","child","ctor","constructor","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","class","escapedParts","parts","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","descriptions","sort","slice","join","describeExpected","describeFound","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","start","peg$parsestart","peg$startRuleFunction","peg$c3","peg$literalExpectation","peg$c4","peg$c5","peg$classExpectation","peg$c8","peg$c11","peg$c14","peg$c18","peg$c19","ss","concat","map","peg$c23","peg$c26","peg$c29","peg$c32","peg$c34","peg$c36","peg$c37","peg$c39","peg$c40","a","peg$c41","peg$c42","peg$c44","peg$c46","op","value","operator","peg$c49","peg$c50","peg$c51","peg$c53","peg$c54","peg$c55","b","peg$c56","d","match","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c66","peg$c67","peg$c68","peg$c70","peg$c72","peg$c73","peg$c75","peg$c77","peg$c78","peg$c81","peg$c82","peg$c86","peg$c89","peg$c90","selectors","peg$c92","peg$c94","peg$c97","peg$c100","peg$c103","peg$c106","peg$c109","peg$currPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","offset","peg$fail","s0","s1","s2","cached","peg$resultsCache","nextPos","peg$parse_","peg$parseselectors","peg$c1","peg$parseidentifierName","test","charAt","peg$parsebinaryOp","s3","s4","s5","s6","s7","peg$parseselector","peg$parsehasSelector","left","right","peg$parsesequence","reduce","memo","rhs","subject","as","peg$parseatom","peg$parsewildcard","peg$parseidentifier","peg$parseattrName","peg$parseattrEqOps","substr","peg$parsetype","flgs","peg$parsere_character_class","peg$parsere_escape","peg$parsere_chars","peg$parseflags","RegExp","peg$parseregex","peg$parseattrOps","peg$parsestring","leadingDecimals","apply","parseFloat","peg$parsenumber","peg$parsepath","peg$parseattrValue","peg$parseattr","peg$parsefield","peg$parsenegation","peg$parsematches","peg$parseis","peg$parsehasSelectors","peg$parsehas","nth","peg$parsefirstChild","nthLast","peg$parselastChild","parseInt","peg$parsenthChild","peg$parsenthLastChild","peg$parseclass","n","index","factory","getPath","MATCHER_CACHE","WeakMap","getMatcher","selector","matcher","get","generateMatcher","set","toLowerCase","ancestry","nodeTypeKey","split","inPath","ancestor","fromPathIndex","field","k","matchers","estraverse","unshift","shift","visitorKeys","l","_typeof","sibling","adjacent","nthChild","matchClass","getVisitorKeys","filter","side","_slicedToArray","listProp","startIndex","indexOf","lowerBound","idx","ast","altSubjects","subjects","results","sel","_toConsumableArray","m","succeedingAncestry","parser","query","matches"],"mappings":"m/DA2BC,SAASA,EAAMC,GAGZ,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,SAASC,EAASC,GACd,IAAcC,EAAKC,EAAfC,EAAM,GACV,IAAKF,KAAOD,EACJA,EAAII,eAAeH,KACnBC,EAAMF,EAAIC,GAENE,EAAIF,GADW,iBAARC,GAA4B,OAARA,EAChBH,EAASG,GAETA,GAIvB,OAAOC,EAgMX,SAASE,EAAUC,EAAQL,GACvBM,KAAKD,OAASA,EACdC,KAAKN,IAAMA,EAiBf,SAASO,EAAQC,EAAMC,EAAMC,EAAMC,GAC/BL,KAAKE,KAAOA,EACZF,KAAKG,KAAOA,EACZH,KAAKI,KAAOA,EACZJ,KAAKK,IAAMA,EAGf,SAASC,KAuHT,SAASC,EAAOL,GACZ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dmN,EAAMnK,MAAQA,EACdmK,EAAM5Y,SAAWA,EACjB4Y,EAAMC,QAvPN,SAAiB7Z,EAAMiX,EAAUM,EAAU5K,GACvC,OAAKsK,KACAjX,IACAuX,IAAYA,EAAW,IAErBP,EAAWC,EAAXD,CAAqBhX,EAAMuX,EAAU5K,KAmPhDiN,EAAMA,MAAQA"} \ No newline at end of file diff --git a/src/hello/backend/node_modules/esquery/license.txt b/src/hello/server/node_modules/esquery/license.txt similarity index 100% rename from src/hello/backend/node_modules/esquery/license.txt rename to src/hello/server/node_modules/esquery/license.txt diff --git a/src/hello/backend/node_modules/esquery/package.json b/src/hello/server/node_modules/esquery/package.json similarity index 98% rename from src/hello/backend/node_modules/esquery/package.json rename to src/hello/server/node_modules/esquery/package.json index 5e314b3a..b494042b 100644 --- a/src/hello/backend/node_modules/esquery/package.json +++ b/src/hello/server/node_modules/esquery/package.json @@ -1,6 +1,6 @@ { "name": "esquery", - "version": "1.6.0", + "version": "1.7.0", "author": "Joel Feenstra ", "contributors": [], "description": "A query library for ECMAScript AST using a CSS selector like query language.", diff --git a/src/hello/backend/node_modules/esquery/parser.js b/src/hello/server/node_modules/esquery/parser.js similarity index 86% rename from src/hello/backend/node_modules/esquery/parser.js rename to src/hello/server/node_modules/esquery/parser.js index eac0a009..c6fd7419 100644 --- a/src/hello/backend/node_modules/esquery/parser.js +++ b/src/hello/server/node_modules/esquery/parser.js @@ -248,38 +248,47 @@ peg$c73 = peg$classExpectation(["i", "m", "s", "u"], false, false), peg$c74 = "/", peg$c75 = peg$literalExpectation("/", false), - peg$c76 = /^[^\/]/, - peg$c77 = peg$classExpectation(["/"], true, false), - peg$c78 = function(d, flgs) { return { - type: 'regexp', value: new RegExp(d.join(''), flgs ? flgs.join('') : '') }; + peg$c76 = function(pattern, flgs) { + return { + type: 'regexp', value: new RegExp(pattern.join(''), flgs ? flgs.join('') : '') + }; }, - peg$c79 = function(i, is) { + peg$c77 = /^[^\]\\]/, + peg$c78 = peg$classExpectation(["]", "\\"], true, false), + peg$c79 = function(cs) { return '[' + cs.join('') + ']'; }, + peg$c80 = function(a) { return '\\' + a; }, + peg$c81 = /^[^\/\\[]/, + peg$c82 = peg$classExpectation(["/", "\\", "["], true, false), + peg$c83 = function(cs) { return cs.join(''); }, + peg$c84 = function(i, is) { return { type: 'field', name: is.reduce(function(memo, p){ return memo + p[0] + p[1]; }, i)}; }, - peg$c80 = ":not(", - peg$c81 = peg$literalExpectation(":not(", false), - peg$c82 = function(ss) { return { type: 'not', selectors: ss }; }, - peg$c83 = ":matches(", - peg$c84 = peg$literalExpectation(":matches(", false), - peg$c85 = function(ss) { return { type: 'matches', selectors: ss }; }, - peg$c86 = ":has(", - peg$c87 = peg$literalExpectation(":has(", false), - peg$c88 = function(ss) { return { type: 'has', selectors: ss }; }, - peg$c89 = ":first-child", - peg$c90 = peg$literalExpectation(":first-child", false), - peg$c91 = function() { return nth(1); }, - peg$c92 = ":last-child", - peg$c93 = peg$literalExpectation(":last-child", false), - peg$c94 = function() { return nthLast(1); }, - peg$c95 = ":nth-child(", - peg$c96 = peg$literalExpectation(":nth-child(", false), - peg$c97 = function(n) { return nth(parseInt(n.join(''), 10)); }, - peg$c98 = ":nth-last-child(", - peg$c99 = peg$literalExpectation(":nth-last-child(", false), - peg$c100 = function(n) { return nthLast(parseInt(n.join(''), 10)); }, - peg$c101 = ":", - peg$c102 = peg$literalExpectation(":", false), - peg$c103 = function(c) { + peg$c85 = ":not(", + peg$c86 = peg$literalExpectation(":not(", false), + peg$c87 = function(ss) { return { type: 'not', selectors: ss }; }, + peg$c88 = ":matches(", + peg$c89 = peg$literalExpectation(":matches(", false), + peg$c90 = function(ss) { return { type: 'matches', selectors: ss }; }, + peg$c91 = ":is(", + peg$c92 = peg$literalExpectation(":is(", false), + peg$c93 = ":has(", + peg$c94 = peg$literalExpectation(":has(", false), + peg$c95 = function(ss) { return { type: 'has', selectors: ss }; }, + peg$c96 = ":first-child", + peg$c97 = peg$literalExpectation(":first-child", false), + peg$c98 = function() { return nth(1); }, + peg$c99 = ":last-child", + peg$c100 = peg$literalExpectation(":last-child", false), + peg$c101 = function() { return nthLast(1); }, + peg$c102 = ":nth-child(", + peg$c103 = peg$literalExpectation(":nth-child(", false), + peg$c104 = function(n) { return nth(parseInt(n.join(''), 10)); }, + peg$c105 = ":nth-last-child(", + peg$c106 = peg$literalExpectation(":nth-last-child(", false), + peg$c107 = function(n) { return nthLast(parseInt(n.join(''), 10)); }, + peg$c108 = ":", + peg$c109 = peg$literalExpectation(":", false), + peg$c110 = function(c) { return { type: 'class', name: c }; }, @@ -424,7 +433,7 @@ function peg$parsestart() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 0, + var key = peg$currPos * 36 + 0, cached = peg$resultsCache[key]; if (cached) { @@ -473,7 +482,7 @@ function peg$parse_() { var s0, s1; - var key = peg$currPos * 32 + 1, + var key = peg$currPos * 36 + 1, cached = peg$resultsCache[key]; if (cached) { @@ -509,7 +518,7 @@ function peg$parseidentifierName() { var s0, s1, s2; - var key = peg$currPos * 32 + 2, + var key = peg$currPos * 36 + 2, cached = peg$resultsCache[key]; if (cached) { @@ -555,7 +564,7 @@ function peg$parsebinaryOp() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 3, + var key = peg$currPos * 36 + 3, cached = peg$resultsCache[key]; if (cached) { @@ -685,7 +694,7 @@ function peg$parsehasSelectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 4, + var key = peg$currPos * 36 + 4, cached = peg$resultsCache[key]; if (cached) { @@ -788,7 +797,7 @@ function peg$parseselectors() { var s0, s1, s2, s3, s4, s5, s6, s7; - var key = peg$currPos * 32 + 5, + var key = peg$currPos * 36 + 5, cached = peg$resultsCache[key]; if (cached) { @@ -891,7 +900,7 @@ function peg$parsehasSelector() { var s0, s1, s2; - var key = peg$currPos * 32 + 6, + var key = peg$currPos * 36 + 6, cached = peg$resultsCache[key]; if (cached) { @@ -928,7 +937,7 @@ function peg$parseselector() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 7, + var key = peg$currPos * 36 + 7, cached = peg$resultsCache[key]; if (cached) { @@ -995,7 +1004,7 @@ function peg$parsesequence() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 8, + var key = peg$currPos * 36 + 8, cached = peg$resultsCache[key]; if (cached) { @@ -1047,7 +1056,7 @@ function peg$parseatom() { var s0; - var key = peg$currPos * 32 + 9, + var key = peg$currPos * 36 + 9, cached = peg$resultsCache[key]; if (cached) { @@ -1068,17 +1077,20 @@ if (s0 === peg$FAILED) { s0 = peg$parsematches(); if (s0 === peg$FAILED) { - s0 = peg$parsehas(); + s0 = peg$parseis(); if (s0 === peg$FAILED) { - s0 = peg$parsefirstChild(); + s0 = peg$parsehas(); if (s0 === peg$FAILED) { - s0 = peg$parselastChild(); + s0 = peg$parsefirstChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthChild(); + s0 = peg$parselastChild(); if (s0 === peg$FAILED) { - s0 = peg$parsenthLastChild(); + s0 = peg$parsenthChild(); if (s0 === peg$FAILED) { - s0 = peg$parseclass(); + s0 = peg$parsenthLastChild(); + if (s0 === peg$FAILED) { + s0 = peg$parseclass(); + } } } } @@ -1099,7 +1111,7 @@ function peg$parsewildcard() { var s0, s1; - var key = peg$currPos * 32 + 10, + var key = peg$currPos * 36 + 10, cached = peg$resultsCache[key]; if (cached) { @@ -1130,7 +1142,7 @@ function peg$parseidentifier() { var s0, s1, s2; - var key = peg$currPos * 32 + 11, + var key = peg$currPos * 36 + 11, cached = peg$resultsCache[key]; if (cached) { @@ -1173,7 +1185,7 @@ function peg$parseattr() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 12, + var key = peg$currPos * 36 + 12, cached = peg$resultsCache[key]; if (cached) { @@ -1237,7 +1249,7 @@ function peg$parseattrOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 13, + var key = peg$currPos * 36 + 13, cached = peg$resultsCache[key]; if (cached) { @@ -1295,7 +1307,7 @@ function peg$parseattrEqOps() { var s0, s1, s2; - var key = peg$currPos * 32 + 14, + var key = peg$currPos * 36 + 14, cached = peg$resultsCache[key]; if (cached) { @@ -1344,7 +1356,7 @@ function peg$parseattrName() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 15, + var key = peg$currPos * 36 + 15, cached = peg$resultsCache[key]; if (cached) { @@ -1423,7 +1435,7 @@ function peg$parseattrValue() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 16, + var key = peg$currPos * 36 + 16, cached = peg$resultsCache[key]; if (cached) { @@ -1529,7 +1541,7 @@ function peg$parsestring() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 17, + var key = peg$currPos * 36 + 17, cached = peg$resultsCache[key]; if (cached) { @@ -1771,7 +1783,7 @@ function peg$parsenumber() { var s0, s1, s2, s3; - var key = peg$currPos * 32 + 18, + var key = peg$currPos * 36 + 18, cached = peg$resultsCache[key]; if (cached) { @@ -1866,7 +1878,7 @@ function peg$parsepath() { var s0, s1; - var key = peg$currPos * 32 + 19, + var key = peg$currPos * 36 + 19, cached = peg$resultsCache[key]; if (cached) { @@ -1891,7 +1903,7 @@ function peg$parsetype() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 20, + var key = peg$currPos * 36 + 20, cached = peg$resultsCache[key]; if (cached) { @@ -1976,7 +1988,7 @@ function peg$parseflags() { var s0, s1; - var key = peg$currPos * 32 + 21, + var key = peg$currPos * 36 + 21, cached = peg$resultsCache[key]; if (cached) { @@ -2016,7 +2028,7 @@ function peg$parseregex() { var s0, s1, s2, s3, s4; - var key = peg$currPos * 32 + 22, + var key = peg$currPos * 36 + 22, cached = peg$resultsCache[key]; if (cached) { @@ -2035,22 +2047,22 @@ } if (s1 !== peg$FAILED) { s2 = []; - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77); } + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); + } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); - if (peg$c76.test(input.charAt(peg$currPos))) { - s3 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c77); } + s3 = peg$parsere_character_class(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + if (s3 === peg$FAILED) { + s3 = peg$parsere_chars(); + } } } } else { @@ -2071,7 +2083,7 @@ } if (s4 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c78(s2, s4); + s1 = peg$c76(s2, s4); s0 = s1; } else { peg$currPos = s0; @@ -2095,10 +2107,181 @@ return s0; } + function peg$parsere_character_class() { + var s0, s1, s2, s3; + + var key = peg$currPos * 36 + 23, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 91) { + s1 = peg$c31; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c32); } + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c78); } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c77.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c78); } + } + if (s3 === peg$FAILED) { + s3 = peg$parsere_escape(); + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s3 = peg$c33; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c34); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c79(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsere_escape() { + var s0, s1, s2; + + var key = peg$currPos * 36 + 24, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c52; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c53); } + } + if (s1 !== peg$FAILED) { + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c54); } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c80(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parsere_chars() { + var s0, s1, s2; + + var key = peg$currPos * 36 + 25, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + s1 = []; + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c82); } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c81.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c82); } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c83(s1); + } + s0 = s1; + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + function peg$parsefield() { var s0, s1, s2, s3, s4, s5, s6; - var key = peg$currPos * 32 + 23, + var key = peg$currPos * 36 + 26, cached = peg$resultsCache[key]; if (cached) { @@ -2166,7 +2349,7 @@ } if (s3 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c79(s2, s3); + s1 = peg$c84(s2, s3); s0 = s1; } else { peg$currPos = s0; @@ -2189,7 +2372,7 @@ function peg$parsenegation() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 24, + var key = peg$currPos * 36 + 27, cached = peg$resultsCache[key]; if (cached) { @@ -2199,12 +2382,12 @@ } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c80) { - s1 = peg$c80; + if (input.substr(peg$currPos, 5) === peg$c85) { + s1 = peg$c85; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c81); } + if (peg$silentFails === 0) { peg$fail(peg$c86); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -2222,7 +2405,7 @@ } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c82(s3); + s1 = peg$c87(s3); s0 = s1; } else { peg$currPos = s0; @@ -2253,7 +2436,7 @@ function peg$parsematches() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 25, + var key = peg$currPos * 36 + 28, cached = peg$resultsCache[key]; if (cached) { @@ -2263,12 +2446,76 @@ } s0 = peg$currPos; - if (input.substr(peg$currPos, 9) === peg$c83) { - s1 = peg$c83; + if (input.substr(peg$currPos, 9) === peg$c88) { + s1 = peg$c88; peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84); } + if (peg$silentFails === 0) { peg$fail(peg$c89); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseselectors(); + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s5 = peg$c69; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c70); } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c90(s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; + + return s0; + } + + function peg$parseis() { + var s0, s1, s2, s3, s4, s5; + + var key = peg$currPos * 36 + 29, + cached = peg$resultsCache[key]; + + if (cached) { + peg$currPos = cached.nextPos; + + return cached.result; + } + + s0 = peg$currPos; + if (input.substr(peg$currPos, 4) === peg$c91) { + s1 = peg$c91; + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$c92); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -2286,7 +2533,7 @@ } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c85(s3); + s1 = peg$c90(s3); s0 = s1; } else { peg$currPos = s0; @@ -2317,7 +2564,7 @@ function peg$parsehas() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 26, + var key = peg$currPos * 36 + 30, cached = peg$resultsCache[key]; if (cached) { @@ -2327,12 +2574,12 @@ } s0 = peg$currPos; - if (input.substr(peg$currPos, 5) === peg$c86) { - s1 = peg$c86; + if (input.substr(peg$currPos, 5) === peg$c93) { + s1 = peg$c93; peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c87); } + if (peg$silentFails === 0) { peg$fail(peg$c94); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -2350,7 +2597,7 @@ } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c88(s3); + s1 = peg$c95(s3); s0 = s1; } else { peg$currPos = s0; @@ -2381,7 +2628,7 @@ function peg$parsefirstChild() { var s0, s1; - var key = peg$currPos * 32 + 27, + var key = peg$currPos * 36 + 31, cached = peg$resultsCache[key]; if (cached) { @@ -2391,16 +2638,16 @@ } s0 = peg$currPos; - if (input.substr(peg$currPos, 12) === peg$c89) { - s1 = peg$c89; + if (input.substr(peg$currPos, 12) === peg$c96) { + s1 = peg$c96; peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c90); } + if (peg$silentFails === 0) { peg$fail(peg$c97); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c91(); + s1 = peg$c98(); } s0 = s1; @@ -2412,7 +2659,7 @@ function peg$parselastChild() { var s0, s1; - var key = peg$currPos * 32 + 28, + var key = peg$currPos * 36 + 32, cached = peg$resultsCache[key]; if (cached) { @@ -2422,16 +2669,16 @@ } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c92) { - s1 = peg$c92; + if (input.substr(peg$currPos, 11) === peg$c99) { + s1 = peg$c99; peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c93); } + if (peg$silentFails === 0) { peg$fail(peg$c100); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c94(); + s1 = peg$c101(); } s0 = s1; @@ -2443,7 +2690,7 @@ function peg$parsenthChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 29, + var key = peg$currPos * 36 + 33, cached = peg$resultsCache[key]; if (cached) { @@ -2453,12 +2700,12 @@ } s0 = peg$currPos; - if (input.substr(peg$currPos, 11) === peg$c95) { - s1 = peg$c95; + if (input.substr(peg$currPos, 11) === peg$c102) { + s1 = peg$c102; peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c96); } + if (peg$silentFails === 0) { peg$fail(peg$c103); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -2497,7 +2744,7 @@ } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c97(s3); + s1 = peg$c104(s3); s0 = s1; } else { peg$currPos = s0; @@ -2528,7 +2775,7 @@ function peg$parsenthLastChild() { var s0, s1, s2, s3, s4, s5; - var key = peg$currPos * 32 + 30, + var key = peg$currPos * 36 + 34, cached = peg$resultsCache[key]; if (cached) { @@ -2538,12 +2785,12 @@ } s0 = peg$currPos; - if (input.substr(peg$currPos, 16) === peg$c98) { - s1 = peg$c98; + if (input.substr(peg$currPos, 16) === peg$c105) { + s1 = peg$c105; peg$currPos += 16; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c99); } + if (peg$silentFails === 0) { peg$fail(peg$c106); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); @@ -2582,7 +2829,7 @@ } if (s5 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c100(s3); + s1 = peg$c107(s3); s0 = s1; } else { peg$currPos = s0; @@ -2613,7 +2860,7 @@ function peg$parseclass() { var s0, s1, s2; - var key = peg$currPos * 32 + 31, + var key = peg$currPos * 36 + 35, cached = peg$resultsCache[key]; if (cached) { @@ -2624,17 +2871,17 @@ s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 58) { - s1 = peg$c101; + s1 = peg$c108; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c102); } + if (peg$silentFails === 0) { peg$fail(peg$c109); } } if (s1 !== peg$FAILED) { s2 = peg$parseidentifierName(); if (s2 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$c103(s2); + s1 = peg$c110(s2); s0 = s1; } else { peg$currPos = s0; diff --git a/src/hello/backend/node_modules/esrecurse/.babelrc b/src/hello/server/node_modules/esrecurse/.babelrc similarity index 100% rename from src/hello/backend/node_modules/esrecurse/.babelrc rename to src/hello/server/node_modules/esrecurse/.babelrc diff --git a/src/hello/backend/node_modules/esrecurse/README.md b/src/hello/server/node_modules/esrecurse/README.md similarity index 100% rename from src/hello/backend/node_modules/esrecurse/README.md rename to src/hello/server/node_modules/esrecurse/README.md diff --git a/src/hello/backend/node_modules/esrecurse/esrecurse.js b/src/hello/server/node_modules/esrecurse/esrecurse.js similarity index 100% rename from src/hello/backend/node_modules/esrecurse/esrecurse.js rename to src/hello/server/node_modules/esrecurse/esrecurse.js diff --git a/src/hello/backend/node_modules/esrecurse/gulpfile.babel.js b/src/hello/server/node_modules/esrecurse/gulpfile.babel.js similarity index 100% rename from src/hello/backend/node_modules/esrecurse/gulpfile.babel.js rename to src/hello/server/node_modules/esrecurse/gulpfile.babel.js diff --git a/src/hello/backend/node_modules/esrecurse/package.json b/src/hello/server/node_modules/esrecurse/package.json similarity index 100% rename from src/hello/backend/node_modules/esrecurse/package.json rename to src/hello/server/node_modules/esrecurse/package.json diff --git a/src/hello/backend/node_modules/estraverse/.jshintrc b/src/hello/server/node_modules/estraverse/.jshintrc similarity index 100% rename from src/hello/backend/node_modules/estraverse/.jshintrc rename to src/hello/server/node_modules/estraverse/.jshintrc diff --git a/src/hello/backend/node_modules/estraverse/LICENSE.BSD b/src/hello/server/node_modules/estraverse/LICENSE.BSD similarity index 100% rename from src/hello/backend/node_modules/estraverse/LICENSE.BSD rename to src/hello/server/node_modules/estraverse/LICENSE.BSD diff --git a/src/hello/backend/node_modules/estraverse/README.md b/src/hello/server/node_modules/estraverse/README.md similarity index 100% rename from src/hello/backend/node_modules/estraverse/README.md rename to src/hello/server/node_modules/estraverse/README.md diff --git a/src/hello/backend/node_modules/estraverse/estraverse.js b/src/hello/server/node_modules/estraverse/estraverse.js similarity index 100% rename from src/hello/backend/node_modules/estraverse/estraverse.js rename to src/hello/server/node_modules/estraverse/estraverse.js diff --git a/src/hello/backend/node_modules/estraverse/gulpfile.js b/src/hello/server/node_modules/estraverse/gulpfile.js similarity index 100% rename from src/hello/backend/node_modules/estraverse/gulpfile.js rename to src/hello/server/node_modules/estraverse/gulpfile.js diff --git a/src/hello/backend/node_modules/estraverse/package.json b/src/hello/server/node_modules/estraverse/package.json similarity index 100% rename from src/hello/backend/node_modules/estraverse/package.json rename to src/hello/server/node_modules/estraverse/package.json diff --git a/src/hello/backend/node_modules/esutils/LICENSE.BSD b/src/hello/server/node_modules/esutils/LICENSE.BSD similarity index 100% rename from src/hello/backend/node_modules/esutils/LICENSE.BSD rename to src/hello/server/node_modules/esutils/LICENSE.BSD diff --git a/src/hello/backend/node_modules/esutils/README.md b/src/hello/server/node_modules/esutils/README.md similarity index 100% rename from src/hello/backend/node_modules/esutils/README.md rename to src/hello/server/node_modules/esutils/README.md diff --git a/src/hello/backend/node_modules/esutils/lib/ast.js b/src/hello/server/node_modules/esutils/lib/ast.js similarity index 100% rename from src/hello/backend/node_modules/esutils/lib/ast.js rename to src/hello/server/node_modules/esutils/lib/ast.js diff --git a/src/hello/backend/node_modules/esutils/lib/code.js b/src/hello/server/node_modules/esutils/lib/code.js similarity index 100% rename from src/hello/backend/node_modules/esutils/lib/code.js rename to src/hello/server/node_modules/esutils/lib/code.js diff --git a/src/hello/backend/node_modules/esutils/lib/keyword.js b/src/hello/server/node_modules/esutils/lib/keyword.js similarity index 100% rename from src/hello/backend/node_modules/esutils/lib/keyword.js rename to src/hello/server/node_modules/esutils/lib/keyword.js diff --git a/src/hello/backend/node_modules/esutils/lib/utils.js b/src/hello/server/node_modules/esutils/lib/utils.js similarity index 100% rename from src/hello/backend/node_modules/esutils/lib/utils.js rename to src/hello/server/node_modules/esutils/lib/utils.js diff --git a/src/hello/backend/node_modules/esutils/package.json b/src/hello/server/node_modules/esutils/package.json similarity index 100% rename from src/hello/backend/node_modules/esutils/package.json rename to src/hello/server/node_modules/esutils/package.json diff --git a/src/hello/backend/node_modules/etag/HISTORY.md b/src/hello/server/node_modules/etag/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/etag/HISTORY.md rename to src/hello/server/node_modules/etag/HISTORY.md diff --git a/src/hello/backend/node_modules/etag/LICENSE b/src/hello/server/node_modules/etag/LICENSE similarity index 100% rename from src/hello/backend/node_modules/etag/LICENSE rename to src/hello/server/node_modules/etag/LICENSE diff --git a/src/hello/backend/node_modules/etag/README.md b/src/hello/server/node_modules/etag/README.md similarity index 100% rename from src/hello/backend/node_modules/etag/README.md rename to src/hello/server/node_modules/etag/README.md diff --git a/src/hello/backend/node_modules/etag/index.js b/src/hello/server/node_modules/etag/index.js similarity index 100% rename from src/hello/backend/node_modules/etag/index.js rename to src/hello/server/node_modules/etag/index.js diff --git a/src/hello/backend/node_modules/etag/package.json b/src/hello/server/node_modules/etag/package.json similarity index 100% rename from src/hello/backend/node_modules/etag/package.json rename to src/hello/server/node_modules/etag/package.json diff --git a/src/hello/backend/node_modules/send/node_modules/http-errors/LICENSE b/src/hello/server/node_modules/express-validator/LICENSE similarity index 89% rename from src/hello/backend/node_modules/send/node_modules/http-errors/LICENSE rename to src/hello/server/node_modules/express-validator/LICENSE index 82af4df5..711d88bb 100644 --- a/src/hello/backend/node_modules/send/node_modules/http-errors/LICENSE +++ b/src/hello/server/node_modules/express-validator/LICENSE @@ -1,8 +1,6 @@ - The MIT License (MIT) -Copyright (c) 2014 Jonathan Ong me@jongleberry.com -Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com +Copyright (c) 2010 Chris O'Hara 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/src/hello/server/node_modules/express-validator/README.md b/src/hello/server/node_modules/express-validator/README.md new file mode 100644 index 00000000..e9d10283 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/README.md @@ -0,0 +1,33 @@ +# express-validator + +[![npm version](https://img.shields.io/npm/v/express-validator.svg)](https://www.npmjs.com/package/express-validator) +[![Build status](https://github.com/express-validator/express-validator/actions/workflows/ci.yml/badge.svg)](https://github.com/express-validator/express-validator/actions/workflows/ci.yml) +[![Coverage Status](https://img.shields.io/coveralls/express-validator/express-validator.svg)](https://coveralls.io/github/express-validator/express-validator?branch=master) + +An [express.js](https://github.com/visionmedia/express) middleware for +[validator](https://github.com/validatorjs/validator.js). + +- [Installation](#installation) +- [Documentation](#documentation) +- [Changelog](#changelog) +- [License](#license) + +## Installation + +``` +npm install express-validator +``` + +Also make sure that you have Node.js 14 or newer in order to use it. + +## Documentation + +Please refer to the documentation website on https://express-validator.github.io. + +## Changelog + +Check the [GitHub Releases page](https://github.com/express-validator/express-validator/releases). + +## License + +MIT License diff --git a/src/hello/server/node_modules/express-validator/lib/base.d.ts b/src/hello/server/node_modules/express-validator/lib/base.d.ts new file mode 100644 index 00000000..f591bd73 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/base.d.ts @@ -0,0 +1,187 @@ +import { ReadonlyContext } from './context'; +export interface Request { + [k: string]: any; + body?: any; + cookies?: Record; + headers?: Record; + params?: Record; + query?: Record; +} +export type Middleware = (req: Request, res: any, next: (err?: any) => void) => void; +export type Location = 'body' | 'cookies' | 'headers' | 'params' | 'query'; +/** + * Metadata about a validated field. + */ +export type Meta = { + /** + * The express request from which the field was validated + */ + req: Request; + /** + * Which of the request objects the field was picked from + */ + location: Location; + /** + * The full path of the field within the request object. + * + * @example + * const meta = { req, location: 'body', path: 'foo.bar' }; // req.body.foo.bar + */ + path: string; + /** + * Values from wildcards/globstars used when selecting fields for validation. + * + * @example + * body('products.*.price').custom((value, { req, pathValues }) => { + * const index = pathValues[0]; + * const productName = req.body.products[index].name; + * }); + */ + pathValues: readonly (string | string[])[]; +}; +/** + * A function which may + * - return falsy values, a promise that rejects or throw to indicate that a field is invalid; + * - return truthy values or a promise that resolves to indicate that a field is valid. + * + * @param input the field value + * @param meta metadata about the field being validated + */ +export type CustomValidator = (input: any, meta: Meta) => any; +export type StandardValidator = (input: string, ...options: any[]) => boolean; +export type CustomSanitizer = (input: any, meta: Meta) => any; +export type StandardSanitizer = (input: string, ...options: any[]) => any; +export interface FieldInstance { + path: string; + originalPath: string; + pathValues: readonly (string | string[])[]; + location: Location; + value: any; +} +export type UnknownFieldInstance = Omit; +export type FieldValidationError = { + /** + * Indicates that the error occurred because a field had an invalid value + */ + type: 'field'; + /** + * The location within the request where this field is + */ + location: Location; + /** + * The path to the field which has a validation error + */ + path: string; + /** + * The value of the field. It might be unset if the value is hidden. + */ + value?: any; + /** + * The error message + */ + msg: any; +}; +export type UnknownFieldsError = { + /** + * Indicates that the error occurred because one or more fields are unknown in the request + */ + type: 'unknown_fields'; + /** + * The error message + */ + msg: any; + /** + * The list of fields that are unknown + */ + fields: UnknownFieldInstance[]; +}; +export type AlternativeValidationError = { + /** + * Indicates that the error occurred because all alternatives (e.g. in `oneOf()`) were invalid + */ + type: 'alternative'; + /** + * The error message + */ + msg: any; + /** + * The list of underlying validation errors returned by validation chains in `oneOf()` + */ + nestedErrors: FieldValidationError[]; +}; +export type GroupedAlternativeValidationError = { + /** + * Indicates that the error occurred because all alternatives (e.g. in `oneOf()`) were invalid, + * and the nested errors are grouped per alternative. + */ + type: 'alternative_grouped'; + /** + * The error message + */ + msg: any; + /** + * The list of underlying validation errors returned by validation chains in `oneOf()` + */ + nestedErrors: FieldValidationError[][]; +}; +/** + * A validation error as reported by a middleware. + * The properties available in the error object vary according to the type. + * + * @example + * if (error.type === 'alternative') { + * console.log(`There are ${error.nestedErrors.length} errors under this alternative list`); + * } else if (error.type === 'field') { + * console.log(`There's an error with field ${error.path} in the request ${error.location}`); + * } + * + */ +export type ValidationError = AlternativeValidationError | GroupedAlternativeValidationError | UnknownFieldsError | FieldValidationError; +/** + * An error message that's not a function, as these are treated as message factories + * by all validation middlewares. + */ +export type ErrorMessage = string | number | symbol | boolean | object | any[]; +/** + * A function which creates an error message based on a field's value. + * + * @param input the field value + * @param meta metadata about the field that was validated + */ +export type FieldMessageFactory = (value: any, meta: Meta) => any; +/** + * A function which creates an error message based on an alternative's nested errors. + * + * @see `oneOf()` + * @param nestedErrors The errors from the invalid alternative(s). + * @param opts + */ +export type AlternativeMessageFactory = (nestedErrors: FieldValidationError[], opts: { + req: Request; +}) => any; +/** + * A function which creates an error message based on a group of alternatives nested errors. + * + * @see `oneOf()` + * @param nestedErrors The errors from the invalid alternative groups. + * @param opts + */ +export type GroupedAlternativeMessageFactory = (nestedErrors: FieldValidationError[][], opts: { + req: Request; +}) => any; +/** + * A function which creates an error message based on unknown fields. + * + * @see `checkExact()` + * @param unknownFields The unknown fields found in the request + * @param opts + */ +export type UnknownFieldMessageFactory = (unknownFields: UnknownFieldInstance[], opts: { + req: Request; +}) => any; +export declare const contextsKey = "express-validator#contexts"; +export interface InternalRequest extends Request { + [contextsKey]?: ReadonlyContext[]; +} +export declare class ValidationHalt extends Error { +} diff --git a/src/hello/server/node_modules/express-validator/lib/base.js b/src/hello/server/node_modules/express-validator/lib/base.js new file mode 100644 index 00000000..8a741b98 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/base.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValidationHalt = exports.contextsKey = void 0; +// Not using Symbol because of #813 +exports.contextsKey = 'express-validator#contexts'; +class ValidationHalt extends Error { +} +exports.ValidationHalt = ValidationHalt; diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-handler-impl.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/context-handler-impl.d.ts new file mode 100644 index 00000000..27837562 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-handler-impl.d.ts @@ -0,0 +1,13 @@ +import { ContextBuilder } from '../context-builder'; +import { CustomValidator } from '../base'; +import { BailOptions, ContextHandler, OptionalOptions } from './context-handler'; +import { ContextRunner } from './context-runner'; +export declare class ContextHandlerImpl implements ContextHandler { + private readonly builder; + private readonly chain; + constructor(builder: ContextBuilder, chain: Chain); + bail(opts?: BailOptions): Chain; + if(condition: CustomValidator | ContextRunner): Chain; + optional(options?: OptionalOptions | boolean): Chain; + hide(hiddenValue?: string): Chain; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-handler-impl.js b/src/hello/server/node_modules/express-validator/lib/chain/context-handler-impl.js new file mode 100644 index 00000000..4e81a171 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-handler-impl.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ContextHandlerImpl = void 0; +const context_items_1 = require("../context-items"); +const bail_1 = require("../context-items/bail"); +class ContextHandlerImpl { + constructor(builder, chain) { + this.builder = builder; + this.chain = chain; + } + bail(opts) { + if (opts?.level === 'request') { + this.builder.setRequestBail(); + } + this.builder.addItem(new bail_1.Bail()); + return this.chain; + } + if(condition) { + if ('run' in condition) { + this.builder.addItem(new context_items_1.ChainCondition(condition)); + } + else if (typeof condition === 'function') { + this.builder.addItem(new context_items_1.CustomCondition(condition)); + } + else { + throw new Error('express-validator: condition is not a validation chain nor a function'); + } + return this.chain; + } + optional(options = true) { + let value; + if (typeof options === 'boolean') { + value = options ? 'undefined' : false; + } + else { + value = options.values + ? options.values + : options.checkFalsy + ? 'falsy' + : options.nullable + ? 'null' + : 'undefined'; + } + this.builder.setOptional(value); + return this.chain; + } + hide(hiddenValue) { + this.builder.setHidden(true, hiddenValue); + return this.chain; + } +} +exports.ContextHandlerImpl = ContextHandlerImpl; diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-handler.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/context-handler.d.ts new file mode 100644 index 00000000..26760691 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-handler.d.ts @@ -0,0 +1,110 @@ +import { CustomValidator } from '../base'; +import { Optional } from '../context'; +import { ContextRunner } from './context-runner'; +export interface BailOptions { + /** + * Defines the level at which to stop running further validations: + * - When set to `chain`, further validations won't be run for this validation chain if there + * are any errors. + * - When set to `request`, no further validations on the same request will be run either if + * there are any errors. + * + * @default 'chain' + */ + level?: 'chain' | 'request'; +} +export interface OptionalOptions { + /** + * Defines which kind of value makes a field optional. + * + * - `undefined`: only `undefined` values; equivalent to `value === undefined` + * - `null`: only `undefined` and `null` values; equivalent to `value == null` + * - `falsy`: all falsy values; equivalent to `!value` + * + * @default 'undefined' + */ + values?: Exclude; + /** + * Whether a field whose value is `null` or `undefined` is to be considered optional. + * @default false + * @deprecated Use `values` instead. + */ + nullable?: boolean; + /** + * Whether a field whose value is falsy (that is, `0`, `false`, `null`, `undefined` or an empty + * string) is to be considered optional. + * @default false + * @deprecated Use `values` instead. + */ + checkFalsy?: boolean; +} +export interface ContextHandler { + /** + * Stops running validations if any of the previous ones have failed. + * + * Useful to prevent a custom validator that touches a database or external API from running when + * you know it will fail. + * + * May be used multiple times in the same validation chain if desired. + * + * @example + * check('username') + * .isEmail() + * // If not an email, stop here + * .bail() + * .custom(checkDenylistDomain) + * // If domain is not allowed, don't go check if it already exists + * .bail() + * .custom(checkEmailExists) + * + * @returns the current validation chain + */ + bail(opts?: BailOptions): Chain; + /** + * Adds a condition on whether the validation should continue on a field or not. + * @param condition may be either + * - a custom validator-like function, which must truthy or a promise that resolves to continue + * validation. If the return value is falsy, a promise that rejects, or if it throws, validation + * will stop. + * - a validation chain which if it would produce errors, the validation chain stops. + * @example + * check('newPassword') + * // Only validate if the old password has been provided + * .if((value, { req }) => req.body.oldPassword) + * // Or, use it with a a validation chain + * .if(body('oldPassword').notEmpty()) + * @returns the current validation chain + */ + if(condition: CustomValidator | ContextRunner): Chain; + /** + * Marks the field(s) of the validation chain as optional. + * By default, only fields with an `undefined` value are considered optional and will be ignored + * when validating. + * + * @param options an object of options to customize the behavior of optional. + * @returns the current validation chain + */ + optional(options?: { + values?: Optional; + /** + * @deprecated use `values` instead + */ + checkFalsy?: boolean; + /** + * @deprecated use `values` instead + */ + nullable?: boolean; + } | boolean): Chain; + /** + * Hide the field's value in errors returned by `validationResult()`. + * + * If the value is confidential information (such as api key), + * you might want to call this method to prevent exposing it. + * + * @param hiddenValue? String to replace the field's value with. + * If it's not set, the field value is removed from errors. + * + * @returns the current validation chain + */ + hide(hiddenValue?: string): Chain; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-handler.js b/src/hello/server/node_modules/express-validator/lib/chain/context-handler.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-handler.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-runner-impl.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/context-runner-impl.d.ts new file mode 100644 index 00000000..0a34f4ff --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-runner-impl.d.ts @@ -0,0 +1,18 @@ +import { Request } from '../base'; +import { Context, ReadonlyContext } from '../context'; +import { ContextBuilder } from '../context-builder'; +import { SelectFields } from '../field-selection'; +import { Result } from '../validation-result'; +import { ContextRunner, ResultWithContext } from './context-runner'; +export declare class ResultWithContextImpl extends Result implements ResultWithContext { + readonly context: ReadonlyContext; + constructor(context: ReadonlyContext); +} +export declare class ContextRunnerImpl implements ContextRunner { + private readonly builderOrContext; + private readonly selectFields; + constructor(builderOrContext: ContextBuilder | Context, selectFields?: SelectFields); + run(req: Request, options?: { + dryRun?: boolean; + }): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-runner-impl.js b/src/hello/server/node_modules/express-validator/lib/chain/context-runner-impl.js new file mode 100644 index 00000000..579994af --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-runner-impl.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ContextRunnerImpl = exports.ResultWithContextImpl = void 0; +const _ = require("lodash"); +const base_1 = require("../base"); +const context_1 = require("../context"); +const field_selection_1 = require("../field-selection"); +const validation_result_1 = require("../validation-result"); +class ResultWithContextImpl extends validation_result_1.Result { + constructor(context) { + super(error => error, context.errors); + this.context = context; + } +} +exports.ResultWithContextImpl = ResultWithContextImpl; +class ContextRunnerImpl { + constructor(builderOrContext, selectFields = field_selection_1.selectFields) { + this.builderOrContext = builderOrContext; + this.selectFields = selectFields; + } + async run(req, options = {}) { + const context = this.builderOrContext instanceof context_1.Context + ? this.builderOrContext + : this.builderOrContext.build(); + const internalReq = req; + const bail = internalReq[base_1.contextsKey]?.some(context => context.bail && context.errors.length > 0); + if (bail) { + return new ResultWithContextImpl(context); + } + const instances = this.selectFields(req, context.fields, context.locations); + context.addFieldInstances(instances); + const haltedInstances = new Set(); + for (const contextItem of context.stack) { + const promises = context.getData({ requiredOnly: true }).map(async (instance) => { + const { location, path } = instance; + const instanceKey = `${location}:${path}`; + if (haltedInstances.has(instanceKey)) { + return; + } + try { + await contextItem.run(context, instance.value, { + req, + location, + path, + pathValues: instance.pathValues, + }); + // An instance is mutable, so if an item changed its value, there's no need to call getData again + const newValue = instance.value; + // Checks whether the value changed. + // Avoids e.g. undefined values being set on the request if it didn't have the key initially. + const reqValue = path !== '' ? _.get(req[location], path) : req[location]; + if (!options.dryRun && reqValue !== instance.value) { + path !== '' ? _.set(req[location], path, newValue) : _.set(req, location, newValue); + } + } + catch (e) { + if (e instanceof base_1.ValidationHalt) { + haltedInstances.add(instanceKey); + return; + } + throw e; + } + }); + await Promise.all(promises); + } + if (!options.dryRun) { + internalReq[base_1.contextsKey] = (internalReq[base_1.contextsKey] || []).concat(context); + } + return new ResultWithContextImpl(context); + } +} +exports.ContextRunnerImpl = ContextRunnerImpl; diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-runner.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/context-runner.d.ts new file mode 100644 index 00000000..7ce1a0c1 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-runner.d.ts @@ -0,0 +1,22 @@ +import { Request, ValidationError } from '../base'; +import { ReadonlyContext } from '../context'; +import { Result } from '../validation-result'; +export type ContextRunningOptions = { + /** + * Defines whether errors and sanitization should be persisted to `req`. + * @default false + */ + dryRun?: boolean; +}; +export interface ResultWithContext extends Result { + readonly context: ReadonlyContext; +} +export interface ContextRunner { + /** + * Runs the current validation chain. + * @param req the express request to validate + * @param options an object of options to customize how the chain will be run + * @returns a promise for a {@link Result} that resolves when the validation chain has finished + */ + run(req: Request, options?: ContextRunningOptions): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/context-runner.js b/src/hello/server/node_modules/express-validator/lib/chain/context-runner.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/context-runner.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/hello/server/node_modules/express-validator/lib/chain/index.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/index.d.ts new file mode 100644 index 00000000..7f64c1f1 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/index.d.ts @@ -0,0 +1,9 @@ +export * from './sanitizers'; +export * from './sanitizers-impl'; +export * from './context-handler'; +export * from './context-handler-impl'; +export * from './context-runner'; +export * from './context-runner-impl'; +export * from './validators'; +export * from './validators-impl'; +export * from './validation-chain'; diff --git a/src/hello/server/node_modules/express-validator/lib/chain/index.js b/src/hello/server/node_modules/express-validator/lib/chain/index.js new file mode 100644 index 00000000..dc8319ff --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/index.js @@ -0,0 +1,25 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./sanitizers"), exports); +__exportStar(require("./sanitizers-impl"), exports); +__exportStar(require("./context-handler"), exports); +__exportStar(require("./context-handler-impl"), exports); +__exportStar(require("./context-runner"), exports); +__exportStar(require("./context-runner-impl"), exports); +__exportStar(require("./validators"), exports); +__exportStar(require("./validators-impl"), exports); +__exportStar(require("./validation-chain"), exports); diff --git a/src/hello/server/node_modules/express-validator/lib/chain/sanitizers-impl.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers-impl.d.ts new file mode 100644 index 00000000..d2c1226e --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers-impl.d.ts @@ -0,0 +1,29 @@ +import { CustomSanitizer } from '../base'; +import { ContextBuilder } from '../context-builder'; +import * as Options from '../options'; +import { Sanitizers } from './sanitizers'; +export declare class SanitizersImpl implements Sanitizers { + private readonly builder; + private readonly chain; + constructor(builder: ContextBuilder, chain: Chain); + customSanitizer(sanitizer: CustomSanitizer): Chain; + default(default_value: any): Chain; + replace(values_to_replace: any, new_value: any): Chain; + private addStandardSanitization; + blacklist(chars: string): Chain; + escape(): Chain; + unescape(): Chain; + ltrim(chars?: string): Chain; + normalizeEmail(options?: Options.NormalizeEmailOptions): Chain; + rtrim(chars?: string): Chain; + stripLow(keep_new_lines?: boolean): Chain; + toArray(): Chain; + toBoolean(strict?: boolean): Chain; + toDate(): Chain; + toFloat(): Chain; + toInt(radix?: number): Chain; + toLowerCase(): Chain; + toUpperCase(): Chain; + trim(chars?: string): Chain; + whitelist(chars: string): Chain; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/sanitizers-impl.js b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers-impl.js new file mode 100644 index 00000000..57d17935 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers-impl.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SanitizersImpl = void 0; +const _ = require("lodash"); +const validator = require("validator"); +const sanitization_1 = require("../context-items/sanitization"); +class SanitizersImpl { + constructor(builder, chain) { + this.builder = builder; + this.chain = chain; + } + // custom sanitizers + customSanitizer(sanitizer) { + this.builder.addItem(new sanitization_1.Sanitization(sanitizer, true)); + return this.chain; + } + default(default_value) { + return this.customSanitizer(value => [undefined, null, NaN, ''].includes(value) ? _.cloneDeep(default_value) : value); + } + replace(values_to_replace, new_value) { + if (!Array.isArray(values_to_replace)) { + values_to_replace = [values_to_replace]; + } + return this.customSanitizer(value => values_to_replace.includes(value) ? _.cloneDeep(new_value) : value); + } + // Standard sanitizers + addStandardSanitization(sanitizer, ...options) { + this.builder.addItem(new sanitization_1.Sanitization(sanitizer, false, options)); + return this.chain; + } + blacklist(chars) { + return this.addStandardSanitization(validator.blacklist, chars); + } + escape() { + return this.addStandardSanitization(validator.escape); + } + unescape() { + return this.addStandardSanitization(validator.unescape); + } + ltrim(chars) { + return this.addStandardSanitization(validator.ltrim, chars); + } + normalizeEmail(options) { + return this.addStandardSanitization(validator.normalizeEmail, options); + } + rtrim(chars) { + return this.addStandardSanitization(validator.rtrim, chars); + } + stripLow(keep_new_lines) { + return this.addStandardSanitization(validator.stripLow, keep_new_lines); + } + toArray() { + return this.customSanitizer(value => (value !== undefined && ((Array.isArray(value) && value) || [value])) || []); + } + toBoolean(strict) { + return this.addStandardSanitization(validator.toBoolean, strict); + } + toDate() { + return this.addStandardSanitization(validator.toDate); + } + toFloat() { + return this.addStandardSanitization(validator.toFloat); + } + toInt(radix) { + return this.addStandardSanitization(validator.toInt, radix); + } + toLowerCase() { + return this.customSanitizer(value => (typeof value === 'string' ? value.toLowerCase() : value)); + } + toUpperCase() { + return this.customSanitizer(value => (typeof value === 'string' ? value.toUpperCase() : value)); + } + trim(chars) { + return this.addStandardSanitization(validator.trim, chars); + } + whitelist(chars) { + return this.addStandardSanitization(validator.whitelist, chars); + } +} +exports.SanitizersImpl = SanitizersImpl; diff --git a/src/hello/server/node_modules/express-validator/lib/chain/sanitizers.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers.d.ts new file mode 100644 index 00000000..0d6d3335 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers.d.ts @@ -0,0 +1,42 @@ +import { CustomSanitizer } from '../base'; +import * as Options from '../options'; +export interface Sanitizers { + /** + * Adds a custom sanitizer to the validation chain. + * + * @param sanitizer the custom sanitizer + * @returns the current validation chain + */ + customSanitizer(sanitizer: CustomSanitizer): Return; + /** + * Replaces the value of the field if it's one of `''`, `null`, `undefined` or `NaN`. + * + * @param default_value the value to replace with + * @returns the current validation chain + */ + default(default_value: any): Return; + /** + * Replaces a field's value with another value. + * + * @param values_to_replace one or more values that should be replaced + * @param new_value the value to replace with + * @returns the current validation chain + */ + replace(values_to_replace: any, new_value: any): Return; + blacklist(chars: string): Return; + escape(): Return; + unescape(): Return; + ltrim(chars?: string): Return; + normalizeEmail(options?: Options.NormalizeEmailOptions): Return; + rtrim(chars?: string): Return; + stripLow(keep_new_lines?: boolean): Return; + toArray(): Return; + toBoolean(strict?: boolean): Return; + toDate(): Return; + toFloat(): Return; + toInt(radix?: number): Return; + toLowerCase(): Return; + toUpperCase(): Return; + trim(chars?: string): Return; + whitelist(chars: string): Return; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/sanitizers.js b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/sanitizers.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/hello/server/node_modules/express-validator/lib/chain/validation-chain.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/validation-chain.d.ts new file mode 100644 index 00000000..aad812eb --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/validation-chain.d.ts @@ -0,0 +1,18 @@ +import { Request } from '../base'; +import { ContextBuilder } from '../context-builder'; +import { Sanitizers } from './sanitizers'; +import { Validators } from './validators'; +import { ContextHandler } from './context-handler'; +import { ContextRunner } from './context-runner'; +export interface ValidationChain extends Validators, Sanitizers, ContextHandler, ContextRunner { + (req: Request, res: any, next: (error?: any) => void): void; + builder: ContextBuilder; +} +/** + * A copy of `ValidationChain` where methods that would return the chain itself can return any other + * value. + * Useful for typing functions which accept either standard or custom validation chains. + */ +export type ValidationChainLike = { + [K in keyof ValidationChain]: ValidationChain[K] extends (...args: infer A) => ValidationChain ? (...args: A) => any : ValidationChain[K]; +}; diff --git a/src/hello/server/node_modules/express-validator/lib/chain/validation-chain.js b/src/hello/server/node_modules/express-validator/lib/chain/validation-chain.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/validation-chain.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/hello/server/node_modules/express-validator/lib/chain/validators-impl.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/validators-impl.d.ts new file mode 100644 index 00000000..1a318dcd --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/validators-impl.d.ts @@ -0,0 +1,121 @@ +import { CustomValidator, ErrorMessage, FieldMessageFactory } from '../base'; +import { ContextBuilder } from '../context-builder'; +import * as Options from '../options'; +import { ExistsOptions, Validators } from './validators'; +export declare class ValidatorsImpl implements Validators { + private readonly builder; + private readonly chain; + private lastValidator; + private negateNext; + constructor(builder: ContextBuilder, chain: Chain); + private addItem; + not(): Chain; + withMessage(message: FieldMessageFactory | ErrorMessage): Chain; + custom(validator: CustomValidator): Chain; + exists(options?: ExistsOptions): Chain; + isArray(options?: { + min?: number; + max?: number; + }): Chain; + isObject(options?: { + strict?: boolean; + }): Chain; + isString(): Chain; + notEmpty(options?: Options.IsEmptyOptions): Chain; + private addStandardValidation; + contains(elem: any, options?: Options.ContainsOptions): Chain; + equals(comparison: string): Chain; + isAbaRouting(): Chain; + isAfter(dateOrOptions?: string | Options.IsAfterOptions): Chain; + isAlpha(locale?: Options.AlphaLocale, options?: Options.IsAlphaOptions): Chain; + isAlphanumeric(locale?: Options.AlphanumericLocale, options?: Options.IsAlphanumericOptions): Chain; + isAscii(): Chain; + isBase32(options?: Options.IsBase32Options): Chain; + isBase58(): Chain; + isBase64(options?: Options.IsBase64Options): Chain; + isBefore(date?: string): Chain; + isBIC(): Chain; + /** + * There are basically three levels of strictness for this validator. + * Passing `{ strict: true }` as option only passes the validation if the value is a JS bool. (It also overrides the loose property of the options). + * Passing `{ loose: true|false }` along with no `strict` prop of with `strict` falsy follows the behaviour specified in validator.js docs. + */ + isBoolean(options?: Options.IsBooleanOptions): Chain; + isBtcAddress(): Chain; + isByteLength(options: Options.MinMaxOptions): Chain; + isCreditCard(): Chain; + isCurrency(options?: Options.IsCurrencyOptions): Chain; + isDataURI(): Chain; + isDate(options?: Options.IsDateOptions): Chain; + isDecimal(options?: Options.IsDecimalOptions): Chain; + isDivisibleBy(number: number): Chain; + isEAN(): Chain; + isEmail(options?: Options.IsEmailOptions): Chain; + isEmpty(options?: Options.IsEmptyOptions): Chain; + isEthereumAddress(): Chain; + isFQDN(options?: Options.IsFQDNOptions): Chain; + isFloat(options?: Options.IsFloatOptions): Chain; + isFreightContainerID(): Chain; + isFullWidth(): Chain; + isHalfWidth(): Chain; + isHash(algorithm: Options.HashAlgorithm): Chain; + isHexColor(): Chain; + isHexadecimal(): Chain; + isHSL(): Chain; + isIBAN(options?: Options.IsIBANOptions): Chain; + isIdentityCard(locale: Options.IdentityCardLocale): Chain; + isIMEI(options?: Options.IsIMEIOptions): Chain; + isIP(version?: Options.IPVersion): Chain; + isIPRange(version?: Options.IPVersion): Chain; + isISBN(versionOrOptions?: number | Options.IsISBNOptions): Chain; + isISSN(options?: Options.IsISSNOptions): Chain; + isISIN(): Chain; + isISO6346(): Chain; + isISO6391(): Chain; + isISO8601(options?: Options.IsISO8601Options): Chain; + isISO31661Numeric(): Chain; + isISO31661Alpha2(): Chain; + isISO31661Alpha3(): Chain; + isISO4217(): Chain; + isISO15924(): Chain; + isISRC(): Chain; + isIn(values: readonly any[]): Chain; + isInt(options?: Options.IsIntOptions): Chain; + isJSON(options?: Options.IsJSONOptions): Chain; + isJWT(): Chain; + isLatLong(options?: Options.IsLatLongOptions): Chain; + isLength(options: Options.MinMaxOptions): Chain; + isLicensePlate(locale: Options.IsLicensePlateLocale): Chain; + isLocale(): Chain; + isLowercase(): Chain; + isLuhnNumber(): Chain; + isMagnetURI(): Chain; + isMailtoURI(options?: Options.IsEmailOptions): Chain; + isMACAddress(options?: Options.IsMACAddressOptions): Chain; + isMD5(): Chain; + isMimeType(): Chain; + isMobilePhone(locale: Options.MobilePhoneLocale | readonly Options.MobilePhoneLocale[], options?: Options.IsMobilePhoneOptions): Chain; + isMongoId(): Chain; + isMultibyte(): Chain; + isNumeric(options?: Options.IsNumericOptions): Chain; + isOctal(): Chain; + isPassportNumber(countryCode?: Options.PassportCountryCode): Chain; + isPort(): Chain; + isPostalCode(locale: Options.PostalCodeLocale): Chain; + isRFC3339(): Chain; + isRgbColor(includePercentValues?: boolean): Chain; + isSemVer(): Chain; + isSlug(): Chain; + isStrongPassword(options?: Options.IsStrongPasswordOptions): Chain; + isSurrogatePair(): Chain; + isTaxID(locale: Options.TaxIDLocale): Chain; + isTime(options?: Options.IsTimeOptions): Chain; + isURL(options?: Options.IsURLOptions): Chain; + isULID(): Chain; + isUUID(version?: Options.UUIDVersion): Chain; + isUppercase(): Chain; + isVariableWidth(): Chain; + isVAT(countryCode: Options.VATCountryCode): Chain; + isWhitelisted(chars: string | readonly string[]): Chain; + matches(pattern: RegExp | string, modifiers?: string): any; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/validators-impl.js b/src/hello/server/node_modules/express-validator/lib/chain/validators-impl.js new file mode 100644 index 00000000..54f7f74d --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/validators-impl.js @@ -0,0 +1,353 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ValidatorsImpl = void 0; +const validator = require("validator"); +const context_items_1 = require("../context-items"); +class ValidatorsImpl { + constructor(builder, chain) { + this.builder = builder; + this.chain = chain; + this.negateNext = false; + } + addItem(item) { + this.builder.addItem(item); + this.lastValidator = item; + // Reset this.negateNext so that next validation isn't negated too + this.negateNext = false; + return this.chain; + } + // validation manipulation + not() { + this.negateNext = true; + return this.chain; + } + withMessage(message) { + this.lastValidator.message = message; + return this.chain; + } + // custom validators + custom(validator) { + return this.addItem(new context_items_1.CustomValidation(validator, this.negateNext)); + } + exists(options = {}) { + let validator; + if (options.checkFalsy || options.values === 'falsy') { + validator = value => !!value; + } + else if (options.checkNull || options.values === 'null') { + validator = value => value != null; + } + else { + validator = value => value !== undefined; + } + return this.custom(validator); + } + isArray(options = {}) { + return this.custom(value => Array.isArray(value) && + (typeof options.min === 'undefined' || value.length >= options.min) && + (typeof options.max === 'undefined' || value.length <= options.max)); + } + isObject(options = { strict: true }) { + return this.custom(value => typeof value === 'object' && + (options.strict == null || options.strict ? value !== null && !Array.isArray(value) : true)); + } + isString() { + return this.custom(value => typeof value === 'string'); + } + notEmpty(options) { + this.not(); + return this.isEmpty(options); + } + // Standard validators + addStandardValidation(validator, ...options) { + return this.addItem(new context_items_1.StandardValidation(validator, this.negateNext, options)); + } + contains(elem, options) { + return this.addStandardValidation(validator.contains, elem, options); + } + equals(comparison) { + return this.addStandardValidation(validator.equals, comparison); + } + isAbaRouting() { + return this.addStandardValidation(validator.isAbaRouting); + } + isAfter(dateOrOptions) { + return this.addStandardValidation(validator.isAfter, dateOrOptions); + } + isAlpha(locale, options) { + // TODO(v7): remove string[] support + const ignore = Array.isArray(options?.ignore) ? options?.ignore.join('') : options?.ignore; + return this.addStandardValidation(validator.isAlpha, locale, { ...options, ignore }); + } + isAlphanumeric(locale, options) { + return this.addStandardValidation(validator.isAlphanumeric, locale, options); + } + isAscii() { + return this.addStandardValidation(validator.isAscii); + } + isBase32(options) { + return this.addStandardValidation(validator.isBase32, options); + } + isBase58() { + return this.addStandardValidation(validator.isBase58); + } + isBase64(options) { + return this.addStandardValidation(validator.isBase64, options); + } + isBefore(date) { + return this.addStandardValidation(validator.isBefore, date); + } + isBIC() { + return this.addStandardValidation(validator.isBIC); + } + /** + * There are basically three levels of strictness for this validator. + * Passing `{ strict: true }` as option only passes the validation if the value is a JS bool. (It also overrides the loose property of the options). + * Passing `{ loose: true|false }` along with no `strict` prop of with `strict` falsy follows the behaviour specified in validator.js docs. + */ + isBoolean(options) { + if (options?.strict) { + return this.custom(value => { + return value === true || value === false; + }); + } + return this.addStandardValidation(validator.isBoolean, options); + } + isBtcAddress() { + return this.addStandardValidation(validator.isBtcAddress); + } + isByteLength(options) { + return this.addStandardValidation(validator.isByteLength, options); + } + isCreditCard() { + return this.addStandardValidation(validator.isCreditCard); + } + isCurrency(options) { + return this.addStandardValidation(validator.isCurrency, options); + } + isDataURI() { + return this.addStandardValidation(validator.isDataURI); + } + isDate(options) { + return this.addStandardValidation(validator.isDate, options); + } + isDecimal(options) { + return this.addStandardValidation(validator.isDecimal, options); + } + isDivisibleBy(number) { + return this.addStandardValidation(validator.isDivisibleBy, number); + } + isEAN() { + return this.addStandardValidation(validator.isEAN); + } + isEmail(options) { + return this.addStandardValidation(validator.isEmail, options); + } + isEmpty(options) { + return this.addStandardValidation(validator.isEmpty, options); + } + isEthereumAddress() { + return this.addStandardValidation(validator.isEthereumAddress); + } + isFQDN(options) { + return this.addStandardValidation(validator.isFQDN, options); + } + isFloat(options) { + return this.addStandardValidation(validator.isFloat, options); + } + isFreightContainerID() { + return this.addStandardValidation(validator.isFreightContainerID); + } + isFullWidth() { + return this.addStandardValidation(validator.isFullWidth); + } + isHalfWidth() { + return this.addStandardValidation(validator.isHalfWidth); + } + isHash(algorithm) { + return this.addStandardValidation(validator.isHash, algorithm); + } + isHexColor() { + return this.addStandardValidation(validator.isHexColor); + } + isHexadecimal() { + return this.addStandardValidation(validator.isHexadecimal); + } + isHSL() { + return this.addStandardValidation(validator.isHSL); + } + isIBAN(options) { + return this.addStandardValidation(validator.isIBAN, options); + } + isIdentityCard(locale) { + return this.addStandardValidation(validator.isIdentityCard, locale); + } + isIMEI(options) { + return this.addStandardValidation(validator.isIMEI, options); + } + isIP(version) { + return this.addStandardValidation(validator.isIP, version); + } + isIPRange(version) { + return this.addStandardValidation(validator.isIPRange, version); + } + isISBN(versionOrOptions) { + return this.addStandardValidation(validator.isISBN, versionOrOptions); + } + isISSN(options) { + return this.addStandardValidation(validator.isISSN, options); + } + isISIN() { + return this.addStandardValidation(validator.isISIN); + } + isISO6346() { + return this.addStandardValidation(validator.isISO6346); + } + isISO6391() { + return this.addStandardValidation(validator.isISO6391); + } + isISO8601(options) { + return this.addStandardValidation(validator.isISO8601, options); + } + isISO31661Numeric() { + return this.addStandardValidation(validator.isISO31661Numeric); + } + isISO31661Alpha2() { + return this.addStandardValidation(validator.isISO31661Alpha2); + } + isISO31661Alpha3() { + return this.addStandardValidation(validator.isISO31661Alpha3); + } + isISO4217() { + return this.addStandardValidation(validator.isISO4217); + } + isISO15924() { + return this.addStandardValidation(validator.isISO15924); + } + isISRC() { + return this.addStandardValidation(validator.isISRC); + } + isIn(values) { + return this.addStandardValidation(validator.isIn, values); + } + isInt(options) { + return this.addStandardValidation(validator.isInt, options); + } + isJSON(options) { + return this.addStandardValidation(validator.isJSON, options); + } + isJWT() { + return this.addStandardValidation(validator.isJWT); + } + isLatLong(options) { + return this.addStandardValidation(validator.isLatLong, options); + } + isLength(options) { + return this.addStandardValidation(validator.isLength, options); + } + isLicensePlate(locale) { + return this.addStandardValidation(validator.isLicensePlate, locale); + } + isLocale() { + return this.addStandardValidation(validator.isLocale); + } + isLowercase() { + return this.addStandardValidation(validator.isLowercase); + } + isLuhnNumber() { + return this.addStandardValidation(validator.isLuhnNumber); + } + isMagnetURI() { + return this.addStandardValidation(validator.isMagnetURI); + } + isMailtoURI(options) { + return this.addStandardValidation(validator.isMailtoURI, options); + } + isMACAddress(options) { + return this.addStandardValidation(validator.isMACAddress, options); + } + isMD5() { + return this.addStandardValidation(validator.isMD5); + } + isMimeType() { + return this.addStandardValidation(validator.isMimeType); + } + isMobilePhone(locale, options) { + return this.addStandardValidation(validator.isMobilePhone, locale, options); + } + isMongoId() { + return this.addStandardValidation(validator.isMongoId); + } + isMultibyte() { + return this.addStandardValidation(validator.isMultibyte); + } + isNumeric(options) { + return this.addStandardValidation(validator.isNumeric, options); + } + isOctal() { + return this.addStandardValidation(validator.isOctal); + } + isPassportNumber(countryCode) { + return this.addStandardValidation(validator.isPassportNumber, countryCode); + } + isPort() { + return this.addStandardValidation(validator.isPort); + } + isPostalCode(locale) { + return this.addStandardValidation(validator.isPostalCode, locale); + } + isRFC3339() { + return this.addStandardValidation(validator.isRFC3339); + } + isRgbColor(includePercentValues) { + return this.addStandardValidation(validator.isRgbColor, includePercentValues); + } + isSemVer() { + return this.addStandardValidation(validator.isSemVer); + } + isSlug() { + return this.addStandardValidation(validator.isSlug); + } + isStrongPassword(options) { + return this.addStandardValidation(validator.isStrongPassword, options); + } + isSurrogatePair() { + return this.addStandardValidation(validator.isSurrogatePair); + } + isTaxID(locale) { + return this.addStandardValidation(validator.isTaxID, locale); + } + isTime(options) { + return this.addStandardValidation(validator.isTime, options); + } + isURL(options) { + return this.addStandardValidation(validator.isURL, options); + } + isULID() { + return this.addStandardValidation(validator.isULID); + } + isUUID(version) { + return this.addStandardValidation(validator.isUUID, version); + } + isUppercase() { + return this.addStandardValidation(validator.isUppercase); + } + isVariableWidth() { + return this.addStandardValidation(validator.isVariableWidth); + } + isVAT(countryCode) { + return this.addStandardValidation(validator.isVAT, countryCode); + } + isWhitelisted(chars) { + return this.addStandardValidation(validator.isWhitelisted, chars); + } + matches(pattern, modifiers) { + return this.addStandardValidation.apply(this, [ + validator.matches, + ...(typeof pattern === 'string' + ? [pattern, modifiers] + : [pattern.source, [...new Set((modifiers || '') + pattern.flags)].join('')]), + ]); + } +} +exports.ValidatorsImpl = ValidatorsImpl; diff --git a/src/hello/server/node_modules/express-validator/lib/chain/validators.d.ts b/src/hello/server/node_modules/express-validator/lib/chain/validators.d.ts new file mode 100644 index 00000000..e889be7c --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/validators.d.ts @@ -0,0 +1,181 @@ +import { CustomValidator, ErrorMessage, FieldMessageFactory } from '../base'; +import * as Options from '../options'; +export type ExistsOptions = { + /** + * Defines which kind of value makes a field _NOT_ exist. + * + * - `undefined`: only `undefined` values; equivalent to `value !== undefined` + * - `null`: only `undefined` and `null` values; equivalent to `value != null` + * - `falsy`: all falsy values; equivalent to `!!value` + * + * @default 'undefined' + */ + values?: 'undefined' | 'null' | 'falsy'; + /** + * Whether a field whose value is falsy should be considered non-existent. + * @default false + * @deprecated Use `values` instead + */ + checkFalsy?: boolean; + /** + * Whether a field whose value is `null` or `undefined` should be considered non-existent. + * @default false + * @deprecated Use `values` instead + */ + checkNull?: boolean; +}; +export interface Validators { + /** + * Negates the result of the next validator. + * + * @example check('weekday').not().isIn(['sunday', 'saturday']) + * @returns the current validation chain + */ + not(): Return; + /** + * Sets the error message for the previous validator. + * + * @param message the message, which can be any value, or a function for dynamically creating the + * error message based on the field value + * @returns the current validation chain + */ + withMessage(message: FieldMessageFactory | ErrorMessage): Return; + /** + * Adds a custom validator to the validation chain. + * + * @param validator the custom validator + * @returns the current validation chain + */ + custom(validator: CustomValidator): Return; + /** + * Adds a validator to check that the fields exist in the request. + * By default, this means that the value of the fields may not be `undefined`; + * all other values are acceptable. + * + * @param options + * @returns the current validation chain + */ + exists(options?: ExistsOptions): Return; + /** + * Adds a validator to check if a value is an array. + * + * @param options + * @returns the current validation chain + */ + isArray(options?: { + min?: number; + max?: number; + }): Return; + /** + * Adds a validator to check if a value is an object. + * + * @param options + * @returns the current validation chain + */ + isObject(options?: { + strict?: boolean; + }): Return; + /** + * Adds a validator to check if a value is a string. + * + * @returns the current validation chain + */ + isString(): Return; + /** + * Adds a validator to check if a value is not empty; that is, a string with length of 1 or more. + * + * @param options + * @returns the current validation chain + */ + notEmpty(options?: Options.IsEmptyOptions): Return; + contains(elem: any, options?: Options.ContainsOptions): Return; + equals(comparison: string): Return; + isAbaRouting(): Return; + isAfter(dateOrOptions?: string | Options.IsAfterOptions): Return; + isAlpha(locale?: Options.AlphaLocale, options?: Options.IsAlphaOptions): Return; + isAlphanumeric(locale?: Options.AlphanumericLocale, options?: Options.IsAlphanumericOptions): Return; + isAscii(): Return; + isBase32(options?: Options.IsBase32Options): Return; + isBase58(): Return; + isBase64(options?: Options.IsBase64Options): Return; + isBefore(date?: string): Return; + isBIC(): Return; + isBoolean(options?: Options.IsBooleanOptions): Return; + isBtcAddress(): Return; + isByteLength(options: Options.MinMaxExtendedOptions): Return; + isCreditCard(options?: Options.IsCreditCard): Return; + isCurrency(options?: Options.IsCurrencyOptions): Return; + isDataURI(): Return; + isDate(options?: Options.IsDateOptions): Return; + isDecimal(options?: Options.IsDecimalOptions): Return; + isDivisibleBy(number: number): Return; + isEAN(): Return; + isEmail(options?: Options.IsEmailOptions): Return; + isEmpty(options?: Options.IsEmptyOptions): Return; + isEthereumAddress(): Return; + isFQDN(options?: Options.IsFQDNOptions): Return; + isFloat(options?: Options.IsFloatOptions): Return; + isFreightContainerID(): Return; + isFullWidth(): Return; + isHalfWidth(): Return; + isHash(algorithm: Options.HashAlgorithm): Return; + isHexColor(): Return; + isHexadecimal(): Return; + isHSL(): Return; + isIBAN(options?: Options.IsIBANOptions): Return; + isIdentityCard(locale?: Options.IdentityCardLocale): Return; + isIMEI(options?: Options.IsIMEIOptions): Return; + isIP(version?: Options.IPVersion): Return; + isIPRange(version?: Options.IPVersion): Return; + isISBN(versionOrOptions?: number | Options.IsISBNOptions): Return; + isISSN(options?: Options.IsISSNOptions): Return; + isISIN(): Return; + isISO6346(): Return; + isISO6391(): Return; + isISO8601(options?: Options.IsISO8601Options): Return; + isISO31661Numeric(): Return; + isISO31661Alpha2(): Return; + isISO31661Alpha3(): Return; + isISO4217(): Return; + isISO15924(): Return; + isISRC(): Return; + isIn(values: readonly any[]): Return; + isInt(options?: Options.IsIntOptions): Return; + isJSON(options?: Options.IsJSONOptions): Return; + isJWT(): Return; + isLatLong(options?: Options.IsLatLongOptions): Return; + isLength(options: Options.MinMaxOptions): Return; + isLicensePlate(locale: Options.IsLicensePlateLocale): Return; + isLocale(): Return; + isLowercase(): Return; + isLuhnNumber(): Return; + isMagnetURI(): Return; + isMailtoURI(options?: Options.IsEmailOptions): Return; + isMACAddress(options?: Options.IsMACAddressOptions): Return; + isMD5(): Return; + isMimeType(): Return; + isMobilePhone(locale: Options.MobilePhoneLocale | readonly Options.MobilePhoneLocale[], options?: Options.IsMobilePhoneOptions): Return; + isMongoId(): Return; + isMultibyte(): Return; + isNumeric(options?: Options.IsNumericOptions): Return; + isOctal(): Return; + isPassportNumber(countryCode?: Options.PassportCountryCode): Return; + isPort(): Return; + isPostalCode(locale: Options.PostalCodeLocale): Return; + isRgbColor(includePercentValues?: boolean): Return; + isRFC3339(): Return; + isSemVer(): Return; + isSlug(): Return; + isStrongPassword(options?: Options.IsStrongPasswordOptions): Return; + isSurrogatePair(): Return; + isTaxID(locale: Options.TaxIDLocale): Return; + isTime(options: Options.IsTimeOptions): Return; + isURL(options?: Options.IsURLOptions): Return; + isULID(): Return; + isUUID(version?: Options.UUIDVersion): Return; + isUppercase(): Return; + isVariableWidth(): Return; + isVAT(countryCode: Options.VATCountryCode): Return; + isWhitelisted(chars: string | readonly string[]): Return; + matches(pattern: RegExp | string, modifiers?: string): Return; +} diff --git a/src/hello/server/node_modules/express-validator/lib/chain/validators.js b/src/hello/server/node_modules/express-validator/lib/chain/validators.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/chain/validators.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/hello/server/node_modules/express-validator/lib/context-builder.d.ts b/src/hello/server/node_modules/express-validator/lib/context-builder.d.ts new file mode 100644 index 00000000..c16ee335 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-builder.d.ts @@ -0,0 +1,20 @@ +import { ContextItem } from './context-items'; +import { Context, Optional } from './context'; +import { Location } from './base'; +export declare class ContextBuilder { + private readonly stack; + private fields; + private locations; + private message; + private optional; + private requestBail; + private visibility; + setFields(fields: string[]): this; + setLocations(locations: Location[]): this; + setMessage(message: any): this; + addItem(...items: ContextItem[]): this; + setOptional(options: Optional): this; + setRequestBail(): this; + setHidden(hidden: boolean, hiddenValue?: string): this; + build(): Context; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-builder.js b/src/hello/server/node_modules/express-validator/lib/context-builder.js new file mode 100644 index 00000000..06fcfa77 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-builder.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ContextBuilder = void 0; +const context_1 = require("./context"); +class ContextBuilder { + constructor() { + this.stack = []; + this.fields = []; + this.locations = []; + this.optional = false; + this.requestBail = false; + this.visibility = { type: 'visible' }; + } + setFields(fields) { + this.fields = fields; + return this; + } + setLocations(locations) { + this.locations = locations; + return this; + } + setMessage(message) { + this.message = message; + return this; + } + addItem(...items) { + this.stack.push(...items); + return this; + } + setOptional(options) { + this.optional = options; + return this; + } + setRequestBail() { + this.requestBail = true; + return this; + } + setHidden(hidden, hiddenValue) { + if (hidden) { + this.visibility = + hiddenValue !== undefined ? { type: 'redacted', value: hiddenValue } : { type: 'hidden' }; + } + else { + this.visibility = { type: 'visible' }; + } + return this; + } + build() { + return new context_1.Context(this.fields, this.locations, this.stack, this.optional, this.requestBail, this.visibility, this.message); + } +} +exports.ContextBuilder = ContextBuilder; diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/bail.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/bail.d.ts new file mode 100644 index 00000000..a7106f71 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/bail.d.ts @@ -0,0 +1,5 @@ +import { Context } from '../context'; +import { ContextItem } from './context-item'; +export declare class Bail implements ContextItem { + run(context: Context): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/bail.js b/src/hello/server/node_modules/express-validator/lib/context-items/bail.js new file mode 100644 index 00000000..b374252c --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/bail.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Bail = void 0; +const base_1 = require("../base"); +class Bail { + run(context) { + if (context.errors.length > 0) { + throw new base_1.ValidationHalt(); + } + return Promise.resolve(); + } +} +exports.Bail = Bail; diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/chain-condition.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/chain-condition.d.ts new file mode 100644 index 00000000..4c0ec3d9 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/chain-condition.d.ts @@ -0,0 +1,9 @@ +import { Meta } from '../base'; +import { ContextRunner } from '../chain'; +import { Context } from '../context'; +import { ContextItem } from './context-item'; +export declare class ChainCondition implements ContextItem { + private readonly chain; + constructor(chain: ContextRunner); + run(_context: Context, _value: any, meta: Meta): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/chain-condition.js b/src/hello/server/node_modules/express-validator/lib/context-items/chain-condition.js new file mode 100644 index 00000000..0d1b44b7 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/chain-condition.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChainCondition = void 0; +const base_1 = require("../base"); +class ChainCondition { + constructor(chain) { + this.chain = chain; + } + async run(_context, _value, meta) { + const result = await this.chain.run(meta.req, { dryRun: true }); + if (!result.isEmpty()) { + throw new base_1.ValidationHalt(); + } + } +} +exports.ChainCondition = ChainCondition; diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/context-item.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/context-item.d.ts new file mode 100644 index 00000000..6cb197ef --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/context-item.d.ts @@ -0,0 +1,5 @@ +import { Meta } from '../base'; +import { Context } from '../context'; +export interface ContextItem { + run(context: Context, value: any, meta: Meta): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/context-item.js b/src/hello/server/node_modules/express-validator/lib/context-items/context-item.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/context-item.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/custom-condition.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/custom-condition.d.ts new file mode 100644 index 00000000..102d20a2 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/custom-condition.d.ts @@ -0,0 +1,8 @@ +import { CustomValidator, Meta } from '../base'; +import { Context } from '../context'; +import { ContextItem } from './context-item'; +export declare class CustomCondition implements ContextItem { + private readonly condition; + constructor(condition: CustomValidator); + run(_context: Context, value: any, meta: Meta): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/custom-condition.js b/src/hello/server/node_modules/express-validator/lib/context-items/custom-condition.js new file mode 100644 index 00000000..65e1a0e2 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/custom-condition.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CustomCondition = void 0; +const base_1 = require("../base"); +class CustomCondition { + constructor(condition) { + this.condition = condition; + } + async run(_context, value, meta) { + try { + const result = this.condition(value, meta); + await result; + // if the promise resolved or the result is truthy somehow, then there's no validation halt. + if (!result) { + // the error thrown here is symbolic, it will be re-thrown in the catch clause anyway. + throw new Error(); + } + } + catch (e) { + throw new base_1.ValidationHalt(); + } + } +} +exports.CustomCondition = CustomCondition; diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/custom-validation.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/custom-validation.d.ts new file mode 100644 index 00000000..15fa35b3 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/custom-validation.d.ts @@ -0,0 +1,10 @@ +import { CustomValidator, Meta } from '../base'; +import { Context } from '../context'; +import { ContextItem } from './context-item'; +export declare class CustomValidation implements ContextItem { + private readonly validator; + private readonly negated; + message: any; + constructor(validator: CustomValidator, negated: boolean); + run(context: Context, value: any, meta: Meta): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/custom-validation.js b/src/hello/server/node_modules/express-validator/lib/context-items/custom-validation.js new file mode 100644 index 00000000..26954687 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/custom-validation.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CustomValidation = void 0; +class CustomValidation { + constructor(validator, negated) { + this.validator = validator; + this.negated = negated; + } + async run(context, value, meta) { + try { + const result = this.validator(value, meta); + const actualResult = await result; + const isPromise = result?.then; + const failed = this.negated ? actualResult : !actualResult; + // A promise that was resolved only adds an error if negated. + // Otherwise it always succeeds + if ((!isPromise && failed) || (isPromise && this.negated)) { + context.addError({ type: 'field', message: this.message, value, meta }); + } + } + catch (err) { + if (this.negated) { + return; + } + context.addError({ + type: 'field', + message: this.message || (err instanceof Error ? err.message : err), + value, + meta, + }); + } + } +} +exports.CustomValidation = CustomValidation; diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/index.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/index.d.ts new file mode 100644 index 00000000..c04d2816 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/index.d.ts @@ -0,0 +1,5 @@ +export * from './chain-condition'; +export * from './context-item'; +export * from './custom-condition'; +export * from './custom-validation'; +export * from './standard-validation'; diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/index.js b/src/hello/server/node_modules/express-validator/lib/context-items/index.js new file mode 100644 index 00000000..3a79eab5 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/index.js @@ -0,0 +1,21 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./chain-condition"), exports); +__exportStar(require("./context-item"), exports); +__exportStar(require("./custom-condition"), exports); +__exportStar(require("./custom-validation"), exports); +__exportStar(require("./standard-validation"), exports); diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/sanitization.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/sanitization.d.ts new file mode 100644 index 00000000..894f30dd --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/sanitization.d.ts @@ -0,0 +1,12 @@ +import { Context } from '../context'; +import { CustomSanitizer, Meta, StandardSanitizer } from '../base'; +import { toString as toStringImpl } from '../utils'; +import { ContextItem } from './context-item'; +export declare class Sanitization implements ContextItem { + private readonly sanitizer; + private readonly custom; + private readonly options; + private readonly stringify; + constructor(sanitizer: StandardSanitizer | CustomSanitizer, custom: boolean, options?: any[], stringify?: typeof toStringImpl); + run(context: Context, value: any, meta: Meta): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/sanitization.js b/src/hello/server/node_modules/express-validator/lib/context-items/sanitization.js new file mode 100644 index 00000000..6ba9d6da --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/sanitization.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Sanitization = void 0; +const utils_1 = require("../utils"); +class Sanitization { + constructor(sanitizer, custom, options = [], + // For testing only. + // Deliberately not calling it `toString` in order to not override `Object.prototype.toString`. + stringify = utils_1.toString) { + this.sanitizer = sanitizer; + this.custom = custom; + this.options = options; + this.stringify = stringify; + } + async run(context, value, meta) { + const { path, location } = meta; + const runCustomSanitizer = async () => { + const sanitizerValue = this.sanitizer(value, meta); + return Promise.resolve(sanitizerValue); + }; + if (this.custom) { + const newValue = await runCustomSanitizer(); + context.setData(path, newValue, location); + return; + } + const values = Array.isArray(value) ? value : [value]; + const newValues = values.map(value => { + return this.sanitizer(this.stringify(value), ...this.options); + }); + // We get only the first value of the array if the original value was wrapped. + context.setData(path, values !== value ? newValues[0] : newValues, location); + } +} +exports.Sanitization = Sanitization; diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/standard-validation.d.ts b/src/hello/server/node_modules/express-validator/lib/context-items/standard-validation.d.ts new file mode 100644 index 00000000..408ba409 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/standard-validation.d.ts @@ -0,0 +1,13 @@ +import { Meta, StandardValidator } from '../base'; +import { toString as toStringImpl } from '../utils'; +import { Context } from '../context'; +import { ContextItem } from './context-item'; +export declare class StandardValidation implements ContextItem { + private readonly validator; + private readonly negated; + private readonly options; + private readonly stringify; + message: any; + constructor(validator: StandardValidator, negated: boolean, options?: any[], stringify?: typeof toStringImpl); + run(context: Context, value: any, meta: Meta): Promise; +} diff --git a/src/hello/server/node_modules/express-validator/lib/context-items/standard-validation.js b/src/hello/server/node_modules/express-validator/lib/context-items/standard-validation.js new file mode 100644 index 00000000..4eba5917 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context-items/standard-validation.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StandardValidation = void 0; +const utils_1 = require("../utils"); +class StandardValidation { + constructor(validator, negated, options = [], + // For testing only. + // Deliberately not calling it `toString` in order to not override `Object.prototype.toString`. + stringify = utils_1.toString) { + this.validator = validator; + this.negated = negated; + this.options = options; + this.stringify = stringify; + } + async run(context, value, meta) { + const values = Array.isArray(value) ? value : [value]; + values.forEach(value => { + const result = this.validator(this.stringify(value), ...this.options); + if (this.negated ? result : !result) { + context.addError({ type: 'field', message: this.message, value, meta }); + } + }); + } +} +exports.StandardValidation = StandardValidation; diff --git a/src/hello/server/node_modules/express-validator/lib/context.d.ts b/src/hello/server/node_modules/express-validator/lib/context.d.ts new file mode 100644 index 00000000..8b47d7a4 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context.d.ts @@ -0,0 +1,61 @@ +import { FieldInstance, FieldValidationError, Location, Meta, Request, UnknownFieldInstance, ValidationError } from './base'; +import { ContextItem } from './context-items'; +/** + * Defines which kind of value makes a field optional. + * + * - `undefined`: only `undefined` values; equivalent to `value === undefined` + * - `null`: only `undefined` and `null` values; equivalent to `value == null` + * - `falsy`: all falsy values; equivalent to `!value` + * - `false`: not optional. + */ +export type Optional = 'undefined' | 'null' | 'falsy' | false; +export type AddErrorOptions = { + type: 'field'; + message?: any; + value: any; + meta: Meta; +} | { + type: 'unknown_fields'; + req: Request; + message?: any; + fields: UnknownFieldInstance[]; +} | { + type: 'alternative'; + req: Request; + message?: any; + nestedErrors: FieldValidationError[]; +} | { + type: 'alternative_grouped'; + req: Request; + message?: any; + nestedErrors: FieldValidationError[][]; +}; +export type ValueVisibility = { + type: 'visible'; +} | { + type: 'hidden'; +} | { + type: 'redacted'; + value: string; +}; +export declare class Context { + readonly fields: string[]; + readonly locations: Location[]; + readonly stack: ReadonlyArray; + readonly optional: Optional; + readonly bail: boolean; + readonly visibility: ValueVisibility; + readonly message?: any | undefined; + private readonly _errors; + get errors(): ReadonlyArray; + private readonly dataMap; + constructor(fields: string[], locations: Location[], stack: ReadonlyArray, optional: Optional, bail: boolean, visibility?: ValueVisibility, message?: any | undefined); + getData(options?: { + requiredOnly: boolean; + }): FieldInstance[]; + addFieldInstances(instances: FieldInstance[]): void; + setData(path: string, value: any, location: Location): void; + addError(opts: AddErrorOptions): void; + private updateVisibility; +} +export type ReadonlyContext = Pick>; diff --git a/src/hello/server/node_modules/express-validator/lib/context.js b/src/hello/server/node_modules/express-validator/lib/context.js new file mode 100644 index 00000000..4a1f779d --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/context.js @@ -0,0 +1,117 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Context = void 0; +const _ = require("lodash"); +function getDataMapKey(path, location) { + return `${location}:${path}`; +} +class Context { + get errors() { + return this._errors; + } + constructor(fields, locations, stack, optional, bail, visibility = { type: 'visible' }, message) { + this.fields = fields; + this.locations = locations; + this.stack = stack; + this.optional = optional; + this.bail = bail; + this.visibility = visibility; + this.message = message; + this._errors = []; + this.dataMap = new Map(); + } + getData(options = { requiredOnly: false }) { + const { optional } = this; + const checks = options.requiredOnly && optional + ? [ + (value) => value !== undefined, + (value) => (optional === 'null' ? value != null : true), + (value) => (optional === 'falsy' ? value : true), + ] + : []; + return _([...this.dataMap.values()]) + .groupBy('originalPath') + .flatMap((instances, group) => { + const locations = _.uniqBy(instances, 'location'); + // #331 - When multiple locations are involved, all of them must pass the validation. + // If none of the locations contain the field, we at least include one for error reporting. + // #458, #531 - Wildcards are an exception though: they may yield 0..* instances with different + // paths, so we may want to skip this filtering. + if (instances.length > 1 && locations.length > 1 && !group.includes('*')) { + const withValue = instances.filter(instance => instance.value !== undefined); + return withValue.length ? withValue : [instances[0]]; + } + return instances; + }) + .filter(instance => checks.every(check => check(instance.value))) + .valueOf(); + } + addFieldInstances(instances) { + instances.forEach(instance => { + this.dataMap.set(getDataMapKey(instance.path, instance.location), { ...instance }); + }); + } + setData(path, value, location) { + const instance = this.dataMap.get(getDataMapKey(path, location)); + if (!instance) { + throw new Error('Attempt to write data that did not pre-exist in context'); + } + instance.value = value; + } + addError(opts) { + const msg = opts.message || this.message || 'Invalid value'; + let error; + switch (opts.type) { + case 'field': + error = this.updateVisibility({ + type: 'field', + value: opts.value, + msg: typeof msg === 'function' ? msg(opts.value, opts.meta) : msg, + path: opts.meta?.path, + location: opts.meta?.location, + }); + break; + case 'unknown_fields': + error = { + type: 'unknown_fields', + msg: typeof msg === 'function' ? msg(opts.fields, { req: opts.req }) : msg, + fields: opts.fields, + }; + break; + case 'alternative': + error = { + type: 'alternative', + msg: typeof msg === 'function' ? msg(opts.nestedErrors, { req: opts.req }) : msg, + nestedErrors: opts.nestedErrors.map(error => this.updateVisibility(error)), + }; + break; + case 'alternative_grouped': + error = { + type: 'alternative_grouped', + msg: typeof msg === 'function' ? msg(opts.nestedErrors, { req: opts.req }) : msg, + nestedErrors: opts.nestedErrors.map(errors => errors.map(error => this.updateVisibility(error))), + }; + break; + default: + throw new Error(`Unhandled addError case`); + } + this._errors.push(error); + } + updateVisibility(error) { + switch (this.visibility.type) { + case 'hidden': + error = { ...error }; + delete error.value; + return error; + case 'redacted': + return { + ...error, + value: this.visibility.value, + }; + case 'visible': + default: + return error; + } + } +} +exports.Context = Context; diff --git a/src/hello/server/node_modules/express-validator/lib/express-validator.d.ts b/src/hello/server/node_modules/express-validator/lib/express-validator.d.ts new file mode 100644 index 00000000..82f8861a --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/express-validator.d.ts @@ -0,0 +1,153 @@ +import { CustomSanitizer, CustomValidator, ErrorMessage, FieldMessageFactory, Location, Middleware, Request, ValidationError } from './base'; +import { ContextRunner, ValidationChain } from './chain'; +import { MatchedDataOptions } from './matched-data'; +import { checkExact } from './middlewares/exact'; +import { OneOfOptions } from './middlewares/one-of'; +import { DefaultSchemaKeys, ExtensionSanitizerSchemaOptions, ExtensionValidatorSchemaOptions, ParamSchema, RunnableValidationChains } from './middlewares/schema'; +import { ErrorFormatter, Result } from './validation-result'; +type CustomValidatorsMap = Record; +type CustomSanitizersMap = Record; +type CustomOptions = { + errorFormatter?: ErrorFormatter; +}; +/** + * A validation chain that contains some extension validators/sanitizers. + * + * Built-in methods return the same chain type so that chaining using more of the extensions is + * possible. + * + * @example + * ``` + * function createChain(chain: ValidationChainWithExtensions<'isAllowedDomain' | 'removeEmailAttribute'>) { + * return chain + * .isEmail() + * .isAllowedDomain() + * .trim() + * .removeEmailAttribute(); + * } + * ``` + */ +export type ValidationChainWithExtensions = Middleware & { + [K in keyof ValidationChain]: ValidationChain[K] extends (...args: infer A) => ValidationChain ? (...params: A) => ValidationChainWithExtensions : ValidationChain[K]; +} & { + [K in T]: () => ValidationChainWithExtensions; +}; +/** + * Schema of validations/sanitizations for a field, including extension validators/sanitizers + */ +export type ParamSchemaWithExtensions = { + [K in keyof ParamSchema | V | S]?: K extends V ? ExtensionValidatorSchemaOptions : K extends S ? ExtensionSanitizerSchemaOptions : K extends keyof ParamSchema ? ParamSchema[K] : never; +}; +/** + * Type of a validation chain created by a custom ExpressValidator instance. + * + * @example + * ``` + * const myExpressValidator = new ExpressValidator({ + * isAllowedDomain: value => value.endsWith('@gmail.com') + * }); + * + * type MyCustomValidationChain = CustomValidationChain + * function createMyCustomChain(): MyCustomValidationChain { + * return myExpressValidator.body('email').isAllowedDomain(); + * } + * ``` + */ +export type CustomValidationChain> = T extends ExpressValidator ? ValidationChainWithExtensions> : never; +/** + * Mapping from field name to a validations/sanitizations schema, including extensions from an + * ExpressValidator instance. + */ +export type CustomSchema, K extends string = DefaultSchemaKeys> = T extends ExpressValidator ? Record, Extract, K>> : never; +export declare class ExpressValidator { + private readonly validators?; + private readonly sanitizers?; + private readonly options?; + private readonly validatorEntries; + private readonly sanitizerEntries; + constructor(validators?: V | undefined, sanitizers?: S | undefined, options?: CustomOptions | undefined); + private createChain; + buildCheckFunction(locations: Location[]): (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain; + /** + * Creates a middleware/validation chain for one or more fields that may be located in + * any of the following: + * + * - `req.body` + * - `req.cookies` + * - `req.headers` + * - `req.params` + * - `req.query` + * + * @param fields a string or array of field names to validate/sanitize + * @param message an error message to use when failed validations don't specify a custom message. + * Defaults to `Invalid Value`. + */ + readonly check: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain; + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.body`. + */ + readonly body: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain; + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.cookies`. + */ + readonly cookie: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain; + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.headers`. + */ + readonly header: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain; + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.params`. + */ + readonly param: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain; + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.query`. + */ + readonly query: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain; + /** + * Checks whether the request contains exactly only those fields that have been validated. + * + * This method is here for convenience; it does exactly the same as `checkExact`. + * + * @see {@link checkExact} + */ + readonly checkExact: typeof checkExact; + /** + * Creates an express middleware with validations for multiple fields at once in the form of + * a schema object. + * + * @param schema the schema to validate. + * @param defaultLocations which locations to validate in each field. Defaults to every location. + */ + readonly checkSchema: (schema: CustomSchema, locations?: Location[]) => RunnableValidationChains>; + /** + * Creates a middleware that will ensure that at least one of the given validation chains + * or validation chain groups are valid. + * + * If none are, a single error of type `alternative` is added to the request, + * with the errors of each chain made available under the `nestedErrors` property. + * + * @param chains an array of validation chains to check if are valid. + * If any of the items of `chains` is an array of validation chains, then all of them + * must be valid together for the request to be considered valid. + */ + oneOf(chains: (CustomValidationChain | CustomValidationChain[])[], options?: OneOfOptions): Middleware & ContextRunner; + /** + * Extracts the validation errors of an express request using the default error formatter of this + * instance. + * + * @see {@link validationResult()} + * @param req the express request object + * @returns a `Result` which will by default use the error formatter passed when + * instantiating `ExpressValidator`. + */ + readonly validationResult: (req: Request) => Result; + /** + * Extracts data validated or sanitized from the request, and builds an object with them. + * + * This method is a shortcut for `matchedData`; it does nothing different than it. + * + * @see {@link matchedData} + */ + matchedData(req: Request, options?: Partial): Record; +} +export {}; diff --git a/src/hello/server/node_modules/express-validator/lib/express-validator.js b/src/hello/server/node_modules/express-validator/lib/express-validator.js new file mode 100644 index 00000000..15287bb3 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/express-validator.js @@ -0,0 +1,125 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExpressValidator = void 0; +const matched_data_1 = require("./matched-data"); +const check_1 = require("./middlewares/check"); +const exact_1 = require("./middlewares/exact"); +const one_of_1 = require("./middlewares/one-of"); +const schema_1 = require("./middlewares/schema"); +const validation_result_1 = require("./validation-result"); +/* eslint-enable no-use-before-define */ +class ExpressValidator { + constructor(validators, sanitizers, options) { + this.validators = validators; + this.sanitizers = sanitizers; + this.options = options; + /** + * Creates a middleware/validation chain for one or more fields that may be located in + * any of the following: + * + * - `req.body` + * - `req.cookies` + * - `req.headers` + * - `req.params` + * - `req.query` + * + * @param fields a string or array of field names to validate/sanitize + * @param message an error message to use when failed validations don't specify a custom message. + * Defaults to `Invalid Value`. + */ + this.check = this.buildCheckFunction(['body', 'cookies', 'headers', 'params', 'query']); + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.body`. + */ + this.body = this.buildCheckFunction(['body']); + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.cookies`. + */ + this.cookie = this.buildCheckFunction(['cookies']); + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.headers`. + */ + this.header = this.buildCheckFunction(['headers']); + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.params`. + */ + this.param = this.buildCheckFunction(['params']); + /** + * Same as {@link ExpressValidator.check}, but only validates in `req.query`. + */ + this.query = this.buildCheckFunction(['query']); + /** + * Checks whether the request contains exactly only those fields that have been validated. + * + * This method is here for convenience; it does exactly the same as `checkExact`. + * + * @see {@link checkExact} + */ + this.checkExact = exact_1.checkExact; + /** + * Creates an express middleware with validations for multiple fields at once in the form of + * a schema object. + * + * @param schema the schema to validate. + * @param defaultLocations which locations to validate in each field. Defaults to every location. + */ + // NOTE: This method references its own type, so the type cast is necessary. + this.checkSchema = (0, schema_1.createCheckSchema)((...args) => this.createChain(...args), Object.keys(this.validators || {}), Object.keys(this.sanitizers || {})); + /** + * Extracts the validation errors of an express request using the default error formatter of this + * instance. + * + * @see {@link validationResult()} + * @param req the express request object + * @returns a `Result` which will by default use the error formatter passed when + * instantiating `ExpressValidator`. + */ + this.validationResult = (req) => { + const formatter = this.options?.errorFormatter; + const result = (0, validation_result_1.validationResult)(req); + return formatter ? result.formatWith(formatter) : result; + }; + this.validatorEntries = Object.entries(validators || {}); + this.sanitizerEntries = Object.entries(sanitizers || {}); + // Can't use arrow function in the declaration of `buildCheckFunction` due to the following + // error which only happens when tests are run without Jest cache (so CI only): + // + // 'buildCheckFunction' implicitly has type 'any' because it does not have a type annotation + // and is referenced directly or indirectly in its own initializer + this.buildCheckFunction = this.buildCheckFunction.bind(this); + } + createChain(fields = '', locations = [], message) { + const middleware = (0, check_1.check)(fields, locations, message); + const boundValidators = Object.fromEntries(this.validatorEntries.map(([name, fn]) => [name, () => middleware.custom(fn)])); + const boundSanitizers = Object.fromEntries(this.sanitizerEntries.map(([name, fn]) => [name, () => middleware.customSanitizer(fn)])); + return Object.assign(middleware, boundValidators, boundSanitizers); + } + buildCheckFunction(locations) { + return (fields, message) => this.createChain(fields, locations, message); + } + /** + * Creates a middleware that will ensure that at least one of the given validation chains + * or validation chain groups are valid. + * + * If none are, a single error of type `alternative` is added to the request, + * with the errors of each chain made available under the `nestedErrors` property. + * + * @param chains an array of validation chains to check if are valid. + * If any of the items of `chains` is an array of validation chains, then all of them + * must be valid together for the request to be considered valid. + */ + oneOf(chains, options) { + return (0, one_of_1.oneOf)(chains, options); + } + /** + * Extracts data validated or sanitized from the request, and builds an object with them. + * + * This method is a shortcut for `matchedData`; it does nothing different than it. + * + * @see {@link matchedData} + */ + matchedData(req, options) { + return (0, matched_data_1.matchedData)(req, options); + } +} +exports.ExpressValidator = ExpressValidator; diff --git a/src/hello/server/node_modules/express-validator/lib/field-selection.d.ts b/src/hello/server/node_modules/express-validator/lib/field-selection.d.ts new file mode 100644 index 00000000..99edd147 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/field-selection.d.ts @@ -0,0 +1,22 @@ +import { FieldInstance, Location, Request, UnknownFieldInstance } from './base'; +export type SelectFields = (req: Request, fields: string[], locations: Location[]) => FieldInstance[]; +export declare const selectFields: SelectFields; +export declare const selectUnknownFields: (req: Request, knownFields: string[], locations: Location[]) => UnknownFieldInstance[]; +/** + * Reconstructs a field path from a list of path segments. + * + * Most segments will be concatenated by a dot, for example `['foo', 'bar']` becomes `foo.bar`. + * However, a numeric segment will be wrapped in brackets to match regular JS array syntax: + * + * ``` + * reconstructFieldPath(['foo', 0, 'bar']) // foo[0].bar + * ``` + * + * Segments which have a special character such as `.` will be wrapped in brackets and quotes, + * which also matches JS syntax for objects with such keys. + * + * ``` + * reconstructFieldPath(['foo', 'bar.baz', 'qux']) // foo["bar.baz"].qux + * ``` + */ +export declare function reconstructFieldPath(segments: readonly string[]): string; diff --git a/src/hello/server/node_modules/express-validator/lib/field-selection.js b/src/hello/server/node_modules/express-validator/lib/field-selection.js new file mode 100644 index 00000000..b0551820 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/field-selection.js @@ -0,0 +1,221 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.selectUnknownFields = exports.selectFields = void 0; +exports.reconstructFieldPath = reconstructFieldPath; +const _ = require("lodash"); +const selectFields = (req, fields, locations) => _(fields) + .flatMap(field => _.flatMap(locations, location => { + return expandField(req, field, location); +})) + // Avoid duplicates if multiple field selections would return the same field twice. + // E.g. with fields = ['*.foo', 'bar.foo'] and req.body = { bar: { foo: 1 }, baz: { foo: 2 } }, + // the instance bla.foo would appear twice, and baz.foo once. + .uniqWith(isSameFieldInstance) + .value(); +exports.selectFields = selectFields; +function isSameFieldInstance(a, b) { + return a.path === b.path && a.location === b.location; +} +function expandField(req, field, location) { + const originalPath = field; + const pathToExpand = location === 'headers' ? field.toLowerCase() : field; + const paths = expandPath(req[location], pathToExpand, []); + return paths.map(({ path, values }) => { + const value = path === '' ? req[location] : _.get(req[location], path); + return { + location, + path, + originalPath, + pathValues: values, + value, + }; + }); +} +function expandPath(object, path, currPath, currValues = []) { + const segments = _.toPath(path); + if (!segments.length) { + // no more paths to traverse + return [ + { + path: reconstructFieldPath(currPath), + values: currValues, + }, + ]; + } + const key = segments[0]; + const rest = segments.slice(1); + if (object != null && !_.isObjectLike(object)) { + if (key === '**') { + if (!rest.length) { + // globstar leaves are always selected + return [ + { + path: reconstructFieldPath(currPath), + values: currValues, + }, + ]; + } + return []; + } + if (key === '*') { + // wildcard position does not exist + return []; + } + // value is a primitive, paths being traversed from here might be in their prototype, return the entire path + return [ + { + path: reconstructFieldPath([...currPath, ...segments]), + values: currValues, + }, + ]; + } + // Use a non-null value so that inexistent fields are still selected + object = object || {}; + if (key === '*') { + return Object.keys(object).flatMap(key => expandPath(object[key], rest, currPath.concat(key), currValues.concat(key))); + } + if (key === '**') { + return Object.keys(object).flatMap(key => { + const nextPath = currPath.concat(key); + const value = object[key]; + // recursively find matching subpaths + const selectedPaths = expandPath(value, segments, nextPath, [key]).concat( + // skip the first remaining segment, if it matches the current key + rest[0] === key ? expandPath(value, rest.slice(1), nextPath, []) : []); + return _.uniqBy(selectedPaths, ({ path }) => path).map(({ path, values }) => ({ + path, + values: values.length ? [...currValues, values.flat()] : currValues, + })); + }); + } + return expandPath(object[key], rest, currPath.concat(key), currValues); +} +const selectUnknownFields = (req, knownFields, locations) => { + const tree = {}; + knownFields.forEach(field => { + const segments = field === '' ? [''] : _.toPath(field); + pathToTree(segments, tree); + }); + const instances = []; + for (const location of locations) { + if (req[location] != null) { + instances.push(...findUnknownFields(location, req[location], tree)); + } + } + return instances; +}; +exports.selectUnknownFields = selectUnknownFields; +function pathToTree(segments, tree) { + // Will either create or merge into existing branch for the current path segment + const branch = tree[segments[0]] || (tree[segments[0]] = {}); + if (segments.length > 1) { + pathToTree(segments.slice(1), branch); + } + else { + // Leaf value. + branch[''] = {}; + } +} +/** + * Performs a depth-first search for unknown fields in `value`. + * The path to the unknown fields will be pushed to the `unknownFields` argument. + * + * Known fields must be passed via `tree`. A field won't be considered unknown if: + * - its branch is validated as a whole; that is, it contains an empty string key (e.g `{ ['']: {} }`); OR + * - its path is individually validated; OR + * - it's covered by a wildcard (`*`). + * + * @returns the list of unknown fields + */ +function findUnknownFields(location, value, tree, treePath = [], unknownFields = []) { + const globstarBranch = tree['**']; + if (tree[''] || globstarBranch?.['']) { + // The rest of the tree from here is covered by some validation chain + // For example, when the current treePath is `['foo', 'bar']` but `foo` is known + return unknownFields; + } + if (typeof value !== 'object') { + if (!treePath.length || globstarBranch) { + // This is either + // a. a req.body that isn't an object (e.g. `req.body = 'bla'`), and wasn't validated either + // b. a leaf value which wasn't the target of a globstar path, e.g. `foo.**.bar` + unknownFields.push({ + path: reconstructFieldPath(treePath), + value, + location, + }); + } + return unknownFields; + } + const wildcardBranch = tree['*']; + for (const key of Object.keys(value)) { + const keyBranch = tree[key]; + const path = treePath.concat([key]); + if (!keyBranch && !wildcardBranch && !globstarBranch) { + // No trees cover this path, so it's an unknown one. + unknownFields.push({ + path: reconstructFieldPath(path), + value: value[key], + location, + }); + continue; + } + const keyUnknowns = keyBranch ? findUnknownFields(location, value[key], keyBranch, path) : []; + const wildcardUnknowns = wildcardBranch + ? findUnknownFields(location, value[key], wildcardBranch, path) + : []; + const globstarUnknowns = globstarBranch + ? findUnknownFields(location, value[key], { ['**']: globstarBranch, ...globstarBranch }, path) + : []; + // If any of the tested branches contain only known fields, then don't mark the fields not covered + // by the other branches to the list of unknown ones. + // For example, `foo` is more comprehensive than `foo.*.bar`. + if ((!keyBranch || keyUnknowns.length) && + (!wildcardBranch || wildcardUnknowns.length) && + (!globstarBranch || globstarUnknowns.length)) { + unknownFields.push(...keyUnknowns, ...wildcardUnknowns, ...globstarUnknowns); + } + } + return unknownFields; +} +/** + * Reconstructs a field path from a list of path segments. + * + * Most segments will be concatenated by a dot, for example `['foo', 'bar']` becomes `foo.bar`. + * However, a numeric segment will be wrapped in brackets to match regular JS array syntax: + * + * ``` + * reconstructFieldPath(['foo', 0, 'bar']) // foo[0].bar + * ``` + * + * Segments which have a special character such as `.` will be wrapped in brackets and quotes, + * which also matches JS syntax for objects with such keys. + * + * ``` + * reconstructFieldPath(['foo', 'bar.baz', 'qux']) // foo["bar.baz"].qux + * ``` + */ +function reconstructFieldPath(segments) { + return segments.reduce((prev, segment) => { + let part = ''; + segment = segment === '\\*' ? '*' : segment; + // TODO: Handle brackets? + if (segment.includes('.')) { + // Special char key access + part = `["${segment}"]`; + } + else if (/^\d+$/.test(segment)) { + // Index access + part = `[${segment}]`; + } + else if (prev) { + // Object key access + part = `.${segment}`; + } + else { + // Top level key + part = segment; + } + return prev + part; + }, ''); +} diff --git a/src/hello/server/node_modules/express-validator/lib/index.d.ts b/src/hello/server/node_modules/express-validator/lib/index.d.ts new file mode 100644 index 00000000..edaa786c --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/index.d.ts @@ -0,0 +1,9 @@ +export { Location, Meta, CustomValidator, CustomSanitizer, AlternativeMessageFactory, FieldMessageFactory, GroupedAlternativeMessageFactory, UnknownFieldMessageFactory, FieldValidationError, AlternativeValidationError, GroupedAlternativeValidationError, UnknownFieldsError, ValidationError, } from './base'; +export { ContextRunner, ValidationChain } from './chain'; +export * from './middlewares/exact'; +export * from './middlewares/one-of'; +export * from './middlewares/validation-chain-builders'; +export { checkSchema, Schema, ParamSchema } from './middlewares/schema'; +export * from './matched-data'; +export * from './validation-result'; +export * from './express-validator'; diff --git a/src/hello/server/node_modules/express-validator/lib/index.js b/src/hello/server/node_modules/express-validator/lib/index.js new file mode 100644 index 00000000..228a49a2 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/index.js @@ -0,0 +1,25 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkSchema = void 0; +__exportStar(require("./middlewares/exact"), exports); +__exportStar(require("./middlewares/one-of"), exports); +__exportStar(require("./middlewares/validation-chain-builders"), exports); +var schema_1 = require("./middlewares/schema"); +Object.defineProperty(exports, "checkSchema", { enumerable: true, get: function () { return schema_1.checkSchema; } }); +__exportStar(require("./matched-data"), exports); +__exportStar(require("./validation-result"), exports); +__exportStar(require("./express-validator"), exports); diff --git a/src/hello/server/node_modules/express-validator/lib/matched-data.d.ts b/src/hello/server/node_modules/express-validator/lib/matched-data.d.ts new file mode 100644 index 00000000..4102a1af --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/matched-data.d.ts @@ -0,0 +1,26 @@ +import { Location, Request } from './base'; +export type MatchedDataOptions = { + /** + * Whether the value returned by `matchedData()` should include data deemed optional. + * @default false + */ + includeOptionals: boolean; + /** + * An array of locations in the request to extract the data from. + */ + locations: Location[]; + /** + * Whether the value returned by `matchedData()` should include only values that have passed + * validation. + * @default true + */ + onlyValidData: boolean; +}; +/** + * Extracts data validated or sanitized from the request, and builds an object with them. + * + * @param req the express request object + * @param options + * @returns an object of data that's been validated or sanitized in the passed request + */ +export declare function matchedData>(req: Request, options?: Partial): T; diff --git a/src/hello/server/node_modules/express-validator/lib/matched-data.js b/src/hello/server/node_modules/express-validator/lib/matched-data.js new file mode 100644 index 00000000..48227bfe --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/matched-data.js @@ -0,0 +1,45 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.matchedData = matchedData; +const _ = require("lodash"); +const base_1 = require("./base"); +/** + * Extracts data validated or sanitized from the request, and builds an object with them. + * + * @param req the express request object + * @param options + * @returns an object of data that's been validated or sanitized in the passed request + */ +function matchedData(req, options = {}) { + const internalReq = req; + const fieldExtractor = createFieldExtractor(options.includeOptionals !== true); + const validityFilter = createValidityFilter(options.onlyValidData); + const locationFilter = createLocationFilter(options.locations); + return _(internalReq[base_1.contextsKey]) + .flatMap(fieldExtractor) + .filter(validityFilter) + .map(field => field.instance) + .filter(locationFilter) + .reduce((state, instance) => _.set(state, instance.path, instance.value), {}); +} +function createFieldExtractor(removeOptionals) { + return (context) => { + const instances = context.getData({ requiredOnly: removeOptionals }); + return instances.map((instance) => ({ instance, context })); + }; +} +function createValidityFilter(onlyValidData = true) { + return !onlyValidData + ? () => true + : (field) => { + const hasError = field.context.errors.some(error => error.type === 'field' && + error.location === field.instance.location && + error.path === field.instance.path); + return !hasError; + }; +} +function createLocationFilter(locations = []) { + // No locations mean all locations + const allLocations = locations.length === 0; + return allLocations ? () => true : (field) => locations.includes(field.location); +} diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/check.d.ts b/src/hello/server/node_modules/express-validator/lib/middlewares/check.d.ts new file mode 100644 index 00000000..8adda740 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/check.d.ts @@ -0,0 +1,3 @@ +import { ErrorMessage, FieldMessageFactory, Location } from '../base'; +import { ValidationChain } from '../chain'; +export declare function check(fields?: string | string[], locations?: Location[], message?: FieldMessageFactory | ErrorMessage): ValidationChain; diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/check.js b/src/hello/server/node_modules/express-validator/lib/middlewares/check.js new file mode 100644 index 00000000..46181b94 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/check.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.check = check; +const chain_1 = require("../chain"); +const context_builder_1 = require("../context-builder"); +const utils_1 = require("../utils"); +function check(fields = '', locations = [], message) { + const builder = new context_builder_1.ContextBuilder() + .setFields(Array.isArray(fields) ? fields : [fields]) + .setLocations(locations) + .setMessage(message); + const runner = new chain_1.ContextRunnerImpl(builder); + const middleware = async (req, _res, next) => { + try { + await runner.run(req); + next(); + } + catch (e) { + next(e); + } + }; + return Object.assign(middleware, (0, utils_1.bindAll)(runner), (0, utils_1.bindAll)(new chain_1.SanitizersImpl(builder, middleware)), (0, utils_1.bindAll)(new chain_1.ValidatorsImpl(builder, middleware)), (0, utils_1.bindAll)(new chain_1.ContextHandlerImpl(builder, middleware)), { builder }); +} diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/exact.d.ts b/src/hello/server/node_modules/express-validator/lib/middlewares/exact.d.ts new file mode 100644 index 00000000..4be208a4 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/exact.d.ts @@ -0,0 +1,29 @@ +import { ErrorMessage, Location, Middleware, UnknownFieldMessageFactory } from '../base'; +import { ContextRunner, ValidationChain } from '../chain'; +type CheckExactOptions = { + /** + * The list of locations which `checkExact()` should check. + * @default ['body', 'params', 'query'] + */ + locations?: readonly Location[]; + message?: UnknownFieldMessageFactory | ErrorMessage; +}; +type CheckExactInput = ValidationChain | ValidationChain[] | (ValidationChain | ValidationChain[])[]; +/** + * Checks whether the request contains exactly only those fields that have been validated. + * + * Unknown fields, if found, will generate an error of type `unknown_fields`. + * + * @param chains either a single chain, an array of chains, or a mixed array of chains and array of chains. + * This means that all of the below are valid: + * ``` + * checkExact(check('foo')) + * checkExact([check('foo'), check('bar')]) + * checkExact([check('foo'), check('bar')]) + * checkExact(checkSchema({ ... })) + * checkExact([checkSchema({ ... }), check('foo')]) + * ``` + * @param opts + */ +export declare function checkExact(chains?: CheckExactInput, opts?: CheckExactOptions): Middleware & ContextRunner; +export {}; diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/exact.js b/src/hello/server/node_modules/express-validator/lib/middlewares/exact.js new file mode 100644 index 00000000..91f44b85 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/exact.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkExact = checkExact; +const base_1 = require("../base"); +const chain_1 = require("../chain"); +const context_1 = require("../context"); +const field_selection_1 = require("../field-selection"); +const utils_1 = require("../utils"); +/** + * Checks whether the request contains exactly only those fields that have been validated. + * + * Unknown fields, if found, will generate an error of type `unknown_fields`. + * + * @param chains either a single chain, an array of chains, or a mixed array of chains and array of chains. + * This means that all of the below are valid: + * ``` + * checkExact(check('foo')) + * checkExact([check('foo'), check('bar')]) + * checkExact([check('foo'), check('bar')]) + * checkExact(checkSchema({ ... })) + * checkExact([checkSchema({ ... }), check('foo')]) + * ``` + * @param opts + */ +function checkExact(chains, opts) { + // Don't include all locations by default. Browsers will add cookies and headers that the user + // might not want to validate, which would be a footgun. + const locations = opts?.locations || ['body', 'params', 'query']; + const chainsArr = Array.isArray(chains) ? chains.flat() : chains ? [chains] : []; + const run = async (req) => { + const internalReq = req; + const fieldsByLocation = new Map(); + await (0, utils_1.runAllChains)(req, chainsArr); + // The chains above will have added contexts to the request + (internalReq[base_1.contextsKey] || []).forEach(context => { + context.locations.forEach(location => { + if (!locations.includes(location)) { + return; + } + const locationFields = fieldsByLocation.get(location) || []; + locationFields.push(...context.fields); + fieldsByLocation.set(location, locationFields); + }); + }); + // when none of the chains matched anything, then everything is unknown. + if (!fieldsByLocation.size) { + locations.forEach(location => fieldsByLocation.set(location, [])); + } + let unknownFields = []; + for (const [location, fields] of fieldsByLocation.entries()) { + unknownFields = unknownFields.concat((0, field_selection_1.selectUnknownFields)(req, fields, [location])); + } + const context = new context_1.Context([], [], [], false, false); + if (unknownFields.length) { + context.addError({ + type: 'unknown_fields', + req, + message: opts?.message || 'Unknown field(s)', + fields: unknownFields, + }); + } + internalReq[base_1.contextsKey] = internalReq[base_1.contextsKey] || []; + internalReq[base_1.contextsKey].push(context); + return new chain_1.ResultWithContextImpl(context); + }; + const middleware = (req, _res, next) => run(req).then(() => next(), next); + return Object.assign(middleware, { run }); +} diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/one-of.d.ts b/src/hello/server/node_modules/express-validator/lib/middlewares/one-of.d.ts new file mode 100644 index 00000000..35eff6cc --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/one-of.d.ts @@ -0,0 +1,28 @@ +import { AlternativeMessageFactory, ErrorMessage, GroupedAlternativeMessageFactory, Middleware } from '../base'; +import { ContextRunner, ValidationChain } from '../chain'; +export type OneOfErrorType = 'grouped' | 'least_errored' | 'flat'; +export type OneOfOptions = { + /** + * The error message to use in case none of the chains are valid. + */ + message?: AlternativeMessageFactory | ErrorMessage; + errorType?: Exclude; +} | { + /** + * The error message to use in case none of the chain groups are valid. + */ + message?: GroupedAlternativeMessageFactory | ErrorMessage; + errorType?: 'grouped'; +}; +/** + * Creates a middleware that will ensure that at least one of the given validation chains + * or validation chain groups are valid. + * + * If none are, a single `AlternativeValidationError` or `GroupedAlternativeValidationError` + * is added to the request, with the errors of each chain made available under the `nestedErrors` property. + * + * @param chains an array of validation chains to check if are valid. + * If any of the items of `chains` is an array of validation chains, then all of them + * must be valid together for the request to be considered valid. + */ +export declare function oneOf(chains: (ValidationChain | ValidationChain[])[], options?: OneOfOptions): Middleware & ContextRunner; diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/one-of.js b/src/hello/server/node_modules/express-validator/lib/middlewares/one-of.js new file mode 100644 index 00000000..da5dfdb4 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/one-of.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.oneOf = oneOf; +const _ = require("lodash"); +const chain_1 = require("../chain"); +const context_builder_1 = require("../context-builder"); +const utils_1 = require("../utils"); +// A dummy context item that gets added to surrogate contexts just to make them run +const dummyItem = { async run() { } }; +/** + * Creates a middleware that will ensure that at least one of the given validation chains + * or validation chain groups are valid. + * + * If none are, a single `AlternativeValidationError` or `GroupedAlternativeValidationError` + * is added to the request, with the errors of each chain made available under the `nestedErrors` property. + * + * @param chains an array of validation chains to check if are valid. + * If any of the items of `chains` is an array of validation chains, then all of them + * must be valid together for the request to be considered valid. + */ +function oneOf(chains, options = {}) { + const run = async (req, opts) => { + const surrogateContext = new context_builder_1.ContextBuilder().addItem(dummyItem).build(); + // Run each group of chains in parallel + const promises = chains.map(async (chain) => { + const group = Array.isArray(chain) ? chain : [chain]; + const results = await (0, utils_1.runAllChains)(req, group, { dryRun: true }); + const { contexts, groupErrors } = results.reduce(({ contexts, groupErrors }, result) => { + const { context } = result; + contexts.push(context); + const fieldErrors = context.errors.filter((error) => error.type === 'field'); + groupErrors.push(...fieldErrors); + return { contexts, groupErrors }; + }, { + contexts: [], + groupErrors: [], + }); + // #536: The data from a chain within oneOf() can only be made available to e.g. matchedData() + // if its entire group is valid. + if (!groupErrors.length) { + contexts.forEach(context => { + surrogateContext.addFieldInstances(context.getData()); + }); + } + return groupErrors; + }); + const allErrors = await Promise.all(promises); + const success = allErrors.some(groupErrors => groupErrors.length === 0); + if (!success) { + const message = options.message || 'Invalid value(s)'; + switch (options.errorType) { + case 'flat': + surrogateContext.addError({ + type: 'alternative', + req, + message, + nestedErrors: _.flatMap(allErrors), + }); + break; + case 'least_errored': + let leastErroredIndex = 0; + for (let i = 1; i < allErrors.length; i++) { + if (allErrors[i].length < allErrors[leastErroredIndex].length) { + leastErroredIndex = i; + } + } + surrogateContext.addError({ + type: 'alternative', + req, + message, + nestedErrors: allErrors[leastErroredIndex], + }); + break; + case 'grouped': + default: + // grouped + surrogateContext.addError({ + type: 'alternative_grouped', + req, + message, + nestedErrors: allErrors, + }); + break; + } + } + // Final context running pass to ensure contexts are added and values are modified properly + return await new chain_1.ContextRunnerImpl(surrogateContext).run(req, opts); + }; + const middleware = (req, _res, next) => run(req).then(() => next(), next); + return Object.assign(middleware, { run }); +} diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/schema.d.ts b/src/hello/server/node_modules/express-validator/lib/middlewares/schema.d.ts new file mode 100644 index 00000000..6ecd2808 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/schema.d.ts @@ -0,0 +1,108 @@ +import { CustomSanitizer, CustomValidator, ErrorMessage, FieldMessageFactory, Location, Request } from '../base'; +import { BailOptions, OptionalOptions, ValidationChain, ValidationChainLike } from '../chain'; +import { ResultWithContext } from '../chain/context-runner'; +import { Sanitizers } from '../chain/sanitizers'; +import { Validators } from '../chain/validators'; +type BaseValidatorSchemaOptions = { + /** + * The error message if there's a validation error, + * or a function for creating an error message dynamically. + */ + errorMessage?: FieldMessageFactory | ErrorMessage; + /** + * Whether the validation should be reversed. + */ + negated?: boolean; + /** + * Whether the validation should bail after running this validator + */ + bail?: boolean | BailOptions; + /** + * Specify a condition upon which this validator should run. + * Can either be a validation chain, or a custom validator function. + */ + if?: CustomValidator | ValidationChain; +}; +type ValidatorSchemaOptions> = boolean | (BaseValidatorSchemaOptions & { + /** + * Options to pass to the validator. + */ + options?: Parameters[K]> | Parameters[K]>[0]; +}); +type CustomValidatorSchemaOptions = BaseValidatorSchemaOptions & { + /** + * The implementation of a custom validator. + */ + custom: CustomValidator; +}; +export type ExtensionValidatorSchemaOptions = boolean | BaseValidatorSchemaOptions; +export type ValidatorsSchema = { + [K in Exclude, 'not' | 'withMessage'>]?: ValidatorSchemaOptions; +}; +type SanitizerSchemaOptions> = boolean | { + /** + * Options to pass to the sanitizer. + */ + options?: Parameters[K]> | Parameters[K]>[0]; +}; +type CustomSanitizerSchemaOptions = { + /** + * The implementation of a custom sanitizer. + */ + customSanitizer: CustomSanitizer; +}; +export type ExtensionSanitizerSchemaOptions = true; +export type SanitizersSchema = { + [K in keyof Sanitizers]?: SanitizerSchemaOptions; +}; +type BaseParamSchema = { + /** + * Which request location(s) the field to validate is. + * If unset, the field will be checked in every request location. + */ + in?: Location | Location[]; + /** + * The general error message in case a validator doesn't specify one, + * or a function for creating the error message dynamically. + */ + errorMessage?: FieldMessageFactory | any; + /** + * Whether this field should be considered optional + */ + optional?: boolean | { + options?: OptionalOptions; + }; +}; +export type DefaultSchemaKeys = keyof BaseParamSchema | keyof ValidatorsSchema | keyof SanitizersSchema; +/** + * Defines a schema of validations/sanitizations for a field + */ +export type ParamSchema = BaseParamSchema & ValidatorsSchema & SanitizersSchema & { + [K in T]?: K extends keyof BaseParamSchema ? BaseParamSchema[K] : K extends keyof ValidatorsSchema ? ValidatorsSchema[K] : K extends keyof SanitizersSchema ? SanitizersSchema[K] : CustomValidatorSchemaOptions | CustomSanitizerSchemaOptions; +}; +/** + * Defines a mapping from field name to a validations/sanitizations schema. + */ +export type Schema = Record>; +/** + * Shortcut type for the return of a {@link checkSchema()}-like function. + */ +export type RunnableValidationChains = C[] & { + run(req: Request): Promise; +}; +/** + * Factory for a {@link checkSchema()} function which can have extension validators and sanitizers. + * + * @see {@link checkSchema()} + */ +export declare function createCheckSchema(createChain: (fields?: string | string[], locations?: Location[], errorMessage?: any) => C, extraValidators?: (keyof C)[], extraSanitizers?: (keyof C)[]): (schema: Schema, defaultLocations?: Location[]) => RunnableValidationChains; +/** + * Creates an express middleware with validations for multiple fields at once in the form of + * a schema object. + * + * @param schema the schema to validate. + * @param defaultLocations + * @returns + */ +export declare const checkSchema: (schema: Schema, defaultLocations?: Location[]) => RunnableValidationChains; +export {}; diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/schema.js b/src/hello/server/node_modules/express-validator/lib/middlewares/schema.js new file mode 100644 index 00000000..345773d3 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/schema.js @@ -0,0 +1,112 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkSchema = void 0; +exports.createCheckSchema = createCheckSchema; +const _ = require("lodash"); +const chain_1 = require("../chain"); +const utils_1 = require("../utils"); +const check_1 = require("./check"); +const validLocations = ['body', 'cookies', 'headers', 'params', 'query']; +const protectedNames = ['errorMessage', 'in', 'optional']; +/** + * Factory for a {@link checkSchema()} function which can have extension validators and sanitizers. + * + * @see {@link checkSchema()} + */ +function createCheckSchema(createChain, extraValidators = [], extraSanitizers = []) { + /** Type guard for an object entry for a standard validator. */ + function isStandardValidator(entry) { + return ( + // #664 - explicitly exclude properties which should be set per validator + !['not', 'withMessage'].includes(entry[0]) && + (entry[0] in chain_1.ValidatorsImpl.prototype || extraValidators.includes(entry[0])) && + entry[1]); + } + /** Type guard for an object entry for a standard sanitizer. */ + function isStandardSanitizer(entry) { + return ((entry[0] in chain_1.SanitizersImpl.prototype || extraSanitizers.includes(entry[0])) && + entry[1]); + } + /** Type guard for an object entry for a custom validator. */ + function isCustomValidator(entry) { + return (!isStandardValidator(entry) && + !isStandardSanitizer(entry) && + typeof entry[1] === 'object' && + entry[1] && + typeof entry[1].custom === 'function'); + } + /** Type guard for an object entry for a custom sanitizer. */ + function isCustomSanitizer(entry) { + return (!isStandardValidator(entry) && + !isStandardSanitizer(entry) && + typeof entry[1] === 'object' && + entry[1] && + typeof entry[1].customSanitizer === 'function'); + } + return (schema, defaultLocations = validLocations) => { + const chains = Object.keys(schema).map(field => { + const config = schema[field]; + const chain = createChain(field, ensureLocations(config, defaultLocations), config.errorMessage); + // optional doesn't matter where it happens in the chain + if (config.optional) { + chain.optional(config.optional === true ? true : config.optional.options); + } + for (const entry of Object.entries(config)) { + if (protectedNames.includes(entry[0]) || !entry[1]) { + continue; + } + if (!isStandardValidator(entry) && + !isStandardSanitizer(entry) && + !isCustomValidator(entry) && + !isCustomSanitizer(entry)) { + console.warn(`express-validator: schema of "${field}" has unknown validator/sanitizer "${entry[0]}"`); + continue; + } + // For validators, stuff that must come _before_ the validator itself in the chain. + if ((isStandardValidator(entry) || isCustomValidator(entry)) && entry[1] !== true) { + const [, validatorConfig] = entry; + validatorConfig.if && chain.if(validatorConfig.if); + validatorConfig.negated && chain.not(); + } + if (isStandardValidator(entry) || isStandardSanitizer(entry)) { + const options = entry[1] ? (entry[1] === true ? [] : _.castArray(entry[1].options)) : []; + chain[entry[0]](...options); + } + if (isCustomValidator(entry)) { + chain.custom(entry[1].custom); + } + if (isCustomSanitizer(entry)) { + chain.customSanitizer(entry[1].customSanitizer); + } + // For validators, stuff that must come _after_ the validator itself in the chain. + if ((isStandardValidator(entry) || isCustomValidator(entry)) && entry[1] !== true) { + const [, validatorConfig] = entry; + validatorConfig.bail && + chain.bail(validatorConfig.bail === true ? {} : validatorConfig.bail); + validatorConfig.errorMessage && chain.withMessage(validatorConfig.errorMessage); + } + } + return chain; + }); + const run = async (req) => (0, utils_1.runAllChains)(req, chains); + return Object.assign(chains, { run }); + }; +} +/** + * Creates an express middleware with validations for multiple fields at once in the form of + * a schema object. + * + * @param schema the schema to validate. + * @param defaultLocations + * @returns + */ +exports.checkSchema = createCheckSchema(check_1.check); +function ensureLocations(config, defaults) { + // .filter(Boolean) is done because in can be undefined -- which is not going away from the type + // See https://github.com/Microsoft/TypeScript/pull/29955 for details + const locations = Array.isArray(config.in) + ? config.in + : [config.in].filter(Boolean); + const actualLocations = locations.length ? locations : defaults; + return actualLocations.filter(location => validLocations.includes(location)); +} diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/validation-chain-builders.d.ts b/src/hello/server/node_modules/express-validator/lib/middlewares/validation-chain-builders.d.ts new file mode 100644 index 00000000..267dc810 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/validation-chain-builders.d.ts @@ -0,0 +1,43 @@ +import { ErrorMessage, FieldMessageFactory, Location } from '../base'; +/** + * Creates a variant of `check()` that checks the given request locations. + * + * @example + * const checkBodyAndQuery = buildCheckFunction(['body', 'query']); + */ +export declare function buildCheckFunction(locations: Location[]): (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => import("..").ValidationChain; +/** + * Creates a middleware/validation chain for one or more fields that may be located in + * any of the following: + * + * - `req.body` + * - `req.cookies` + * - `req.headers` + * - `req.params` + * - `req.query` + * + * @param fields a string or array of field names to validate/sanitize + * @param message an error message to use when failed validations don't specify a custom message. + * Defaults to `Invalid Value`. + */ +export declare const check: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => import("..").ValidationChain; +/** + * Same as {@link check()}, but only validates `req.body`. + */ +export declare const body: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => import("..").ValidationChain; +/** + * Same as {@link check()}, but only validates `req.cookies`. + */ +export declare const cookie: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => import("..").ValidationChain; +/** + * Same as {@link check()}, but only validates `req.headers`. + */ +export declare const header: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => import("..").ValidationChain; +/** + * Same as {@link check()}, but only validates `req.params`. + */ +export declare const param: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => import("..").ValidationChain; +/** + * Same as {@link check()}, but only validates `req.query`. + */ +export declare const query: (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => import("..").ValidationChain; diff --git a/src/hello/server/node_modules/express-validator/lib/middlewares/validation-chain-builders.js b/src/hello/server/node_modules/express-validator/lib/middlewares/validation-chain-builders.js new file mode 100644 index 00000000..58f357ea --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/middlewares/validation-chain-builders.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.query = exports.param = exports.header = exports.cookie = exports.body = exports.check = void 0; +exports.buildCheckFunction = buildCheckFunction; +const check_1 = require("./check"); +/** + * Creates a variant of `check()` that checks the given request locations. + * + * @example + * const checkBodyAndQuery = buildCheckFunction(['body', 'query']); + */ +function buildCheckFunction(locations) { + return (fields, message) => (0, check_1.check)(fields, locations, message); +} +/** + * Creates a middleware/validation chain for one or more fields that may be located in + * any of the following: + * + * - `req.body` + * - `req.cookies` + * - `req.headers` + * - `req.params` + * - `req.query` + * + * @param fields a string or array of field names to validate/sanitize + * @param message an error message to use when failed validations don't specify a custom message. + * Defaults to `Invalid Value`. + */ +exports.check = buildCheckFunction(['body', 'cookies', 'headers', 'params', 'query']); +/** + * Same as {@link check()}, but only validates `req.body`. + */ +exports.body = buildCheckFunction(['body']); +/** + * Same as {@link check()}, but only validates `req.cookies`. + */ +exports.cookie = buildCheckFunction(['cookies']); +/** + * Same as {@link check()}, but only validates `req.headers`. + */ +exports.header = buildCheckFunction(['headers']); +/** + * Same as {@link check()}, but only validates `req.params`. + */ +exports.param = buildCheckFunction(['params']); +/** + * Same as {@link check()}, but only validates `req.query`. + */ +exports.query = buildCheckFunction(['query']); diff --git a/src/hello/server/node_modules/express-validator/lib/options.d.ts b/src/hello/server/node_modules/express-validator/lib/options.d.ts new file mode 100644 index 00000000..a01a3202 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/options.d.ts @@ -0,0 +1,377 @@ +export type URLProtocol = 'http' | 'https' | 'ftp' | string; +export type UUIDVersion = 1 | 2 | 3 | 4 | 5 | 7 | '1' | '2' | '3' | '4' | '5' | '7' | 'all' | 'loose'; +export type IPVersion = 4 | 6; +export type AlphaLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'bn-BD' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'eo' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fr-FR' | 'gu-IN' | 'he' | 'hi-IN' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ja-JP' | 'kk-KZ' | 'kn-IN' | 'ko-KR' | 'ku-IQ' | 'ml-IN' | 'nb-NO' | 'nl-NL' | 'nn-NO' | 'or-IN' | 'pa-IN' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'ta-IN' | 'te-IN' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN'; +export type AlphanumericLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'bn-BD' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'eo' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fr-FR' | 'fr-BE' | 'gu-IN' | 'he' | 'hi-IN' | 'hu-HU' | 'it-IT' | 'id-ID' | 'ja-JP' | 'kk-KZ' | 'kn-IN' | 'ko-KR' | 'ku-IQ' | 'ml-IN' | 'nb-NO' | 'nl-BE' | 'nl-NL' | 'nn-NO' | 'or-IN' | 'pa-IN' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'ta-IN' | 'te-IN' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN'; +export type MobilePhoneLocale = 'any' | 'am-AM' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-EH' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-QA' | 'ar-PS' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'be-BY' | 'bg-BG' | 'bn-BD' | 'bs-BA' | 'cs-CZ' | 'de-AT' | 'de-CH' | 'de-DE' | 'de-LU' | 'da-DK' | 'dv-MV' | 'dz-BT' | 'el-CY' | 'el-GR' | 'en-AG' | 'en-AI' | 'en-AU' | 'en-BM' | 'en-BS' | 'en-BW' | 'en-CA' | 'en-GB' | 'en-GG' | 'en-GH' | 'en-GY' | 'en-HK' | 'en-HN' | 'en-IE' | 'en-IN' | 'en-JM' | 'en-KE' | 'en-KI' | 'en-KN' | 'en-LS' | 'en-MT' | 'en-MU' | 'en-MW' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PG' | 'en-PH' | 'en-PK' | 'en-RW' | 'en-SG' | 'en-SL' | 'en-SS' | 'en-TZ' | 'en-UG' | 'en-US' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-GT' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PY' | 'es-SV' | 'es-UY' | 'es-VE' | 'et-EE' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fj-FJ' | 'fo-FO' | 'fr-BE' | 'fr-BF' | 'fr-BJ' | 'fr-CD' | 'fr-CF' | 'fr-CH' | 'fr-CM' | 'fr-FR' | 'fr-GF' | 'fr-GP' | 'fr-MQ' | 'fr-PF' | 'fr-RE' | 'fr-WF' | 'ga-IE' | 'he-IL' | 'hu-HU' | 'id-ID' | 'ir-IR' | 'it-CH' | 'it-IT' | 'it-SM' | 'ja-JP' | 'ka-GE' | 'kk-KZ' | 'kl-GL' | 'ko-KR' | 'ky-KG' | 'lt-LT' | 'lv-LV' | 'mg-MG' | 'mk-MK' | 'mn-MN' | 'ms-MY' | 'my-MM' | 'mz-MZ' | 'nb-NO' | 'nl-AW' | 'nl-BE' | 'nl-NL' | 'ne-NP' | 'nn-NO' | 'pl-PL' | 'pt-AO' | 'pt-BR' | 'pt-PT' | 'ro-MD' | 'ro-RO' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'so-SO' | 'sq-AL' | 'sr-RS' | 'sv-SE' | 'tg-TJ' | 'th-TH' | 'tk-TM' | 'tr-TR' | 'uk-UA' | 'uz-Uz' | 'vi-VN' | 'zh-CN' | 'zh-HK' | 'zh-TW'; +export type PostalCodeLocale = 'any' | 'AD' | 'AT' | 'AU' | 'AZ' | 'BA' | 'BD' | 'BE' | 'BG' | 'BR' | 'BY' | 'CA' | 'CH' | 'CN' | 'CO' | 'CZ' | 'DE' | 'DK' | 'DO' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HT' | 'HU' | 'ID' | 'IL' | 'IN' | 'IR' | 'IS' | 'IT' | 'JP' | 'KE' | 'KR' | 'LI' | 'LK' | 'LT' | 'LU' | 'LV' | 'MT' | 'MX' | 'MY' | 'NL' | 'NO' | 'NP' | 'NZ' | 'PK' | 'PL' | 'PR' | 'PT' | 'RO' | 'RU' | 'SA' | 'SE' | 'SG' | 'SI' | 'SK' | 'TH' | 'TN' | 'TW' | 'UA' | 'US' | 'ZA' | 'ZM'; +export type HashAlgorithm = 'md4' | 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512' | 'ripemd128' | 'ripemd160' | 'tiger128' | 'tiger160' | 'tiger192' | 'crc32' | 'crc32b'; +export type IBANCode = 'AD' | 'AE' | 'AL' | 'AT' | 'AZ' | 'BA' | 'BE' | 'BG' | 'BH' | 'BR' | 'BY' | 'CH' | 'CR' | 'CY' | 'CZ' | 'DE' | 'DK' | 'DO' | 'DZ' | 'EE' | 'EG' | 'ES' | 'FI' | 'FO' | 'FR' | 'GB' | 'GE' | 'GI' | 'GL' | 'GR' | 'GT' | 'HR' | 'HU' | 'IE' | 'IL' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JO' | 'KW' | 'KZ' | 'LB' | 'LC' | 'LI' | 'LT' | 'LU' | 'LV' | 'MC' | 'MD' | 'ME' | 'MK' | 'MR' | 'MT' | 'MU' | 'MZ' | 'NL' | 'NO' | 'PK' | 'PL' | 'PS' | 'PT' | 'QA' | 'RO' | 'RS' | 'SA' | 'SC' | 'SE' | 'SI' | 'SK' | 'SM' | 'SV' | 'TL' | 'TN' | 'TR' | 'UA' | 'VA' | 'VG' | 'XK'; +export interface IsIBANOptions { + whitelist?: readonly IBANCode[]; + blacklist?: readonly IBANCode[]; +} +export type IdentityCardLocale = 'any' | 'ar-LY' | 'ar-TN' | 'ES' | 'FI' | 'he-IL' | 'hk-HK' | 'IN' | 'IT' | 'IR' | 'MZ' | 'NO' | 'PK' | 'PL' | 'TH' | 'zh-CN' | 'zh-TW'; +export type PassportCountryCode = 'AM' | 'AR' | 'AT' | 'AU' | 'AZ' | 'BE' | 'BG' | 'BY' | 'BR' | 'CA' | 'CH' | 'CN' | 'CY' | 'CZ' | 'DE' | 'DK' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HU' | 'ID' | 'IE' | 'IN' | 'IR' | 'IS' | 'IT' | 'JM' | 'JP' | 'KR' | 'KZ' | 'LI' | 'LT' | 'LU' | 'LV' | 'LY' | 'MT' | 'MY' | 'MZ' | 'NL' | 'NZ' | 'PH' | 'PK' | 'PL' | 'PO' | 'PT' | 'RO' | 'RU' | 'SE' | 'SL' | 'SK' | 'TH' | 'TR' | 'UA' | 'US' | 'ZA'; +export type IsLicensePlateLocale = 'cs-CZ' | 'de-DE' | 'de-LI' | 'en-NI' | 'en-PK' | 'en-SG' | 'es-AR' | 'fi-FI' | 'hu-HU' | 'pt-BR' | 'pt-PT' | 'sq-AL' | 'sv-SE' | 'any'; +export type TaxIDLocale = 'bg-BG' | 'cs-CZ' | 'de-AT' | 'de-DE' | 'dk-DK' | 'el-CY' | 'el-GR' | 'en-CA' | 'en-GB' | 'en-IE' | 'en-US' | 'es-AR' | 'es-ES' | 'et-EE' | 'fi-FI' | 'fr-BE' | 'fr-FR' | 'fr-LU' | 'hr-HR' | 'hu-HU' | 'it-IT' | 'lb-LU' | 'lt-LT' | 'lv-LV' | 'mt-MT' | 'nl-BE' | 'nl-NL' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'sl-SI' | 'sv-SE' | 'uk-UA'; +export type VATCountryCode = 'GB' | 'IT' | 'NL' | 'AT' | 'BE' | 'BG' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'EE' | 'FI' | 'FR' | 'DE' | 'EL' | 'HU' | 'IE' | 'LV' | 'LT' | 'LU' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SI' | 'ES' | 'SE' | 'AL' | 'MK' | 'AU' | 'BY' | 'CA' | 'IS' | 'IN' | 'ID' | 'IL' | 'KZ' | 'NZ' | 'NG' | 'NO' | 'PH' | 'RU' | 'SM' | 'SA' | 'RS' | 'CH' | 'TR' | 'UA' | 'UZ' | 'AR' | 'BO' | 'BR' | 'CL' | 'CO' | 'CR' | 'EC' | 'SV' | 'GT' | 'HN' | 'MX' | 'NI' | 'PA' | 'PY' | 'PE' | 'DO' | 'UY' | 'VE'; +export interface MinMaxOptions { + min?: number; + max?: number; +} +export interface MinMaxExtendedOptions extends MinMaxOptions { + lt?: number; + gt?: number; +} +/** + * defaults to + * { + * ignoreCase: false| + * minOccurrences: 1 + * } + */ +export interface ContainsOptions { + ignoreCase?: boolean; + minOccurrences?: number; +} +/** + * defaults to + * { + * comparisonDate: Date().toString() + * } + */ +export interface IsAfterOptions { + comparisonDate?: string; +} +export interface IsAlphaOptions { + ignore?: string | string[] | RegExp; +} +export interface IsAlphanumericOptions { + ignore?: string | RegExp; +} +/** + * defaults to + * { + * crockford: false + * } + */ +export interface IsBase32Options { + crockford?: boolean; +} +/** + * defaults to + * { + * urlSafe: false + * } + */ +export interface IsBase64Options { + urlSafe?: boolean; +} +/** + * defaults to + * { + * comparisonDate: new Date().toString() + * } + */ +export interface IsBeforeOptions { + comparisonDate?: string; +} +/** + * defaults to + * { + * strict: false + * loose: false + * } + */ +export interface IsBooleanOptions { + strict?: boolean; + loose?: boolean; +} +/** + * defaults to + * { + * includePercentValues: true + * allowSpaces: true + * } + */ +export interface IsRgbColorOptions { + includePercentValues?: boolean; + allowSpaces?: boolean; +} +export interface IsCreditCard { + provider?: 'amex' | 'dinersclub' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa'; +} +/** + * defaults to + * { + * symbol: '$'| + * require_symbol: false| + * allow_space_after_symbol: false| + * symbol_after_digits: false| + * allow_negatives: true| + * parens_for_negatives: false| + * negative_sign_before_digits: false| + * negative_sign_after_digits: false| + * allow_negative_sign_placeholder: false| + * thousands_separator: '|'| + * decimal_separator: '.'| + * allow_space_after_digits: false + * } + */ +export interface IsCurrencyOptions { + symbol?: string; + require_symbol?: boolean; + allow_space_after_symbol?: boolean; + symbol_after_digits?: boolean; + allow_negatives?: boolean; + parens_for_negatives?: boolean; + negative_sign_before_digits?: boolean; + negative_sign_after_digits?: boolean; + allow_negative_sign_placeholder?: boolean; + thousands_separator?: string; + decimal_separator?: string; + allow_decimal?: boolean; + require_decimal?: boolean; + digits_after_decimal?: number[]; + allow_space_after_digits?: boolean; +} +/** + * defaults to + * { + * format: 'YYYY/MM/DD'| + * delimiters: ['/'| '-']| + * strictMode: false + * } + */ +export interface IsDateOptions { + format?: string; + delimiters?: string[]; + strictMode?: boolean; +} +export interface IsDecimalOptions { + decimal_digits?: string; + force_decimal?: boolean; + locale?: AlphanumericLocale; + blacklisted_chars?: string; +} +export interface IsEmailOptions { + allow_display_name?: boolean; + allow_underscores?: boolean; + allow_utf8_local_part?: boolean; + require_tld?: boolean; + ignore_max_length?: boolean; + allow_ip_domain?: boolean; + domain_specific_validation?: boolean; + blacklisted_chars?: string; + host_blacklist?: (string | RegExp)[]; + host_whitelist?: (string | RegExp)[]; +} +/** + * defaults to + * { + * ignore_whitespace: false + * } + */ +export interface IsEmptyOptions { + ignore_whitespace: boolean; +} +export interface IsFloatOptions extends MinMaxExtendedOptions { + locale?: AlphanumericLocale; +} +/** + * defaults to + * { + * require_tld: true| + * allow_underscores: false| + * allow_trailing_dot: false| + * allow_numeric_tld: false| + * allow_wildcard: false| + * ignore_max_length: false + * } + */ +export interface IsFQDNOptions { + require_tld?: boolean; + allow_underscores?: boolean; + allow_trailing_dot?: boolean; + allow_numeric_tld?: boolean; + allow_wildcard?: boolean; + ignore_max_length?: boolean; +} +export interface IsIntOptions extends MinMaxExtendedOptions { + allow_leading_zeroes?: boolean; +} +/** + * defaults to + * { + * allow_primitives: false + * } + */ +export interface IsJSONOptions { + allow_primitives?: boolean; +} +/** + * defaults to + * { + * checkDMS: false + * } + */ +export interface IsLatLongOptions { + checkDMS?: boolean; +} +export interface IsLengthOptions extends MinMaxOptions { + discreteLengths?: number[]; +} +/** + * defaults to + * { + * allow_hyphens: false + * } + */ +export interface IsIMEIOptions { + allow_hyphens?: boolean; +} +/** + * defaults to + * { + * strict: false| + * strictSeparator: false + * } + */ +export interface IsISO8601Options { + strict?: boolean; + strictSeparator?: boolean; +} +export interface IsISBNOptions { + version?: '10' | '13'; +} +/** + * defaults to + * { + * case_sensitive: false| + * require_hyphen: false + * } + */ +export interface IsISSNOptions { + case_sensitive?: boolean; + require_hyphen?: boolean; +} +/** + * defaults to + * ```js + * { + * no_separators: false + * } + * ``` + */ +export interface IsMACAddressOptions { + no_separators?: boolean; + /** + * @deprecated use `no_separators` instead + */ + no_colons?: boolean; + eui?: '48' | '64'; +} +export interface IsMobilePhoneOptions { + strictMode?: boolean; +} +/** + * defaults to + * { + * no_symbols: false + * } + */ +export interface IsNumericOptions { + no_symbols: boolean; + locale?: AlphanumericLocale; +} +/** + * defaults to + * { + * minLength: 8| + * minLowercase: 1| + * minUppercase: 1| + * minNumbers: 1| + * minSymbols: 1| + * returnScore: false| + * pointsPerUnique: 1| + * pointsPerRepeat: 0.5| + * pointsForContainingLower: 10| + * pointsForContainingUpper: 10| + * pointsForContainingNumber: 10| + * pointsForContainingSymbol: 10 + * } + */ +export interface IsStrongPasswordOptions { + minLength?: number; + minLowercase?: number; + minUppercase?: number; + minNumbers?: number; + minSymbols?: number; + returnScore?: boolean; + pointsPerUnique?: number; + pointsPerRepeat?: number; + pointsForContainingLower?: number; + pointsForContainingUpper?: number; + pointsForContainingNumber?: number; + pointsForContainingSymbol?: number; +} +/** + * defaults to + * { + * protocols: ['http'|'https'|'ftp']| + * require_tld: true| + * require_protocol: false| + * require_host: true| + * require_port: false; + * require_valid_protocol: true| + * allow_underscores: false| + * host_whitelist: false| + * host_blacklist: false| + * allow_trailing_dot: false| + * allow_protocol_relative_urls: false| + * validate_length: true| + * allow_fragments: true| + * allow_query_components: true + * } + */ +export interface IsURLOptions extends IsFQDNOptions { + protocols?: URLProtocol[]; + require_protocol?: boolean; + require_host?: boolean; + require_port?: boolean; + require_valid_protocol?: boolean; + host_whitelist?: (string | RegExp)[]; + host_blacklist?: (string | RegExp)[]; + allow_protocol_relative_urls?: boolean; + disallow_auth?: boolean; + validate_length?: boolean; + max_allowed_length?: number; + allow_fragments?: boolean; + allow_query_components?: boolean; +} +/** + * defaults to + * { + * hourFormat: 'hour24'| + * mode: 'default'| + * }; + */ +export interface IsTimeOptions { + hourFormat?: 'hour24' | 'hour12'; + mode?: 'default' | 'withSeconds'; +} +export interface NormalizeEmailOptions { + all_lowercase?: boolean; + gmail_lowercase?: boolean; + gmail_remove_dots?: boolean; + gmail_remove_subaddress?: boolean; + gmail_convert_googlemaildotcom?: boolean; + outlookdotcom_lowercase?: boolean; + outlookdotcom_remove_subaddress?: boolean; + yahoo_lowercase?: boolean; + yahoo_remove_subaddress?: boolean; + icloud_lowercase?: boolean; + icloud_remove_subaddress?: boolean; + yandex_convert_yandexru?: boolean; +} diff --git a/src/hello/server/node_modules/express-validator/lib/options.js b/src/hello/server/node_modules/express-validator/lib/options.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/options.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/hello/server/node_modules/express-validator/lib/utils.d.ts b/src/hello/server/node_modules/express-validator/lib/utils.d.ts new file mode 100644 index 00000000..4afe8d9e --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/utils.d.ts @@ -0,0 +1,12 @@ +import { Request } from './base'; +import { ContextRunningOptions, ResultWithContext, ValidationChainLike } from './chain'; +export declare const bindAll: (object: T) => { [K in keyof T]: T[K]; }; +export declare function toString(value: any): string; +/** + * Runs all validation chains, and returns their results. + * + * If one of them has a request-level bail set, the previous chains will be awaited on so that + * results are not skewed, which can be slow. + * If this same chain also contains errors, no further chains are run. + */ +export declare function runAllChains(req: Request, chains: readonly ValidationChainLike[], runOpts?: ContextRunningOptions): Promise; diff --git a/src/hello/server/node_modules/express-validator/lib/utils.js b/src/hello/server/node_modules/express-validator/lib/utils.js new file mode 100644 index 00000000..17111980 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/utils.js @@ -0,0 +1,56 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bindAll = void 0; +exports.toString = toString; +exports.runAllChains = runAllChains; +const bindAll = (object) => { + const protoKeys = Object.getOwnPropertyNames(Object.getPrototypeOf(object)); + protoKeys.forEach(key => { + const maybeFn = object[key]; + if (typeof maybeFn === 'function' && key !== 'constructor') { + object[key] = maybeFn.bind(object); + } + }); + return object; +}; +exports.bindAll = bindAll; +function toString(value) { + if (value instanceof Date) { + return value.toISOString(); + } + else if (value && typeof value === 'object' && value.toString) { + if (typeof value.toString !== 'function') { + return Object.getPrototypeOf(value).toString.call(value); + } + return value.toString(); + } + else if (value == null || (isNaN(value) && !value.length)) { + return ''; + } + return String(value); +} +/** + * Runs all validation chains, and returns their results. + * + * If one of them has a request-level bail set, the previous chains will be awaited on so that + * results are not skewed, which can be slow. + * If this same chain also contains errors, no further chains are run. + */ +async function runAllChains(req, chains, runOpts) { + const promises = []; + for (const chain of chains) { + const bails = chain.builder.build().bail; + if (bails) { + await Promise.all(promises); + } + const resultPromise = chain.run(req, runOpts); + promises.push(resultPromise); + if (bails) { + const result = await resultPromise; + if (!result.isEmpty()) { + break; + } + } + } + return Promise.all(promises); +} diff --git a/src/hello/server/node_modules/express-validator/lib/validation-result.d.ts b/src/hello/server/node_modules/express-validator/lib/validation-result.d.ts new file mode 100644 index 00000000..35cc523a --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/validation-result.d.ts @@ -0,0 +1,67 @@ +import { Request, ValidationError } from './base'; +/** + * Given a validation error, returns a new value that represents it. + */ +export type ErrorFormatter = (error: ValidationError) => T; +type ToArrayOptions = { + /** + * Whether only the first error of each field should be returned. + * @default false + */ + onlyFirstError?: boolean; +}; +export type ResultFactory = (req: Request) => Result; +interface ResultFactoryBuilderOptions { + /** + * The default error formatter of every {@link Result} instance returned by + * the custom `validationResult()` function. + */ + formatter: ErrorFormatter; +} +/** + * Extracts the validation errors of an express request + */ +export declare const validationResult: ResultFactory & { + withDefaults: typeof withDefaults; +}; +/** + * The current state of the validation errors in a request. + */ +export declare class Result { + private formatter; + private readonly errors; + constructor(formatter: ErrorFormatter, errors: readonly ValidationError[]); + /** + * Gets the validation errors as an array. + * + * @param options.onlyFirstError whether only the first error of each + */ + array(options?: ToArrayOptions): T[]; + /** + * Gets the validation errors as an object. + * If a field has more than one error, only the first one is set in the resulting object. + * + * @returns an object from field name to error + */ + mapped(): Record; + /** + * Specifies a function to format errors with. + * @param formatter the function to use for formatting errors + * @returns A new {@link Result} instance with the given formatter + */ + formatWith(formatter: ErrorFormatter): Result; + /** + * @returns `true` if there are no errors, `false` otherwise + */ + isEmpty(): boolean; + /** + * Throws an error if there are validation errors. + */ + throw(): void; +} +/** + * Creates a `validationResult`-like function with default options passed to every {@link Result} it + * returns. + */ +declare function withDefaults(options?: Partial>): ResultFactory; +export {}; diff --git a/src/hello/server/node_modules/express-validator/lib/validation-result.js b/src/hello/server/node_modules/express-validator/lib/validation-result.js new file mode 100644 index 00000000..6811e4b5 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/lib/validation-result.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Result = exports.validationResult = void 0; +const _ = require("lodash"); +const base_1 = require("./base"); +const utils_1 = require("./utils"); +/** + * Extracts the validation errors of an express request + */ +exports.validationResult = Object.assign(withDefaults(), { withDefaults }); +/** + * The current state of the validation errors in a request. + */ +class Result { + constructor(formatter, errors) { + this.formatter = formatter; + this.errors = errors; + } + /** + * Gets the validation errors as an array. + * + * @param options.onlyFirstError whether only the first error of each + */ + array(options) { + return options?.onlyFirstError ? Object.values(this.mapped()) : this.errors.map(this.formatter); + } + /** + * Gets the validation errors as an object. + * If a field has more than one error, only the first one is set in the resulting object. + * + * @returns an object from field name to error + */ + mapped() { + return this.errors.reduce((mapping, error) => { + const key = error.type === 'field' ? error.path : `_${error.type}`; + if (!mapping[key]) { + mapping[key] = this.formatter(error); + } + return mapping; + }, {}); + } + /** + * Specifies a function to format errors with. + * @param formatter the function to use for formatting errors + * @returns A new {@link Result} instance with the given formatter + */ + formatWith(formatter) { + return new Result(formatter, this.errors); + } + /** + * @returns `true` if there are no errors, `false` otherwise + */ + isEmpty() { + return this.errors.length === 0; + } + /** + * Throws an error if there are validation errors. + */ + throw() { + if (!this.isEmpty()) { + throw Object.assign(new Error(), (0, utils_1.bindAll)(this)); + } + } +} +exports.Result = Result; +/** + * Creates a `validationResult`-like function with default options passed to every {@link Result} it + * returns. + */ +function withDefaults(options = {}) { + const defaults = { + formatter: error => error, + }; + const actualOptions = _.defaults(options, defaults); + return (req) => { + const contexts = req[base_1.contextsKey] || []; + const errors = _.flatMap(contexts, 'errors'); + return new Result(actualOptions.formatter, errors); + }; +} diff --git a/src/hello/server/node_modules/express-validator/package.json b/src/hello/server/node_modules/express-validator/package.json new file mode 100644 index 00000000..27a95a84 --- /dev/null +++ b/src/hello/server/node_modules/express-validator/package.json @@ -0,0 +1,73 @@ +{ + "name": "express-validator", + "description": "Express middleware for the validator module.", + "author": "Christoph Tavan ", + "contributors": [ + "Rusty Bailey ", + "Gustavo Henke ", + "Federico Ciardi " + ], + "version": "7.3.1", + "homepage": "https://express-validator.github.io", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/express-validator/express-validator.git" + }, + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "files": [ + "lib", + "!*.spec.{d.ts,js}", + "!src", + "!website", + "!docs" + ], + "scripts": { + "build": "tsc", + "clean": "git clean -Xf lib", + "docs:build": "npm --prefix ./website run build", + "docs:publish": "USE_SSH=true DEPLOYMENT_BRANCH=master npm --prefix ./website run publish-gh-pages", + "docs:regenerate-api": "npm --prefix ./website run regenerate-api", + "docs:serve": "npm --prefix ./website run serve", + "docs:start": "npm --prefix ./website start", + "docs:version": "npm --prefix ./website run version", + "prepublishOnly": "tsc", + "postpublish": "npm run docs:publish", + "test": "jest", + "lint": "eslint --ignore-path .gitignore 'src/**/*.ts' && prettier -c ." + }, + "engines": { + "node": ">= 8.0.0" + }, + "dependencies": { + "lodash": "^4.17.21", + "validator": "~13.15.23" + }, + "devDependencies": { + "@docusaurus/core": "^3.1.0", + "@docusaurus/plugin-client-redirects": "^3.1.0", + "@docusaurus/preset-classic": "^3.1.0", + "@types/jest": "^26.0.20", + "@types/lodash": "^4.14.168", + "@typescript-eslint/eslint-plugin": "^7.18.0", + "@typescript-eslint/parser": "^7.18.0", + "eslint": "^8.30.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-prettier": "^4.2.1", + "jest": "^29.7.0", + "prettier": "^2.8.1", + "ts-jest": "^29.1.5", + "typescript": "^5.7.2" + }, + "keywords": [ + "express", + "validator", + "validation", + "validate", + "sanitize", + "sanitization", + "xss" + ] +} diff --git a/src/hello/backend/node_modules/express/History.md b/src/hello/server/node_modules/express/History.md similarity index 100% rename from src/hello/backend/node_modules/express/History.md rename to src/hello/server/node_modules/express/History.md diff --git a/src/hello/backend/node_modules/express/LICENSE b/src/hello/server/node_modules/express/LICENSE similarity index 100% rename from src/hello/backend/node_modules/express/LICENSE rename to src/hello/server/node_modules/express/LICENSE diff --git a/src/hello/backend/node_modules/express/Readme.md b/src/hello/server/node_modules/express/Readme.md similarity index 100% rename from src/hello/backend/node_modules/express/Readme.md rename to src/hello/server/node_modules/express/Readme.md diff --git a/src/hello/backend/node_modules/express/index.js b/src/hello/server/node_modules/express/index.js similarity index 100% rename from src/hello/backend/node_modules/express/index.js rename to src/hello/server/node_modules/express/index.js diff --git a/src/hello/backend/node_modules/express/lib/application.js b/src/hello/server/node_modules/express/lib/application.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/application.js rename to src/hello/server/node_modules/express/lib/application.js diff --git a/src/hello/backend/node_modules/express/lib/express.js b/src/hello/server/node_modules/express/lib/express.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/express.js rename to src/hello/server/node_modules/express/lib/express.js diff --git a/src/hello/backend/node_modules/express/lib/middleware/init.js b/src/hello/server/node_modules/express/lib/middleware/init.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/middleware/init.js rename to src/hello/server/node_modules/express/lib/middleware/init.js diff --git a/src/hello/backend/node_modules/express/lib/middleware/query.js b/src/hello/server/node_modules/express/lib/middleware/query.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/middleware/query.js rename to src/hello/server/node_modules/express/lib/middleware/query.js diff --git a/src/hello/backend/node_modules/express/lib/request.js b/src/hello/server/node_modules/express/lib/request.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/request.js rename to src/hello/server/node_modules/express/lib/request.js diff --git a/src/hello/backend/node_modules/express/lib/response.js b/src/hello/server/node_modules/express/lib/response.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/response.js rename to src/hello/server/node_modules/express/lib/response.js diff --git a/src/hello/backend/node_modules/express/lib/router/index.js b/src/hello/server/node_modules/express/lib/router/index.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/router/index.js rename to src/hello/server/node_modules/express/lib/router/index.js diff --git a/src/hello/backend/node_modules/express/lib/router/layer.js b/src/hello/server/node_modules/express/lib/router/layer.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/router/layer.js rename to src/hello/server/node_modules/express/lib/router/layer.js diff --git a/src/hello/backend/node_modules/express/lib/router/route.js b/src/hello/server/node_modules/express/lib/router/route.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/router/route.js rename to src/hello/server/node_modules/express/lib/router/route.js diff --git a/src/hello/backend/node_modules/express/lib/utils.js b/src/hello/server/node_modules/express/lib/utils.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/utils.js rename to src/hello/server/node_modules/express/lib/utils.js diff --git a/src/hello/backend/node_modules/express/lib/view.js b/src/hello/server/node_modules/express/lib/view.js similarity index 100% rename from src/hello/backend/node_modules/express/lib/view.js rename to src/hello/server/node_modules/express/lib/view.js diff --git a/src/hello/server/node_modules/express/node_modules/debug/.coveralls.yml b/src/hello/server/node_modules/express/node_modules/debug/.coveralls.yml new file mode 100644 index 00000000..20a70685 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/src/hello/server/node_modules/express/node_modules/debug/.eslintrc b/src/hello/server/node_modules/express/node_modules/debug/.eslintrc new file mode 100644 index 00000000..8a37ae2c --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/.npmignore b/src/hello/server/node_modules/express/node_modules/debug/.npmignore new file mode 100644 index 00000000..5f60eecc --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/.npmignore @@ -0,0 +1,9 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage +bower.json diff --git a/src/hello/server/node_modules/express/node_modules/debug/.travis.yml b/src/hello/server/node_modules/express/node_modules/debug/.travis.yml new file mode 100644 index 00000000..6c6090c3 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/src/hello/server/node_modules/express/node_modules/debug/CHANGELOG.md b/src/hello/server/node_modules/express/node_modules/debug/CHANGELOG.md new file mode 100644 index 00000000..eadaa189 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/CHANGELOG.md @@ -0,0 +1,362 @@ + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/src/hello/backend/node_modules/nodemon/node_modules/debug/LICENSE b/src/hello/server/node_modules/express/node_modules/debug/LICENSE similarity index 66% rename from src/hello/backend/node_modules/nodemon/node_modules/debug/LICENSE rename to src/hello/server/node_modules/express/node_modules/debug/LICENSE index 1a9820e2..658c933d 100644 --- a/src/hello/backend/node_modules/nodemon/node_modules/debug/LICENSE +++ b/src/hello/server/node_modules/express/node_modules/debug/LICENSE @@ -1,20 +1,19 @@ (The MIT License) -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon +Copyright (c) 2014 TJ Holowaychuk -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +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 +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 +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/src/hello/server/node_modules/express/node_modules/debug/Makefile b/src/hello/server/node_modules/express/node_modules/debug/Makefile new file mode 100644 index 00000000..584da8bf --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/README.md b/src/hello/server/node_modules/express/node_modules/debug/README.md similarity index 59% rename from src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/README.md rename to src/hello/server/node_modules/express/node_modules/debug/README.md index 9ebdfbf1..f67be6b3 100644 --- a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/README.md +++ b/src/hello/server/node_modules/express/node_modules/debug/README.md @@ -1,11 +1,12 @@ # debug -[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. + +A tiny node.js debugging utility modelled after node core's debugging technique. + +**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** ## Installation @@ -17,7 +18,7 @@ $ npm install debug `debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. -Example [_app.js_](./examples/node/app.js): +Example _app.js_: ```js var debug = require('debug')('http') @@ -26,7 +27,7 @@ var debug = require('debug')('http') // fake app -debug('booting %o', name); +debug('booting %s', name); http.createServer(function(req, res){ debug(req.method + ' ' + req.url); @@ -40,148 +41,81 @@ http.createServer(function(req, res){ require('./worker'); ``` -Example [_worker.js_](./examples/node/worker.js): +Example _worker.js_: ```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); +var debug = require('debug')('worker'); -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); +setInterval(function(){ + debug('doing some work'); +}, 1000); ``` -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: -Here are some examples: + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) -#### Windows command prompt notes +#### Windows note -##### CMD + On Windows the environment variable is set using the `set` command. -On Windows the environment variable is set using the `set` command. + ```cmd + set DEBUG=*,-not_this + ``` -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) + Note that PowerShell uses different syntax to set environment variables. -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` + ```cmd + $env:DEBUG = "*,-not_this" + ``` Then, run the program to be debugged as usual. -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - ## Millisecond diff -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - + When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) ## Conventions -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". ## Wildcards -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". + You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". ## Environment Variables -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: + When running through Node.js, you can set a few environment variables that will + change the behavior of the debug logging: | Name | Purpose | |-----------|-------------------------------------------------| | `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | | `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_DEPTH` | Object inspection depth. | | `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. + __Note:__ The environment variables beginning with `DEBUG_` end up being + converted into an Options object that gets used with `%o`/`%O` formatters. + See the Node.js documentation for + [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) + for the complete list. ## Formatters -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: + + Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: | Formatter | Representation | |-----------|----------------| @@ -192,12 +126,9 @@ Below are the officially supported formatters: | `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | | `%%` | Single percent sign ('%'). This does not consume an argument. | - ### Custom formatters -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: + You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: ```js const createDebug = require('debug') @@ -211,16 +142,14 @@ debug('this is hex: %h', new Buffer('hello world')) // foo this is hex: 68656c6c6f20776f726c6421 +0ms ``` +## Browser support + You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), + or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), + if you don't want to build it yourself. -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: + Debug's enable state is currently persisted by `localStorage`. + Consider the situation shown below where you have `worker:a` and `worker:b`, + and wish to debug both. You can enable this using `localStorage.debug`: ```js localStorage.debug = 'worker:*' @@ -241,15 +170,23 @@ setInterval(function(){ }, 1200); ``` -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. +#### Web Inspector Colors + + Colors are also enabled on "Web Inspectors" that understand the `%c` formatting + option. These are WebKit web inspectors, Firefox ([since version + 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) + and the Firebug plugin for Firefox (any version). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - ## Output streams By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: -Example [_stdout.js_](./examples/node/stdout.js): +Example _stdout.js_: ```js var debug = require('debug'); @@ -271,118 +208,13 @@ error('now goes to stdout via console.info'); log('still goes to stdout, but via console.info now'); ``` -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - ## Authors - TJ Holowaychuk - Nathan Rajlich - Andrew Rhyne - - Josh Junon - + ## Backers Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] @@ -458,8 +290,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s (The MIT License) -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon +Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/src/hello/server/node_modules/express/node_modules/debug/component.json b/src/hello/server/node_modules/express/node_modules/debug/component.json new file mode 100644 index 00000000..9de26410 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.9", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/karma.conf.js b/src/hello/server/node_modules/express/node_modules/debug/karma.conf.js new file mode 100644 index 00000000..103a82d1 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/node.js b/src/hello/server/node_modules/express/node_modules/debug/node.js new file mode 100644 index 00000000..7fc36fe6 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/src/hello/server/node_modules/express/node_modules/debug/package.json b/src/hello/server/node_modules/express/node_modules/debug/package.json new file mode 100644 index 00000000..dc787ba7 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/package.json @@ -0,0 +1,49 @@ +{ + "name": "debug", + "version": "2.6.9", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + }, + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + } +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/src/browser.js b/src/hello/server/node_modules/express/node_modules/debug/src/browser.js new file mode 100644 index 00000000..71069249 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/src/browser.js @@ -0,0 +1,185 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/src/debug.js b/src/hello/server/node_modules/express/node_modules/debug/src/debug.js new file mode 100644 index 00000000..6a5e3fc9 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/src/index.js b/src/hello/server/node_modules/express/node_modules/debug/src/index.js new file mode 100644 index 00000000..e12cf4d5 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/src/inspector-log.js b/src/hello/server/node_modules/express/node_modules/debug/src/inspector-log.js new file mode 100644 index 00000000..60ea6c04 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/src/inspector-log.js @@ -0,0 +1,15 @@ +module.exports = inspectorLog; + +// black hole +const nullStream = new (require('stream').Writable)(); +nullStream._write = () => {}; + +/** + * Outputs a `console.log()` to the Node.js Inspector console *only*. + */ +function inspectorLog() { + const stdout = console._stdout; + console._stdout = nullStream; + console.log.apply(console, arguments); + console._stdout = stdout; +} diff --git a/src/hello/server/node_modules/express/node_modules/debug/src/node.js b/src/hello/server/node_modules/express/node_modules/debug/src/node.js new file mode 100644 index 00000000..b15109c9 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/debug/src/node.js @@ -0,0 +1,248 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); + + obj[prop] = val; + return obj; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n').map(function(str) { + return str.trim() + }).join(' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init (debug) { + debug.inspectOpts = {}; + + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/src/hello/server/node_modules/express/node_modules/ms/index.js b/src/hello/server/node_modules/express/node_modules/ms/index.js new file mode 100644 index 00000000..6a522b16 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/src/hello/server/node_modules/express/node_modules/ms/license.md b/src/hello/server/node_modules/express/node_modules/ms/license.md new file mode 100644 index 00000000..69b61253 --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/hello/server/node_modules/express/node_modules/ms/package.json b/src/hello/server/node_modules/express/node_modules/ms/package.json new file mode 100644 index 00000000..6a31c81f --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/src/hello/server/node_modules/express/node_modules/ms/readme.md b/src/hello/server/node_modules/express/node_modules/ms/readme.md new file mode 100644 index 00000000..84a9974c --- /dev/null +++ b/src/hello/server/node_modules/express/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/src/hello/backend/node_modules/express/package.json b/src/hello/server/node_modules/express/package.json similarity index 100% rename from src/hello/backend/node_modules/express/package.json rename to src/hello/server/node_modules/express/package.json diff --git a/src/hello/backend/node_modules/fast-deep-equal/LICENSE b/src/hello/server/node_modules/fast-deep-equal/LICENSE similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/LICENSE rename to src/hello/server/node_modules/fast-deep-equal/LICENSE diff --git a/src/hello/backend/node_modules/fast-deep-equal/README.md b/src/hello/server/node_modules/fast-deep-equal/README.md similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/README.md rename to src/hello/server/node_modules/fast-deep-equal/README.md diff --git a/src/hello/backend/node_modules/fast-deep-equal/es6/index.d.ts b/src/hello/server/node_modules/fast-deep-equal/es6/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/es6/index.d.ts rename to src/hello/server/node_modules/fast-deep-equal/es6/index.d.ts diff --git a/src/hello/backend/node_modules/fast-deep-equal/es6/index.js b/src/hello/server/node_modules/fast-deep-equal/es6/index.js similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/es6/index.js rename to src/hello/server/node_modules/fast-deep-equal/es6/index.js diff --git a/src/hello/backend/node_modules/fast-deep-equal/es6/react.d.ts b/src/hello/server/node_modules/fast-deep-equal/es6/react.d.ts similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/es6/react.d.ts rename to src/hello/server/node_modules/fast-deep-equal/es6/react.d.ts diff --git a/src/hello/backend/node_modules/fast-deep-equal/es6/react.js b/src/hello/server/node_modules/fast-deep-equal/es6/react.js similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/es6/react.js rename to src/hello/server/node_modules/fast-deep-equal/es6/react.js diff --git a/src/hello/backend/node_modules/fast-deep-equal/index.d.ts b/src/hello/server/node_modules/fast-deep-equal/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/index.d.ts rename to src/hello/server/node_modules/fast-deep-equal/index.d.ts diff --git a/src/hello/backend/node_modules/fast-deep-equal/index.js b/src/hello/server/node_modules/fast-deep-equal/index.js similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/index.js rename to src/hello/server/node_modules/fast-deep-equal/index.js diff --git a/src/hello/backend/node_modules/fast-deep-equal/package.json b/src/hello/server/node_modules/fast-deep-equal/package.json similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/package.json rename to src/hello/server/node_modules/fast-deep-equal/package.json diff --git a/src/hello/backend/node_modules/fast-deep-equal/react.d.ts b/src/hello/server/node_modules/fast-deep-equal/react.d.ts similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/react.d.ts rename to src/hello/server/node_modules/fast-deep-equal/react.d.ts diff --git a/src/hello/backend/node_modules/fast-deep-equal/react.js b/src/hello/server/node_modules/fast-deep-equal/react.js similarity index 100% rename from src/hello/backend/node_modules/fast-deep-equal/react.js rename to src/hello/server/node_modules/fast-deep-equal/react.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/.eslintrc.yml b/src/hello/server/node_modules/fast-json-stable-stringify/.eslintrc.yml similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/.eslintrc.yml rename to src/hello/server/node_modules/fast-json-stable-stringify/.eslintrc.yml diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/.github/FUNDING.yml b/src/hello/server/node_modules/fast-json-stable-stringify/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/.github/FUNDING.yml rename to src/hello/server/node_modules/fast-json-stable-stringify/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/.travis.yml b/src/hello/server/node_modules/fast-json-stable-stringify/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/.travis.yml rename to src/hello/server/node_modules/fast-json-stable-stringify/.travis.yml diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/LICENSE b/src/hello/server/node_modules/fast-json-stable-stringify/LICENSE similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/LICENSE rename to src/hello/server/node_modules/fast-json-stable-stringify/LICENSE diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/README.md b/src/hello/server/node_modules/fast-json-stable-stringify/README.md similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/README.md rename to src/hello/server/node_modules/fast-json-stable-stringify/README.md diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/benchmark/index.js b/src/hello/server/node_modules/fast-json-stable-stringify/benchmark/index.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/benchmark/index.js rename to src/hello/server/node_modules/fast-json-stable-stringify/benchmark/index.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/benchmark/test.json b/src/hello/server/node_modules/fast-json-stable-stringify/benchmark/test.json similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/benchmark/test.json rename to src/hello/server/node_modules/fast-json-stable-stringify/benchmark/test.json diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/example/key_cmp.js b/src/hello/server/node_modules/fast-json-stable-stringify/example/key_cmp.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/example/key_cmp.js rename to src/hello/server/node_modules/fast-json-stable-stringify/example/key_cmp.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/example/nested.js b/src/hello/server/node_modules/fast-json-stable-stringify/example/nested.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/example/nested.js rename to src/hello/server/node_modules/fast-json-stable-stringify/example/nested.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/example/str.js b/src/hello/server/node_modules/fast-json-stable-stringify/example/str.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/example/str.js rename to src/hello/server/node_modules/fast-json-stable-stringify/example/str.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/example/value_cmp.js b/src/hello/server/node_modules/fast-json-stable-stringify/example/value_cmp.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/example/value_cmp.js rename to src/hello/server/node_modules/fast-json-stable-stringify/example/value_cmp.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/index.d.ts b/src/hello/server/node_modules/fast-json-stable-stringify/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/index.d.ts rename to src/hello/server/node_modules/fast-json-stable-stringify/index.d.ts diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/index.js b/src/hello/server/node_modules/fast-json-stable-stringify/index.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/index.js rename to src/hello/server/node_modules/fast-json-stable-stringify/index.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/package.json b/src/hello/server/node_modules/fast-json-stable-stringify/package.json similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/package.json rename to src/hello/server/node_modules/fast-json-stable-stringify/package.json diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/test/cmp.js b/src/hello/server/node_modules/fast-json-stable-stringify/test/cmp.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/test/cmp.js rename to src/hello/server/node_modules/fast-json-stable-stringify/test/cmp.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/test/nested.js b/src/hello/server/node_modules/fast-json-stable-stringify/test/nested.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/test/nested.js rename to src/hello/server/node_modules/fast-json-stable-stringify/test/nested.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/test/str.js b/src/hello/server/node_modules/fast-json-stable-stringify/test/str.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/test/str.js rename to src/hello/server/node_modules/fast-json-stable-stringify/test/str.js diff --git a/src/hello/backend/node_modules/fast-json-stable-stringify/test/to-json.js b/src/hello/server/node_modules/fast-json-stable-stringify/test/to-json.js similarity index 100% rename from src/hello/backend/node_modules/fast-json-stable-stringify/test/to-json.js rename to src/hello/server/node_modules/fast-json-stable-stringify/test/to-json.js diff --git a/src/hello/backend/node_modules/fast-levenshtein/LICENSE.md b/src/hello/server/node_modules/fast-levenshtein/LICENSE.md similarity index 100% rename from src/hello/backend/node_modules/fast-levenshtein/LICENSE.md rename to src/hello/server/node_modules/fast-levenshtein/LICENSE.md diff --git a/src/hello/backend/node_modules/fast-levenshtein/README.md b/src/hello/server/node_modules/fast-levenshtein/README.md similarity index 100% rename from src/hello/backend/node_modules/fast-levenshtein/README.md rename to src/hello/server/node_modules/fast-levenshtein/README.md diff --git a/src/hello/backend/node_modules/fast-levenshtein/levenshtein.js b/src/hello/server/node_modules/fast-levenshtein/levenshtein.js similarity index 100% rename from src/hello/backend/node_modules/fast-levenshtein/levenshtein.js rename to src/hello/server/node_modules/fast-levenshtein/levenshtein.js diff --git a/src/hello/backend/node_modules/fast-levenshtein/package.json b/src/hello/server/node_modules/fast-levenshtein/package.json similarity index 100% rename from src/hello/backend/node_modules/fast-levenshtein/package.json rename to src/hello/server/node_modules/fast-levenshtein/package.json diff --git a/src/hello/backend/node_modules/fastq/LICENSE b/src/hello/server/node_modules/fastq/LICENSE similarity index 100% rename from src/hello/backend/node_modules/fastq/LICENSE rename to src/hello/server/node_modules/fastq/LICENSE diff --git a/src/hello/backend/node_modules/fastq/README.md b/src/hello/server/node_modules/fastq/README.md similarity index 98% rename from src/hello/backend/node_modules/fastq/README.md rename to src/hello/server/node_modules/fastq/README.md index 16441111..b44cce36 100644 --- a/src/hello/backend/node_modules/fastq/README.md +++ b/src/hello/server/node_modules/fastq/README.md @@ -18,8 +18,6 @@ If you need zero-overhead series function call, check out [fastseries](http://npm.im/fastseries). For zero-overhead parallel function call, check out [fastparallel](http://npm.im/fastparallel). -[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard) - * Installation * Usage * API diff --git a/src/hello/backend/node_modules/fastq/SECURITY.md b/src/hello/server/node_modules/fastq/SECURITY.md similarity index 100% rename from src/hello/backend/node_modules/fastq/SECURITY.md rename to src/hello/server/node_modules/fastq/SECURITY.md diff --git a/src/hello/backend/node_modules/fastq/bench.js b/src/hello/server/node_modules/fastq/bench.js similarity index 100% rename from src/hello/backend/node_modules/fastq/bench.js rename to src/hello/server/node_modules/fastq/bench.js diff --git a/src/hello/server/node_modules/fastq/eslint.config.js b/src/hello/server/node_modules/fastq/eslint.config.js new file mode 100644 index 00000000..57482dbb --- /dev/null +++ b/src/hello/server/node_modules/fastq/eslint.config.js @@ -0,0 +1,11 @@ +const neostandard = require('neostandard') + +module.exports = [ + ...neostandard(), + { + name: 'node-0.10-compatibility', + rules: { + 'object-shorthand': 'off' // Disable ES6 object shorthand for Node.js 0.10 compatibility + } + } +] diff --git a/src/hello/backend/node_modules/fastq/example.js b/src/hello/server/node_modules/fastq/example.js similarity index 100% rename from src/hello/backend/node_modules/fastq/example.js rename to src/hello/server/node_modules/fastq/example.js diff --git a/src/hello/backend/node_modules/fastq/example.mjs b/src/hello/server/node_modules/fastq/example.mjs similarity index 90% rename from src/hello/backend/node_modules/fastq/example.mjs rename to src/hello/server/node_modules/fastq/example.mjs index 81be789a..f31364a5 100644 --- a/src/hello/backend/node_modules/fastq/example.mjs +++ b/src/hello/server/node_modules/fastq/example.mjs @@ -1,7 +1,5 @@ import { promise as queueAsPromised } from './queue.js' -/* eslint-disable */ - const queue = queueAsPromised(worker, 1) console.log('the result is', await queue.push(42)) diff --git a/src/hello/backend/node_modules/fastq/index.d.ts b/src/hello/server/node_modules/fastq/index.d.ts similarity index 94% rename from src/hello/backend/node_modules/fastq/index.d.ts rename to src/hello/server/node_modules/fastq/index.d.ts index 817cdb58..262dd048 100644 --- a/src/hello/backend/node_modules/fastq/index.d.ts +++ b/src/hello/server/node_modules/fastq/index.d.ts @@ -27,6 +27,8 @@ declare namespace fastq { kill(): any /** Same than `kill` but the `drain` function will be called before reset to empty. */ killAndDrain(): any + /** Removes all tasks waiting to be processed, calls each task's callback with an abort error (rejects promises for promise-based queues), and resets `drain` to an empty function. */ + abort(): any /** Set a global error handler. `handler(err, task)` will be called each time a task is completed, `err` will be not null if the task has thrown an error. */ error(handler: errorHandler): void /** Property that returns the number of concurrent tasks that could be executed in parallel. It can be altered at runtime. */ diff --git a/src/hello/backend/node_modules/fastq/package.json b/src/hello/server/node_modules/fastq/package.json similarity index 86% rename from src/hello/backend/node_modules/fastq/package.json rename to src/hello/server/node_modules/fastq/package.json index 989151ff..9e1d9dde 100644 --- a/src/hello/backend/node_modules/fastq/package.json +++ b/src/hello/server/node_modules/fastq/package.json @@ -1,10 +1,11 @@ { "name": "fastq", - "version": "1.19.1", + "version": "1.20.1", "description": "Fast, in memory work queue", "main": "queue.js", + "type": "commonjs", "scripts": { - "lint": "standard --verbose | snazzy", + "lint": "eslint .", "unit": "nyc --lines 100 --branches 100 --functions 100 --check-coverage --reporter=text tape test/test.js test/promise.js", "coverage": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/test.js test/promise.js", "test:report": "npm run lint && npm run unit:report", @@ -34,20 +35,15 @@ "homepage": "https://github.com/mcollina/fastq#readme", "devDependencies": { "async": "^3.1.0", + "eslint": "^9.36.0", "neo-async": "^2.6.1", + "neostandard": "^0.12.2", "nyc": "^17.0.0", "pre-commit": "^1.2.2", - "snazzy": "^9.0.0", - "standard": "^16.0.0", "tape": "^5.0.0", "typescript": "^5.0.4" }, "dependencies": { "reusify": "^1.0.4" - }, - "standard": { - "ignore": [ - "example.mjs" - ] } } diff --git a/src/hello/backend/node_modules/fastq/queue.js b/src/hello/server/node_modules/fastq/queue.js similarity index 88% rename from src/hello/backend/node_modules/fastq/queue.js rename to src/hello/server/node_modules/fastq/queue.js index 7ea8a312..d0fbf202 100644 --- a/src/hello/backend/node_modules/fastq/queue.js +++ b/src/hello/server/node_modules/fastq/queue.js @@ -53,7 +53,8 @@ function fastqueue (context, worker, _concurrency) { empty: noop, kill: kill, killAndDrain: killAndDrain, - error: error + error: error, + abort: abort } return self @@ -193,6 +194,40 @@ function fastqueue (context, worker, _concurrency) { self.drain = noop } + function abort () { + var current = queueHead + queueHead = null + queueTail = null + + while (current) { + var next = current.next + var callback = current.callback + var errorHandler = current.errorHandler + var val = current.value + var context = current.context + + // Reset the task state + current.value = null + current.callback = noop + current.errorHandler = null + + // Call error handler if present + if (errorHandler) { + errorHandler(new Error('abort'), val) + } + + // Call callback with error + callback.call(context, new Error('abort')) + + // Release the task back to the pool + current.release(current) + + current = next + } + + self.drain = noop + } + function error (handler) { errorHandler = handler } diff --git a/src/hello/backend/node_modules/fastq/test/example.ts b/src/hello/server/node_modules/fastq/test/example.ts similarity index 100% rename from src/hello/backend/node_modules/fastq/test/example.ts rename to src/hello/server/node_modules/fastq/test/example.ts diff --git a/src/hello/backend/node_modules/fastq/test/promise.js b/src/hello/server/node_modules/fastq/test/promise.js similarity index 89% rename from src/hello/backend/node_modules/fastq/test/promise.js rename to src/hello/server/node_modules/fastq/test/promise.js index 45349a4f..b425fda5 100644 --- a/src/hello/backend/node_modules/fastq/test/promise.js +++ b/src/hello/server/node_modules/fastq/test/promise.js @@ -289,3 +289,37 @@ test('drained should handle undefined drain function', async function (t) { t.pass('drained resolved successfully with undefined drain') }) + +test('abort rejects all pending promises', async function (t) { + const queue = buildQueue(worker, 1) + const promises = [] + let rejectedCount = 0 + + // Pause queue to prevent tasks from starting + queue.pause() + + for (let i = 0; i < 10; i++) { + promises.push(queue.push(i)) + } + + queue.abort() + + // All promises should be rejected + for (const promise of promises) { + try { + await promise + t.fail('promise should have been rejected') + } catch (err) { + t.equal(err.message, 'abort', 'error message is abort') + rejectedCount++ + } + } + + t.equal(rejectedCount, 10, 'all promises were rejected') + t.equal(queue.length(), 0, 'queue is empty') + + async function worker (arg) { + await sleep(500) + return arg + } +}) diff --git a/src/hello/backend/node_modules/fastq/test/test.js b/src/hello/server/node_modules/fastq/test/test.js similarity index 88% rename from src/hello/backend/node_modules/fastq/test/test.js rename to src/hello/server/node_modules/fastq/test/test.js index 79f0f6c8..37e211e9 100644 --- a/src/hello/backend/node_modules/fastq/test/test.js +++ b/src/hello/server/node_modules/fastq/test/test.js @@ -651,3 +651,83 @@ test('paused flag', function (t) { queue.pause() t.equal(queue.paused, true) }) + +test('abort', function (t) { + t.plan(11) + + var queue = buildQueue(worker, 1) + var abortedTasks = 0 + + var predrain = queue.drain + + queue.drain = function drain () { + t.fail('drain should never be called') + } + + // Pause queue to prevent tasks from starting + queue.pause() + queue.push(1, doneAborted) + queue.push(4, doneAborted) + queue.unshift(3, doneAborted) + queue.unshift(2, doneAborted) + + // Abort all queued tasks + queue.abort() + + // Verify state after abort + t.equal(queue.length(), 0, 'no queued tasks after abort') + t.equal(queue.drain, predrain, 'drain is back to default') + + setImmediate(function () { + t.equal(abortedTasks, 4, 'all queued tasks were aborted') + }) + + function doneAborted (err) { + t.ok(err, 'error is present') + t.equal(err.message, 'abort', 'error message is abort') + abortedTasks++ + } + + function worker (arg, cb) { + t.fail('worker should not be called') + setImmediate(function () { + cb(null, true) + }) + } +}) + +test('abort with error handler', function (t) { + t.plan(7) + + var queue = buildQueue(worker, 1) + var errorHandlerCalled = 0 + + queue.error(function (err, task) { + t.equal(err.message, 'abort', 'error handler receives abort error') + t.ok(task !== null, 'error handler receives task value') + errorHandlerCalled++ + }) + + // Pause queue to prevent tasks from starting + queue.pause() + queue.push(1, doneAborted) + queue.push(2, doneAborted) + + // Abort all queued tasks + queue.abort() + + setImmediate(function () { + t.equal(errorHandlerCalled, 2, 'error handler called for all aborted tasks') + }) + + function doneAborted (err) { + t.ok(err, 'callback receives error') + } + + function worker (arg, cb) { + t.fail('worker should not be called') + setImmediate(function () { + cb(null, true) + }) + } +}) diff --git a/src/hello/backend/node_modules/fastq/test/tsconfig.json b/src/hello/server/node_modules/fastq/test/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/fastq/test/tsconfig.json rename to src/hello/server/node_modules/fastq/test/tsconfig.json diff --git a/src/hello/backend/node_modules/file-entry-cache/LICENSE b/src/hello/server/node_modules/file-entry-cache/LICENSE similarity index 100% rename from src/hello/backend/node_modules/file-entry-cache/LICENSE rename to src/hello/server/node_modules/file-entry-cache/LICENSE diff --git a/src/hello/backend/node_modules/file-entry-cache/README.md b/src/hello/server/node_modules/file-entry-cache/README.md similarity index 100% rename from src/hello/backend/node_modules/file-entry-cache/README.md rename to src/hello/server/node_modules/file-entry-cache/README.md diff --git a/src/hello/backend/node_modules/file-entry-cache/cache.js b/src/hello/server/node_modules/file-entry-cache/cache.js similarity index 100% rename from src/hello/backend/node_modules/file-entry-cache/cache.js rename to src/hello/server/node_modules/file-entry-cache/cache.js diff --git a/src/hello/backend/node_modules/file-entry-cache/changelog.md b/src/hello/server/node_modules/file-entry-cache/changelog.md similarity index 100% rename from src/hello/backend/node_modules/file-entry-cache/changelog.md rename to src/hello/server/node_modules/file-entry-cache/changelog.md diff --git a/src/hello/backend/node_modules/file-entry-cache/package.json b/src/hello/server/node_modules/file-entry-cache/package.json similarity index 100% rename from src/hello/backend/node_modules/file-entry-cache/package.json rename to src/hello/server/node_modules/file-entry-cache/package.json diff --git a/src/hello/backend/node_modules/fill-range/LICENSE b/src/hello/server/node_modules/fill-range/LICENSE similarity index 100% rename from src/hello/backend/node_modules/fill-range/LICENSE rename to src/hello/server/node_modules/fill-range/LICENSE diff --git a/src/hello/backend/node_modules/fill-range/README.md b/src/hello/server/node_modules/fill-range/README.md similarity index 100% rename from src/hello/backend/node_modules/fill-range/README.md rename to src/hello/server/node_modules/fill-range/README.md diff --git a/src/hello/backend/node_modules/fill-range/index.js b/src/hello/server/node_modules/fill-range/index.js similarity index 100% rename from src/hello/backend/node_modules/fill-range/index.js rename to src/hello/server/node_modules/fill-range/index.js diff --git a/src/hello/backend/node_modules/fill-range/package.json b/src/hello/server/node_modules/fill-range/package.json similarity index 100% rename from src/hello/backend/node_modules/fill-range/package.json rename to src/hello/server/node_modules/fill-range/package.json diff --git a/src/hello/backend/node_modules/finalhandler/HISTORY.md b/src/hello/server/node_modules/finalhandler/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/finalhandler/HISTORY.md rename to src/hello/server/node_modules/finalhandler/HISTORY.md diff --git a/src/hello/backend/node_modules/finalhandler/LICENSE b/src/hello/server/node_modules/finalhandler/LICENSE similarity index 100% rename from src/hello/backend/node_modules/finalhandler/LICENSE rename to src/hello/server/node_modules/finalhandler/LICENSE diff --git a/src/hello/backend/node_modules/finalhandler/README.md b/src/hello/server/node_modules/finalhandler/README.md similarity index 100% rename from src/hello/backend/node_modules/finalhandler/README.md rename to src/hello/server/node_modules/finalhandler/README.md diff --git a/src/hello/backend/node_modules/finalhandler/SECURITY.md b/src/hello/server/node_modules/finalhandler/SECURITY.md similarity index 100% rename from src/hello/backend/node_modules/finalhandler/SECURITY.md rename to src/hello/server/node_modules/finalhandler/SECURITY.md diff --git a/src/hello/backend/node_modules/finalhandler/index.js b/src/hello/server/node_modules/finalhandler/index.js similarity index 100% rename from src/hello/backend/node_modules/finalhandler/index.js rename to src/hello/server/node_modules/finalhandler/index.js diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/.coveralls.yml b/src/hello/server/node_modules/finalhandler/node_modules/debug/.coveralls.yml new file mode 100644 index 00000000..20a70685 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/.coveralls.yml @@ -0,0 +1 @@ +repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/.eslintrc b/src/hello/server/node_modules/finalhandler/node_modules/debug/.eslintrc new file mode 100644 index 00000000..8a37ae2c --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/.eslintrc @@ -0,0 +1,11 @@ +{ + "env": { + "browser": true, + "node": true + }, + "rules": { + "no-console": 0, + "no-empty": [1, { "allowEmptyCatch": true }] + }, + "extends": "eslint:recommended" +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/.npmignore b/src/hello/server/node_modules/finalhandler/node_modules/debug/.npmignore new file mode 100644 index 00000000..5f60eecc --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/.npmignore @@ -0,0 +1,9 @@ +support +test +examples +example +*.sock +dist +yarn.lock +coverage +bower.json diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/.travis.yml b/src/hello/server/node_modules/finalhandler/node_modules/debug/.travis.yml new file mode 100644 index 00000000..6c6090c3 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/.travis.yml @@ -0,0 +1,14 @@ + +language: node_js +node_js: + - "6" + - "5" + - "4" + +install: + - make node_modules + +script: + - make lint + - make test + - make coveralls diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/CHANGELOG.md b/src/hello/server/node_modules/finalhandler/node_modules/debug/CHANGELOG.md new file mode 100644 index 00000000..eadaa189 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/CHANGELOG.md @@ -0,0 +1,362 @@ + +2.6.9 / 2017-09-22 +================== + + * remove ReDoS regexp in %o formatter (#504) + +2.6.8 / 2017-05-18 +================== + + * Fix: Check for undefined on browser globals (#462, @marbemac) + +2.6.7 / 2017-05-16 +================== + + * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) + * Fix: Inline extend function in node implementation (#452, @dougwilson) + * Docs: Fix typo (#455, @msasad) + +2.6.5 / 2017-04-27 +================== + + * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) + * Misc: clean up browser reference checks (#447, @thebigredgeek) + * Misc: add npm-debug.log to .gitignore (@thebigredgeek) + + +2.6.4 / 2017-04-20 +================== + + * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) + * Chore: ignore bower.json in npm installations. (#437, @joaovieira) + * Misc: update "ms" to v0.7.3 (@tootallnate) + +2.6.3 / 2017-03-13 +================== + + * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) + * Docs: Changelog fix (@thebigredgeek) + +2.6.2 / 2017-03-10 +================== + + * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) + * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) + * Docs: Add Slackin invite badge (@tootallnate) + +2.6.1 / 2017-02-10 +================== + + * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error + * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) + * Fix: IE8 "Expected identifier" error (#414, @vgoma) + * Fix: Namespaces would not disable once enabled (#409, @musikov) + +2.6.0 / 2016-12-28 +================== + + * Fix: added better null pointer checks for browser useColors (@thebigredgeek) + * Improvement: removed explicit `window.debug` export (#404, @tootallnate) + * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) + +2.5.2 / 2016-12-25 +================== + + * Fix: reference error on window within webworkers (#393, @KlausTrainer) + * Docs: fixed README typo (#391, @lurch) + * Docs: added notice about v3 api discussion (@thebigredgeek) + +2.5.1 / 2016-12-20 +================== + + * Fix: babel-core compatibility + +2.5.0 / 2016-12-20 +================== + + * Fix: wrong reference in bower file (@thebigredgeek) + * Fix: webworker compatibility (@thebigredgeek) + * Fix: output formatting issue (#388, @kribblo) + * Fix: babel-loader compatibility (#383, @escwald) + * Misc: removed built asset from repo and publications (@thebigredgeek) + * Misc: moved source files to /src (#378, @yamikuronue) + * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) + * Test: coveralls integration (#378, @yamikuronue) + * Docs: simplified language in the opening paragraph (#373, @yamikuronue) + +2.4.5 / 2016-12-17 +================== + + * Fix: `navigator` undefined in Rhino (#376, @jochenberger) + * Fix: custom log function (#379, @hsiliev) + * Improvement: bit of cleanup + linting fixes (@thebigredgeek) + * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) + * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) + +2.4.4 / 2016-12-14 +================== + + * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) + +2.4.3 / 2016-12-14 +================== + + * Fix: navigation.userAgent error for react native (#364, @escwald) + +2.4.2 / 2016-12-14 +================== + + * Fix: browser colors (#367, @tootallnate) + * Misc: travis ci integration (@thebigredgeek) + * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) + +2.4.1 / 2016-12-13 +================== + + * Fix: typo that broke the package (#356) + +2.4.0 / 2016-12-13 +================== + + * Fix: bower.json references unbuilt src entry point (#342, @justmatt) + * Fix: revert "handle regex special characters" (@tootallnate) + * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) + * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) + * Improvement: allow colors in workers (#335, @botverse) + * Improvement: use same color for same namespace. (#338, @lchenay) + +2.3.3 / 2016-11-09 +================== + + * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) + * Fix: Returning `localStorage` saved values (#331, Levi Thomason) + * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) + +2.3.2 / 2016-11-09 +================== + + * Fix: be super-safe in index.js as well (@TooTallNate) + * Fix: should check whether process exists (Tom Newby) + +2.3.1 / 2016-11-09 +================== + + * Fix: Added electron compatibility (#324, @paulcbetts) + * Improvement: Added performance optimizations (@tootallnate) + * Readme: Corrected PowerShell environment variable example (#252, @gimre) + * Misc: Removed yarn lock file from source control (#321, @fengmk2) + +2.3.0 / 2016-11-07 +================== + + * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) + * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) + * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) + * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) + * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) + * Package: Update "ms" to 0.7.2 (#315, @DevSide) + * Package: removed superfluous version property from bower.json (#207 @kkirsche) + * Readme: fix USE_COLORS to DEBUG_COLORS + * Readme: Doc fixes for format string sugar (#269, @mlucool) + * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) + * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) + * Readme: better docs for browser support (#224, @matthewmueller) + * Tooling: Added yarn integration for development (#317, @thebigredgeek) + * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) + * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) + * Misc: Updated contributors (@thebigredgeek) + +2.2.0 / 2015-05-09 +================== + + * package: update "ms" to v0.7.1 (#202, @dougwilson) + * README: add logging to file example (#193, @DanielOchoa) + * README: fixed a typo (#191, @amir-s) + * browser: expose `storage` (#190, @stephenmathieson) + * Makefile: add a `distclean` target (#189, @stephenmathieson) + +2.1.3 / 2015-03-13 +================== + + * Updated stdout/stderr example (#186) + * Updated example/stdout.js to match debug current behaviour + * Renamed example/stderr.js to stdout.js + * Update Readme.md (#184) + * replace high intensity foreground color for bold (#182, #183) + +2.1.2 / 2015-03-01 +================== + + * dist: recompile + * update "ms" to v0.7.0 + * package: update "browserify" to v9.0.3 + * component: fix "ms.js" repo location + * changed bower package name + * updated documentation about using debug in a browser + * fix: security error on safari (#167, #168, @yields) + +2.1.1 / 2014-12-29 +================== + + * browser: use `typeof` to check for `console` existence + * browser: check for `console.log` truthiness (fix IE 8/9) + * browser: add support for Chrome apps + * Readme: added Windows usage remarks + * Add `bower.json` to properly support bower install + +2.1.0 / 2014-10-15 +================== + + * node: implement `DEBUG_FD` env variable support + * package: update "browserify" to v6.1.0 + * package: add "license" field to package.json (#135, @panuhorsmalahti) + +2.0.0 / 2014-09-01 +================== + + * package: update "browserify" to v5.11.0 + * node: use stderr rather than stdout for logging (#29, @stephenmathieson) + +1.0.4 / 2014-07-15 +================== + + * dist: recompile + * example: remove `console.info()` log usage + * example: add "Content-Type" UTF-8 header to browser example + * browser: place %c marker after the space character + * browser: reset the "content" color via `color: inherit` + * browser: add colors support for Firefox >= v31 + * debug: prefer an instance `log()` function over the global one (#119) + * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) + +1.0.3 / 2014-07-09 +================== + + * Add support for multiple wildcards in namespaces (#122, @seegno) + * browser: fix lint + +1.0.2 / 2014-06-10 +================== + + * browser: update color palette (#113, @gscottolson) + * common: make console logging function configurable (#108, @timoxley) + * node: fix %o colors on old node <= 0.8.x + * Makefile: find node path using shell/which (#109, @timoxley) + +1.0.1 / 2014-06-06 +================== + + * browser: use `removeItem()` to clear localStorage + * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) + * package: add "contributors" section + * node: fix comment typo + * README: list authors + +1.0.0 / 2014-06-04 +================== + + * make ms diff be global, not be scope + * debug: ignore empty strings in enable() + * node: make DEBUG_COLORS able to disable coloring + * *: export the `colors` array + * npmignore: don't publish the `dist` dir + * Makefile: refactor to use browserify + * package: add "browserify" as a dev dependency + * Readme: add Web Inspector Colors section + * node: reset terminal color for the debug content + * node: map "%o" to `util.inspect()` + * browser: map "%j" to `JSON.stringify()` + * debug: add custom "formatters" + * debug: use "ms" module for humanizing the diff + * Readme: add "bash" syntax highlighting + * browser: add Firebug color support + * browser: add colors for WebKit browsers + * node: apply log to `console` + * rewrite: abstract common logic for Node & browsers + * add .jshintrc file + +0.8.1 / 2014-04-14 +================== + + * package: re-add the "component" section + +0.8.0 / 2014-03-30 +================== + + * add `enable()` method for nodejs. Closes #27 + * change from stderr to stdout + * remove unnecessary index.js file + +0.7.4 / 2013-11-13 +================== + + * remove "browserify" key from package.json (fixes something in browserify) + +0.7.3 / 2013-10-30 +================== + + * fix: catch localStorage security error when cookies are blocked (Chrome) + * add debug(err) support. Closes #46 + * add .browser prop to package.json. Closes #42 + +0.7.2 / 2013-02-06 +================== + + * fix package.json + * fix: Mobile Safari (private mode) is broken with debug + * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript + +0.7.1 / 2013-02-05 +================== + + * add repository URL to package.json + * add DEBUG_COLORED to force colored output + * add browserify support + * fix component. Closes #24 + +0.7.0 / 2012-05-04 +================== + + * Added .component to package.json + * Added debug.component.js build + +0.6.0 / 2012-03-16 +================== + + * Added support for "-" prefix in DEBUG [Vinay Pulim] + * Added `.enabled` flag to the node version [TooTallNate] + +0.5.0 / 2012-02-02 +================== + + * Added: humanize diffs. Closes #8 + * Added `debug.disable()` to the CS variant + * Removed padding. Closes #10 + * Fixed: persist client-side variant again. Closes #9 + +0.4.0 / 2012-02-01 +================== + + * Added browser variant support for older browsers [TooTallNate] + * Added `debug.enable('project:*')` to browser variant [TooTallNate] + * Added padding to diff (moved it to the right) + +0.3.0 / 2012-01-26 +================== + + * Added millisecond diff when isatty, otherwise UTC string + +0.2.0 / 2012-01-22 +================== + + * Added wildcard support + +0.1.0 / 2011-12-02 +================== + + * Added: remove colors unless stderr isatty [TooTallNate] + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/LICENSE b/src/hello/server/node_modules/finalhandler/node_modules/debug/LICENSE similarity index 66% rename from src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/LICENSE rename to src/hello/server/node_modules/finalhandler/node_modules/debug/LICENSE index 1a9820e2..658c933d 100644 --- a/src/hello/backend/node_modules/@humanwhocodes/config-array/node_modules/debug/LICENSE +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/LICENSE @@ -1,20 +1,19 @@ (The MIT License) -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon +Copyright (c) 2014 TJ Holowaychuk -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +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 +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 +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/src/hello/server/node_modules/finalhandler/node_modules/debug/Makefile b/src/hello/server/node_modules/finalhandler/node_modules/debug/Makefile new file mode 100644 index 00000000..584da8bf --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/Makefile @@ -0,0 +1,50 @@ +# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 +THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) +THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) + +# BIN directory +BIN := $(THIS_DIR)/node_modules/.bin + +# Path +PATH := node_modules/.bin:$(PATH) +SHELL := /bin/bash + +# applications +NODE ?= $(shell which node) +YARN ?= $(shell which yarn) +PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) +BROWSERIFY ?= $(NODE) $(BIN)/browserify + +.FORCE: + +install: node_modules + +node_modules: package.json + @NODE_ENV= $(PKG) install + @touch node_modules + +lint: .FORCE + eslint browser.js debug.js index.js node.js + +test-node: .FORCE + istanbul cover node_modules/mocha/bin/_mocha -- test/**.js + +test-browser: .FORCE + mkdir -p dist + + @$(BROWSERIFY) \ + --standalone debug \ + . > dist/debug.js + + karma start --single-run + rimraf dist + +test: .FORCE + concurrently \ + "make test-node" \ + "make test-browser" + +coveralls: + cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + +.PHONY: all install clean distclean diff --git a/src/hello/backend/node_modules/eslint/node_modules/debug/README.md b/src/hello/server/node_modules/finalhandler/node_modules/debug/README.md similarity index 59% rename from src/hello/backend/node_modules/eslint/node_modules/debug/README.md rename to src/hello/server/node_modules/finalhandler/node_modules/debug/README.md index 9ebdfbf1..f67be6b3 100644 --- a/src/hello/backend/node_modules/eslint/node_modules/debug/README.md +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/README.md @@ -1,11 +1,12 @@ # debug -[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. + +A tiny node.js debugging utility modelled after node core's debugging technique. + +**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** ## Installation @@ -17,7 +18,7 @@ $ npm install debug `debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. -Example [_app.js_](./examples/node/app.js): +Example _app.js_: ```js var debug = require('debug')('http') @@ -26,7 +27,7 @@ var debug = require('debug')('http') // fake app -debug('booting %o', name); +debug('booting %s', name); http.createServer(function(req, res){ debug(req.method + ' ' + req.url); @@ -40,148 +41,81 @@ http.createServer(function(req, res){ require('./worker'); ``` -Example [_worker.js_](./examples/node/worker.js): +Example _worker.js_: ```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); +var debug = require('debug')('worker'); -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); +setInterval(function(){ + debug('doing some work'); +}, 1000); ``` -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. + The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: -Here are some examples: + ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm + ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) -#### Windows command prompt notes +#### Windows note -##### CMD + On Windows the environment variable is set using the `set` command. -On Windows the environment variable is set using the `set` command. + ```cmd + set DEBUG=*,-not_this + ``` -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) + Note that PowerShell uses different syntax to set environment variables. -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` + ```cmd + $env:DEBUG = "*,-not_this" + ``` Then, run the program to be debugged as usual. -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - ## Millisecond diff -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - + When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - + When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: + ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) ## Conventions -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". ## Wildcards -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". + You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". ## Environment Variables -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: + When running through Node.js, you can set a few environment variables that will + change the behavior of the debug logging: | Name | Purpose | |-----------|-------------------------------------------------| | `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | | `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_DEPTH` | Object inspection depth. | | `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. + __Note:__ The environment variables beginning with `DEBUG_` end up being + converted into an Options object that gets used with `%o`/`%O` formatters. + See the Node.js documentation for + [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) + for the complete list. ## Formatters -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: + + Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: | Formatter | Representation | |-----------|----------------| @@ -192,12 +126,9 @@ Below are the officially supported formatters: | `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | | `%%` | Single percent sign ('%'). This does not consume an argument. | - ### Custom formatters -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: + You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: ```js const createDebug = require('debug') @@ -211,16 +142,14 @@ debug('this is hex: %h', new Buffer('hello world')) // foo this is hex: 68656c6c6f20776f726c6421 +0ms ``` +## Browser support + You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), + or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), + if you don't want to build it yourself. -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: + Debug's enable state is currently persisted by `localStorage`. + Consider the situation shown below where you have `worker:a` and `worker:b`, + and wish to debug both. You can enable this using `localStorage.debug`: ```js localStorage.debug = 'worker:*' @@ -241,15 +170,23 @@ setInterval(function(){ }, 1200); ``` -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. +#### Web Inspector Colors + + Colors are also enabled on "Web Inspectors" that understand the `%c` formatting + option. These are WebKit web inspectors, Firefox ([since version + 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) + and the Firebug plugin for Firefox (any version). + + Colored output looks something like: + + ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - ## Output streams By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: -Example [_stdout.js_](./examples/node/stdout.js): +Example _stdout.js_: ```js var debug = require('debug'); @@ -271,118 +208,13 @@ error('now goes to stdout via console.info'); log('still goes to stdout, but via console.info now'); ``` -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - ## Authors - TJ Holowaychuk - Nathan Rajlich - Andrew Rhyne - - Josh Junon - + ## Backers Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] @@ -458,8 +290,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s (The MIT License) -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon +Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/component.json b/src/hello/server/node_modules/finalhandler/node_modules/debug/component.json new file mode 100644 index 00000000..9de26410 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/component.json @@ -0,0 +1,19 @@ +{ + "name": "debug", + "repo": "visionmedia/debug", + "description": "small debugging utility", + "version": "2.6.9", + "keywords": [ + "debug", + "log", + "debugger" + ], + "main": "src/browser.js", + "scripts": [ + "src/browser.js", + "src/debug.js" + ], + "dependencies": { + "rauchg/ms.js": "0.7.1" + } +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/karma.conf.js b/src/hello/server/node_modules/finalhandler/node_modules/debug/karma.conf.js new file mode 100644 index 00000000..103a82d1 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/karma.conf.js @@ -0,0 +1,70 @@ +// Karma configuration +// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'chai', 'sinon'], + + + // list of files / patterns to load in the browser + files: [ + 'dist/debug.js', + 'test/*spec.js' + ], + + + // list of files to exclude + exclude: [ + 'src/node.js' + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + }, + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress'], + + + // web server port + port: 9876, + + + // enable / disable colors in the output (reporters and logs) + colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/node.js b/src/hello/server/node_modules/finalhandler/node_modules/debug/node.js new file mode 100644 index 00000000..7fc36fe6 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/node.js @@ -0,0 +1 @@ +module.exports = require('./src/node'); diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/package.json b/src/hello/server/node_modules/finalhandler/node_modules/debug/package.json new file mode 100644 index 00000000..dc787ba7 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/package.json @@ -0,0 +1,49 @@ +{ + "name": "debug", + "version": "2.6.9", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/debug.git" + }, + "description": "small debugging utility", + "keywords": [ + "debug", + "log", + "debugger" + ], + "author": "TJ Holowaychuk ", + "contributors": [ + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + }, + "devDependencies": { + "browserify": "9.0.3", + "chai": "^3.5.0", + "concurrently": "^3.1.0", + "coveralls": "^2.11.15", + "eslint": "^3.12.1", + "istanbul": "^0.4.5", + "karma": "^1.3.0", + "karma-chai": "^0.1.0", + "karma-mocha": "^1.3.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-sinon": "^1.0.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "rimraf": "^2.5.4", + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "component": { + "scripts": { + "debug/index.js": "browser.js", + "debug/debug.js": "debug.js" + } + } +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/src/browser.js b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/browser.js new file mode 100644 index 00000000..71069249 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/browser.js @@ -0,0 +1,185 @@ +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/src/debug.js b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/debug.js new file mode 100644 index 00000000..6a5e3fc9 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/debug.js @@ -0,0 +1,202 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = require('ms'); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/src/index.js b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/index.js new file mode 100644 index 00000000..e12cf4d5 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/src/inspector-log.js b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/inspector-log.js new file mode 100644 index 00000000..60ea6c04 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/inspector-log.js @@ -0,0 +1,15 @@ +module.exports = inspectorLog; + +// black hole +const nullStream = new (require('stream').Writable)(); +nullStream._write = () => {}; + +/** + * Outputs a `console.log()` to the Node.js Inspector console *only*. + */ +function inspectorLog() { + const stdout = console._stdout; + console._stdout = nullStream; + console.log.apply(console, arguments); + console._stdout = stdout; +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/debug/src/node.js b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/node.js new file mode 100644 index 00000000..b15109c9 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/debug/src/node.js @@ -0,0 +1,248 @@ +/** + * Module dependencies. + */ + +var tty = require('tty'); +var util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = require('./debug'); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); + + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); + + obj[prop] = val; + return obj; +}, {}); + +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ + +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; + +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} + +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n').map(function(str) { + return str.trim() + }).join(' '); +}; + +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ + +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; + + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} + +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ + +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ + +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); + + // Note stream._type is used for test-module-load-list.js + + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; + + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + case 'FILE': + var fs = require('fs'); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; + + case 'PIPE': + case 'TCP': + var net = require('net'); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); + + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; + + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; + + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } + + // For supporting legacy API we put the FD here. + stream.fd = fd; + + stream._isStdio = true; + + return stream; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init (debug) { + debug.inspectOpts = {}; + + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +/** + * Enable namespaces listed in `process.env.DEBUG` initially. + */ + +exports.enable(load()); diff --git a/src/hello/server/node_modules/finalhandler/node_modules/ms/index.js b/src/hello/server/node_modules/finalhandler/node_modules/ms/index.js new file mode 100644 index 00000000..6a522b16 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/ms/index.js @@ -0,0 +1,152 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/ms/license.md b/src/hello/server/node_modules/finalhandler/node_modules/ms/license.md new file mode 100644 index 00000000..69b61253 --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/hello/server/node_modules/finalhandler/node_modules/ms/package.json b/src/hello/server/node_modules/finalhandler/node_modules/ms/package.json new file mode 100644 index 00000000..6a31c81f --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/ms/package.json @@ -0,0 +1,37 @@ +{ + "name": "ms", + "version": "2.0.0", + "description": "Tiny milisecond conversion utility", + "repository": "zeit/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "3.19.0", + "expect.js": "0.3.1", + "husky": "0.13.3", + "lint-staged": "3.4.1", + "mocha": "3.4.1" + } +} diff --git a/src/hello/server/node_modules/finalhandler/node_modules/ms/readme.md b/src/hello/server/node_modules/finalhandler/node_modules/ms/readme.md new file mode 100644 index 00000000..84a9974c --- /dev/null +++ b/src/hello/server/node_modules/finalhandler/node_modules/ms/readme.md @@ -0,0 +1,51 @@ +# ms + +[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) +[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +``` + +### Convert from milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(ms('10 hours')) // "10h" +``` + +### Time format written-out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [node](https://nodejs.org) and in the browser. +- If a number is supplied to `ms`, a string with a unit is returned. +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). +- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. + +## Caught a bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/src/hello/backend/node_modules/finalhandler/package.json b/src/hello/server/node_modules/finalhandler/package.json similarity index 100% rename from src/hello/backend/node_modules/finalhandler/package.json rename to src/hello/server/node_modules/finalhandler/package.json diff --git a/src/hello/backend/node_modules/find-up/index.d.ts b/src/hello/server/node_modules/find-up/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/find-up/index.d.ts rename to src/hello/server/node_modules/find-up/index.d.ts diff --git a/src/hello/backend/node_modules/find-up/index.js b/src/hello/server/node_modules/find-up/index.js similarity index 100% rename from src/hello/backend/node_modules/find-up/index.js rename to src/hello/server/node_modules/find-up/index.js diff --git a/src/hello/backend/node_modules/find-up/license b/src/hello/server/node_modules/find-up/license similarity index 100% rename from src/hello/backend/node_modules/find-up/license rename to src/hello/server/node_modules/find-up/license diff --git a/src/hello/backend/node_modules/find-up/package.json b/src/hello/server/node_modules/find-up/package.json similarity index 100% rename from src/hello/backend/node_modules/find-up/package.json rename to src/hello/server/node_modules/find-up/package.json diff --git a/src/hello/backend/node_modules/find-up/readme.md b/src/hello/server/node_modules/find-up/readme.md similarity index 100% rename from src/hello/backend/node_modules/find-up/readme.md rename to src/hello/server/node_modules/find-up/readme.md diff --git a/src/hello/backend/node_modules/flat-cache/LICENSE b/src/hello/server/node_modules/flat-cache/LICENSE similarity index 100% rename from src/hello/backend/node_modules/flat-cache/LICENSE rename to src/hello/server/node_modules/flat-cache/LICENSE diff --git a/src/hello/backend/node_modules/flat-cache/README.md b/src/hello/server/node_modules/flat-cache/README.md similarity index 100% rename from src/hello/backend/node_modules/flat-cache/README.md rename to src/hello/server/node_modules/flat-cache/README.md diff --git a/src/hello/backend/node_modules/flat-cache/changelog.md b/src/hello/server/node_modules/flat-cache/changelog.md similarity index 100% rename from src/hello/backend/node_modules/flat-cache/changelog.md rename to src/hello/server/node_modules/flat-cache/changelog.md diff --git a/src/hello/backend/node_modules/flat-cache/package.json b/src/hello/server/node_modules/flat-cache/package.json similarity index 100% rename from src/hello/backend/node_modules/flat-cache/package.json rename to src/hello/server/node_modules/flat-cache/package.json diff --git a/src/hello/backend/node_modules/flat-cache/src/cache.js b/src/hello/server/node_modules/flat-cache/src/cache.js similarity index 100% rename from src/hello/backend/node_modules/flat-cache/src/cache.js rename to src/hello/server/node_modules/flat-cache/src/cache.js diff --git a/src/hello/backend/node_modules/flat-cache/src/del.js b/src/hello/server/node_modules/flat-cache/src/del.js similarity index 100% rename from src/hello/backend/node_modules/flat-cache/src/del.js rename to src/hello/server/node_modules/flat-cache/src/del.js diff --git a/src/hello/backend/node_modules/flat-cache/src/utils.js b/src/hello/server/node_modules/flat-cache/src/utils.js similarity index 100% rename from src/hello/backend/node_modules/flat-cache/src/utils.js rename to src/hello/server/node_modules/flat-cache/src/utils.js diff --git a/src/hello/backend/node_modules/flatted/LICENSE b/src/hello/server/node_modules/flatted/LICENSE similarity index 100% rename from src/hello/backend/node_modules/flatted/LICENSE rename to src/hello/server/node_modules/flatted/LICENSE diff --git a/src/hello/backend/node_modules/flatted/README.md b/src/hello/server/node_modules/flatted/README.md similarity index 100% rename from src/hello/backend/node_modules/flatted/README.md rename to src/hello/server/node_modules/flatted/README.md diff --git a/src/hello/backend/node_modules/flatted/cjs/index.js b/src/hello/server/node_modules/flatted/cjs/index.js similarity index 100% rename from src/hello/backend/node_modules/flatted/cjs/index.js rename to src/hello/server/node_modules/flatted/cjs/index.js diff --git a/src/hello/backend/node_modules/flatted/cjs/package.json b/src/hello/server/node_modules/flatted/cjs/package.json similarity index 100% rename from src/hello/backend/node_modules/flatted/cjs/package.json rename to src/hello/server/node_modules/flatted/cjs/package.json diff --git a/src/hello/backend/node_modules/flatted/es.js b/src/hello/server/node_modules/flatted/es.js similarity index 100% rename from src/hello/backend/node_modules/flatted/es.js rename to src/hello/server/node_modules/flatted/es.js diff --git a/src/hello/backend/node_modules/flatted/esm.js b/src/hello/server/node_modules/flatted/esm.js similarity index 100% rename from src/hello/backend/node_modules/flatted/esm.js rename to src/hello/server/node_modules/flatted/esm.js diff --git a/src/hello/backend/node_modules/flatted/esm/index.js b/src/hello/server/node_modules/flatted/esm/index.js similarity index 100% rename from src/hello/backend/node_modules/flatted/esm/index.js rename to src/hello/server/node_modules/flatted/esm/index.js diff --git a/src/hello/backend/node_modules/flatted/index.js b/src/hello/server/node_modules/flatted/index.js similarity index 100% rename from src/hello/backend/node_modules/flatted/index.js rename to src/hello/server/node_modules/flatted/index.js diff --git a/src/hello/backend/node_modules/flatted/min.js b/src/hello/server/node_modules/flatted/min.js similarity index 100% rename from src/hello/backend/node_modules/flatted/min.js rename to src/hello/server/node_modules/flatted/min.js diff --git a/src/hello/backend/node_modules/flatted/package.json b/src/hello/server/node_modules/flatted/package.json similarity index 100% rename from src/hello/backend/node_modules/flatted/package.json rename to src/hello/server/node_modules/flatted/package.json diff --git a/src/hello/backend/node_modules/flatted/php/flatted.php b/src/hello/server/node_modules/flatted/php/flatted.php similarity index 100% rename from src/hello/backend/node_modules/flatted/php/flatted.php rename to src/hello/server/node_modules/flatted/php/flatted.php diff --git a/src/hello/backend/node_modules/flatted/python/flatted.py b/src/hello/server/node_modules/flatted/python/flatted.py similarity index 100% rename from src/hello/backend/node_modules/flatted/python/flatted.py rename to src/hello/server/node_modules/flatted/python/flatted.py diff --git a/src/hello/backend/node_modules/flatted/types/index.d.ts b/src/hello/server/node_modules/flatted/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/flatted/types/index.d.ts rename to src/hello/server/node_modules/flatted/types/index.d.ts diff --git a/src/hello/backend/node_modules/follow-redirects/LICENSE b/src/hello/server/node_modules/follow-redirects/LICENSE similarity index 100% rename from src/hello/backend/node_modules/follow-redirects/LICENSE rename to src/hello/server/node_modules/follow-redirects/LICENSE diff --git a/src/hello/backend/node_modules/follow-redirects/README.md b/src/hello/server/node_modules/follow-redirects/README.md similarity index 100% rename from src/hello/backend/node_modules/follow-redirects/README.md rename to src/hello/server/node_modules/follow-redirects/README.md diff --git a/src/hello/backend/node_modules/follow-redirects/debug.js b/src/hello/server/node_modules/follow-redirects/debug.js similarity index 100% rename from src/hello/backend/node_modules/follow-redirects/debug.js rename to src/hello/server/node_modules/follow-redirects/debug.js diff --git a/src/hello/backend/node_modules/follow-redirects/http.js b/src/hello/server/node_modules/follow-redirects/http.js similarity index 100% rename from src/hello/backend/node_modules/follow-redirects/http.js rename to src/hello/server/node_modules/follow-redirects/http.js diff --git a/src/hello/backend/node_modules/follow-redirects/https.js b/src/hello/server/node_modules/follow-redirects/https.js similarity index 100% rename from src/hello/backend/node_modules/follow-redirects/https.js rename to src/hello/server/node_modules/follow-redirects/https.js diff --git a/src/hello/backend/node_modules/follow-redirects/index.js b/src/hello/server/node_modules/follow-redirects/index.js similarity index 100% rename from src/hello/backend/node_modules/follow-redirects/index.js rename to src/hello/server/node_modules/follow-redirects/index.js diff --git a/src/hello/backend/node_modules/follow-redirects/package.json b/src/hello/server/node_modules/follow-redirects/package.json similarity index 100% rename from src/hello/backend/node_modules/follow-redirects/package.json rename to src/hello/server/node_modules/follow-redirects/package.json diff --git a/src/hello/backend/node_modules/form-data/CHANGELOG.md b/src/hello/server/node_modules/form-data/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/form-data/CHANGELOG.md rename to src/hello/server/node_modules/form-data/CHANGELOG.md diff --git a/src/hello/backend/node_modules/form-data/License b/src/hello/server/node_modules/form-data/License similarity index 100% rename from src/hello/backend/node_modules/form-data/License rename to src/hello/server/node_modules/form-data/License diff --git a/src/hello/backend/node_modules/form-data/README.md b/src/hello/server/node_modules/form-data/README.md similarity index 100% rename from src/hello/backend/node_modules/form-data/README.md rename to src/hello/server/node_modules/form-data/README.md diff --git a/src/hello/backend/node_modules/form-data/index.d.ts b/src/hello/server/node_modules/form-data/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/form-data/index.d.ts rename to src/hello/server/node_modules/form-data/index.d.ts diff --git a/src/hello/backend/node_modules/form-data/lib/browser.js b/src/hello/server/node_modules/form-data/lib/browser.js similarity index 100% rename from src/hello/backend/node_modules/form-data/lib/browser.js rename to src/hello/server/node_modules/form-data/lib/browser.js diff --git a/src/hello/backend/node_modules/form-data/lib/form_data.js b/src/hello/server/node_modules/form-data/lib/form_data.js similarity index 100% rename from src/hello/backend/node_modules/form-data/lib/form_data.js rename to src/hello/server/node_modules/form-data/lib/form_data.js diff --git a/src/hello/backend/node_modules/form-data/lib/populate.js b/src/hello/server/node_modules/form-data/lib/populate.js similarity index 100% rename from src/hello/backend/node_modules/form-data/lib/populate.js rename to src/hello/server/node_modules/form-data/lib/populate.js diff --git a/src/hello/backend/node_modules/form-data/package.json b/src/hello/server/node_modules/form-data/package.json similarity index 100% rename from src/hello/backend/node_modules/form-data/package.json rename to src/hello/server/node_modules/form-data/package.json diff --git a/src/hello/backend/node_modules/forwarded/HISTORY.md b/src/hello/server/node_modules/forwarded/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/forwarded/HISTORY.md rename to src/hello/server/node_modules/forwarded/HISTORY.md diff --git a/src/hello/backend/node_modules/forwarded/LICENSE b/src/hello/server/node_modules/forwarded/LICENSE similarity index 100% rename from src/hello/backend/node_modules/forwarded/LICENSE rename to src/hello/server/node_modules/forwarded/LICENSE diff --git a/src/hello/backend/node_modules/forwarded/README.md b/src/hello/server/node_modules/forwarded/README.md similarity index 100% rename from src/hello/backend/node_modules/forwarded/README.md rename to src/hello/server/node_modules/forwarded/README.md diff --git a/src/hello/backend/node_modules/forwarded/index.js b/src/hello/server/node_modules/forwarded/index.js similarity index 100% rename from src/hello/backend/node_modules/forwarded/index.js rename to src/hello/server/node_modules/forwarded/index.js diff --git a/src/hello/backend/node_modules/forwarded/package.json b/src/hello/server/node_modules/forwarded/package.json similarity index 100% rename from src/hello/backend/node_modules/forwarded/package.json rename to src/hello/server/node_modules/forwarded/package.json diff --git a/src/hello/backend/node_modules/frac/LICENSE b/src/hello/server/node_modules/frac/LICENSE similarity index 100% rename from src/hello/backend/node_modules/frac/LICENSE rename to src/hello/server/node_modules/frac/LICENSE diff --git a/src/hello/backend/node_modules/frac/README.md b/src/hello/server/node_modules/frac/README.md similarity index 100% rename from src/hello/backend/node_modules/frac/README.md rename to src/hello/server/node_modules/frac/README.md diff --git a/src/hello/backend/node_modules/frac/dist/LICENSE b/src/hello/server/node_modules/frac/dist/LICENSE similarity index 100% rename from src/hello/backend/node_modules/frac/dist/LICENSE rename to src/hello/server/node_modules/frac/dist/LICENSE diff --git a/src/hello/backend/node_modules/frac/dist/frac.js b/src/hello/server/node_modules/frac/dist/frac.js similarity index 100% rename from src/hello/backend/node_modules/frac/dist/frac.js rename to src/hello/server/node_modules/frac/dist/frac.js diff --git a/src/hello/backend/node_modules/frac/dist/frac.min.js b/src/hello/server/node_modules/frac/dist/frac.min.js similarity index 100% rename from src/hello/backend/node_modules/frac/dist/frac.min.js rename to src/hello/server/node_modules/frac/dist/frac.min.js diff --git a/src/hello/backend/node_modules/frac/dist/frac.min.map b/src/hello/server/node_modules/frac/dist/frac.min.map similarity index 100% rename from src/hello/backend/node_modules/frac/dist/frac.min.map rename to src/hello/server/node_modules/frac/dist/frac.min.map diff --git a/src/hello/backend/node_modules/frac/frac.js b/src/hello/server/node_modules/frac/frac.js similarity index 100% rename from src/hello/backend/node_modules/frac/frac.js rename to src/hello/server/node_modules/frac/frac.js diff --git a/src/hello/backend/node_modules/frac/package.json b/src/hello/server/node_modules/frac/package.json similarity index 100% rename from src/hello/backend/node_modules/frac/package.json rename to src/hello/server/node_modules/frac/package.json diff --git a/src/hello/backend/node_modules/frac/types/index.d.ts b/src/hello/server/node_modules/frac/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/frac/types/index.d.ts rename to src/hello/server/node_modules/frac/types/index.d.ts diff --git a/src/hello/backend/node_modules/frac/types/tsconfig.json b/src/hello/server/node_modules/frac/types/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/frac/types/tsconfig.json rename to src/hello/server/node_modules/frac/types/tsconfig.json diff --git a/src/hello/backend/node_modules/frac/types/tslint.json b/src/hello/server/node_modules/frac/types/tslint.json similarity index 100% rename from src/hello/backend/node_modules/frac/types/tslint.json rename to src/hello/server/node_modules/frac/types/tslint.json diff --git a/src/hello/backend/node_modules/fresh/HISTORY.md b/src/hello/server/node_modules/fresh/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/fresh/HISTORY.md rename to src/hello/server/node_modules/fresh/HISTORY.md diff --git a/src/hello/backend/node_modules/fresh/LICENSE b/src/hello/server/node_modules/fresh/LICENSE similarity index 100% rename from src/hello/backend/node_modules/fresh/LICENSE rename to src/hello/server/node_modules/fresh/LICENSE diff --git a/src/hello/backend/node_modules/fresh/README.md b/src/hello/server/node_modules/fresh/README.md similarity index 100% rename from src/hello/backend/node_modules/fresh/README.md rename to src/hello/server/node_modules/fresh/README.md diff --git a/src/hello/backend/node_modules/fresh/index.js b/src/hello/server/node_modules/fresh/index.js similarity index 100% rename from src/hello/backend/node_modules/fresh/index.js rename to src/hello/server/node_modules/fresh/index.js diff --git a/src/hello/backend/node_modules/fresh/package.json b/src/hello/server/node_modules/fresh/package.json similarity index 100% rename from src/hello/backend/node_modules/fresh/package.json rename to src/hello/server/node_modules/fresh/package.json diff --git a/src/hello/backend/node_modules/fs.realpath/LICENSE b/src/hello/server/node_modules/fs.realpath/LICENSE similarity index 100% rename from src/hello/backend/node_modules/fs.realpath/LICENSE rename to src/hello/server/node_modules/fs.realpath/LICENSE diff --git a/src/hello/backend/node_modules/fs.realpath/README.md b/src/hello/server/node_modules/fs.realpath/README.md similarity index 100% rename from src/hello/backend/node_modules/fs.realpath/README.md rename to src/hello/server/node_modules/fs.realpath/README.md diff --git a/src/hello/backend/node_modules/fs.realpath/index.js b/src/hello/server/node_modules/fs.realpath/index.js similarity index 100% rename from src/hello/backend/node_modules/fs.realpath/index.js rename to src/hello/server/node_modules/fs.realpath/index.js diff --git a/src/hello/backend/node_modules/fs.realpath/old.js b/src/hello/server/node_modules/fs.realpath/old.js similarity index 100% rename from src/hello/backend/node_modules/fs.realpath/old.js rename to src/hello/server/node_modules/fs.realpath/old.js diff --git a/src/hello/backend/node_modules/fs.realpath/package.json b/src/hello/server/node_modules/fs.realpath/package.json similarity index 100% rename from src/hello/backend/node_modules/fs.realpath/package.json rename to src/hello/server/node_modules/fs.realpath/package.json diff --git a/src/hello/backend/node_modules/function-bind/.eslintrc b/src/hello/server/node_modules/function-bind/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/function-bind/.eslintrc rename to src/hello/server/node_modules/function-bind/.eslintrc diff --git a/src/hello/backend/node_modules/function-bind/.github/FUNDING.yml b/src/hello/server/node_modules/function-bind/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/function-bind/.github/FUNDING.yml rename to src/hello/server/node_modules/function-bind/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/function-bind/.github/SECURITY.md b/src/hello/server/node_modules/function-bind/.github/SECURITY.md similarity index 100% rename from src/hello/backend/node_modules/function-bind/.github/SECURITY.md rename to src/hello/server/node_modules/function-bind/.github/SECURITY.md diff --git a/src/hello/backend/node_modules/function-bind/.nycrc b/src/hello/server/node_modules/function-bind/.nycrc similarity index 100% rename from src/hello/backend/node_modules/function-bind/.nycrc rename to src/hello/server/node_modules/function-bind/.nycrc diff --git a/src/hello/backend/node_modules/function-bind/CHANGELOG.md b/src/hello/server/node_modules/function-bind/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/function-bind/CHANGELOG.md rename to src/hello/server/node_modules/function-bind/CHANGELOG.md diff --git a/src/hello/backend/node_modules/function-bind/LICENSE b/src/hello/server/node_modules/function-bind/LICENSE similarity index 100% rename from src/hello/backend/node_modules/function-bind/LICENSE rename to src/hello/server/node_modules/function-bind/LICENSE diff --git a/src/hello/backend/node_modules/function-bind/README.md b/src/hello/server/node_modules/function-bind/README.md similarity index 100% rename from src/hello/backend/node_modules/function-bind/README.md rename to src/hello/server/node_modules/function-bind/README.md diff --git a/src/hello/backend/node_modules/function-bind/implementation.js b/src/hello/server/node_modules/function-bind/implementation.js similarity index 100% rename from src/hello/backend/node_modules/function-bind/implementation.js rename to src/hello/server/node_modules/function-bind/implementation.js diff --git a/src/hello/backend/node_modules/function-bind/index.js b/src/hello/server/node_modules/function-bind/index.js similarity index 100% rename from src/hello/backend/node_modules/function-bind/index.js rename to src/hello/server/node_modules/function-bind/index.js diff --git a/src/hello/backend/node_modules/function-bind/package.json b/src/hello/server/node_modules/function-bind/package.json similarity index 100% rename from src/hello/backend/node_modules/function-bind/package.json rename to src/hello/server/node_modules/function-bind/package.json diff --git a/src/hello/backend/node_modules/function-bind/test/.eslintrc b/src/hello/server/node_modules/function-bind/test/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/function-bind/test/.eslintrc rename to src/hello/server/node_modules/function-bind/test/.eslintrc diff --git a/src/hello/backend/node_modules/function-bind/test/index.js b/src/hello/server/node_modules/function-bind/test/index.js similarity index 100% rename from src/hello/backend/node_modules/function-bind/test/index.js rename to src/hello/server/node_modules/function-bind/test/index.js diff --git a/src/hello/backend/node_modules/generate-function/.travis.yml b/src/hello/server/node_modules/generate-function/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/generate-function/.travis.yml rename to src/hello/server/node_modules/generate-function/.travis.yml diff --git a/src/hello/backend/node_modules/generate-function/LICENSE b/src/hello/server/node_modules/generate-function/LICENSE similarity index 100% rename from src/hello/backend/node_modules/generate-function/LICENSE rename to src/hello/server/node_modules/generate-function/LICENSE diff --git a/src/hello/backend/node_modules/generate-function/README.md b/src/hello/server/node_modules/generate-function/README.md similarity index 100% rename from src/hello/backend/node_modules/generate-function/README.md rename to src/hello/server/node_modules/generate-function/README.md diff --git a/src/hello/backend/node_modules/generate-function/example.js b/src/hello/server/node_modules/generate-function/example.js similarity index 100% rename from src/hello/backend/node_modules/generate-function/example.js rename to src/hello/server/node_modules/generate-function/example.js diff --git a/src/hello/backend/node_modules/generate-function/index.js b/src/hello/server/node_modules/generate-function/index.js similarity index 100% rename from src/hello/backend/node_modules/generate-function/index.js rename to src/hello/server/node_modules/generate-function/index.js diff --git a/src/hello/backend/node_modules/generate-function/package.json b/src/hello/server/node_modules/generate-function/package.json similarity index 100% rename from src/hello/backend/node_modules/generate-function/package.json rename to src/hello/server/node_modules/generate-function/package.json diff --git a/src/hello/backend/node_modules/generate-function/test.js b/src/hello/server/node_modules/generate-function/test.js similarity index 100% rename from src/hello/backend/node_modules/generate-function/test.js rename to src/hello/server/node_modules/generate-function/test.js diff --git a/src/hello/backend/node_modules/get-intrinsic/.eslintrc b/src/hello/server/node_modules/get-intrinsic/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/.eslintrc rename to src/hello/server/node_modules/get-intrinsic/.eslintrc diff --git a/src/hello/backend/node_modules/get-intrinsic/.github/FUNDING.yml b/src/hello/server/node_modules/get-intrinsic/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/.github/FUNDING.yml rename to src/hello/server/node_modules/get-intrinsic/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/get-intrinsic/.nycrc b/src/hello/server/node_modules/get-intrinsic/.nycrc similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/.nycrc rename to src/hello/server/node_modules/get-intrinsic/.nycrc diff --git a/src/hello/backend/node_modules/get-intrinsic/CHANGELOG.md b/src/hello/server/node_modules/get-intrinsic/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/CHANGELOG.md rename to src/hello/server/node_modules/get-intrinsic/CHANGELOG.md diff --git a/src/hello/backend/node_modules/get-intrinsic/LICENSE b/src/hello/server/node_modules/get-intrinsic/LICENSE similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/LICENSE rename to src/hello/server/node_modules/get-intrinsic/LICENSE diff --git a/src/hello/backend/node_modules/get-intrinsic/README.md b/src/hello/server/node_modules/get-intrinsic/README.md similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/README.md rename to src/hello/server/node_modules/get-intrinsic/README.md diff --git a/src/hello/backend/node_modules/get-intrinsic/index.js b/src/hello/server/node_modules/get-intrinsic/index.js similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/index.js rename to src/hello/server/node_modules/get-intrinsic/index.js diff --git a/src/hello/backend/node_modules/get-intrinsic/package.json b/src/hello/server/node_modules/get-intrinsic/package.json similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/package.json rename to src/hello/server/node_modules/get-intrinsic/package.json diff --git a/src/hello/backend/node_modules/get-intrinsic/test/GetIntrinsic.js b/src/hello/server/node_modules/get-intrinsic/test/GetIntrinsic.js similarity index 100% rename from src/hello/backend/node_modules/get-intrinsic/test/GetIntrinsic.js rename to src/hello/server/node_modules/get-intrinsic/test/GetIntrinsic.js diff --git a/src/hello/backend/node_modules/get-proto/.eslintrc b/src/hello/server/node_modules/get-proto/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/get-proto/.eslintrc rename to src/hello/server/node_modules/get-proto/.eslintrc diff --git a/src/hello/backend/node_modules/get-proto/.github/FUNDING.yml b/src/hello/server/node_modules/get-proto/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/get-proto/.github/FUNDING.yml rename to src/hello/server/node_modules/get-proto/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/get-proto/.nycrc b/src/hello/server/node_modules/get-proto/.nycrc similarity index 100% rename from src/hello/backend/node_modules/get-proto/.nycrc rename to src/hello/server/node_modules/get-proto/.nycrc diff --git a/src/hello/backend/node_modules/get-proto/CHANGELOG.md b/src/hello/server/node_modules/get-proto/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/get-proto/CHANGELOG.md rename to src/hello/server/node_modules/get-proto/CHANGELOG.md diff --git a/src/hello/backend/node_modules/get-proto/LICENSE b/src/hello/server/node_modules/get-proto/LICENSE similarity index 100% rename from src/hello/backend/node_modules/get-proto/LICENSE rename to src/hello/server/node_modules/get-proto/LICENSE diff --git a/src/hello/backend/node_modules/get-proto/Object.getPrototypeOf.d.ts b/src/hello/server/node_modules/get-proto/Object.getPrototypeOf.d.ts similarity index 100% rename from src/hello/backend/node_modules/get-proto/Object.getPrototypeOf.d.ts rename to src/hello/server/node_modules/get-proto/Object.getPrototypeOf.d.ts diff --git a/src/hello/backend/node_modules/get-proto/Object.getPrototypeOf.js b/src/hello/server/node_modules/get-proto/Object.getPrototypeOf.js similarity index 100% rename from src/hello/backend/node_modules/get-proto/Object.getPrototypeOf.js rename to src/hello/server/node_modules/get-proto/Object.getPrototypeOf.js diff --git a/src/hello/backend/node_modules/get-proto/README.md b/src/hello/server/node_modules/get-proto/README.md similarity index 100% rename from src/hello/backend/node_modules/get-proto/README.md rename to src/hello/server/node_modules/get-proto/README.md diff --git a/src/hello/backend/node_modules/get-proto/Reflect.getPrototypeOf.d.ts b/src/hello/server/node_modules/get-proto/Reflect.getPrototypeOf.d.ts similarity index 100% rename from src/hello/backend/node_modules/get-proto/Reflect.getPrototypeOf.d.ts rename to src/hello/server/node_modules/get-proto/Reflect.getPrototypeOf.d.ts diff --git a/src/hello/backend/node_modules/get-proto/Reflect.getPrototypeOf.js b/src/hello/server/node_modules/get-proto/Reflect.getPrototypeOf.js similarity index 100% rename from src/hello/backend/node_modules/get-proto/Reflect.getPrototypeOf.js rename to src/hello/server/node_modules/get-proto/Reflect.getPrototypeOf.js diff --git a/src/hello/backend/node_modules/get-proto/index.d.ts b/src/hello/server/node_modules/get-proto/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/get-proto/index.d.ts rename to src/hello/server/node_modules/get-proto/index.d.ts diff --git a/src/hello/backend/node_modules/get-proto/index.js b/src/hello/server/node_modules/get-proto/index.js similarity index 100% rename from src/hello/backend/node_modules/get-proto/index.js rename to src/hello/server/node_modules/get-proto/index.js diff --git a/src/hello/backend/node_modules/get-proto/package.json b/src/hello/server/node_modules/get-proto/package.json similarity index 100% rename from src/hello/backend/node_modules/get-proto/package.json rename to src/hello/server/node_modules/get-proto/package.json diff --git a/src/hello/backend/node_modules/get-proto/test/index.js b/src/hello/server/node_modules/get-proto/test/index.js similarity index 100% rename from src/hello/backend/node_modules/get-proto/test/index.js rename to src/hello/server/node_modules/get-proto/test/index.js diff --git a/src/hello/backend/node_modules/get-proto/tsconfig.json b/src/hello/server/node_modules/get-proto/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/get-proto/tsconfig.json rename to src/hello/server/node_modules/get-proto/tsconfig.json diff --git a/src/hello/backend/node_modules/glob-parent/LICENSE b/src/hello/server/node_modules/glob-parent/LICENSE similarity index 100% rename from src/hello/backend/node_modules/glob-parent/LICENSE rename to src/hello/server/node_modules/glob-parent/LICENSE diff --git a/src/hello/backend/node_modules/glob-parent/README.md b/src/hello/server/node_modules/glob-parent/README.md similarity index 100% rename from src/hello/backend/node_modules/glob-parent/README.md rename to src/hello/server/node_modules/glob-parent/README.md diff --git a/src/hello/backend/node_modules/glob-parent/index.js b/src/hello/server/node_modules/glob-parent/index.js similarity index 100% rename from src/hello/backend/node_modules/glob-parent/index.js rename to src/hello/server/node_modules/glob-parent/index.js diff --git a/src/hello/backend/node_modules/glob-parent/package.json b/src/hello/server/node_modules/glob-parent/package.json similarity index 100% rename from src/hello/backend/node_modules/glob-parent/package.json rename to src/hello/server/node_modules/glob-parent/package.json diff --git a/src/hello/backend/node_modules/glob/LICENSE b/src/hello/server/node_modules/glob/LICENSE similarity index 100% rename from src/hello/backend/node_modules/glob/LICENSE rename to src/hello/server/node_modules/glob/LICENSE diff --git a/src/hello/backend/node_modules/glob/README.md b/src/hello/server/node_modules/glob/README.md similarity index 100% rename from src/hello/backend/node_modules/glob/README.md rename to src/hello/server/node_modules/glob/README.md diff --git a/src/hello/backend/node_modules/glob/common.js b/src/hello/server/node_modules/glob/common.js similarity index 100% rename from src/hello/backend/node_modules/glob/common.js rename to src/hello/server/node_modules/glob/common.js diff --git a/src/hello/backend/node_modules/glob/glob.js b/src/hello/server/node_modules/glob/glob.js similarity index 100% rename from src/hello/backend/node_modules/glob/glob.js rename to src/hello/server/node_modules/glob/glob.js diff --git a/src/hello/backend/node_modules/glob/package.json b/src/hello/server/node_modules/glob/package.json similarity index 100% rename from src/hello/backend/node_modules/glob/package.json rename to src/hello/server/node_modules/glob/package.json diff --git a/src/hello/backend/node_modules/glob/sync.js b/src/hello/server/node_modules/glob/sync.js similarity index 100% rename from src/hello/backend/node_modules/glob/sync.js rename to src/hello/server/node_modules/glob/sync.js diff --git a/src/hello/backend/node_modules/globals/globals.json b/src/hello/server/node_modules/globals/globals.json similarity index 100% rename from src/hello/backend/node_modules/globals/globals.json rename to src/hello/server/node_modules/globals/globals.json diff --git a/src/hello/backend/node_modules/globals/index.d.ts b/src/hello/server/node_modules/globals/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/globals/index.d.ts rename to src/hello/server/node_modules/globals/index.d.ts diff --git a/src/hello/backend/node_modules/globals/index.js b/src/hello/server/node_modules/globals/index.js similarity index 100% rename from src/hello/backend/node_modules/globals/index.js rename to src/hello/server/node_modules/globals/index.js diff --git a/src/hello/backend/node_modules/globals/license b/src/hello/server/node_modules/globals/license similarity index 100% rename from src/hello/backend/node_modules/globals/license rename to src/hello/server/node_modules/globals/license diff --git a/src/hello/backend/node_modules/globals/package.json b/src/hello/server/node_modules/globals/package.json similarity index 100% rename from src/hello/backend/node_modules/globals/package.json rename to src/hello/server/node_modules/globals/package.json diff --git a/src/hello/backend/node_modules/globals/readme.md b/src/hello/server/node_modules/globals/readme.md similarity index 100% rename from src/hello/backend/node_modules/globals/readme.md rename to src/hello/server/node_modules/globals/readme.md diff --git a/src/hello/backend/node_modules/gopd/.eslintrc b/src/hello/server/node_modules/gopd/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/gopd/.eslintrc rename to src/hello/server/node_modules/gopd/.eslintrc diff --git a/src/hello/backend/node_modules/gopd/.github/FUNDING.yml b/src/hello/server/node_modules/gopd/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/gopd/.github/FUNDING.yml rename to src/hello/server/node_modules/gopd/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/gopd/CHANGELOG.md b/src/hello/server/node_modules/gopd/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/gopd/CHANGELOG.md rename to src/hello/server/node_modules/gopd/CHANGELOG.md diff --git a/src/hello/backend/node_modules/gopd/LICENSE b/src/hello/server/node_modules/gopd/LICENSE similarity index 100% rename from src/hello/backend/node_modules/gopd/LICENSE rename to src/hello/server/node_modules/gopd/LICENSE diff --git a/src/hello/backend/node_modules/gopd/README.md b/src/hello/server/node_modules/gopd/README.md similarity index 100% rename from src/hello/backend/node_modules/gopd/README.md rename to src/hello/server/node_modules/gopd/README.md diff --git a/src/hello/backend/node_modules/gopd/gOPD.d.ts b/src/hello/server/node_modules/gopd/gOPD.d.ts similarity index 100% rename from src/hello/backend/node_modules/gopd/gOPD.d.ts rename to src/hello/server/node_modules/gopd/gOPD.d.ts diff --git a/src/hello/backend/node_modules/gopd/gOPD.js b/src/hello/server/node_modules/gopd/gOPD.js similarity index 100% rename from src/hello/backend/node_modules/gopd/gOPD.js rename to src/hello/server/node_modules/gopd/gOPD.js diff --git a/src/hello/backend/node_modules/gopd/index.d.ts b/src/hello/server/node_modules/gopd/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/gopd/index.d.ts rename to src/hello/server/node_modules/gopd/index.d.ts diff --git a/src/hello/backend/node_modules/gopd/index.js b/src/hello/server/node_modules/gopd/index.js similarity index 100% rename from src/hello/backend/node_modules/gopd/index.js rename to src/hello/server/node_modules/gopd/index.js diff --git a/src/hello/backend/node_modules/gopd/package.json b/src/hello/server/node_modules/gopd/package.json similarity index 100% rename from src/hello/backend/node_modules/gopd/package.json rename to src/hello/server/node_modules/gopd/package.json diff --git a/src/hello/backend/node_modules/gopd/test/index.js b/src/hello/server/node_modules/gopd/test/index.js similarity index 100% rename from src/hello/backend/node_modules/gopd/test/index.js rename to src/hello/server/node_modules/gopd/test/index.js diff --git a/src/hello/backend/node_modules/gopd/tsconfig.json b/src/hello/server/node_modules/gopd/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/gopd/tsconfig.json rename to src/hello/server/node_modules/gopd/tsconfig.json diff --git a/src/hello/backend/node_modules/graphemer/CHANGELOG.md b/src/hello/server/node_modules/graphemer/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/graphemer/CHANGELOG.md rename to src/hello/server/node_modules/graphemer/CHANGELOG.md diff --git a/src/hello/backend/node_modules/graphemer/LICENSE b/src/hello/server/node_modules/graphemer/LICENSE similarity index 100% rename from src/hello/backend/node_modules/graphemer/LICENSE rename to src/hello/server/node_modules/graphemer/LICENSE diff --git a/src/hello/backend/node_modules/graphemer/README.md b/src/hello/server/node_modules/graphemer/README.md similarity index 100% rename from src/hello/backend/node_modules/graphemer/README.md rename to src/hello/server/node_modules/graphemer/README.md diff --git a/src/hello/backend/node_modules/graphemer/lib/Graphemer.d.ts b/src/hello/server/node_modules/graphemer/lib/Graphemer.d.ts similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/Graphemer.d.ts rename to src/hello/server/node_modules/graphemer/lib/Graphemer.d.ts diff --git a/src/hello/backend/node_modules/graphemer/lib/Graphemer.d.ts.map b/src/hello/server/node_modules/graphemer/lib/Graphemer.d.ts.map similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/Graphemer.d.ts.map rename to src/hello/server/node_modules/graphemer/lib/Graphemer.d.ts.map diff --git a/src/hello/backend/node_modules/graphemer/lib/Graphemer.js b/src/hello/server/node_modules/graphemer/lib/Graphemer.js similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/Graphemer.js rename to src/hello/server/node_modules/graphemer/lib/Graphemer.js diff --git a/src/hello/backend/node_modules/graphemer/lib/GraphemerHelper.d.ts b/src/hello/server/node_modules/graphemer/lib/GraphemerHelper.d.ts similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/GraphemerHelper.d.ts rename to src/hello/server/node_modules/graphemer/lib/GraphemerHelper.d.ts diff --git a/src/hello/backend/node_modules/graphemer/lib/GraphemerHelper.d.ts.map b/src/hello/server/node_modules/graphemer/lib/GraphemerHelper.d.ts.map similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/GraphemerHelper.d.ts.map rename to src/hello/server/node_modules/graphemer/lib/GraphemerHelper.d.ts.map diff --git a/src/hello/backend/node_modules/graphemer/lib/GraphemerHelper.js b/src/hello/server/node_modules/graphemer/lib/GraphemerHelper.js similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/GraphemerHelper.js rename to src/hello/server/node_modules/graphemer/lib/GraphemerHelper.js diff --git a/src/hello/backend/node_modules/graphemer/lib/GraphemerIterator.d.ts b/src/hello/server/node_modules/graphemer/lib/GraphemerIterator.d.ts similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/GraphemerIterator.d.ts rename to src/hello/server/node_modules/graphemer/lib/GraphemerIterator.d.ts diff --git a/src/hello/backend/node_modules/graphemer/lib/GraphemerIterator.d.ts.map b/src/hello/server/node_modules/graphemer/lib/GraphemerIterator.d.ts.map similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/GraphemerIterator.d.ts.map rename to src/hello/server/node_modules/graphemer/lib/GraphemerIterator.d.ts.map diff --git a/src/hello/backend/node_modules/graphemer/lib/GraphemerIterator.js b/src/hello/server/node_modules/graphemer/lib/GraphemerIterator.js similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/GraphemerIterator.js rename to src/hello/server/node_modules/graphemer/lib/GraphemerIterator.js diff --git a/src/hello/backend/node_modules/graphemer/lib/boundaries.d.ts b/src/hello/server/node_modules/graphemer/lib/boundaries.d.ts similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/boundaries.d.ts rename to src/hello/server/node_modules/graphemer/lib/boundaries.d.ts diff --git a/src/hello/backend/node_modules/graphemer/lib/boundaries.d.ts.map b/src/hello/server/node_modules/graphemer/lib/boundaries.d.ts.map similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/boundaries.d.ts.map rename to src/hello/server/node_modules/graphemer/lib/boundaries.d.ts.map diff --git a/src/hello/backend/node_modules/graphemer/lib/boundaries.js b/src/hello/server/node_modules/graphemer/lib/boundaries.js similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/boundaries.js rename to src/hello/server/node_modules/graphemer/lib/boundaries.js diff --git a/src/hello/backend/node_modules/graphemer/lib/index.d.ts b/src/hello/server/node_modules/graphemer/lib/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/index.d.ts rename to src/hello/server/node_modules/graphemer/lib/index.d.ts diff --git a/src/hello/backend/node_modules/graphemer/lib/index.d.ts.map b/src/hello/server/node_modules/graphemer/lib/index.d.ts.map similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/index.d.ts.map rename to src/hello/server/node_modules/graphemer/lib/index.d.ts.map diff --git a/src/hello/backend/node_modules/graphemer/lib/index.js b/src/hello/server/node_modules/graphemer/lib/index.js similarity index 100% rename from src/hello/backend/node_modules/graphemer/lib/index.js rename to src/hello/server/node_modules/graphemer/lib/index.js diff --git a/src/hello/backend/node_modules/graphemer/package.json b/src/hello/server/node_modules/graphemer/package.json similarity index 100% rename from src/hello/backend/node_modules/graphemer/package.json rename to src/hello/server/node_modules/graphemer/package.json diff --git a/src/hello/backend/node_modules/chalk/node_modules/has-flag/index.d.ts b/src/hello/server/node_modules/has-flag/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/chalk/node_modules/has-flag/index.d.ts rename to src/hello/server/node_modules/has-flag/index.d.ts diff --git a/src/hello/backend/node_modules/chalk/node_modules/has-flag/index.js b/src/hello/server/node_modules/has-flag/index.js similarity index 100% rename from src/hello/backend/node_modules/chalk/node_modules/has-flag/index.js rename to src/hello/server/node_modules/has-flag/index.js diff --git a/src/hello/backend/node_modules/chalk/node_modules/has-flag/license b/src/hello/server/node_modules/has-flag/license similarity index 100% rename from src/hello/backend/node_modules/chalk/node_modules/has-flag/license rename to src/hello/server/node_modules/has-flag/license diff --git a/src/hello/backend/node_modules/chalk/node_modules/has-flag/package.json b/src/hello/server/node_modules/has-flag/package.json similarity index 100% rename from src/hello/backend/node_modules/chalk/node_modules/has-flag/package.json rename to src/hello/server/node_modules/has-flag/package.json diff --git a/src/hello/backend/node_modules/chalk/node_modules/has-flag/readme.md b/src/hello/server/node_modules/has-flag/readme.md similarity index 100% rename from src/hello/backend/node_modules/chalk/node_modules/has-flag/readme.md rename to src/hello/server/node_modules/has-flag/readme.md diff --git a/src/hello/backend/node_modules/has-symbols/.eslintrc b/src/hello/server/node_modules/has-symbols/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/has-symbols/.eslintrc rename to src/hello/server/node_modules/has-symbols/.eslintrc diff --git a/src/hello/backend/node_modules/has-symbols/.github/FUNDING.yml b/src/hello/server/node_modules/has-symbols/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/has-symbols/.github/FUNDING.yml rename to src/hello/server/node_modules/has-symbols/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/has-symbols/.nycrc b/src/hello/server/node_modules/has-symbols/.nycrc similarity index 100% rename from src/hello/backend/node_modules/has-symbols/.nycrc rename to src/hello/server/node_modules/has-symbols/.nycrc diff --git a/src/hello/backend/node_modules/has-symbols/CHANGELOG.md b/src/hello/server/node_modules/has-symbols/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/has-symbols/CHANGELOG.md rename to src/hello/server/node_modules/has-symbols/CHANGELOG.md diff --git a/src/hello/backend/node_modules/has-symbols/LICENSE b/src/hello/server/node_modules/has-symbols/LICENSE similarity index 100% rename from src/hello/backend/node_modules/has-symbols/LICENSE rename to src/hello/server/node_modules/has-symbols/LICENSE diff --git a/src/hello/backend/node_modules/has-symbols/README.md b/src/hello/server/node_modules/has-symbols/README.md similarity index 100% rename from src/hello/backend/node_modules/has-symbols/README.md rename to src/hello/server/node_modules/has-symbols/README.md diff --git a/src/hello/backend/node_modules/has-symbols/index.d.ts b/src/hello/server/node_modules/has-symbols/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/has-symbols/index.d.ts rename to src/hello/server/node_modules/has-symbols/index.d.ts diff --git a/src/hello/backend/node_modules/has-symbols/index.js b/src/hello/server/node_modules/has-symbols/index.js similarity index 100% rename from src/hello/backend/node_modules/has-symbols/index.js rename to src/hello/server/node_modules/has-symbols/index.js diff --git a/src/hello/backend/node_modules/has-symbols/package.json b/src/hello/server/node_modules/has-symbols/package.json similarity index 100% rename from src/hello/backend/node_modules/has-symbols/package.json rename to src/hello/server/node_modules/has-symbols/package.json diff --git a/src/hello/backend/node_modules/has-symbols/shams.d.ts b/src/hello/server/node_modules/has-symbols/shams.d.ts similarity index 100% rename from src/hello/backend/node_modules/has-symbols/shams.d.ts rename to src/hello/server/node_modules/has-symbols/shams.d.ts diff --git a/src/hello/backend/node_modules/has-symbols/shams.js b/src/hello/server/node_modules/has-symbols/shams.js similarity index 100% rename from src/hello/backend/node_modules/has-symbols/shams.js rename to src/hello/server/node_modules/has-symbols/shams.js diff --git a/src/hello/backend/node_modules/has-symbols/test/index.js b/src/hello/server/node_modules/has-symbols/test/index.js similarity index 100% rename from src/hello/backend/node_modules/has-symbols/test/index.js rename to src/hello/server/node_modules/has-symbols/test/index.js diff --git a/src/hello/backend/node_modules/has-symbols/test/shams/core-js.js b/src/hello/server/node_modules/has-symbols/test/shams/core-js.js similarity index 100% rename from src/hello/backend/node_modules/has-symbols/test/shams/core-js.js rename to src/hello/server/node_modules/has-symbols/test/shams/core-js.js diff --git a/src/hello/backend/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/src/hello/server/node_modules/has-symbols/test/shams/get-own-property-symbols.js similarity index 100% rename from src/hello/backend/node_modules/has-symbols/test/shams/get-own-property-symbols.js rename to src/hello/server/node_modules/has-symbols/test/shams/get-own-property-symbols.js diff --git a/src/hello/backend/node_modules/has-symbols/test/tests.js b/src/hello/server/node_modules/has-symbols/test/tests.js similarity index 100% rename from src/hello/backend/node_modules/has-symbols/test/tests.js rename to src/hello/server/node_modules/has-symbols/test/tests.js diff --git a/src/hello/backend/node_modules/has-symbols/tsconfig.json b/src/hello/server/node_modules/has-symbols/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/has-symbols/tsconfig.json rename to src/hello/server/node_modules/has-symbols/tsconfig.json diff --git a/src/hello/backend/node_modules/has-tostringtag/.eslintrc b/src/hello/server/node_modules/has-tostringtag/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/.eslintrc rename to src/hello/server/node_modules/has-tostringtag/.eslintrc diff --git a/src/hello/backend/node_modules/has-tostringtag/.github/FUNDING.yml b/src/hello/server/node_modules/has-tostringtag/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/.github/FUNDING.yml rename to src/hello/server/node_modules/has-tostringtag/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/has-tostringtag/.nycrc b/src/hello/server/node_modules/has-tostringtag/.nycrc similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/.nycrc rename to src/hello/server/node_modules/has-tostringtag/.nycrc diff --git a/src/hello/backend/node_modules/has-tostringtag/CHANGELOG.md b/src/hello/server/node_modules/has-tostringtag/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/CHANGELOG.md rename to src/hello/server/node_modules/has-tostringtag/CHANGELOG.md diff --git a/src/hello/backend/node_modules/has-tostringtag/LICENSE b/src/hello/server/node_modules/has-tostringtag/LICENSE similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/LICENSE rename to src/hello/server/node_modules/has-tostringtag/LICENSE diff --git a/src/hello/backend/node_modules/has-tostringtag/README.md b/src/hello/server/node_modules/has-tostringtag/README.md similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/README.md rename to src/hello/server/node_modules/has-tostringtag/README.md diff --git a/src/hello/backend/node_modules/has-tostringtag/index.d.ts b/src/hello/server/node_modules/has-tostringtag/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/index.d.ts rename to src/hello/server/node_modules/has-tostringtag/index.d.ts diff --git a/src/hello/backend/node_modules/has-tostringtag/index.js b/src/hello/server/node_modules/has-tostringtag/index.js similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/index.js rename to src/hello/server/node_modules/has-tostringtag/index.js diff --git a/src/hello/backend/node_modules/has-tostringtag/package.json b/src/hello/server/node_modules/has-tostringtag/package.json similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/package.json rename to src/hello/server/node_modules/has-tostringtag/package.json diff --git a/src/hello/backend/node_modules/has-tostringtag/shams.d.ts b/src/hello/server/node_modules/has-tostringtag/shams.d.ts similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/shams.d.ts rename to src/hello/server/node_modules/has-tostringtag/shams.d.ts diff --git a/src/hello/backend/node_modules/has-tostringtag/shams.js b/src/hello/server/node_modules/has-tostringtag/shams.js similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/shams.js rename to src/hello/server/node_modules/has-tostringtag/shams.js diff --git a/src/hello/backend/node_modules/has-tostringtag/test/index.js b/src/hello/server/node_modules/has-tostringtag/test/index.js similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/test/index.js rename to src/hello/server/node_modules/has-tostringtag/test/index.js diff --git a/src/hello/backend/node_modules/has-tostringtag/test/shams/core-js.js b/src/hello/server/node_modules/has-tostringtag/test/shams/core-js.js similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/test/shams/core-js.js rename to src/hello/server/node_modules/has-tostringtag/test/shams/core-js.js diff --git a/src/hello/backend/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js b/src/hello/server/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js rename to src/hello/server/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js diff --git a/src/hello/backend/node_modules/has-tostringtag/test/tests.js b/src/hello/server/node_modules/has-tostringtag/test/tests.js similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/test/tests.js rename to src/hello/server/node_modules/has-tostringtag/test/tests.js diff --git a/src/hello/backend/node_modules/has-tostringtag/tsconfig.json b/src/hello/server/node_modules/has-tostringtag/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/has-tostringtag/tsconfig.json rename to src/hello/server/node_modules/has-tostringtag/tsconfig.json diff --git a/src/hello/backend/node_modules/hasown/.eslintrc b/src/hello/server/node_modules/hasown/.eslintrc similarity index 100% rename from src/hello/backend/node_modules/hasown/.eslintrc rename to src/hello/server/node_modules/hasown/.eslintrc diff --git a/src/hello/backend/node_modules/hasown/.github/FUNDING.yml b/src/hello/server/node_modules/hasown/.github/FUNDING.yml similarity index 100% rename from src/hello/backend/node_modules/hasown/.github/FUNDING.yml rename to src/hello/server/node_modules/hasown/.github/FUNDING.yml diff --git a/src/hello/backend/node_modules/hasown/.nycrc b/src/hello/server/node_modules/hasown/.nycrc similarity index 100% rename from src/hello/backend/node_modules/hasown/.nycrc rename to src/hello/server/node_modules/hasown/.nycrc diff --git a/src/hello/backend/node_modules/hasown/CHANGELOG.md b/src/hello/server/node_modules/hasown/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/hasown/CHANGELOG.md rename to src/hello/server/node_modules/hasown/CHANGELOG.md diff --git a/src/hello/backend/node_modules/hasown/LICENSE b/src/hello/server/node_modules/hasown/LICENSE similarity index 100% rename from src/hello/backend/node_modules/hasown/LICENSE rename to src/hello/server/node_modules/hasown/LICENSE diff --git a/src/hello/backend/node_modules/hasown/README.md b/src/hello/server/node_modules/hasown/README.md similarity index 100% rename from src/hello/backend/node_modules/hasown/README.md rename to src/hello/server/node_modules/hasown/README.md diff --git a/src/hello/backend/node_modules/hasown/index.d.ts b/src/hello/server/node_modules/hasown/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/hasown/index.d.ts rename to src/hello/server/node_modules/hasown/index.d.ts diff --git a/src/hello/backend/node_modules/hasown/index.js b/src/hello/server/node_modules/hasown/index.js similarity index 100% rename from src/hello/backend/node_modules/hasown/index.js rename to src/hello/server/node_modules/hasown/index.js diff --git a/src/hello/backend/node_modules/hasown/package.json b/src/hello/server/node_modules/hasown/package.json similarity index 100% rename from src/hello/backend/node_modules/hasown/package.json rename to src/hello/server/node_modules/hasown/package.json diff --git a/src/hello/backend/node_modules/hasown/tsconfig.json b/src/hello/server/node_modules/hasown/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/hasown/tsconfig.json rename to src/hello/server/node_modules/hasown/tsconfig.json diff --git a/src/hello/backend/node_modules/http-errors/HISTORY.md b/src/hello/server/node_modules/http-errors/HISTORY.md similarity index 100% rename from src/hello/backend/node_modules/http-errors/HISTORY.md rename to src/hello/server/node_modules/http-errors/HISTORY.md diff --git a/src/hello/backend/node_modules/http-errors/LICENSE b/src/hello/server/node_modules/http-errors/LICENSE similarity index 100% rename from src/hello/backend/node_modules/http-errors/LICENSE rename to src/hello/server/node_modules/http-errors/LICENSE diff --git a/src/hello/backend/node_modules/http-errors/README.md b/src/hello/server/node_modules/http-errors/README.md similarity index 100% rename from src/hello/backend/node_modules/http-errors/README.md rename to src/hello/server/node_modules/http-errors/README.md diff --git a/src/hello/backend/node_modules/http-errors/index.js b/src/hello/server/node_modules/http-errors/index.js similarity index 100% rename from src/hello/backend/node_modules/http-errors/index.js rename to src/hello/server/node_modules/http-errors/index.js diff --git a/src/hello/backend/node_modules/http-errors/package.json b/src/hello/server/node_modules/http-errors/package.json similarity index 100% rename from src/hello/backend/node_modules/http-errors/package.json rename to src/hello/server/node_modules/http-errors/package.json diff --git a/src/hello/backend/node_modules/iconv-lite/Changelog.md b/src/hello/server/node_modules/iconv-lite/Changelog.md similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/Changelog.md rename to src/hello/server/node_modules/iconv-lite/Changelog.md diff --git a/src/hello/backend/node_modules/iconv-lite/LICENSE b/src/hello/server/node_modules/iconv-lite/LICENSE similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/LICENSE rename to src/hello/server/node_modules/iconv-lite/LICENSE diff --git a/src/hello/backend/node_modules/iconv-lite/README.md b/src/hello/server/node_modules/iconv-lite/README.md similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/README.md rename to src/hello/server/node_modules/iconv-lite/README.md diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/dbcs-codec.js b/src/hello/server/node_modules/iconv-lite/encodings/dbcs-codec.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/dbcs-codec.js rename to src/hello/server/node_modules/iconv-lite/encodings/dbcs-codec.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/dbcs-data.js b/src/hello/server/node_modules/iconv-lite/encodings/dbcs-data.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/dbcs-data.js rename to src/hello/server/node_modules/iconv-lite/encodings/dbcs-data.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/index.js b/src/hello/server/node_modules/iconv-lite/encodings/index.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/index.js rename to src/hello/server/node_modules/iconv-lite/encodings/index.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/internal.js b/src/hello/server/node_modules/iconv-lite/encodings/internal.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/internal.js rename to src/hello/server/node_modules/iconv-lite/encodings/internal.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/sbcs-codec.js b/src/hello/server/node_modules/iconv-lite/encodings/sbcs-codec.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/sbcs-codec.js rename to src/hello/server/node_modules/iconv-lite/encodings/sbcs-codec.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/src/hello/server/node_modules/iconv-lite/encodings/sbcs-data-generated.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/sbcs-data-generated.js rename to src/hello/server/node_modules/iconv-lite/encodings/sbcs-data-generated.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/sbcs-data.js b/src/hello/server/node_modules/iconv-lite/encodings/sbcs-data.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/sbcs-data.js rename to src/hello/server/node_modules/iconv-lite/encodings/sbcs-data.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/big5-added.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/big5-added.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/big5-added.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/big5-added.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/cp936.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/cp936.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/cp936.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/cp936.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/cp949.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/cp949.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/cp949.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/cp949.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/cp950.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/cp950.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/cp950.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/cp950.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/eucjp.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/eucjp.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/eucjp.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/eucjp.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/gbk-added.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/gbk-added.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/gbk-added.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/gbk-added.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/tables/shiftjis.json b/src/hello/server/node_modules/iconv-lite/encodings/tables/shiftjis.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/tables/shiftjis.json rename to src/hello/server/node_modules/iconv-lite/encodings/tables/shiftjis.json diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/utf16.js b/src/hello/server/node_modules/iconv-lite/encodings/utf16.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/utf16.js rename to src/hello/server/node_modules/iconv-lite/encodings/utf16.js diff --git a/src/hello/backend/node_modules/iconv-lite/encodings/utf7.js b/src/hello/server/node_modules/iconv-lite/encodings/utf7.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/encodings/utf7.js rename to src/hello/server/node_modules/iconv-lite/encodings/utf7.js diff --git a/src/hello/backend/node_modules/iconv-lite/lib/bom-handling.js b/src/hello/server/node_modules/iconv-lite/lib/bom-handling.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/lib/bom-handling.js rename to src/hello/server/node_modules/iconv-lite/lib/bom-handling.js diff --git a/src/hello/backend/node_modules/iconv-lite/lib/extend-node.js b/src/hello/server/node_modules/iconv-lite/lib/extend-node.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/lib/extend-node.js rename to src/hello/server/node_modules/iconv-lite/lib/extend-node.js diff --git a/src/hello/backend/node_modules/iconv-lite/lib/index.d.ts b/src/hello/server/node_modules/iconv-lite/lib/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/lib/index.d.ts rename to src/hello/server/node_modules/iconv-lite/lib/index.d.ts diff --git a/src/hello/backend/node_modules/iconv-lite/lib/index.js b/src/hello/server/node_modules/iconv-lite/lib/index.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/lib/index.js rename to src/hello/server/node_modules/iconv-lite/lib/index.js diff --git a/src/hello/backend/node_modules/iconv-lite/lib/streams.js b/src/hello/server/node_modules/iconv-lite/lib/streams.js similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/lib/streams.js rename to src/hello/server/node_modules/iconv-lite/lib/streams.js diff --git a/src/hello/backend/node_modules/iconv-lite/package.json b/src/hello/server/node_modules/iconv-lite/package.json similarity index 100% rename from src/hello/backend/node_modules/iconv-lite/package.json rename to src/hello/server/node_modules/iconv-lite/package.json diff --git a/src/hello/backend/node_modules/ignore-by-default/LICENSE b/src/hello/server/node_modules/ignore-by-default/LICENSE similarity index 100% rename from src/hello/backend/node_modules/ignore-by-default/LICENSE rename to src/hello/server/node_modules/ignore-by-default/LICENSE diff --git a/src/hello/backend/node_modules/ignore-by-default/README.md b/src/hello/server/node_modules/ignore-by-default/README.md similarity index 100% rename from src/hello/backend/node_modules/ignore-by-default/README.md rename to src/hello/server/node_modules/ignore-by-default/README.md diff --git a/src/hello/backend/node_modules/ignore-by-default/index.js b/src/hello/server/node_modules/ignore-by-default/index.js similarity index 100% rename from src/hello/backend/node_modules/ignore-by-default/index.js rename to src/hello/server/node_modules/ignore-by-default/index.js diff --git a/src/hello/backend/node_modules/ignore-by-default/package.json b/src/hello/server/node_modules/ignore-by-default/package.json similarity index 100% rename from src/hello/backend/node_modules/ignore-by-default/package.json rename to src/hello/server/node_modules/ignore-by-default/package.json diff --git a/src/hello/backend/node_modules/ignore/LICENSE-MIT b/src/hello/server/node_modules/ignore/LICENSE-MIT similarity index 100% rename from src/hello/backend/node_modules/ignore/LICENSE-MIT rename to src/hello/server/node_modules/ignore/LICENSE-MIT diff --git a/src/hello/backend/node_modules/ignore/README.md b/src/hello/server/node_modules/ignore/README.md similarity index 100% rename from src/hello/backend/node_modules/ignore/README.md rename to src/hello/server/node_modules/ignore/README.md diff --git a/src/hello/backend/node_modules/ignore/index.d.ts b/src/hello/server/node_modules/ignore/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/ignore/index.d.ts rename to src/hello/server/node_modules/ignore/index.d.ts diff --git a/src/hello/backend/node_modules/ignore/index.js b/src/hello/server/node_modules/ignore/index.js similarity index 100% rename from src/hello/backend/node_modules/ignore/index.js rename to src/hello/server/node_modules/ignore/index.js diff --git a/src/hello/backend/node_modules/ignore/legacy.js b/src/hello/server/node_modules/ignore/legacy.js similarity index 100% rename from src/hello/backend/node_modules/ignore/legacy.js rename to src/hello/server/node_modules/ignore/legacy.js diff --git a/src/hello/backend/node_modules/ignore/package.json b/src/hello/server/node_modules/ignore/package.json similarity index 100% rename from src/hello/backend/node_modules/ignore/package.json rename to src/hello/server/node_modules/ignore/package.json diff --git a/src/hello/backend/node_modules/import-fresh/index.d.ts b/src/hello/server/node_modules/import-fresh/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/import-fresh/index.d.ts rename to src/hello/server/node_modules/import-fresh/index.d.ts diff --git a/src/hello/backend/node_modules/import-fresh/index.js b/src/hello/server/node_modules/import-fresh/index.js similarity index 100% rename from src/hello/backend/node_modules/import-fresh/index.js rename to src/hello/server/node_modules/import-fresh/index.js diff --git a/src/hello/backend/node_modules/import-fresh/license b/src/hello/server/node_modules/import-fresh/license similarity index 100% rename from src/hello/backend/node_modules/import-fresh/license rename to src/hello/server/node_modules/import-fresh/license diff --git a/src/hello/backend/node_modules/import-fresh/package.json b/src/hello/server/node_modules/import-fresh/package.json similarity index 100% rename from src/hello/backend/node_modules/import-fresh/package.json rename to src/hello/server/node_modules/import-fresh/package.json diff --git a/src/hello/backend/node_modules/import-fresh/readme.md b/src/hello/server/node_modules/import-fresh/readme.md similarity index 100% rename from src/hello/backend/node_modules/import-fresh/readme.md rename to src/hello/server/node_modules/import-fresh/readme.md diff --git a/src/hello/backend/node_modules/imurmurhash/README.md b/src/hello/server/node_modules/imurmurhash/README.md similarity index 100% rename from src/hello/backend/node_modules/imurmurhash/README.md rename to src/hello/server/node_modules/imurmurhash/README.md diff --git a/src/hello/backend/node_modules/imurmurhash/imurmurhash.js b/src/hello/server/node_modules/imurmurhash/imurmurhash.js similarity index 100% rename from src/hello/backend/node_modules/imurmurhash/imurmurhash.js rename to src/hello/server/node_modules/imurmurhash/imurmurhash.js diff --git a/src/hello/backend/node_modules/imurmurhash/imurmurhash.min.js b/src/hello/server/node_modules/imurmurhash/imurmurhash.min.js similarity index 100% rename from src/hello/backend/node_modules/imurmurhash/imurmurhash.min.js rename to src/hello/server/node_modules/imurmurhash/imurmurhash.min.js diff --git a/src/hello/backend/node_modules/imurmurhash/package.json b/src/hello/server/node_modules/imurmurhash/package.json similarity index 100% rename from src/hello/backend/node_modules/imurmurhash/package.json rename to src/hello/server/node_modules/imurmurhash/package.json diff --git a/src/hello/backend/node_modules/inflight/LICENSE b/src/hello/server/node_modules/inflight/LICENSE similarity index 100% rename from src/hello/backend/node_modules/inflight/LICENSE rename to src/hello/server/node_modules/inflight/LICENSE diff --git a/src/hello/backend/node_modules/inflight/README.md b/src/hello/server/node_modules/inflight/README.md similarity index 100% rename from src/hello/backend/node_modules/inflight/README.md rename to src/hello/server/node_modules/inflight/README.md diff --git a/src/hello/backend/node_modules/inflight/inflight.js b/src/hello/server/node_modules/inflight/inflight.js similarity index 100% rename from src/hello/backend/node_modules/inflight/inflight.js rename to src/hello/server/node_modules/inflight/inflight.js diff --git a/src/hello/backend/node_modules/inflight/package.json b/src/hello/server/node_modules/inflight/package.json similarity index 100% rename from src/hello/backend/node_modules/inflight/package.json rename to src/hello/server/node_modules/inflight/package.json diff --git a/src/hello/backend/node_modules/inherits/LICENSE b/src/hello/server/node_modules/inherits/LICENSE similarity index 100% rename from src/hello/backend/node_modules/inherits/LICENSE rename to src/hello/server/node_modules/inherits/LICENSE diff --git a/src/hello/backend/node_modules/inherits/README.md b/src/hello/server/node_modules/inherits/README.md similarity index 100% rename from src/hello/backend/node_modules/inherits/README.md rename to src/hello/server/node_modules/inherits/README.md diff --git a/src/hello/backend/node_modules/inherits/inherits.js b/src/hello/server/node_modules/inherits/inherits.js similarity index 100% rename from src/hello/backend/node_modules/inherits/inherits.js rename to src/hello/server/node_modules/inherits/inherits.js diff --git a/src/hello/backend/node_modules/inherits/inherits_browser.js b/src/hello/server/node_modules/inherits/inherits_browser.js similarity index 100% rename from src/hello/backend/node_modules/inherits/inherits_browser.js rename to src/hello/server/node_modules/inherits/inherits_browser.js diff --git a/src/hello/backend/node_modules/inherits/package.json b/src/hello/server/node_modules/inherits/package.json similarity index 100% rename from src/hello/backend/node_modules/inherits/package.json rename to src/hello/server/node_modules/inherits/package.json diff --git a/src/hello/backend/node_modules/ipaddr.js/LICENSE b/src/hello/server/node_modules/ipaddr.js/LICENSE similarity index 100% rename from src/hello/backend/node_modules/ipaddr.js/LICENSE rename to src/hello/server/node_modules/ipaddr.js/LICENSE diff --git a/src/hello/backend/node_modules/ipaddr.js/README.md b/src/hello/server/node_modules/ipaddr.js/README.md similarity index 100% rename from src/hello/backend/node_modules/ipaddr.js/README.md rename to src/hello/server/node_modules/ipaddr.js/README.md diff --git a/src/hello/backend/node_modules/ipaddr.js/ipaddr.min.js b/src/hello/server/node_modules/ipaddr.js/ipaddr.min.js similarity index 100% rename from src/hello/backend/node_modules/ipaddr.js/ipaddr.min.js rename to src/hello/server/node_modules/ipaddr.js/ipaddr.min.js diff --git a/src/hello/backend/node_modules/ipaddr.js/lib/ipaddr.js b/src/hello/server/node_modules/ipaddr.js/lib/ipaddr.js similarity index 100% rename from src/hello/backend/node_modules/ipaddr.js/lib/ipaddr.js rename to src/hello/server/node_modules/ipaddr.js/lib/ipaddr.js diff --git a/src/hello/backend/node_modules/ipaddr.js/lib/ipaddr.js.d.ts b/src/hello/server/node_modules/ipaddr.js/lib/ipaddr.js.d.ts similarity index 100% rename from src/hello/backend/node_modules/ipaddr.js/lib/ipaddr.js.d.ts rename to src/hello/server/node_modules/ipaddr.js/lib/ipaddr.js.d.ts diff --git a/src/hello/backend/node_modules/ipaddr.js/package.json b/src/hello/server/node_modules/ipaddr.js/package.json similarity index 100% rename from src/hello/backend/node_modules/ipaddr.js/package.json rename to src/hello/server/node_modules/ipaddr.js/package.json diff --git a/src/hello/backend/node_modules/is-binary-path/index.d.ts b/src/hello/server/node_modules/is-binary-path/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/is-binary-path/index.d.ts rename to src/hello/server/node_modules/is-binary-path/index.d.ts diff --git a/src/hello/backend/node_modules/is-binary-path/index.js b/src/hello/server/node_modules/is-binary-path/index.js similarity index 100% rename from src/hello/backend/node_modules/is-binary-path/index.js rename to src/hello/server/node_modules/is-binary-path/index.js diff --git a/src/hello/backend/node_modules/is-binary-path/license b/src/hello/server/node_modules/is-binary-path/license similarity index 100% rename from src/hello/backend/node_modules/is-binary-path/license rename to src/hello/server/node_modules/is-binary-path/license diff --git a/src/hello/backend/node_modules/is-binary-path/package.json b/src/hello/server/node_modules/is-binary-path/package.json similarity index 100% rename from src/hello/backend/node_modules/is-binary-path/package.json rename to src/hello/server/node_modules/is-binary-path/package.json diff --git a/src/hello/backend/node_modules/is-binary-path/readme.md b/src/hello/server/node_modules/is-binary-path/readme.md similarity index 100% rename from src/hello/backend/node_modules/is-binary-path/readme.md rename to src/hello/server/node_modules/is-binary-path/readme.md diff --git a/src/hello/backend/node_modules/is-extglob/LICENSE b/src/hello/server/node_modules/is-extglob/LICENSE similarity index 100% rename from src/hello/backend/node_modules/is-extglob/LICENSE rename to src/hello/server/node_modules/is-extglob/LICENSE diff --git a/src/hello/backend/node_modules/is-extglob/README.md b/src/hello/server/node_modules/is-extglob/README.md similarity index 100% rename from src/hello/backend/node_modules/is-extglob/README.md rename to src/hello/server/node_modules/is-extglob/README.md diff --git a/src/hello/backend/node_modules/is-extglob/index.js b/src/hello/server/node_modules/is-extglob/index.js similarity index 100% rename from src/hello/backend/node_modules/is-extglob/index.js rename to src/hello/server/node_modules/is-extglob/index.js diff --git a/src/hello/backend/node_modules/is-extglob/package.json b/src/hello/server/node_modules/is-extglob/package.json similarity index 100% rename from src/hello/backend/node_modules/is-extglob/package.json rename to src/hello/server/node_modules/is-extglob/package.json diff --git a/src/hello/backend/node_modules/is-glob/LICENSE b/src/hello/server/node_modules/is-glob/LICENSE similarity index 100% rename from src/hello/backend/node_modules/is-glob/LICENSE rename to src/hello/server/node_modules/is-glob/LICENSE diff --git a/src/hello/backend/node_modules/is-glob/README.md b/src/hello/server/node_modules/is-glob/README.md similarity index 100% rename from src/hello/backend/node_modules/is-glob/README.md rename to src/hello/server/node_modules/is-glob/README.md diff --git a/src/hello/backend/node_modules/is-glob/index.js b/src/hello/server/node_modules/is-glob/index.js similarity index 100% rename from src/hello/backend/node_modules/is-glob/index.js rename to src/hello/server/node_modules/is-glob/index.js diff --git a/src/hello/backend/node_modules/is-glob/package.json b/src/hello/server/node_modules/is-glob/package.json similarity index 100% rename from src/hello/backend/node_modules/is-glob/package.json rename to src/hello/server/node_modules/is-glob/package.json diff --git a/src/hello/backend/node_modules/is-number/LICENSE b/src/hello/server/node_modules/is-number/LICENSE similarity index 100% rename from src/hello/backend/node_modules/is-number/LICENSE rename to src/hello/server/node_modules/is-number/LICENSE diff --git a/src/hello/backend/node_modules/is-number/README.md b/src/hello/server/node_modules/is-number/README.md similarity index 100% rename from src/hello/backend/node_modules/is-number/README.md rename to src/hello/server/node_modules/is-number/README.md diff --git a/src/hello/backend/node_modules/is-number/index.js b/src/hello/server/node_modules/is-number/index.js similarity index 100% rename from src/hello/backend/node_modules/is-number/index.js rename to src/hello/server/node_modules/is-number/index.js diff --git a/src/hello/backend/node_modules/is-number/package.json b/src/hello/server/node_modules/is-number/package.json similarity index 100% rename from src/hello/backend/node_modules/is-number/package.json rename to src/hello/server/node_modules/is-number/package.json diff --git a/src/hello/backend/node_modules/is-path-inside/index.d.ts b/src/hello/server/node_modules/is-path-inside/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/is-path-inside/index.d.ts rename to src/hello/server/node_modules/is-path-inside/index.d.ts diff --git a/src/hello/backend/node_modules/is-path-inside/index.js b/src/hello/server/node_modules/is-path-inside/index.js similarity index 100% rename from src/hello/backend/node_modules/is-path-inside/index.js rename to src/hello/server/node_modules/is-path-inside/index.js diff --git a/src/hello/backend/node_modules/chalk/node_modules/supports-color/license b/src/hello/server/node_modules/is-path-inside/license similarity index 100% rename from src/hello/backend/node_modules/chalk/node_modules/supports-color/license rename to src/hello/server/node_modules/is-path-inside/license diff --git a/src/hello/backend/node_modules/is-path-inside/package.json b/src/hello/server/node_modules/is-path-inside/package.json similarity index 100% rename from src/hello/backend/node_modules/is-path-inside/package.json rename to src/hello/server/node_modules/is-path-inside/package.json diff --git a/src/hello/backend/node_modules/is-path-inside/readme.md b/src/hello/server/node_modules/is-path-inside/readme.md similarity index 100% rename from src/hello/backend/node_modules/is-path-inside/readme.md rename to src/hello/server/node_modules/is-path-inside/readme.md diff --git a/src/hello/backend/node_modules/is-property/.npmignore b/src/hello/server/node_modules/is-property/.npmignore similarity index 100% rename from src/hello/backend/node_modules/is-property/.npmignore rename to src/hello/server/node_modules/is-property/.npmignore diff --git a/src/hello/backend/node_modules/is-property/LICENSE b/src/hello/server/node_modules/is-property/LICENSE similarity index 100% rename from src/hello/backend/node_modules/is-property/LICENSE rename to src/hello/server/node_modules/is-property/LICENSE diff --git a/src/hello/backend/node_modules/is-property/README.md b/src/hello/server/node_modules/is-property/README.md similarity index 100% rename from src/hello/backend/node_modules/is-property/README.md rename to src/hello/server/node_modules/is-property/README.md diff --git a/src/hello/backend/node_modules/is-property/is-property.js b/src/hello/server/node_modules/is-property/is-property.js similarity index 100% rename from src/hello/backend/node_modules/is-property/is-property.js rename to src/hello/server/node_modules/is-property/is-property.js diff --git a/src/hello/backend/node_modules/is-property/package.json b/src/hello/server/node_modules/is-property/package.json similarity index 100% rename from src/hello/backend/node_modules/is-property/package.json rename to src/hello/server/node_modules/is-property/package.json diff --git a/src/hello/backend/node_modules/isarray/.npmignore b/src/hello/server/node_modules/isarray/.npmignore similarity index 100% rename from src/hello/backend/node_modules/isarray/.npmignore rename to src/hello/server/node_modules/isarray/.npmignore diff --git a/src/hello/backend/node_modules/isarray/.travis.yml b/src/hello/server/node_modules/isarray/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/isarray/.travis.yml rename to src/hello/server/node_modules/isarray/.travis.yml diff --git a/src/hello/backend/node_modules/isarray/Makefile b/src/hello/server/node_modules/isarray/Makefile similarity index 100% rename from src/hello/backend/node_modules/isarray/Makefile rename to src/hello/server/node_modules/isarray/Makefile diff --git a/src/hello/backend/node_modules/isarray/README.md b/src/hello/server/node_modules/isarray/README.md similarity index 100% rename from src/hello/backend/node_modules/isarray/README.md rename to src/hello/server/node_modules/isarray/README.md diff --git a/src/hello/backend/node_modules/isarray/component.json b/src/hello/server/node_modules/isarray/component.json similarity index 100% rename from src/hello/backend/node_modules/isarray/component.json rename to src/hello/server/node_modules/isarray/component.json diff --git a/src/hello/backend/node_modules/isarray/index.js b/src/hello/server/node_modules/isarray/index.js similarity index 100% rename from src/hello/backend/node_modules/isarray/index.js rename to src/hello/server/node_modules/isarray/index.js diff --git a/src/hello/backend/node_modules/isarray/package.json b/src/hello/server/node_modules/isarray/package.json similarity index 100% rename from src/hello/backend/node_modules/isarray/package.json rename to src/hello/server/node_modules/isarray/package.json diff --git a/src/hello/backend/node_modules/isarray/test.js b/src/hello/server/node_modules/isarray/test.js similarity index 100% rename from src/hello/backend/node_modules/isarray/test.js rename to src/hello/server/node_modules/isarray/test.js diff --git a/src/hello/backend/node_modules/isexe/.npmignore b/src/hello/server/node_modules/isexe/.npmignore similarity index 100% rename from src/hello/backend/node_modules/isexe/.npmignore rename to src/hello/server/node_modules/isexe/.npmignore diff --git a/src/hello/backend/node_modules/isexe/LICENSE b/src/hello/server/node_modules/isexe/LICENSE similarity index 100% rename from src/hello/backend/node_modules/isexe/LICENSE rename to src/hello/server/node_modules/isexe/LICENSE diff --git a/src/hello/backend/node_modules/isexe/README.md b/src/hello/server/node_modules/isexe/README.md similarity index 100% rename from src/hello/backend/node_modules/isexe/README.md rename to src/hello/server/node_modules/isexe/README.md diff --git a/src/hello/backend/node_modules/isexe/index.js b/src/hello/server/node_modules/isexe/index.js similarity index 100% rename from src/hello/backend/node_modules/isexe/index.js rename to src/hello/server/node_modules/isexe/index.js diff --git a/src/hello/backend/node_modules/isexe/mode.js b/src/hello/server/node_modules/isexe/mode.js similarity index 100% rename from src/hello/backend/node_modules/isexe/mode.js rename to src/hello/server/node_modules/isexe/mode.js diff --git a/src/hello/backend/node_modules/isexe/package.json b/src/hello/server/node_modules/isexe/package.json similarity index 100% rename from src/hello/backend/node_modules/isexe/package.json rename to src/hello/server/node_modules/isexe/package.json diff --git a/src/hello/backend/node_modules/isexe/test/basic.js b/src/hello/server/node_modules/isexe/test/basic.js similarity index 100% rename from src/hello/backend/node_modules/isexe/test/basic.js rename to src/hello/server/node_modules/isexe/test/basic.js diff --git a/src/hello/backend/node_modules/isexe/windows.js b/src/hello/server/node_modules/isexe/windows.js similarity index 100% rename from src/hello/backend/node_modules/isexe/windows.js rename to src/hello/server/node_modules/isexe/windows.js diff --git a/src/hello/backend/node_modules/js-yaml/LICENSE b/src/hello/server/node_modules/js-yaml/LICENSE similarity index 100% rename from src/hello/backend/node_modules/js-yaml/LICENSE rename to src/hello/server/node_modules/js-yaml/LICENSE diff --git a/src/hello/backend/node_modules/js-yaml/README.md b/src/hello/server/node_modules/js-yaml/README.md similarity index 100% rename from src/hello/backend/node_modules/js-yaml/README.md rename to src/hello/server/node_modules/js-yaml/README.md diff --git a/src/hello/server/node_modules/js-yaml/bin/js-yaml.js b/src/hello/server/node_modules/js-yaml/bin/js-yaml.js new file mode 100644 index 00000000..a182f1af --- /dev/null +++ b/src/hello/server/node_modules/js-yaml/bin/js-yaml.js @@ -0,0 +1,126 @@ +#!/usr/bin/env node + + +'use strict'; + +/*eslint-disable no-console*/ + + +var fs = require('fs'); +var argparse = require('argparse'); +var yaml = require('..'); + + +//////////////////////////////////////////////////////////////////////////////// + + +var cli = new argparse.ArgumentParser({ + prog: 'js-yaml', + add_help: true +}); + +cli.add_argument('-v', '--version', { + action: 'version', + version: require('../package.json').version +}); + +cli.add_argument('-c', '--compact', { + help: 'Display errors in compact mode', + action: 'store_true' +}); + +// deprecated (not needed after we removed output colors) +// option suppressed, but not completely removed for compatibility +cli.add_argument('-j', '--to-json', { + help: argparse.SUPPRESS, + dest: 'json', + action: 'store_true' +}); + +cli.add_argument('-t', '--trace', { + help: 'Show stack trace on error', + action: 'store_true' +}); + +cli.add_argument('file', { + help: 'File to read, utf-8 encoded without BOM', + nargs: '?', + default: '-' +}); + + +//////////////////////////////////////////////////////////////////////////////// + + +var options = cli.parse_args(); + + +//////////////////////////////////////////////////////////////////////////////// + +function readFile(filename, encoding, callback) { + if (options.file === '-') { + // read from stdin + + var chunks = []; + + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }); + + process.stdin.on('end', function () { + return callback(null, Buffer.concat(chunks).toString(encoding)); + }); + } else { + fs.readFile(filename, encoding, callback); + } +} + +readFile(options.file, 'utf8', function (error, input) { + var output, isYaml; + + if (error) { + if (error.code === 'ENOENT') { + console.error('File not found: ' + options.file); + process.exit(2); + } + + console.error( + options.trace && error.stack || + error.message || + String(error)); + + process.exit(1); + } + + try { + output = JSON.parse(input); + isYaml = false; + } catch (err) { + if (err instanceof SyntaxError) { + try { + output = []; + yaml.loadAll(input, function (doc) { output.push(doc); }, {}); + isYaml = true; + + if (output.length === 0) output = null; + else if (output.length === 1) output = output[0]; + + } catch (e) { + if (options.trace && err.stack) console.error(e.stack); + else console.error(e.toString(options.compact)); + + process.exit(1); + } + } else { + console.error( + options.trace && err.stack || + err.message || + String(err)); + + process.exit(1); + } + } + + if (isYaml) console.log(JSON.stringify(output, null, ' ')); + else console.log(yaml.dump(output)); +}); diff --git a/src/hello/backend/node_modules/js-yaml/dist/js-yaml.js b/src/hello/server/node_modules/js-yaml/dist/js-yaml.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/dist/js-yaml.js rename to src/hello/server/node_modules/js-yaml/dist/js-yaml.js diff --git a/src/hello/backend/node_modules/js-yaml/dist/js-yaml.min.js b/src/hello/server/node_modules/js-yaml/dist/js-yaml.min.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/dist/js-yaml.min.js rename to src/hello/server/node_modules/js-yaml/dist/js-yaml.min.js diff --git a/src/hello/backend/node_modules/js-yaml/dist/js-yaml.mjs b/src/hello/server/node_modules/js-yaml/dist/js-yaml.mjs similarity index 100% rename from src/hello/backend/node_modules/js-yaml/dist/js-yaml.mjs rename to src/hello/server/node_modules/js-yaml/dist/js-yaml.mjs diff --git a/src/hello/backend/node_modules/js-yaml/index.js b/src/hello/server/node_modules/js-yaml/index.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/index.js rename to src/hello/server/node_modules/js-yaml/index.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/common.js b/src/hello/server/node_modules/js-yaml/lib/common.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/common.js rename to src/hello/server/node_modules/js-yaml/lib/common.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/dumper.js b/src/hello/server/node_modules/js-yaml/lib/dumper.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/dumper.js rename to src/hello/server/node_modules/js-yaml/lib/dumper.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/exception.js b/src/hello/server/node_modules/js-yaml/lib/exception.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/exception.js rename to src/hello/server/node_modules/js-yaml/lib/exception.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/loader.js b/src/hello/server/node_modules/js-yaml/lib/loader.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/loader.js rename to src/hello/server/node_modules/js-yaml/lib/loader.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/schema.js b/src/hello/server/node_modules/js-yaml/lib/schema.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/schema.js rename to src/hello/server/node_modules/js-yaml/lib/schema.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/schema/core.js b/src/hello/server/node_modules/js-yaml/lib/schema/core.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/schema/core.js rename to src/hello/server/node_modules/js-yaml/lib/schema/core.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/schema/default.js b/src/hello/server/node_modules/js-yaml/lib/schema/default.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/schema/default.js rename to src/hello/server/node_modules/js-yaml/lib/schema/default.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/schema/failsafe.js b/src/hello/server/node_modules/js-yaml/lib/schema/failsafe.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/schema/failsafe.js rename to src/hello/server/node_modules/js-yaml/lib/schema/failsafe.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/schema/json.js b/src/hello/server/node_modules/js-yaml/lib/schema/json.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/schema/json.js rename to src/hello/server/node_modules/js-yaml/lib/schema/json.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/snippet.js b/src/hello/server/node_modules/js-yaml/lib/snippet.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/snippet.js rename to src/hello/server/node_modules/js-yaml/lib/snippet.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type.js b/src/hello/server/node_modules/js-yaml/lib/type.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type.js rename to src/hello/server/node_modules/js-yaml/lib/type.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/binary.js b/src/hello/server/node_modules/js-yaml/lib/type/binary.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/binary.js rename to src/hello/server/node_modules/js-yaml/lib/type/binary.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/bool.js b/src/hello/server/node_modules/js-yaml/lib/type/bool.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/bool.js rename to src/hello/server/node_modules/js-yaml/lib/type/bool.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/float.js b/src/hello/server/node_modules/js-yaml/lib/type/float.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/float.js rename to src/hello/server/node_modules/js-yaml/lib/type/float.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/int.js b/src/hello/server/node_modules/js-yaml/lib/type/int.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/int.js rename to src/hello/server/node_modules/js-yaml/lib/type/int.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/map.js b/src/hello/server/node_modules/js-yaml/lib/type/map.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/map.js rename to src/hello/server/node_modules/js-yaml/lib/type/map.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/merge.js b/src/hello/server/node_modules/js-yaml/lib/type/merge.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/merge.js rename to src/hello/server/node_modules/js-yaml/lib/type/merge.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/null.js b/src/hello/server/node_modules/js-yaml/lib/type/null.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/null.js rename to src/hello/server/node_modules/js-yaml/lib/type/null.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/omap.js b/src/hello/server/node_modules/js-yaml/lib/type/omap.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/omap.js rename to src/hello/server/node_modules/js-yaml/lib/type/omap.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/pairs.js b/src/hello/server/node_modules/js-yaml/lib/type/pairs.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/pairs.js rename to src/hello/server/node_modules/js-yaml/lib/type/pairs.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/seq.js b/src/hello/server/node_modules/js-yaml/lib/type/seq.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/seq.js rename to src/hello/server/node_modules/js-yaml/lib/type/seq.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/set.js b/src/hello/server/node_modules/js-yaml/lib/type/set.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/set.js rename to src/hello/server/node_modules/js-yaml/lib/type/set.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/str.js b/src/hello/server/node_modules/js-yaml/lib/type/str.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/str.js rename to src/hello/server/node_modules/js-yaml/lib/type/str.js diff --git a/src/hello/backend/node_modules/js-yaml/lib/type/timestamp.js b/src/hello/server/node_modules/js-yaml/lib/type/timestamp.js similarity index 100% rename from src/hello/backend/node_modules/js-yaml/lib/type/timestamp.js rename to src/hello/server/node_modules/js-yaml/lib/type/timestamp.js diff --git a/src/hello/backend/node_modules/js-yaml/package.json b/src/hello/server/node_modules/js-yaml/package.json similarity index 100% rename from src/hello/backend/node_modules/js-yaml/package.json rename to src/hello/server/node_modules/js-yaml/package.json diff --git a/src/hello/backend/node_modules/json-buffer/.travis.yml b/src/hello/server/node_modules/json-buffer/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/json-buffer/.travis.yml rename to src/hello/server/node_modules/json-buffer/.travis.yml diff --git a/src/hello/backend/node_modules/json-buffer/LICENSE b/src/hello/server/node_modules/json-buffer/LICENSE similarity index 100% rename from src/hello/backend/node_modules/json-buffer/LICENSE rename to src/hello/server/node_modules/json-buffer/LICENSE diff --git a/src/hello/backend/node_modules/json-buffer/README.md b/src/hello/server/node_modules/json-buffer/README.md similarity index 100% rename from src/hello/backend/node_modules/json-buffer/README.md rename to src/hello/server/node_modules/json-buffer/README.md diff --git a/src/hello/backend/node_modules/json-buffer/index.js b/src/hello/server/node_modules/json-buffer/index.js similarity index 100% rename from src/hello/backend/node_modules/json-buffer/index.js rename to src/hello/server/node_modules/json-buffer/index.js diff --git a/src/hello/backend/node_modules/json-buffer/package.json b/src/hello/server/node_modules/json-buffer/package.json similarity index 100% rename from src/hello/backend/node_modules/json-buffer/package.json rename to src/hello/server/node_modules/json-buffer/package.json diff --git a/src/hello/backend/node_modules/json-buffer/test/index.js b/src/hello/server/node_modules/json-buffer/test/index.js similarity index 100% rename from src/hello/backend/node_modules/json-buffer/test/index.js rename to src/hello/server/node_modules/json-buffer/test/index.js diff --git a/src/hello/backend/node_modules/json-schema-traverse/.eslintrc.yml b/src/hello/server/node_modules/json-schema-traverse/.eslintrc.yml similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/.eslintrc.yml rename to src/hello/server/node_modules/json-schema-traverse/.eslintrc.yml diff --git a/src/hello/backend/node_modules/json-schema-traverse/.travis.yml b/src/hello/server/node_modules/json-schema-traverse/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/.travis.yml rename to src/hello/server/node_modules/json-schema-traverse/.travis.yml diff --git a/src/hello/backend/node_modules/json-schema-traverse/LICENSE b/src/hello/server/node_modules/json-schema-traverse/LICENSE similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/LICENSE rename to src/hello/server/node_modules/json-schema-traverse/LICENSE diff --git a/src/hello/backend/node_modules/json-schema-traverse/README.md b/src/hello/server/node_modules/json-schema-traverse/README.md similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/README.md rename to src/hello/server/node_modules/json-schema-traverse/README.md diff --git a/src/hello/backend/node_modules/json-schema-traverse/index.js b/src/hello/server/node_modules/json-schema-traverse/index.js similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/index.js rename to src/hello/server/node_modules/json-schema-traverse/index.js diff --git a/src/hello/backend/node_modules/json-schema-traverse/package.json b/src/hello/server/node_modules/json-schema-traverse/package.json similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/package.json rename to src/hello/server/node_modules/json-schema-traverse/package.json diff --git a/src/hello/backend/node_modules/json-schema-traverse/spec/.eslintrc.yml b/src/hello/server/node_modules/json-schema-traverse/spec/.eslintrc.yml similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/spec/.eslintrc.yml rename to src/hello/server/node_modules/json-schema-traverse/spec/.eslintrc.yml diff --git a/src/hello/backend/node_modules/json-schema-traverse/spec/fixtures/schema.js b/src/hello/server/node_modules/json-schema-traverse/spec/fixtures/schema.js similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/spec/fixtures/schema.js rename to src/hello/server/node_modules/json-schema-traverse/spec/fixtures/schema.js diff --git a/src/hello/backend/node_modules/json-schema-traverse/spec/index.spec.js b/src/hello/server/node_modules/json-schema-traverse/spec/index.spec.js similarity index 100% rename from src/hello/backend/node_modules/json-schema-traverse/spec/index.spec.js rename to src/hello/server/node_modules/json-schema-traverse/spec/index.spec.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/.npmignore b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/.npmignore similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/.npmignore rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/.npmignore diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/.travis.yml b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/.travis.yml similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/.travis.yml rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/.travis.yml diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/LICENSE b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/LICENSE similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/LICENSE rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/LICENSE diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/nested.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/nested.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/nested.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/nested.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/str.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/str.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/str.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/str.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/index.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/index.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/index.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/index.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/package.json b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/package.json similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/package.json rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/package.json diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/readme.markdown b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/readme.markdown similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/readme.markdown rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/readme.markdown diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/cmp.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/cmp.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/cmp.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/cmp.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/nested.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/nested.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/nested.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/nested.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/replacer.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/replacer.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/replacer.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/replacer.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/space.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/space.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/space.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/space.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/str.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/str.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/str.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/str.js diff --git a/src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/to-json.js b/src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/to-json.js similarity index 100% rename from src/hello/backend/node_modules/json-stable-stringify-without-jsonify/test/to-json.js rename to src/hello/server/node_modules/json-stable-stringify-without-jsonify/test/to-json.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/LICENSE b/src/hello/server/node_modules/jsonwebtoken/LICENSE similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/LICENSE rename to src/hello/server/node_modules/jsonwebtoken/LICENSE diff --git a/src/hello/backend/node_modules/jsonwebtoken/README.md b/src/hello/server/node_modules/jsonwebtoken/README.md similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/README.md rename to src/hello/server/node_modules/jsonwebtoken/README.md diff --git a/src/hello/backend/node_modules/jsonwebtoken/decode.js b/src/hello/server/node_modules/jsonwebtoken/decode.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/decode.js rename to src/hello/server/node_modules/jsonwebtoken/decode.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/index.js b/src/hello/server/node_modules/jsonwebtoken/index.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/index.js rename to src/hello/server/node_modules/jsonwebtoken/index.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/JsonWebTokenError.js b/src/hello/server/node_modules/jsonwebtoken/lib/JsonWebTokenError.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/JsonWebTokenError.js rename to src/hello/server/node_modules/jsonwebtoken/lib/JsonWebTokenError.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/NotBeforeError.js b/src/hello/server/node_modules/jsonwebtoken/lib/NotBeforeError.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/NotBeforeError.js rename to src/hello/server/node_modules/jsonwebtoken/lib/NotBeforeError.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/TokenExpiredError.js b/src/hello/server/node_modules/jsonwebtoken/lib/TokenExpiredError.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/TokenExpiredError.js rename to src/hello/server/node_modules/jsonwebtoken/lib/TokenExpiredError.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js b/src/hello/server/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js rename to src/hello/server/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/psSupported.js b/src/hello/server/node_modules/jsonwebtoken/lib/psSupported.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/psSupported.js rename to src/hello/server/node_modules/jsonwebtoken/lib/psSupported.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js b/src/hello/server/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js rename to src/hello/server/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/timespan.js b/src/hello/server/node_modules/jsonwebtoken/lib/timespan.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/timespan.js rename to src/hello/server/node_modules/jsonwebtoken/lib/timespan.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js b/src/hello/server/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js rename to src/hello/server/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/package.json b/src/hello/server/node_modules/jsonwebtoken/package.json similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/package.json rename to src/hello/server/node_modules/jsonwebtoken/package.json diff --git a/src/hello/backend/node_modules/jsonwebtoken/sign.js b/src/hello/server/node_modules/jsonwebtoken/sign.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/sign.js rename to src/hello/server/node_modules/jsonwebtoken/sign.js diff --git a/src/hello/backend/node_modules/jsonwebtoken/verify.js b/src/hello/server/node_modules/jsonwebtoken/verify.js similarity index 100% rename from src/hello/backend/node_modules/jsonwebtoken/verify.js rename to src/hello/server/node_modules/jsonwebtoken/verify.js diff --git a/src/hello/backend/node_modules/jwa/LICENSE b/src/hello/server/node_modules/jwa/LICENSE similarity index 100% rename from src/hello/backend/node_modules/jwa/LICENSE rename to src/hello/server/node_modules/jwa/LICENSE diff --git a/src/hello/backend/node_modules/jwa/README.md b/src/hello/server/node_modules/jwa/README.md similarity index 100% rename from src/hello/backend/node_modules/jwa/README.md rename to src/hello/server/node_modules/jwa/README.md diff --git a/src/hello/backend/node_modules/jwa/index.js b/src/hello/server/node_modules/jwa/index.js similarity index 100% rename from src/hello/backend/node_modules/jwa/index.js rename to src/hello/server/node_modules/jwa/index.js diff --git a/src/hello/backend/node_modules/jwa/opslevel.yml b/src/hello/server/node_modules/jwa/opslevel.yml similarity index 100% rename from src/hello/backend/node_modules/jwa/opslevel.yml rename to src/hello/server/node_modules/jwa/opslevel.yml diff --git a/src/hello/backend/node_modules/jwa/package.json b/src/hello/server/node_modules/jwa/package.json similarity index 100% rename from src/hello/backend/node_modules/jwa/package.json rename to src/hello/server/node_modules/jwa/package.json diff --git a/src/hello/backend/node_modules/jws/CHANGELOG.md b/src/hello/server/node_modules/jws/CHANGELOG.md similarity index 100% rename from src/hello/backend/node_modules/jws/CHANGELOG.md rename to src/hello/server/node_modules/jws/CHANGELOG.md diff --git a/src/hello/backend/node_modules/jws/LICENSE b/src/hello/server/node_modules/jws/LICENSE similarity index 100% rename from src/hello/backend/node_modules/jws/LICENSE rename to src/hello/server/node_modules/jws/LICENSE diff --git a/src/hello/backend/node_modules/jws/index.js b/src/hello/server/node_modules/jws/index.js similarity index 100% rename from src/hello/backend/node_modules/jws/index.js rename to src/hello/server/node_modules/jws/index.js diff --git a/src/hello/backend/node_modules/jws/lib/data-stream.js b/src/hello/server/node_modules/jws/lib/data-stream.js similarity index 100% rename from src/hello/backend/node_modules/jws/lib/data-stream.js rename to src/hello/server/node_modules/jws/lib/data-stream.js diff --git a/src/hello/backend/node_modules/jws/lib/sign-stream.js b/src/hello/server/node_modules/jws/lib/sign-stream.js similarity index 100% rename from src/hello/backend/node_modules/jws/lib/sign-stream.js rename to src/hello/server/node_modules/jws/lib/sign-stream.js diff --git a/src/hello/backend/node_modules/jws/lib/tostring.js b/src/hello/server/node_modules/jws/lib/tostring.js similarity index 100% rename from src/hello/backend/node_modules/jws/lib/tostring.js rename to src/hello/server/node_modules/jws/lib/tostring.js diff --git a/src/hello/backend/node_modules/jws/lib/verify-stream.js b/src/hello/server/node_modules/jws/lib/verify-stream.js similarity index 100% rename from src/hello/backend/node_modules/jws/lib/verify-stream.js rename to src/hello/server/node_modules/jws/lib/verify-stream.js diff --git a/src/hello/backend/node_modules/jws/opslevel.yml b/src/hello/server/node_modules/jws/opslevel.yml similarity index 100% rename from src/hello/backend/node_modules/jws/opslevel.yml rename to src/hello/server/node_modules/jws/opslevel.yml diff --git a/src/hello/backend/node_modules/jws/package.json b/src/hello/server/node_modules/jws/package.json similarity index 100% rename from src/hello/backend/node_modules/jws/package.json rename to src/hello/server/node_modules/jws/package.json diff --git a/src/hello/backend/node_modules/jws/readme.md b/src/hello/server/node_modules/jws/readme.md similarity index 100% rename from src/hello/backend/node_modules/jws/readme.md rename to src/hello/server/node_modules/jws/readme.md diff --git a/src/hello/backend/node_modules/keyv/README.md b/src/hello/server/node_modules/keyv/README.md similarity index 100% rename from src/hello/backend/node_modules/keyv/README.md rename to src/hello/server/node_modules/keyv/README.md diff --git a/src/hello/backend/node_modules/keyv/package.json b/src/hello/server/node_modules/keyv/package.json similarity index 100% rename from src/hello/backend/node_modules/keyv/package.json rename to src/hello/server/node_modules/keyv/package.json diff --git a/src/hello/backend/node_modules/keyv/src/index.d.ts b/src/hello/server/node_modules/keyv/src/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/keyv/src/index.d.ts rename to src/hello/server/node_modules/keyv/src/index.d.ts diff --git a/src/hello/backend/node_modules/keyv/src/index.js b/src/hello/server/node_modules/keyv/src/index.js similarity index 100% rename from src/hello/backend/node_modules/keyv/src/index.js rename to src/hello/server/node_modules/keyv/src/index.js diff --git a/src/hello/backend/node_modules/levn/LICENSE b/src/hello/server/node_modules/levn/LICENSE similarity index 100% rename from src/hello/backend/node_modules/levn/LICENSE rename to src/hello/server/node_modules/levn/LICENSE diff --git a/src/hello/backend/node_modules/levn/README.md b/src/hello/server/node_modules/levn/README.md similarity index 100% rename from src/hello/backend/node_modules/levn/README.md rename to src/hello/server/node_modules/levn/README.md diff --git a/src/hello/backend/node_modules/levn/lib/cast.js b/src/hello/server/node_modules/levn/lib/cast.js similarity index 100% rename from src/hello/backend/node_modules/levn/lib/cast.js rename to src/hello/server/node_modules/levn/lib/cast.js diff --git a/src/hello/backend/node_modules/levn/lib/index.js b/src/hello/server/node_modules/levn/lib/index.js similarity index 100% rename from src/hello/backend/node_modules/levn/lib/index.js rename to src/hello/server/node_modules/levn/lib/index.js diff --git a/src/hello/backend/node_modules/levn/lib/parse-string.js b/src/hello/server/node_modules/levn/lib/parse-string.js similarity index 100% rename from src/hello/backend/node_modules/levn/lib/parse-string.js rename to src/hello/server/node_modules/levn/lib/parse-string.js diff --git a/src/hello/backend/node_modules/levn/package.json b/src/hello/server/node_modules/levn/package.json similarity index 100% rename from src/hello/backend/node_modules/levn/package.json rename to src/hello/server/node_modules/levn/package.json diff --git a/src/hello/backend/node_modules/locate-path/index.d.ts b/src/hello/server/node_modules/locate-path/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/locate-path/index.d.ts rename to src/hello/server/node_modules/locate-path/index.d.ts diff --git a/src/hello/backend/node_modules/locate-path/index.js b/src/hello/server/node_modules/locate-path/index.js similarity index 100% rename from src/hello/backend/node_modules/locate-path/index.js rename to src/hello/server/node_modules/locate-path/index.js diff --git a/src/hello/backend/node_modules/locate-path/license b/src/hello/server/node_modules/locate-path/license similarity index 100% rename from src/hello/backend/node_modules/locate-path/license rename to src/hello/server/node_modules/locate-path/license diff --git a/src/hello/backend/node_modules/locate-path/package.json b/src/hello/server/node_modules/locate-path/package.json similarity index 100% rename from src/hello/backend/node_modules/locate-path/package.json rename to src/hello/server/node_modules/locate-path/package.json diff --git a/src/hello/backend/node_modules/locate-path/readme.md b/src/hello/server/node_modules/locate-path/readme.md similarity index 100% rename from src/hello/backend/node_modules/locate-path/readme.md rename to src/hello/server/node_modules/locate-path/readme.md diff --git a/src/hello/backend/node_modules/lodash.includes/LICENSE b/src/hello/server/node_modules/lodash.includes/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.includes/LICENSE rename to src/hello/server/node_modules/lodash.includes/LICENSE diff --git a/src/hello/backend/node_modules/lodash.includes/README.md b/src/hello/server/node_modules/lodash.includes/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.includes/README.md rename to src/hello/server/node_modules/lodash.includes/README.md diff --git a/src/hello/backend/node_modules/lodash.includes/index.js b/src/hello/server/node_modules/lodash.includes/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.includes/index.js rename to src/hello/server/node_modules/lodash.includes/index.js diff --git a/src/hello/backend/node_modules/lodash.includes/package.json b/src/hello/server/node_modules/lodash.includes/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.includes/package.json rename to src/hello/server/node_modules/lodash.includes/package.json diff --git a/src/hello/backend/node_modules/lodash.isboolean/LICENSE b/src/hello/server/node_modules/lodash.isboolean/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.isboolean/LICENSE rename to src/hello/server/node_modules/lodash.isboolean/LICENSE diff --git a/src/hello/backend/node_modules/lodash.isboolean/README.md b/src/hello/server/node_modules/lodash.isboolean/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.isboolean/README.md rename to src/hello/server/node_modules/lodash.isboolean/README.md diff --git a/src/hello/backend/node_modules/lodash.isboolean/index.js b/src/hello/server/node_modules/lodash.isboolean/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.isboolean/index.js rename to src/hello/server/node_modules/lodash.isboolean/index.js diff --git a/src/hello/backend/node_modules/lodash.isboolean/package.json b/src/hello/server/node_modules/lodash.isboolean/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.isboolean/package.json rename to src/hello/server/node_modules/lodash.isboolean/package.json diff --git a/src/hello/backend/node_modules/lodash.isinteger/LICENSE b/src/hello/server/node_modules/lodash.isinteger/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.isinteger/LICENSE rename to src/hello/server/node_modules/lodash.isinteger/LICENSE diff --git a/src/hello/backend/node_modules/lodash.isinteger/README.md b/src/hello/server/node_modules/lodash.isinteger/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.isinteger/README.md rename to src/hello/server/node_modules/lodash.isinteger/README.md diff --git a/src/hello/backend/node_modules/lodash.isinteger/index.js b/src/hello/server/node_modules/lodash.isinteger/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.isinteger/index.js rename to src/hello/server/node_modules/lodash.isinteger/index.js diff --git a/src/hello/backend/node_modules/lodash.isinteger/package.json b/src/hello/server/node_modules/lodash.isinteger/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.isinteger/package.json rename to src/hello/server/node_modules/lodash.isinteger/package.json diff --git a/src/hello/backend/node_modules/lodash.isnumber/LICENSE b/src/hello/server/node_modules/lodash.isnumber/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.isnumber/LICENSE rename to src/hello/server/node_modules/lodash.isnumber/LICENSE diff --git a/src/hello/backend/node_modules/lodash.isnumber/README.md b/src/hello/server/node_modules/lodash.isnumber/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.isnumber/README.md rename to src/hello/server/node_modules/lodash.isnumber/README.md diff --git a/src/hello/backend/node_modules/lodash.isnumber/index.js b/src/hello/server/node_modules/lodash.isnumber/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.isnumber/index.js rename to src/hello/server/node_modules/lodash.isnumber/index.js diff --git a/src/hello/backend/node_modules/lodash.isnumber/package.json b/src/hello/server/node_modules/lodash.isnumber/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.isnumber/package.json rename to src/hello/server/node_modules/lodash.isnumber/package.json diff --git a/src/hello/backend/node_modules/lodash.isplainobject/LICENSE b/src/hello/server/node_modules/lodash.isplainobject/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.isplainobject/LICENSE rename to src/hello/server/node_modules/lodash.isplainobject/LICENSE diff --git a/src/hello/backend/node_modules/lodash.isplainobject/README.md b/src/hello/server/node_modules/lodash.isplainobject/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.isplainobject/README.md rename to src/hello/server/node_modules/lodash.isplainobject/README.md diff --git a/src/hello/backend/node_modules/lodash.isplainobject/index.js b/src/hello/server/node_modules/lodash.isplainobject/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.isplainobject/index.js rename to src/hello/server/node_modules/lodash.isplainobject/index.js diff --git a/src/hello/backend/node_modules/lodash.isplainobject/package.json b/src/hello/server/node_modules/lodash.isplainobject/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.isplainobject/package.json rename to src/hello/server/node_modules/lodash.isplainobject/package.json diff --git a/src/hello/backend/node_modules/lodash.isstring/LICENSE b/src/hello/server/node_modules/lodash.isstring/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.isstring/LICENSE rename to src/hello/server/node_modules/lodash.isstring/LICENSE diff --git a/src/hello/backend/node_modules/lodash.isstring/README.md b/src/hello/server/node_modules/lodash.isstring/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.isstring/README.md rename to src/hello/server/node_modules/lodash.isstring/README.md diff --git a/src/hello/backend/node_modules/lodash.isstring/index.js b/src/hello/server/node_modules/lodash.isstring/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.isstring/index.js rename to src/hello/server/node_modules/lodash.isstring/index.js diff --git a/src/hello/backend/node_modules/lodash.isstring/package.json b/src/hello/server/node_modules/lodash.isstring/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.isstring/package.json rename to src/hello/server/node_modules/lodash.isstring/package.json diff --git a/src/hello/backend/node_modules/lodash.merge/LICENSE b/src/hello/server/node_modules/lodash.merge/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.merge/LICENSE rename to src/hello/server/node_modules/lodash.merge/LICENSE diff --git a/src/hello/backend/node_modules/lodash.merge/README.md b/src/hello/server/node_modules/lodash.merge/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.merge/README.md rename to src/hello/server/node_modules/lodash.merge/README.md diff --git a/src/hello/backend/node_modules/lodash.merge/index.js b/src/hello/server/node_modules/lodash.merge/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.merge/index.js rename to src/hello/server/node_modules/lodash.merge/index.js diff --git a/src/hello/backend/node_modules/lodash.merge/package.json b/src/hello/server/node_modules/lodash.merge/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.merge/package.json rename to src/hello/server/node_modules/lodash.merge/package.json diff --git a/src/hello/backend/node_modules/lodash.once/LICENSE b/src/hello/server/node_modules/lodash.once/LICENSE similarity index 100% rename from src/hello/backend/node_modules/lodash.once/LICENSE rename to src/hello/server/node_modules/lodash.once/LICENSE diff --git a/src/hello/backend/node_modules/lodash.once/README.md b/src/hello/server/node_modules/lodash.once/README.md similarity index 100% rename from src/hello/backend/node_modules/lodash.once/README.md rename to src/hello/server/node_modules/lodash.once/README.md diff --git a/src/hello/backend/node_modules/lodash.once/index.js b/src/hello/server/node_modules/lodash.once/index.js similarity index 100% rename from src/hello/backend/node_modules/lodash.once/index.js rename to src/hello/server/node_modules/lodash.once/index.js diff --git a/src/hello/backend/node_modules/lodash.once/package.json b/src/hello/server/node_modules/lodash.once/package.json similarity index 100% rename from src/hello/backend/node_modules/lodash.once/package.json rename to src/hello/server/node_modules/lodash.once/package.json diff --git a/src/hello/server/node_modules/lodash/LICENSE b/src/hello/server/node_modules/lodash/LICENSE new file mode 100644 index 00000000..77c42f14 --- /dev/null +++ b/src/hello/server/node_modules/lodash/LICENSE @@ -0,0 +1,47 @@ +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/src/hello/server/node_modules/lodash/README.md b/src/hello/server/node_modules/lodash/README.md new file mode 100644 index 00000000..3ab1a05c --- /dev/null +++ b/src/hello/server/node_modules/lodash/README.md @@ -0,0 +1,39 @@ +# lodash v4.17.21 + +The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. + +## Installation + +Using npm: +```shell +$ npm i -g npm +$ npm i --save lodash +``` + +In Node.js: +```js +// Load the full build. +var _ = require('lodash'); +// Load the core build. +var _ = require('lodash/core'); +// Load the FP build for immutable auto-curried iteratee-first data-last methods. +var fp = require('lodash/fp'); + +// Load method categories. +var array = require('lodash/array'); +var object = require('lodash/fp/object'); + +// Cherry-pick methods for smaller browserify/rollup/webpack bundles. +var at = require('lodash/at'); +var curryN = require('lodash/fp/curryN'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/4.17.21-npm) for more details. + +**Note:**
+Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL. + +## Support + +Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
+Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/src/hello/server/node_modules/lodash/_DataView.js b/src/hello/server/node_modules/lodash/_DataView.js new file mode 100644 index 00000000..ac2d57ca --- /dev/null +++ b/src/hello/server/node_modules/lodash/_DataView.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; diff --git a/src/hello/server/node_modules/lodash/_Hash.js b/src/hello/server/node_modules/lodash/_Hash.js new file mode 100644 index 00000000..b504fe34 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_Hash.js @@ -0,0 +1,32 @@ +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; diff --git a/src/hello/server/node_modules/lodash/_LazyWrapper.js b/src/hello/server/node_modules/lodash/_LazyWrapper.js new file mode 100644 index 00000000..81786c7f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_LazyWrapper.js @@ -0,0 +1,28 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295; + +/** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ +function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; +} + +// Ensure `LazyWrapper` is an instance of `baseLodash`. +LazyWrapper.prototype = baseCreate(baseLodash.prototype); +LazyWrapper.prototype.constructor = LazyWrapper; + +module.exports = LazyWrapper; diff --git a/src/hello/server/node_modules/lodash/_ListCache.js b/src/hello/server/node_modules/lodash/_ListCache.js new file mode 100644 index 00000000..26895c3a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/src/hello/server/node_modules/lodash/_LodashWrapper.js b/src/hello/server/node_modules/lodash/_LodashWrapper.js new file mode 100644 index 00000000..c1e4d9df --- /dev/null +++ b/src/hello/server/node_modules/lodash/_LodashWrapper.js @@ -0,0 +1,22 @@ +var baseCreate = require('./_baseCreate'), + baseLodash = require('./_baseLodash'); + +/** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ +function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; +} + +LodashWrapper.prototype = baseCreate(baseLodash.prototype); +LodashWrapper.prototype.constructor = LodashWrapper; + +module.exports = LodashWrapper; diff --git a/src/hello/server/node_modules/lodash/_Map.js b/src/hello/server/node_modules/lodash/_Map.js new file mode 100644 index 00000000..b73f29a0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_Map.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; diff --git a/src/hello/server/node_modules/lodash/_MapCache.js b/src/hello/server/node_modules/lodash/_MapCache.js new file mode 100644 index 00000000..4a4eea7b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_MapCache.js @@ -0,0 +1,32 @@ +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; diff --git a/src/hello/server/node_modules/lodash/_Promise.js b/src/hello/server/node_modules/lodash/_Promise.js new file mode 100644 index 00000000..247b9e1b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_Promise.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; diff --git a/src/hello/server/node_modules/lodash/_Set.js b/src/hello/server/node_modules/lodash/_Set.js new file mode 100644 index 00000000..b3c8dcbf --- /dev/null +++ b/src/hello/server/node_modules/lodash/_Set.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); + +module.exports = Set; diff --git a/src/hello/server/node_modules/lodash/_SetCache.js b/src/hello/server/node_modules/lodash/_SetCache.js new file mode 100644 index 00000000..6468b064 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_SetCache.js @@ -0,0 +1,27 @@ +var MapCache = require('./_MapCache'), + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); + +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; diff --git a/src/hello/server/node_modules/lodash/_Stack.js b/src/hello/server/node_modules/lodash/_Stack.js new file mode 100644 index 00000000..80b2cf1b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_Stack.js @@ -0,0 +1,27 @@ +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), + stackDelete = require('./_stackDelete'), + stackGet = require('./_stackGet'), + stackHas = require('./_stackHas'), + stackSet = require('./_stackSet'); + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +module.exports = Stack; diff --git a/src/hello/server/node_modules/lodash/_Symbol.js b/src/hello/server/node_modules/lodash/_Symbol.js new file mode 100644 index 00000000..a013f7c5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_Symbol.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Symbol = root.Symbol; + +module.exports = Symbol; diff --git a/src/hello/server/node_modules/lodash/_Uint8Array.js b/src/hello/server/node_modules/lodash/_Uint8Array.js new file mode 100644 index 00000000..2fb30e15 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_Uint8Array.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; diff --git a/src/hello/server/node_modules/lodash/_WeakMap.js b/src/hello/server/node_modules/lodash/_WeakMap.js new file mode 100644 index 00000000..567f86c6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_WeakMap.js @@ -0,0 +1,7 @@ +var getNative = require('./_getNative'), + root = require('./_root'); + +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; diff --git a/src/hello/server/node_modules/lodash/_apply.js b/src/hello/server/node_modules/lodash/_apply.js new file mode 100644 index 00000000..36436dda --- /dev/null +++ b/src/hello/server/node_modules/lodash/_apply.js @@ -0,0 +1,21 @@ +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; diff --git a/src/hello/server/node_modules/lodash/_arrayAggregator.js b/src/hello/server/node_modules/lodash/_arrayAggregator.js new file mode 100644 index 00000000..d96c3ca4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayAggregator.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; +} + +module.exports = arrayAggregator; diff --git a/src/hello/server/node_modules/lodash/_arrayEach.js b/src/hello/server/node_modules/lodash/_arrayEach.js new file mode 100644 index 00000000..2c5f5796 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayEach.js @@ -0,0 +1,22 @@ +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEach; diff --git a/src/hello/server/node_modules/lodash/_arrayEachRight.js b/src/hello/server/node_modules/lodash/_arrayEachRight.js new file mode 100644 index 00000000..976ca5c2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayEachRight.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; +} + +module.exports = arrayEachRight; diff --git a/src/hello/server/node_modules/lodash/_arrayEvery.js b/src/hello/server/node_modules/lodash/_arrayEvery.js new file mode 100644 index 00000000..e26a9184 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayEvery.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ +function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; +} + +module.exports = arrayEvery; diff --git a/src/hello/server/node_modules/lodash/_arrayFilter.js b/src/hello/server/node_modules/lodash/_arrayFilter.js new file mode 100644 index 00000000..75ea2544 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayFilter.js @@ -0,0 +1,25 @@ +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = arrayFilter; diff --git a/src/hello/server/node_modules/lodash/_arrayIncludes.js b/src/hello/server/node_modules/lodash/_arrayIncludes.js new file mode 100644 index 00000000..3737a6d9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayIncludes.js @@ -0,0 +1,17 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; +} + +module.exports = arrayIncludes; diff --git a/src/hello/server/node_modules/lodash/_arrayIncludesWith.js b/src/hello/server/node_modules/lodash/_arrayIncludesWith.js new file mode 100644 index 00000000..235fd975 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayIncludesWith.js @@ -0,0 +1,22 @@ +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} + +module.exports = arrayIncludesWith; diff --git a/src/hello/server/node_modules/lodash/_arrayLikeKeys.js b/src/hello/server/node_modules/lodash/_arrayLikeKeys.js new file mode 100644 index 00000000..b2ec9ce7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayLikeKeys.js @@ -0,0 +1,49 @@ +var baseTimes = require('./_baseTimes'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isIndex = require('./_isIndex'), + isTypedArray = require('./isTypedArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +module.exports = arrayLikeKeys; diff --git a/src/hello/server/node_modules/lodash/_arrayMap.js b/src/hello/server/node_modules/lodash/_arrayMap.js new file mode 100644 index 00000000..22b22464 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayMap.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +module.exports = arrayMap; diff --git a/src/hello/server/node_modules/lodash/_arrayPush.js b/src/hello/server/node_modules/lodash/_arrayPush.js new file mode 100644 index 00000000..7d742b38 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayPush.js @@ -0,0 +1,20 @@ +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; diff --git a/src/hello/server/node_modules/lodash/_arrayReduce.js b/src/hello/server/node_modules/lodash/_arrayReduce.js new file mode 100644 index 00000000..de8b79b2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayReduce.js @@ -0,0 +1,26 @@ +/** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; +} + +module.exports = arrayReduce; diff --git a/src/hello/server/node_modules/lodash/_arrayReduceRight.js b/src/hello/server/node_modules/lodash/_arrayReduceRight.js new file mode 100644 index 00000000..22d8976d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayReduceRight.js @@ -0,0 +1,24 @@ +/** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ +function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; +} + +module.exports = arrayReduceRight; diff --git a/src/hello/server/node_modules/lodash/_arraySample.js b/src/hello/server/node_modules/lodash/_arraySample.js new file mode 100644 index 00000000..fcab0105 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arraySample.js @@ -0,0 +1,15 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ +function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; +} + +module.exports = arraySample; diff --git a/src/hello/server/node_modules/lodash/_arraySampleSize.js b/src/hello/server/node_modules/lodash/_arraySampleSize.js new file mode 100644 index 00000000..8c7e364f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arraySampleSize.js @@ -0,0 +1,17 @@ +var baseClamp = require('./_baseClamp'), + copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); +} + +module.exports = arraySampleSize; diff --git a/src/hello/server/node_modules/lodash/_arrayShuffle.js b/src/hello/server/node_modules/lodash/_arrayShuffle.js new file mode 100644 index 00000000..46313a39 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arrayShuffle.js @@ -0,0 +1,15 @@ +var copyArray = require('./_copyArray'), + shuffleSelf = require('./_shuffleSelf'); + +/** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); +} + +module.exports = arrayShuffle; diff --git a/src/hello/server/node_modules/lodash/_arraySome.js b/src/hello/server/node_modules/lodash/_arraySome.js new file mode 100644 index 00000000..6fd02fd4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_arraySome.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +module.exports = arraySome; diff --git a/src/hello/server/node_modules/lodash/_asciiSize.js b/src/hello/server/node_modules/lodash/_asciiSize.js new file mode 100644 index 00000000..11d29c33 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_asciiSize.js @@ -0,0 +1,12 @@ +var baseProperty = require('./_baseProperty'); + +/** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +var asciiSize = baseProperty('length'); + +module.exports = asciiSize; diff --git a/src/hello/server/node_modules/lodash/_asciiToArray.js b/src/hello/server/node_modules/lodash/_asciiToArray.js new file mode 100644 index 00000000..8e3dd5b4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_asciiToArray.js @@ -0,0 +1,12 @@ +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; diff --git a/src/hello/server/node_modules/lodash/_asciiWords.js b/src/hello/server/node_modules/lodash/_asciiWords.js new file mode 100644 index 00000000..d765f0f7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_asciiWords.js @@ -0,0 +1,15 @@ +/** Used to match words composed of alphanumeric characters. */ +var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + +/** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function asciiWords(string) { + return string.match(reAsciiWord) || []; +} + +module.exports = asciiWords; diff --git a/src/hello/server/node_modules/lodash/_assignMergeValue.js b/src/hello/server/node_modules/lodash/_assignMergeValue.js new file mode 100644 index 00000000..cb1185e9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_assignMergeValue.js @@ -0,0 +1,20 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignMergeValue; diff --git a/src/hello/server/node_modules/lodash/_assignValue.js b/src/hello/server/node_modules/lodash/_assignValue.js new file mode 100644 index 00000000..40839575 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_assignValue.js @@ -0,0 +1,28 @@ +var baseAssignValue = require('./_baseAssignValue'), + eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +module.exports = assignValue; diff --git a/src/hello/server/node_modules/lodash/_assocIndexOf.js b/src/hello/server/node_modules/lodash/_assocIndexOf.js new file mode 100644 index 00000000..5b77a2bd --- /dev/null +++ b/src/hello/server/node_modules/lodash/_assocIndexOf.js @@ -0,0 +1,21 @@ +var eq = require('./eq'); + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +module.exports = assocIndexOf; diff --git a/src/hello/server/node_modules/lodash/_baseAggregator.js b/src/hello/server/node_modules/lodash/_baseAggregator.js new file mode 100644 index 00000000..4bc9e91f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseAggregator.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ +function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; +} + +module.exports = baseAggregator; diff --git a/src/hello/server/node_modules/lodash/_baseAssign.js b/src/hello/server/node_modules/lodash/_baseAssign.js new file mode 100644 index 00000000..e5c4a1a5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseAssign.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keys = require('./keys'); + +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} + +module.exports = baseAssign; diff --git a/src/hello/server/node_modules/lodash/_baseAssignIn.js b/src/hello/server/node_modules/lodash/_baseAssignIn.js new file mode 100644 index 00000000..6624f900 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseAssignIn.js @@ -0,0 +1,17 @@ +var copyObject = require('./_copyObject'), + keysIn = require('./keysIn'); + +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} + +module.exports = baseAssignIn; diff --git a/src/hello/server/node_modules/lodash/_baseAssignValue.js b/src/hello/server/node_modules/lodash/_baseAssignValue.js new file mode 100644 index 00000000..d6f66ef3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseAssignValue.js @@ -0,0 +1,25 @@ +var defineProperty = require('./_defineProperty'); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; diff --git a/src/hello/server/node_modules/lodash/_baseAt.js b/src/hello/server/node_modules/lodash/_baseAt.js new file mode 100644 index 00000000..90e4237a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseAt.js @@ -0,0 +1,23 @@ +var get = require('./get'); + +/** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ +function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; +} + +module.exports = baseAt; diff --git a/src/hello/server/node_modules/lodash/_baseClamp.js b/src/hello/server/node_modules/lodash/_baseClamp.js new file mode 100644 index 00000000..a1c56929 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseClamp.js @@ -0,0 +1,22 @@ +/** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ +function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; +} + +module.exports = baseClamp; diff --git a/src/hello/server/node_modules/lodash/_baseClone.js b/src/hello/server/node_modules/lodash/_baseClone.js new file mode 100644 index 00000000..69f87054 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseClone.js @@ -0,0 +1,166 @@ +var Stack = require('./_Stack'), + arrayEach = require('./_arrayEach'), + assignValue = require('./_assignValue'), + baseAssign = require('./_baseAssign'), + baseAssignIn = require('./_baseAssignIn'), + cloneBuffer = require('./_cloneBuffer'), + copyArray = require('./_copyArray'), + copySymbols = require('./_copySymbols'), + copySymbolsIn = require('./_copySymbolsIn'), + getAllKeys = require('./_getAllKeys'), + getAllKeysIn = require('./_getAllKeysIn'), + getTag = require('./_getTag'), + initCloneArray = require('./_initCloneArray'), + initCloneByTag = require('./_initCloneByTag'), + initCloneObject = require('./_initCloneObject'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isMap = require('./isMap'), + isObject = require('./isObject'), + isSet = require('./isSet'), + keys = require('./keys'), + keysIn = require('./keysIn'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; + +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} + +module.exports = baseClone; diff --git a/src/hello/server/node_modules/lodash/_baseConforms.js b/src/hello/server/node_modules/lodash/_baseConforms.js new file mode 100644 index 00000000..947e20d4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseConforms.js @@ -0,0 +1,18 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ +function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; +} + +module.exports = baseConforms; diff --git a/src/hello/server/node_modules/lodash/_baseConformsTo.js b/src/hello/server/node_modules/lodash/_baseConformsTo.js new file mode 100644 index 00000000..e449cb84 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseConformsTo.js @@ -0,0 +1,27 @@ +/** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ +function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; +} + +module.exports = baseConformsTo; diff --git a/src/hello/server/node_modules/lodash/_baseCreate.js b/src/hello/server/node_modules/lodash/_baseCreate.js new file mode 100644 index 00000000..ffa6a52a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseCreate.js @@ -0,0 +1,30 @@ +var isObject = require('./isObject'); + +/** Built-in value references. */ +var objectCreate = Object.create; + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +module.exports = baseCreate; diff --git a/src/hello/server/node_modules/lodash/_baseDelay.js b/src/hello/server/node_modules/lodash/_baseDelay.js new file mode 100644 index 00000000..1486d697 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseDelay.js @@ -0,0 +1,21 @@ +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ +function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); +} + +module.exports = baseDelay; diff --git a/src/hello/server/node_modules/lodash/_baseDifference.js b/src/hello/server/node_modules/lodash/_baseDifference.js new file mode 100644 index 00000000..343ac19f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseDifference.js @@ -0,0 +1,67 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; +} + +module.exports = baseDifference; diff --git a/src/hello/server/node_modules/lodash/_baseEach.js b/src/hello/server/node_modules/lodash/_baseEach.js new file mode 100644 index 00000000..512c0676 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseEach.js @@ -0,0 +1,14 @@ +var baseForOwn = require('./_baseForOwn'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); + +module.exports = baseEach; diff --git a/src/hello/server/node_modules/lodash/_baseEachRight.js b/src/hello/server/node_modules/lodash/_baseEachRight.js new file mode 100644 index 00000000..0a8feeca --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseEachRight.js @@ -0,0 +1,14 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + createBaseEach = require('./_createBaseEach'); + +/** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEachRight = createBaseEach(baseForOwnRight, true); + +module.exports = baseEachRight; diff --git a/src/hello/server/node_modules/lodash/_baseEvery.js b/src/hello/server/node_modules/lodash/_baseEvery.js new file mode 100644 index 00000000..fa52f7bc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseEvery.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ +function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; +} + +module.exports = baseEvery; diff --git a/src/hello/server/node_modules/lodash/_baseExtremum.js b/src/hello/server/node_modules/lodash/_baseExtremum.js new file mode 100644 index 00000000..9d6aa77e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseExtremum.js @@ -0,0 +1,32 @@ +var isSymbol = require('./isSymbol'); + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +module.exports = baseExtremum; diff --git a/src/hello/server/node_modules/lodash/_baseFill.js b/src/hello/server/node_modules/lodash/_baseFill.js new file mode 100644 index 00000000..46ef9c76 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseFill.js @@ -0,0 +1,32 @@ +var toInteger = require('./toInteger'), + toLength = require('./toLength'); + +/** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ +function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; +} + +module.exports = baseFill; diff --git a/src/hello/server/node_modules/lodash/_baseFilter.js b/src/hello/server/node_modules/lodash/_baseFilter.js new file mode 100644 index 00000000..46784773 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseFilter.js @@ -0,0 +1,21 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; +} + +module.exports = baseFilter; diff --git a/src/hello/server/node_modules/lodash/_baseFindIndex.js b/src/hello/server/node_modules/lodash/_baseFindIndex.js new file mode 100644 index 00000000..e3f5d8aa --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseFindIndex.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +module.exports = baseFindIndex; diff --git a/src/hello/server/node_modules/lodash/_baseFindKey.js b/src/hello/server/node_modules/lodash/_baseFindKey.js new file mode 100644 index 00000000..2e430f3a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseFindKey.js @@ -0,0 +1,23 @@ +/** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ +function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; +} + +module.exports = baseFindKey; diff --git a/src/hello/server/node_modules/lodash/_baseFlatten.js b/src/hello/server/node_modules/lodash/_baseFlatten.js new file mode 100644 index 00000000..4b1e009b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseFlatten.js @@ -0,0 +1,38 @@ +var arrayPush = require('./_arrayPush'), + isFlattenable = require('./_isFlattenable'); + +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; diff --git a/src/hello/server/node_modules/lodash/_baseFor.js b/src/hello/server/node_modules/lodash/_baseFor.js new file mode 100644 index 00000000..d946590f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseFor.js @@ -0,0 +1,16 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; diff --git a/src/hello/server/node_modules/lodash/_baseForOwn.js b/src/hello/server/node_modules/lodash/_baseForOwn.js new file mode 100644 index 00000000..503d5234 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseForOwn.js @@ -0,0 +1,16 @@ +var baseFor = require('./_baseFor'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +module.exports = baseForOwn; diff --git a/src/hello/server/node_modules/lodash/_baseForOwnRight.js b/src/hello/server/node_modules/lodash/_baseForOwnRight.js new file mode 100644 index 00000000..a4b10e6c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseForOwnRight.js @@ -0,0 +1,16 @@ +var baseForRight = require('./_baseForRight'), + keys = require('./keys'); + +/** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); +} + +module.exports = baseForOwnRight; diff --git a/src/hello/server/node_modules/lodash/_baseForRight.js b/src/hello/server/node_modules/lodash/_baseForRight.js new file mode 100644 index 00000000..32842cd8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseForRight.js @@ -0,0 +1,15 @@ +var createBaseFor = require('./_createBaseFor'); + +/** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseForRight = createBaseFor(true); + +module.exports = baseForRight; diff --git a/src/hello/server/node_modules/lodash/_baseFunctions.js b/src/hello/server/node_modules/lodash/_baseFunctions.js new file mode 100644 index 00000000..d23bc9b4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseFunctions.js @@ -0,0 +1,19 @@ +var arrayFilter = require('./_arrayFilter'), + isFunction = require('./isFunction'); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ +function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); +} + +module.exports = baseFunctions; diff --git a/src/hello/server/node_modules/lodash/_baseGet.js b/src/hello/server/node_modules/lodash/_baseGet.js new file mode 100644 index 00000000..a194913d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseGet.js @@ -0,0 +1,24 @@ +var castPath = require('./_castPath'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; diff --git a/src/hello/server/node_modules/lodash/_baseGetAllKeys.js b/src/hello/server/node_modules/lodash/_baseGetAllKeys.js new file mode 100644 index 00000000..8ad204ea --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseGetAllKeys.js @@ -0,0 +1,20 @@ +var arrayPush = require('./_arrayPush'), + isArray = require('./isArray'); + +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +} + +module.exports = baseGetAllKeys; diff --git a/src/hello/server/node_modules/lodash/_baseGetTag.js b/src/hello/server/node_modules/lodash/_baseGetTag.js new file mode 100644 index 00000000..b927ccc1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseGetTag.js @@ -0,0 +1,28 @@ +var Symbol = require('./_Symbol'), + getRawTag = require('./_getRawTag'), + objectToString = require('./_objectToString'); + +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +module.exports = baseGetTag; diff --git a/src/hello/server/node_modules/lodash/_baseGt.js b/src/hello/server/node_modules/lodash/_baseGt.js new file mode 100644 index 00000000..502d273c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseGt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; diff --git a/src/hello/server/node_modules/lodash/_baseHas.js b/src/hello/server/node_modules/lodash/_baseHas.js new file mode 100644 index 00000000..1b730321 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseHas.js @@ -0,0 +1,19 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); +} + +module.exports = baseHas; diff --git a/src/hello/server/node_modules/lodash/_baseHasIn.js b/src/hello/server/node_modules/lodash/_baseHasIn.js new file mode 100644 index 00000000..2e0d0426 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseHasIn.js @@ -0,0 +1,13 @@ +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; diff --git a/src/hello/server/node_modules/lodash/_baseInRange.js b/src/hello/server/node_modules/lodash/_baseInRange.js new file mode 100644 index 00000000..ec956661 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseInRange.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ +function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); +} + +module.exports = baseInRange; diff --git a/src/hello/server/node_modules/lodash/_baseIndexOf.js b/src/hello/server/node_modules/lodash/_baseIndexOf.js new file mode 100644 index 00000000..167e706e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIndexOf.js @@ -0,0 +1,20 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictIndexOf = require('./_strictIndexOf'); + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +module.exports = baseIndexOf; diff --git a/src/hello/server/node_modules/lodash/_baseIndexOfWith.js b/src/hello/server/node_modules/lodash/_baseIndexOfWith.js new file mode 100644 index 00000000..f815fe0d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIndexOfWith.js @@ -0,0 +1,23 @@ +/** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOfWith; diff --git a/src/hello/server/node_modules/lodash/_baseIntersection.js b/src/hello/server/node_modules/lodash/_baseIntersection.js new file mode 100644 index 00000000..c1d250c2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIntersection.js @@ -0,0 +1,74 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + arrayMap = require('./_arrayMap'), + baseUnary = require('./_baseUnary'), + cacheHas = require('./_cacheHas'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseIntersection; diff --git a/src/hello/server/node_modules/lodash/_baseInverter.js b/src/hello/server/node_modules/lodash/_baseInverter.js new file mode 100644 index 00000000..fbc337f0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseInverter.js @@ -0,0 +1,21 @@ +var baseForOwn = require('./_baseForOwn'); + +/** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ +function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; +} + +module.exports = baseInverter; diff --git a/src/hello/server/node_modules/lodash/_baseInvoke.js b/src/hello/server/node_modules/lodash/_baseInvoke.js new file mode 100644 index 00000000..49bcf3c3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseInvoke.js @@ -0,0 +1,24 @@ +var apply = require('./_apply'), + castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ +function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); +} + +module.exports = baseInvoke; diff --git a/src/hello/server/node_modules/lodash/_baseIsArguments.js b/src/hello/server/node_modules/lodash/_baseIsArguments.js new file mode 100644 index 00000000..b3562cca --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsArguments.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +module.exports = baseIsArguments; diff --git a/src/hello/server/node_modules/lodash/_baseIsArrayBuffer.js b/src/hello/server/node_modules/lodash/_baseIsArrayBuffer.js new file mode 100644 index 00000000..a2c4f30a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsArrayBuffer.js @@ -0,0 +1,17 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +var arrayBufferTag = '[object ArrayBuffer]'; + +/** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ +function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; +} + +module.exports = baseIsArrayBuffer; diff --git a/src/hello/server/node_modules/lodash/_baseIsDate.js b/src/hello/server/node_modules/lodash/_baseIsDate.js new file mode 100644 index 00000000..ba67c785 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsDate.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var dateTag = '[object Date]'; + +/** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ +function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; +} + +module.exports = baseIsDate; diff --git a/src/hello/server/node_modules/lodash/_baseIsEqual.js b/src/hello/server/node_modules/lodash/_baseIsEqual.js new file mode 100644 index 00000000..00a68a4f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsEqual.js @@ -0,0 +1,28 @@ +var baseIsEqualDeep = require('./_baseIsEqualDeep'), + isObjectLike = require('./isObjectLike'); + +/** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; diff --git a/src/hello/server/node_modules/lodash/_baseIsEqualDeep.js b/src/hello/server/node_modules/lodash/_baseIsEqualDeep.js new file mode 100644 index 00000000..e3cfd6a8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsEqualDeep.js @@ -0,0 +1,83 @@ +var Stack = require('./_Stack'), + equalArrays = require('./_equalArrays'), + equalByTag = require('./_equalByTag'), + equalObjects = require('./_equalObjects'), + getTag = require('./_getTag'), + isArray = require('./isArray'), + isBuffer = require('./isBuffer'), + isTypedArray = require('./isTypedArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); +} + +module.exports = baseIsEqualDeep; diff --git a/src/hello/server/node_modules/lodash/_baseIsMap.js b/src/hello/server/node_modules/lodash/_baseIsMap.js new file mode 100644 index 00000000..02a4021c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsMap.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; + +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} + +module.exports = baseIsMap; diff --git a/src/hello/server/node_modules/lodash/_baseIsMatch.js b/src/hello/server/node_modules/lodash/_baseIsMatch.js new file mode 100644 index 00000000..72494bed --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsMatch.js @@ -0,0 +1,62 @@ +var Stack = require('./_Stack'), + baseIsEqual = require('./_baseIsEqual'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; +} + +module.exports = baseIsMatch; diff --git a/src/hello/server/node_modules/lodash/_baseIsNaN.js b/src/hello/server/node_modules/lodash/_baseIsNaN.js new file mode 100644 index 00000000..316f1eb1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsNaN.js @@ -0,0 +1,12 @@ +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +module.exports = baseIsNaN; diff --git a/src/hello/server/node_modules/lodash/_baseIsNative.js b/src/hello/server/node_modules/lodash/_baseIsNative.js new file mode 100644 index 00000000..87023304 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/src/hello/server/node_modules/lodash/_baseIsRegExp.js b/src/hello/server/node_modules/lodash/_baseIsRegExp.js new file mode 100644 index 00000000..6cd7c1ae --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsRegExp.js @@ -0,0 +1,18 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var regexpTag = '[object RegExp]'; + +/** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ +function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; +} + +module.exports = baseIsRegExp; diff --git a/src/hello/server/node_modules/lodash/_baseIsSet.js b/src/hello/server/node_modules/lodash/_baseIsSet.js new file mode 100644 index 00000000..6dee3671 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsSet.js @@ -0,0 +1,18 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var setTag = '[object Set]'; + +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} + +module.exports = baseIsSet; diff --git a/src/hello/server/node_modules/lodash/_baseIsTypedArray.js b/src/hello/server/node_modules/lodash/_baseIsTypedArray.js new file mode 100644 index 00000000..1edb32ff --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIsTypedArray.js @@ -0,0 +1,60 @@ +var baseGetTag = require('./_baseGetTag'), + isLength = require('./isLength'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +module.exports = baseIsTypedArray; diff --git a/src/hello/server/node_modules/lodash/_baseIteratee.js b/src/hello/server/node_modules/lodash/_baseIteratee.js new file mode 100644 index 00000000..995c2575 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseIteratee.js @@ -0,0 +1,31 @@ +var baseMatches = require('./_baseMatches'), + baseMatchesProperty = require('./_baseMatchesProperty'), + identity = require('./identity'), + isArray = require('./isArray'), + property = require('./property'); + +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} + +module.exports = baseIteratee; diff --git a/src/hello/server/node_modules/lodash/_baseKeys.js b/src/hello/server/node_modules/lodash/_baseKeys.js new file mode 100644 index 00000000..45e9e6f3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseKeys.js @@ -0,0 +1,30 @@ +var isPrototype = require('./_isPrototype'), + nativeKeys = require('./_nativeKeys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; diff --git a/src/hello/server/node_modules/lodash/_baseKeysIn.js b/src/hello/server/node_modules/lodash/_baseKeysIn.js new file mode 100644 index 00000000..ea8a0a17 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseKeysIn.js @@ -0,0 +1,33 @@ +var isObject = require('./isObject'), + isPrototype = require('./_isPrototype'), + nativeKeysIn = require('./_nativeKeysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +module.exports = baseKeysIn; diff --git a/src/hello/server/node_modules/lodash/_baseLodash.js b/src/hello/server/node_modules/lodash/_baseLodash.js new file mode 100644 index 00000000..f76c790e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseLodash.js @@ -0,0 +1,10 @@ +/** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ +function baseLodash() { + // No operation performed. +} + +module.exports = baseLodash; diff --git a/src/hello/server/node_modules/lodash/_baseLt.js b/src/hello/server/node_modules/lodash/_baseLt.js new file mode 100644 index 00000000..8674d294 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseLt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +module.exports = baseLt; diff --git a/src/hello/server/node_modules/lodash/_baseMap.js b/src/hello/server/node_modules/lodash/_baseMap.js new file mode 100644 index 00000000..0bf5cead --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseMap.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'), + isArrayLike = require('./isArrayLike'); + +/** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; +} + +module.exports = baseMap; diff --git a/src/hello/server/node_modules/lodash/_baseMatches.js b/src/hello/server/node_modules/lodash/_baseMatches.js new file mode 100644 index 00000000..e56582ad --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseMatches.js @@ -0,0 +1,22 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'), + matchesStrictComparable = require('./_matchesStrictComparable'); + +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; +} + +module.exports = baseMatches; diff --git a/src/hello/server/node_modules/lodash/_baseMatchesProperty.js b/src/hello/server/node_modules/lodash/_baseMatchesProperty.js new file mode 100644 index 00000000..24afd893 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseMatchesProperty.js @@ -0,0 +1,33 @@ +var baseIsEqual = require('./_baseIsEqual'), + get = require('./get'), + hasIn = require('./hasIn'), + isKey = require('./_isKey'), + isStrictComparable = require('./_isStrictComparable'), + matchesStrictComparable = require('./_matchesStrictComparable'), + toKey = require('./_toKey'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; +} + +module.exports = baseMatchesProperty; diff --git a/src/hello/server/node_modules/lodash/_baseMean.js b/src/hello/server/node_modules/lodash/_baseMean.js new file mode 100644 index 00000000..fa9e00a0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseMean.js @@ -0,0 +1,20 @@ +var baseSum = require('./_baseSum'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ +function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; +} + +module.exports = baseMean; diff --git a/src/hello/server/node_modules/lodash/_baseMerge.js b/src/hello/server/node_modules/lodash/_baseMerge.js new file mode 100644 index 00000000..c98b5eb0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseMerge.js @@ -0,0 +1,42 @@ +var Stack = require('./_Stack'), + assignMergeValue = require('./_assignMergeValue'), + baseFor = require('./_baseFor'), + baseMergeDeep = require('./_baseMergeDeep'), + isObject = require('./isObject'), + keysIn = require('./keysIn'), + safeGet = require('./_safeGet'); + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +module.exports = baseMerge; diff --git a/src/hello/server/node_modules/lodash/_baseMergeDeep.js b/src/hello/server/node_modules/lodash/_baseMergeDeep.js new file mode 100644 index 00000000..4679e8dc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseMergeDeep.js @@ -0,0 +1,94 @@ +var assignMergeValue = require('./_assignMergeValue'), + cloneBuffer = require('./_cloneBuffer'), + cloneTypedArray = require('./_cloneTypedArray'), + copyArray = require('./_copyArray'), + initCloneObject = require('./_initCloneObject'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLikeObject = require('./isArrayLikeObject'), + isBuffer = require('./isBuffer'), + isFunction = require('./isFunction'), + isObject = require('./isObject'), + isPlainObject = require('./isPlainObject'), + isTypedArray = require('./isTypedArray'), + safeGet = require('./_safeGet'), + toPlainObject = require('./toPlainObject'); + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +module.exports = baseMergeDeep; diff --git a/src/hello/server/node_modules/lodash/_baseNth.js b/src/hello/server/node_modules/lodash/_baseNth.js new file mode 100644 index 00000000..0403c2a3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseNth.js @@ -0,0 +1,20 @@ +var isIndex = require('./_isIndex'); + +/** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ +function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; +} + +module.exports = baseNth; diff --git a/src/hello/server/node_modules/lodash/_baseOrderBy.js b/src/hello/server/node_modules/lodash/_baseOrderBy.js new file mode 100644 index 00000000..775a0174 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseOrderBy.js @@ -0,0 +1,49 @@ +var arrayMap = require('./_arrayMap'), + baseGet = require('./_baseGet'), + baseIteratee = require('./_baseIteratee'), + baseMap = require('./_baseMap'), + baseSortBy = require('./_baseSortBy'), + baseUnary = require('./_baseUnary'), + compareMultiple = require('./_compareMultiple'), + identity = require('./identity'), + isArray = require('./isArray'); + +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} + +module.exports = baseOrderBy; diff --git a/src/hello/server/node_modules/lodash/_basePick.js b/src/hello/server/node_modules/lodash/_basePick.js new file mode 100644 index 00000000..09b458a6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_basePick.js @@ -0,0 +1,19 @@ +var basePickBy = require('./_basePickBy'), + hasIn = require('./hasIn'); + +/** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} + +module.exports = basePick; diff --git a/src/hello/server/node_modules/lodash/_basePickBy.js b/src/hello/server/node_modules/lodash/_basePickBy.js new file mode 100644 index 00000000..85be68c8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_basePickBy.js @@ -0,0 +1,30 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'), + castPath = require('./_castPath'); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; diff --git a/src/hello/server/node_modules/lodash/_baseProperty.js b/src/hello/server/node_modules/lodash/_baseProperty.js new file mode 100644 index 00000000..496281ec --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseProperty.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = baseProperty; diff --git a/src/hello/server/node_modules/lodash/_basePropertyDeep.js b/src/hello/server/node_modules/lodash/_basePropertyDeep.js new file mode 100644 index 00000000..1e5aae50 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_basePropertyDeep.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'); + +/** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; +} + +module.exports = basePropertyDeep; diff --git a/src/hello/server/node_modules/lodash/_basePropertyOf.js b/src/hello/server/node_modules/lodash/_basePropertyOf.js new file mode 100644 index 00000000..46173999 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_basePropertyOf.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ +function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; +} + +module.exports = basePropertyOf; diff --git a/src/hello/server/node_modules/lodash/_basePullAll.js b/src/hello/server/node_modules/lodash/_basePullAll.js new file mode 100644 index 00000000..305720ed --- /dev/null +++ b/src/hello/server/node_modules/lodash/_basePullAll.js @@ -0,0 +1,51 @@ +var arrayMap = require('./_arrayMap'), + baseIndexOf = require('./_baseIndexOf'), + baseIndexOfWith = require('./_baseIndexOfWith'), + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = basePullAll; diff --git a/src/hello/server/node_modules/lodash/_basePullAt.js b/src/hello/server/node_modules/lodash/_basePullAt.js new file mode 100644 index 00000000..c3e9e710 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_basePullAt.js @@ -0,0 +1,37 @@ +var baseUnset = require('./_baseUnset'), + isIndex = require('./_isIndex'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ +function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; +} + +module.exports = basePullAt; diff --git a/src/hello/server/node_modules/lodash/_baseRandom.js b/src/hello/server/node_modules/lodash/_baseRandom.js new file mode 100644 index 00000000..94f76a76 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseRandom.js @@ -0,0 +1,18 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeRandom = Math.random; + +/** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ +function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); +} + +module.exports = baseRandom; diff --git a/src/hello/server/node_modules/lodash/_baseRange.js b/src/hello/server/node_modules/lodash/_baseRange.js new file mode 100644 index 00000000..0fb8e419 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseRange.js @@ -0,0 +1,28 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +module.exports = baseRange; diff --git a/src/hello/server/node_modules/lodash/_baseReduce.js b/src/hello/server/node_modules/lodash/_baseReduce.js new file mode 100644 index 00000000..5a1f8b57 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseReduce.js @@ -0,0 +1,23 @@ +/** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ +function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; +} + +module.exports = baseReduce; diff --git a/src/hello/server/node_modules/lodash/_baseRepeat.js b/src/hello/server/node_modules/lodash/_baseRepeat.js new file mode 100644 index 00000000..ee44c31a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseRepeat.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor; + +/** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ +function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; +} + +module.exports = baseRepeat; diff --git a/src/hello/server/node_modules/lodash/_baseRest.js b/src/hello/server/node_modules/lodash/_baseRest.js new file mode 100644 index 00000000..d0dc4bdd --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseRest.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +module.exports = baseRest; diff --git a/src/hello/server/node_modules/lodash/_baseSample.js b/src/hello/server/node_modules/lodash/_baseSample.js new file mode 100644 index 00000000..58582b91 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSample.js @@ -0,0 +1,15 @@ +var arraySample = require('./_arraySample'), + values = require('./values'); + +/** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ +function baseSample(collection) { + return arraySample(values(collection)); +} + +module.exports = baseSample; diff --git a/src/hello/server/node_modules/lodash/_baseSampleSize.js b/src/hello/server/node_modules/lodash/_baseSampleSize.js new file mode 100644 index 00000000..5c90ec51 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSampleSize.js @@ -0,0 +1,18 @@ +var baseClamp = require('./_baseClamp'), + shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ +function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); +} + +module.exports = baseSampleSize; diff --git a/src/hello/server/node_modules/lodash/_baseSet.js b/src/hello/server/node_modules/lodash/_baseSet.js new file mode 100644 index 00000000..99f4fbf9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSet.js @@ -0,0 +1,51 @@ +var assignValue = require('./_assignValue'), + castPath = require('./_castPath'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} + +module.exports = baseSet; diff --git a/src/hello/server/node_modules/lodash/_baseSetData.js b/src/hello/server/node_modules/lodash/_baseSetData.js new file mode 100644 index 00000000..c409947d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSetData.js @@ -0,0 +1,17 @@ +var identity = require('./identity'), + metaMap = require('./_metaMap'); + +/** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; +}; + +module.exports = baseSetData; diff --git a/src/hello/server/node_modules/lodash/_baseSetToString.js b/src/hello/server/node_modules/lodash/_baseSetToString.js new file mode 100644 index 00000000..89eaca38 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSetToString.js @@ -0,0 +1,22 @@ +var constant = require('./constant'), + defineProperty = require('./_defineProperty'), + identity = require('./identity'); + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; diff --git a/src/hello/server/node_modules/lodash/_baseShuffle.js b/src/hello/server/node_modules/lodash/_baseShuffle.js new file mode 100644 index 00000000..023077ac --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseShuffle.js @@ -0,0 +1,15 @@ +var shuffleSelf = require('./_shuffleSelf'), + values = require('./values'); + +/** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ +function baseShuffle(collection) { + return shuffleSelf(values(collection)); +} + +module.exports = baseShuffle; diff --git a/src/hello/server/node_modules/lodash/_baseSlice.js b/src/hello/server/node_modules/lodash/_baseSlice.js new file mode 100644 index 00000000..786f6c99 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSlice.js @@ -0,0 +1,31 @@ +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +module.exports = baseSlice; diff --git a/src/hello/server/node_modules/lodash/_baseSome.js b/src/hello/server/node_modules/lodash/_baseSome.js new file mode 100644 index 00000000..58f3f447 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSome.js @@ -0,0 +1,22 @@ +var baseEach = require('./_baseEach'); + +/** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; +} + +module.exports = baseSome; diff --git a/src/hello/server/node_modules/lodash/_baseSortBy.js b/src/hello/server/node_modules/lodash/_baseSortBy.js new file mode 100644 index 00000000..a25c92ed --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSortBy.js @@ -0,0 +1,21 @@ +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy; diff --git a/src/hello/server/node_modules/lodash/_baseSortedIndex.js b/src/hello/server/node_modules/lodash/_baseSortedIndex.js new file mode 100644 index 00000000..638c366c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSortedIndex.js @@ -0,0 +1,42 @@ +var baseSortedIndexBy = require('./_baseSortedIndexBy'), + identity = require('./identity'), + isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + +/** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); +} + +module.exports = baseSortedIndex; diff --git a/src/hello/server/node_modules/lodash/_baseSortedIndexBy.js b/src/hello/server/node_modules/lodash/_baseSortedIndexBy.js new file mode 100644 index 00000000..c247b377 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSortedIndexBy.js @@ -0,0 +1,67 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for the maximum length and index of an array. */ +var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeFloor = Math.floor, + nativeMin = Math.min; + +/** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ +function baseSortedIndexBy(array, value, iteratee, retHighest) { + var low = 0, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); +} + +module.exports = baseSortedIndexBy; diff --git a/src/hello/server/node_modules/lodash/_baseSortedUniq.js b/src/hello/server/node_modules/lodash/_baseSortedUniq.js new file mode 100644 index 00000000..802159a3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSortedUniq.js @@ -0,0 +1,30 @@ +var eq = require('./eq'); + +/** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; +} + +module.exports = baseSortedUniq; diff --git a/src/hello/server/node_modules/lodash/_baseSum.js b/src/hello/server/node_modules/lodash/_baseSum.js new file mode 100644 index 00000000..a9e84c13 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseSum.js @@ -0,0 +1,24 @@ +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; +} + +module.exports = baseSum; diff --git a/src/hello/server/node_modules/lodash/_baseTimes.js b/src/hello/server/node_modules/lodash/_baseTimes.js new file mode 100644 index 00000000..0603fc37 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseTimes.js @@ -0,0 +1,20 @@ +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; diff --git a/src/hello/server/node_modules/lodash/_baseToNumber.js b/src/hello/server/node_modules/lodash/_baseToNumber.js new file mode 100644 index 00000000..04859f39 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseToNumber.js @@ -0,0 +1,24 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ +function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; +} + +module.exports = baseToNumber; diff --git a/src/hello/server/node_modules/lodash/_baseToPairs.js b/src/hello/server/node_modules/lodash/_baseToPairs.js new file mode 100644 index 00000000..bff19912 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseToPairs.js @@ -0,0 +1,18 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ +function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); +} + +module.exports = baseToPairs; diff --git a/src/hello/server/node_modules/lodash/_baseToString.js b/src/hello/server/node_modules/lodash/_baseToString.js new file mode 100644 index 00000000..ada6ad29 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseToString.js @@ -0,0 +1,37 @@ +var Symbol = require('./_Symbol'), + arrayMap = require('./_arrayMap'), + isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; diff --git a/src/hello/server/node_modules/lodash/_baseTrim.js b/src/hello/server/node_modules/lodash/_baseTrim.js new file mode 100644 index 00000000..3e2797d9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseTrim.js @@ -0,0 +1,19 @@ +var trimmedEndIndex = require('./_trimmedEndIndex'); + +/** Used to match leading whitespace. */ +var reTrimStart = /^\s+/; + +/** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ +function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; +} + +module.exports = baseTrim; diff --git a/src/hello/server/node_modules/lodash/_baseUnary.js b/src/hello/server/node_modules/lodash/_baseUnary.js new file mode 100644 index 00000000..98639e92 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseUnary.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +module.exports = baseUnary; diff --git a/src/hello/server/node_modules/lodash/_baseUniq.js b/src/hello/server/node_modules/lodash/_baseUniq.js new file mode 100644 index 00000000..aea459dc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseUniq.js @@ -0,0 +1,72 @@ +var SetCache = require('./_SetCache'), + arrayIncludes = require('./_arrayIncludes'), + arrayIncludesWith = require('./_arrayIncludesWith'), + cacheHas = require('./_cacheHas'), + createSet = require('./_createSet'), + setToArray = require('./_setToArray'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +module.exports = baseUniq; diff --git a/src/hello/server/node_modules/lodash/_baseUnset.js b/src/hello/server/node_modules/lodash/_baseUnset.js new file mode 100644 index 00000000..eefc6e37 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseUnset.js @@ -0,0 +1,20 @@ +var castPath = require('./_castPath'), + last = require('./last'), + parent = require('./_parent'), + toKey = require('./_toKey'); + +/** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ +function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; +} + +module.exports = baseUnset; diff --git a/src/hello/server/node_modules/lodash/_baseUpdate.js b/src/hello/server/node_modules/lodash/_baseUpdate.js new file mode 100644 index 00000000..92a62377 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseUpdate.js @@ -0,0 +1,18 @@ +var baseGet = require('./_baseGet'), + baseSet = require('./_baseSet'); + +/** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); +} + +module.exports = baseUpdate; diff --git a/src/hello/server/node_modules/lodash/_baseValues.js b/src/hello/server/node_modules/lodash/_baseValues.js new file mode 100644 index 00000000..b95faadc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseValues.js @@ -0,0 +1,19 @@ +var arrayMap = require('./_arrayMap'); + +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); +} + +module.exports = baseValues; diff --git a/src/hello/server/node_modules/lodash/_baseWhile.js b/src/hello/server/node_modules/lodash/_baseWhile.js new file mode 100644 index 00000000..07eac61b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseWhile.js @@ -0,0 +1,26 @@ +var baseSlice = require('./_baseSlice'); + +/** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ +function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); +} + +module.exports = baseWhile; diff --git a/src/hello/server/node_modules/lodash/_baseWrapperValue.js b/src/hello/server/node_modules/lodash/_baseWrapperValue.js new file mode 100644 index 00000000..443e0df5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseWrapperValue.js @@ -0,0 +1,25 @@ +var LazyWrapper = require('./_LazyWrapper'), + arrayPush = require('./_arrayPush'), + arrayReduce = require('./_arrayReduce'); + +/** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ +function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); +} + +module.exports = baseWrapperValue; diff --git a/src/hello/server/node_modules/lodash/_baseXor.js b/src/hello/server/node_modules/lodash/_baseXor.js new file mode 100644 index 00000000..8e69338b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseXor.js @@ -0,0 +1,36 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseUniq = require('./_baseUniq'); + +/** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ +function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); +} + +module.exports = baseXor; diff --git a/src/hello/server/node_modules/lodash/_baseZipObject.js b/src/hello/server/node_modules/lodash/_baseZipObject.js new file mode 100644 index 00000000..401f85be --- /dev/null +++ b/src/hello/server/node_modules/lodash/_baseZipObject.js @@ -0,0 +1,23 @@ +/** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ +function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; +} + +module.exports = baseZipObject; diff --git a/src/hello/server/node_modules/lodash/_cacheHas.js b/src/hello/server/node_modules/lodash/_cacheHas.js new file mode 100644 index 00000000..2dec8926 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_cacheHas.js @@ -0,0 +1,13 @@ +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} + +module.exports = cacheHas; diff --git a/src/hello/server/node_modules/lodash/_castArrayLikeObject.js b/src/hello/server/node_modules/lodash/_castArrayLikeObject.js new file mode 100644 index 00000000..92c75fa1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_castArrayLikeObject.js @@ -0,0 +1,14 @@ +var isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; +} + +module.exports = castArrayLikeObject; diff --git a/src/hello/server/node_modules/lodash/_castFunction.js b/src/hello/server/node_modules/lodash/_castFunction.js new file mode 100644 index 00000000..98c91ae6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_castFunction.js @@ -0,0 +1,14 @@ +var identity = require('./identity'); + +/** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ +function castFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = castFunction; diff --git a/src/hello/server/node_modules/lodash/_castPath.js b/src/hello/server/node_modules/lodash/_castPath.js new file mode 100644 index 00000000..017e4c1b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_castPath.js @@ -0,0 +1,21 @@ +var isArray = require('./isArray'), + isKey = require('./_isKey'), + stringToPath = require('./_stringToPath'), + toString = require('./toString'); + +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); +} + +module.exports = castPath; diff --git a/src/hello/server/node_modules/lodash/_castRest.js b/src/hello/server/node_modules/lodash/_castRest.js new file mode 100644 index 00000000..213c66f1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_castRest.js @@ -0,0 +1,14 @@ +var baseRest = require('./_baseRest'); + +/** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +var castRest = baseRest; + +module.exports = castRest; diff --git a/src/hello/server/node_modules/lodash/_castSlice.js b/src/hello/server/node_modules/lodash/_castSlice.js new file mode 100644 index 00000000..071faeba --- /dev/null +++ b/src/hello/server/node_modules/lodash/_castSlice.js @@ -0,0 +1,18 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; diff --git a/src/hello/server/node_modules/lodash/_charsEndIndex.js b/src/hello/server/node_modules/lodash/_charsEndIndex.js new file mode 100644 index 00000000..07908ff3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_charsEndIndex.js @@ -0,0 +1,19 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; diff --git a/src/hello/server/node_modules/lodash/_charsStartIndex.js b/src/hello/server/node_modules/lodash/_charsStartIndex.js new file mode 100644 index 00000000..b17afd25 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_charsStartIndex.js @@ -0,0 +1,20 @@ +var baseIndexOf = require('./_baseIndexOf'); + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsStartIndex; diff --git a/src/hello/server/node_modules/lodash/_cloneArrayBuffer.js b/src/hello/server/node_modules/lodash/_cloneArrayBuffer.js new file mode 100644 index 00000000..c3d8f6e3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_cloneArrayBuffer.js @@ -0,0 +1,16 @@ +var Uint8Array = require('./_Uint8Array'); + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +module.exports = cloneArrayBuffer; diff --git a/src/hello/server/node_modules/lodash/_cloneBuffer.js b/src/hello/server/node_modules/lodash/_cloneBuffer.js new file mode 100644 index 00000000..27c48109 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_cloneBuffer.js @@ -0,0 +1,35 @@ +var root = require('./_root'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +module.exports = cloneBuffer; diff --git a/src/hello/server/node_modules/lodash/_cloneDataView.js b/src/hello/server/node_modules/lodash/_cloneDataView.js new file mode 100644 index 00000000..9c9b7b05 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_cloneDataView.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} + +module.exports = cloneDataView; diff --git a/src/hello/server/node_modules/lodash/_cloneRegExp.js b/src/hello/server/node_modules/lodash/_cloneRegExp.js new file mode 100644 index 00000000..64a30dfb --- /dev/null +++ b/src/hello/server/node_modules/lodash/_cloneRegExp.js @@ -0,0 +1,17 @@ +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; + +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} + +module.exports = cloneRegExp; diff --git a/src/hello/server/node_modules/lodash/_cloneSymbol.js b/src/hello/server/node_modules/lodash/_cloneSymbol.js new file mode 100644 index 00000000..bede39f5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_cloneSymbol.js @@ -0,0 +1,18 @@ +var Symbol = require('./_Symbol'); + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} + +module.exports = cloneSymbol; diff --git a/src/hello/server/node_modules/lodash/_cloneTypedArray.js b/src/hello/server/node_modules/lodash/_cloneTypedArray.js new file mode 100644 index 00000000..7aad84d4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_cloneTypedArray.js @@ -0,0 +1,16 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'); + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +module.exports = cloneTypedArray; diff --git a/src/hello/server/node_modules/lodash/_compareAscending.js b/src/hello/server/node_modules/lodash/_compareAscending.js new file mode 100644 index 00000000..8dc27910 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_compareAscending.js @@ -0,0 +1,41 @@ +var isSymbol = require('./isSymbol'); + +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; +} + +module.exports = compareAscending; diff --git a/src/hello/server/node_modules/lodash/_compareMultiple.js b/src/hello/server/node_modules/lodash/_compareMultiple.js new file mode 100644 index 00000000..ad61f0fb --- /dev/null +++ b/src/hello/server/node_modules/lodash/_compareMultiple.js @@ -0,0 +1,44 @@ +var compareAscending = require('./_compareAscending'); + +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; +} + +module.exports = compareMultiple; diff --git a/src/hello/server/node_modules/lodash/_composeArgs.js b/src/hello/server/node_modules/lodash/_composeArgs.js new file mode 100644 index 00000000..1ce40f4f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_composeArgs.js @@ -0,0 +1,39 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; +} + +module.exports = composeArgs; diff --git a/src/hello/server/node_modules/lodash/_composeArgsRight.js b/src/hello/server/node_modules/lodash/_composeArgsRight.js new file mode 100644 index 00000000..8dc588d0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_composeArgsRight.js @@ -0,0 +1,41 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ +function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; +} + +module.exports = composeArgsRight; diff --git a/src/hello/server/node_modules/lodash/_copyArray.js b/src/hello/server/node_modules/lodash/_copyArray.js new file mode 100644 index 00000000..cd94d5d0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_copyArray.js @@ -0,0 +1,20 @@ +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +module.exports = copyArray; diff --git a/src/hello/server/node_modules/lodash/_copyObject.js b/src/hello/server/node_modules/lodash/_copyObject.js new file mode 100644 index 00000000..2f2a5c23 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_copyObject.js @@ -0,0 +1,40 @@ +var assignValue = require('./_assignValue'), + baseAssignValue = require('./_baseAssignValue'); + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +module.exports = copyObject; diff --git a/src/hello/server/node_modules/lodash/_copySymbols.js b/src/hello/server/node_modules/lodash/_copySymbols.js new file mode 100644 index 00000000..c35944ab --- /dev/null +++ b/src/hello/server/node_modules/lodash/_copySymbols.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbols = require('./_getSymbols'); + +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} + +module.exports = copySymbols; diff --git a/src/hello/server/node_modules/lodash/_copySymbolsIn.js b/src/hello/server/node_modules/lodash/_copySymbolsIn.js new file mode 100644 index 00000000..fdf20a73 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_copySymbolsIn.js @@ -0,0 +1,16 @@ +var copyObject = require('./_copyObject'), + getSymbolsIn = require('./_getSymbolsIn'); + +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} + +module.exports = copySymbolsIn; diff --git a/src/hello/server/node_modules/lodash/_coreJsData.js b/src/hello/server/node_modules/lodash/_coreJsData.js new file mode 100644 index 00000000..f8e5b4e3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/src/hello/server/node_modules/lodash/_countHolders.js b/src/hello/server/node_modules/lodash/_countHolders.js new file mode 100644 index 00000000..718fcdaa --- /dev/null +++ b/src/hello/server/node_modules/lodash/_countHolders.js @@ -0,0 +1,21 @@ +/** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ +function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; +} + +module.exports = countHolders; diff --git a/src/hello/server/node_modules/lodash/_createAggregator.js b/src/hello/server/node_modules/lodash/_createAggregator.js new file mode 100644 index 00000000..0be42c41 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createAggregator.js @@ -0,0 +1,23 @@ +var arrayAggregator = require('./_arrayAggregator'), + baseAggregator = require('./_baseAggregator'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ +function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; +} + +module.exports = createAggregator; diff --git a/src/hello/server/node_modules/lodash/_createAssigner.js b/src/hello/server/node_modules/lodash/_createAssigner.js new file mode 100644 index 00000000..1f904c51 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createAssigner.js @@ -0,0 +1,37 @@ +var baseRest = require('./_baseRest'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +module.exports = createAssigner; diff --git a/src/hello/server/node_modules/lodash/_createBaseEach.js b/src/hello/server/node_modules/lodash/_createBaseEach.js new file mode 100644 index 00000000..d24fdd1b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createBaseEach.js @@ -0,0 +1,32 @@ +var isArrayLike = require('./isArrayLike'); + +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; diff --git a/src/hello/server/node_modules/lodash/_createBaseFor.js b/src/hello/server/node_modules/lodash/_createBaseFor.js new file mode 100644 index 00000000..94cbf297 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createBaseFor.js @@ -0,0 +1,25 @@ +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; diff --git a/src/hello/server/node_modules/lodash/_createBind.js b/src/hello/server/node_modules/lodash/_createBind.js new file mode 100644 index 00000000..07cb99f4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createBind.js @@ -0,0 +1,28 @@ +var createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; +} + +module.exports = createBind; diff --git a/src/hello/server/node_modules/lodash/_createCaseFirst.js b/src/hello/server/node_modules/lodash/_createCaseFirst.js new file mode 100644 index 00000000..fe8ea483 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createCaseFirst.js @@ -0,0 +1,33 @@ +var castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringToArray = require('./_stringToArray'), + toString = require('./toString'); + +/** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ +function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; +} + +module.exports = createCaseFirst; diff --git a/src/hello/server/node_modules/lodash/_createCompounder.js b/src/hello/server/node_modules/lodash/_createCompounder.js new file mode 100644 index 00000000..8d4cee2c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createCompounder.js @@ -0,0 +1,24 @@ +var arrayReduce = require('./_arrayReduce'), + deburr = require('./deburr'), + words = require('./words'); + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; +} + +module.exports = createCompounder; diff --git a/src/hello/server/node_modules/lodash/_createCtor.js b/src/hello/server/node_modules/lodash/_createCtor.js new file mode 100644 index 00000000..9047aa5f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createCtor.js @@ -0,0 +1,37 @@ +var baseCreate = require('./_baseCreate'), + isObject = require('./isObject'); + +/** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ +function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; +} + +module.exports = createCtor; diff --git a/src/hello/server/node_modules/lodash/_createCurry.js b/src/hello/server/node_modules/lodash/_createCurry.js new file mode 100644 index 00000000..f06c2cdd --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createCurry.js @@ -0,0 +1,46 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + createHybrid = require('./_createHybrid'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; +} + +module.exports = createCurry; diff --git a/src/hello/server/node_modules/lodash/_createFind.js b/src/hello/server/node_modules/lodash/_createFind.js new file mode 100644 index 00000000..8859ff89 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createFind.js @@ -0,0 +1,25 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/src/hello/server/node_modules/lodash/_createFlow.js b/src/hello/server/node_modules/lodash/_createFlow.js new file mode 100644 index 00000000..baaddbf5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createFlow.js @@ -0,0 +1,78 @@ +var LodashWrapper = require('./_LodashWrapper'), + flatRest = require('./_flatRest'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + isArray = require('./isArray'), + isLaziable = require('./_isLaziable'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ +function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); +} + +module.exports = createFlow; diff --git a/src/hello/server/node_modules/lodash/_createHybrid.js b/src/hello/server/node_modules/lodash/_createHybrid.js new file mode 100644 index 00000000..b671bd11 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createHybrid.js @@ -0,0 +1,92 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + countHolders = require('./_countHolders'), + createCtor = require('./_createCtor'), + createRecurry = require('./_createRecurry'), + getHolder = require('./_getHolder'), + reorder = require('./_reorder'), + replaceHolders = require('./_replaceHolders'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_ARY_FLAG = 128, + WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; +} + +module.exports = createHybrid; diff --git a/src/hello/server/node_modules/lodash/_createInverter.js b/src/hello/server/node_modules/lodash/_createInverter.js new file mode 100644 index 00000000..6c0c5629 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createInverter.js @@ -0,0 +1,17 @@ +var baseInverter = require('./_baseInverter'); + +/** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ +function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; +} + +module.exports = createInverter; diff --git a/src/hello/server/node_modules/lodash/_createMathOperation.js b/src/hello/server/node_modules/lodash/_createMathOperation.js new file mode 100644 index 00000000..f1e238ac --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createMathOperation.js @@ -0,0 +1,38 @@ +var baseToNumber = require('./_baseToNumber'), + baseToString = require('./_baseToString'); + +/** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ +function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; +} + +module.exports = createMathOperation; diff --git a/src/hello/server/node_modules/lodash/_createOver.js b/src/hello/server/node_modules/lodash/_createOver.js new file mode 100644 index 00000000..3b945516 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createOver.js @@ -0,0 +1,27 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + baseUnary = require('./_baseUnary'), + flatRest = require('./_flatRest'); + +/** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ +function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); +} + +module.exports = createOver; diff --git a/src/hello/server/node_modules/lodash/_createPadding.js b/src/hello/server/node_modules/lodash/_createPadding.js new file mode 100644 index 00000000..2124612b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createPadding.js @@ -0,0 +1,33 @@ +var baseRepeat = require('./_baseRepeat'), + baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), + hasUnicode = require('./_hasUnicode'), + stringSize = require('./_stringSize'), + stringToArray = require('./_stringToArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; + +/** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ +function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); +} + +module.exports = createPadding; diff --git a/src/hello/server/node_modules/lodash/_createPartial.js b/src/hello/server/node_modules/lodash/_createPartial.js new file mode 100644 index 00000000..e16c248b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createPartial.js @@ -0,0 +1,43 @@ +var apply = require('./_apply'), + createCtor = require('./_createCtor'), + root = require('./_root'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1; + +/** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ +function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; +} + +module.exports = createPartial; diff --git a/src/hello/server/node_modules/lodash/_createRange.js b/src/hello/server/node_modules/lodash/_createRange.js new file mode 100644 index 00000000..9f52c779 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createRange.js @@ -0,0 +1,30 @@ +var baseRange = require('./_baseRange'), + isIterateeCall = require('./_isIterateeCall'), + toFinite = require('./toFinite'); + +/** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ +function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; +} + +module.exports = createRange; diff --git a/src/hello/server/node_modules/lodash/_createRecurry.js b/src/hello/server/node_modules/lodash/_createRecurry.js new file mode 100644 index 00000000..eb29fb24 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createRecurry.js @@ -0,0 +1,56 @@ +var isLaziable = require('./_isLaziable'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); +} + +module.exports = createRecurry; diff --git a/src/hello/server/node_modules/lodash/_createRelationalOperation.js b/src/hello/server/node_modules/lodash/_createRelationalOperation.js new file mode 100644 index 00000000..a17c6b5e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createRelationalOperation.js @@ -0,0 +1,20 @@ +var toNumber = require('./toNumber'); + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; +} + +module.exports = createRelationalOperation; diff --git a/src/hello/server/node_modules/lodash/_createRound.js b/src/hello/server/node_modules/lodash/_createRound.js new file mode 100644 index 00000000..88be5df3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createRound.js @@ -0,0 +1,35 @@ +var root = require('./_root'), + toInteger = require('./toInteger'), + toNumber = require('./toNumber'), + toString = require('./toString'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite, + nativeMin = Math.min; + +/** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ +function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; +} + +module.exports = createRound; diff --git a/src/hello/server/node_modules/lodash/_createSet.js b/src/hello/server/node_modules/lodash/_createSet.js new file mode 100644 index 00000000..0f644eea --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createSet.js @@ -0,0 +1,19 @@ +var Set = require('./_Set'), + noop = require('./noop'), + setToArray = require('./_setToArray'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +module.exports = createSet; diff --git a/src/hello/server/node_modules/lodash/_createToPairs.js b/src/hello/server/node_modules/lodash/_createToPairs.js new file mode 100644 index 00000000..568417af --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/src/hello/server/node_modules/lodash/_createWrap.js b/src/hello/server/node_modules/lodash/_createWrap.js new file mode 100644 index 00000000..33f0633e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_createWrap.js @@ -0,0 +1,106 @@ +var baseSetData = require('./_baseSetData'), + createBind = require('./_createBind'), + createCurry = require('./_createCurry'), + createHybrid = require('./_createHybrid'), + createPartial = require('./_createPartial'), + getData = require('./_getData'), + mergeData = require('./_mergeData'), + setData = require('./_setData'), + setWrapToString = require('./_setWrapToString'), + toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ +function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); +} + +module.exports = createWrap; diff --git a/src/hello/server/node_modules/lodash/_customDefaultsAssignIn.js b/src/hello/server/node_modules/lodash/_customDefaultsAssignIn.js new file mode 100644 index 00000000..1f49e6fc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_customDefaultsAssignIn.js @@ -0,0 +1,29 @@ +var eq = require('./eq'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ +function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; +} + +module.exports = customDefaultsAssignIn; diff --git a/src/hello/server/node_modules/lodash/_customDefaultsMerge.js b/src/hello/server/node_modules/lodash/_customDefaultsMerge.js new file mode 100644 index 00000000..4cab3175 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_customDefaultsMerge.js @@ -0,0 +1,28 @@ +var baseMerge = require('./_baseMerge'), + isObject = require('./isObject'); + +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; +} + +module.exports = customDefaultsMerge; diff --git a/src/hello/server/node_modules/lodash/_customOmitClone.js b/src/hello/server/node_modules/lodash/_customOmitClone.js new file mode 100644 index 00000000..968db2ef --- /dev/null +++ b/src/hello/server/node_modules/lodash/_customOmitClone.js @@ -0,0 +1,16 @@ +var isPlainObject = require('./isPlainObject'); + +/** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ +function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; +} + +module.exports = customOmitClone; diff --git a/src/hello/server/node_modules/lodash/_deburrLetter.js b/src/hello/server/node_modules/lodash/_deburrLetter.js new file mode 100644 index 00000000..3e531edc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_deburrLetter.js @@ -0,0 +1,71 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map Latin Unicode letters to basic Latin letters. */ +var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' +}; + +/** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ +var deburrLetter = basePropertyOf(deburredLetters); + +module.exports = deburrLetter; diff --git a/src/hello/server/node_modules/lodash/_defineProperty.js b/src/hello/server/node_modules/lodash/_defineProperty.js new file mode 100644 index 00000000..b6116d92 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_defineProperty.js @@ -0,0 +1,11 @@ +var getNative = require('./_getNative'); + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +module.exports = defineProperty; diff --git a/src/hello/server/node_modules/lodash/_equalArrays.js b/src/hello/server/node_modules/lodash/_equalArrays.js new file mode 100644 index 00000000..824228c7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_equalArrays.js @@ -0,0 +1,84 @@ +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'), + cacheHas = require('./_cacheHas'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; +} + +module.exports = equalArrays; diff --git a/src/hello/server/node_modules/lodash/_equalByTag.js b/src/hello/server/node_modules/lodash/_equalByTag.js new file mode 100644 index 00000000..71919e86 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_equalByTag.js @@ -0,0 +1,112 @@ +var Symbol = require('./_Symbol'), + Uint8Array = require('./_Uint8Array'), + eq = require('./eq'), + equalArrays = require('./_equalArrays'), + mapToArray = require('./_mapToArray'), + setToArray = require('./_setToArray'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; +} + +module.exports = equalByTag; diff --git a/src/hello/server/node_modules/lodash/_equalObjects.js b/src/hello/server/node_modules/lodash/_equalObjects.js new file mode 100644 index 00000000..cdaacd2d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_equalObjects.js @@ -0,0 +1,90 @@ +var getAllKeys = require('./_getAllKeys'); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} + +module.exports = equalObjects; diff --git a/src/hello/server/node_modules/lodash/_escapeHtmlChar.js b/src/hello/server/node_modules/lodash/_escapeHtmlChar.js new file mode 100644 index 00000000..7ca68ee6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_escapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}; + +/** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +var escapeHtmlChar = basePropertyOf(htmlEscapes); + +module.exports = escapeHtmlChar; diff --git a/src/hello/server/node_modules/lodash/_escapeStringChar.js b/src/hello/server/node_modules/lodash/_escapeStringChar.js new file mode 100644 index 00000000..44eca96c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_escapeStringChar.js @@ -0,0 +1,22 @@ +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +module.exports = escapeStringChar; diff --git a/src/hello/server/node_modules/lodash/_flatRest.js b/src/hello/server/node_modules/lodash/_flatRest.js new file mode 100644 index 00000000..94ab6cca --- /dev/null +++ b/src/hello/server/node_modules/lodash/_flatRest.js @@ -0,0 +1,16 @@ +var flatten = require('./flatten'), + overRest = require('./_overRest'), + setToString = require('./_setToString'); + +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} + +module.exports = flatRest; diff --git a/src/hello/server/node_modules/lodash/_freeGlobal.js b/src/hello/server/node_modules/lodash/_freeGlobal.js new file mode 100644 index 00000000..bbec998f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_freeGlobal.js @@ -0,0 +1,4 @@ +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +module.exports = freeGlobal; diff --git a/src/hello/server/node_modules/lodash/_getAllKeys.js b/src/hello/server/node_modules/lodash/_getAllKeys.js new file mode 100644 index 00000000..a9ce6995 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getAllKeys.js @@ -0,0 +1,16 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbols = require('./_getSymbols'), + keys = require('./keys'); + +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); +} + +module.exports = getAllKeys; diff --git a/src/hello/server/node_modules/lodash/_getAllKeysIn.js b/src/hello/server/node_modules/lodash/_getAllKeysIn.js new file mode 100644 index 00000000..1b466784 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getAllKeysIn.js @@ -0,0 +1,17 @@ +var baseGetAllKeys = require('./_baseGetAllKeys'), + getSymbolsIn = require('./_getSymbolsIn'), + keysIn = require('./keysIn'); + +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} + +module.exports = getAllKeysIn; diff --git a/src/hello/server/node_modules/lodash/_getData.js b/src/hello/server/node_modules/lodash/_getData.js new file mode 100644 index 00000000..a1fe7b77 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getData.js @@ -0,0 +1,15 @@ +var metaMap = require('./_metaMap'), + noop = require('./noop'); + +/** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ +var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); +}; + +module.exports = getData; diff --git a/src/hello/server/node_modules/lodash/_getFuncName.js b/src/hello/server/node_modules/lodash/_getFuncName.js new file mode 100644 index 00000000..21e15b33 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getFuncName.js @@ -0,0 +1,31 @@ +var realNames = require('./_realNames'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ +function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; +} + +module.exports = getFuncName; diff --git a/src/hello/server/node_modules/lodash/_getHolder.js b/src/hello/server/node_modules/lodash/_getHolder.js new file mode 100644 index 00000000..65e94b5c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getHolder.js @@ -0,0 +1,13 @@ +/** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ +function getHolder(func) { + var object = func; + return object.placeholder; +} + +module.exports = getHolder; diff --git a/src/hello/server/node_modules/lodash/_getMapData.js b/src/hello/server/node_modules/lodash/_getMapData.js new file mode 100644 index 00000000..17f63032 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/src/hello/server/node_modules/lodash/_getMatchData.js b/src/hello/server/node_modules/lodash/_getMatchData.js new file mode 100644 index 00000000..2cc70f91 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getMatchData.js @@ -0,0 +1,24 @@ +var isStrictComparable = require('./_isStrictComparable'), + keys = require('./keys'); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; diff --git a/src/hello/server/node_modules/lodash/_getNative.js b/src/hello/server/node_modules/lodash/_getNative.js new file mode 100644 index 00000000..97a622b8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getNative.js @@ -0,0 +1,17 @@ +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +module.exports = getNative; diff --git a/src/hello/server/node_modules/lodash/_getPrototype.js b/src/hello/server/node_modules/lodash/_getPrototype.js new file mode 100644 index 00000000..e8086121 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getPrototype.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; diff --git a/src/hello/server/node_modules/lodash/_getRawTag.js b/src/hello/server/node_modules/lodash/_getRawTag.js new file mode 100644 index 00000000..49a95c9c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getRawTag.js @@ -0,0 +1,46 @@ +var Symbol = require('./_Symbol'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; diff --git a/src/hello/server/node_modules/lodash/_getSymbols.js b/src/hello/server/node_modules/lodash/_getSymbols.js new file mode 100644 index 00000000..7d6eafeb --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getSymbols.js @@ -0,0 +1,30 @@ +var arrayFilter = require('./_arrayFilter'), + stubArray = require('./stubArray'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; + +module.exports = getSymbols; diff --git a/src/hello/server/node_modules/lodash/_getSymbolsIn.js b/src/hello/server/node_modules/lodash/_getSymbolsIn.js new file mode 100644 index 00000000..cec0855a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getSymbolsIn.js @@ -0,0 +1,25 @@ +var arrayPush = require('./_arrayPush'), + getPrototype = require('./_getPrototype'), + getSymbols = require('./_getSymbols'), + stubArray = require('./stubArray'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; + +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; +}; + +module.exports = getSymbolsIn; diff --git a/src/hello/server/node_modules/lodash/_getTag.js b/src/hello/server/node_modules/lodash/_getTag.js new file mode 100644 index 00000000..deaf89d5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getTag.js @@ -0,0 +1,58 @@ +var DataView = require('./_DataView'), + Map = require('./_Map'), + Promise = require('./_Promise'), + Set = require('./_Set'), + WeakMap = require('./_WeakMap'), + baseGetTag = require('./_baseGetTag'), + toSource = require('./_toSource'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; + +var dataViewTag = '[object DataView]'; + +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; + +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; +} + +module.exports = getTag; diff --git a/src/hello/server/node_modules/lodash/_getValue.js b/src/hello/server/node_modules/lodash/_getValue.js new file mode 100644 index 00000000..5f7d7736 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/src/hello/server/node_modules/lodash/_getView.js b/src/hello/server/node_modules/lodash/_getView.js new file mode 100644 index 00000000..df1e5d44 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getView.js @@ -0,0 +1,33 @@ +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ +function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; +} + +module.exports = getView; diff --git a/src/hello/server/node_modules/lodash/_getWrapDetails.js b/src/hello/server/node_modules/lodash/_getWrapDetails.js new file mode 100644 index 00000000..3bcc6e48 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_getWrapDetails.js @@ -0,0 +1,17 @@ +/** Used to match wrap detail comments. */ +var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + +/** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ +function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; +} + +module.exports = getWrapDetails; diff --git a/src/hello/server/node_modules/lodash/_hasPath.js b/src/hello/server/node_modules/lodash/_hasPath.js new file mode 100644 index 00000000..93dbde15 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hasPath.js @@ -0,0 +1,39 @@ +var castPath = require('./_castPath'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isIndex = require('./_isIndex'), + isLength = require('./isLength'), + toKey = require('./_toKey'); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} + +module.exports = hasPath; diff --git a/src/hello/server/node_modules/lodash/_hasUnicode.js b/src/hello/server/node_modules/lodash/_hasUnicode.js new file mode 100644 index 00000000..cb6ca15f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hasUnicode.js @@ -0,0 +1,26 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; diff --git a/src/hello/server/node_modules/lodash/_hasUnicodeWord.js b/src/hello/server/node_modules/lodash/_hasUnicodeWord.js new file mode 100644 index 00000000..95d52c44 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hasUnicodeWord.js @@ -0,0 +1,15 @@ +/** Used to detect strings that need a more robust regexp to match words. */ +var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + +/** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ +function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); +} + +module.exports = hasUnicodeWord; diff --git a/src/hello/server/node_modules/lodash/_hashClear.js b/src/hello/server/node_modules/lodash/_hashClear.js new file mode 100644 index 00000000..5d4b70cc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hashClear.js @@ -0,0 +1,15 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; diff --git a/src/hello/server/node_modules/lodash/_hashDelete.js b/src/hello/server/node_modules/lodash/_hashDelete.js new file mode 100644 index 00000000..ea9dabf1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hashDelete.js @@ -0,0 +1,17 @@ +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +module.exports = hashDelete; diff --git a/src/hello/server/node_modules/lodash/_hashGet.js b/src/hello/server/node_modules/lodash/_hashGet.js new file mode 100644 index 00000000..1fc2f34b --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hashGet.js @@ -0,0 +1,30 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +module.exports = hashGet; diff --git a/src/hello/server/node_modules/lodash/_hashHas.js b/src/hello/server/node_modules/lodash/_hashHas.js new file mode 100644 index 00000000..281a5517 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hashHas.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +module.exports = hashHas; diff --git a/src/hello/server/node_modules/lodash/_hashSet.js b/src/hello/server/node_modules/lodash/_hashSet.js new file mode 100644 index 00000000..e1055283 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_hashSet.js @@ -0,0 +1,23 @@ +var nativeCreate = require('./_nativeCreate'); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; diff --git a/src/hello/server/node_modules/lodash/_initCloneArray.js b/src/hello/server/node_modules/lodash/_initCloneArray.js new file mode 100644 index 00000000..078c15af --- /dev/null +++ b/src/hello/server/node_modules/lodash/_initCloneArray.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} + +module.exports = initCloneArray; diff --git a/src/hello/server/node_modules/lodash/_initCloneByTag.js b/src/hello/server/node_modules/lodash/_initCloneByTag.js new file mode 100644 index 00000000..f69a008c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_initCloneByTag.js @@ -0,0 +1,77 @@ +var cloneArrayBuffer = require('./_cloneArrayBuffer'), + cloneDataView = require('./_cloneDataView'), + cloneRegExp = require('./_cloneRegExp'), + cloneSymbol = require('./_cloneSymbol'), + cloneTypedArray = require('./_cloneTypedArray'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } +} + +module.exports = initCloneByTag; diff --git a/src/hello/server/node_modules/lodash/_initCloneObject.js b/src/hello/server/node_modules/lodash/_initCloneObject.js new file mode 100644 index 00000000..5a13e64a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_initCloneObject.js @@ -0,0 +1,18 @@ +var baseCreate = require('./_baseCreate'), + getPrototype = require('./_getPrototype'), + isPrototype = require('./_isPrototype'); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +module.exports = initCloneObject; diff --git a/src/hello/server/node_modules/lodash/_insertWrapDetails.js b/src/hello/server/node_modules/lodash/_insertWrapDetails.js new file mode 100644 index 00000000..e7908086 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_insertWrapDetails.js @@ -0,0 +1,23 @@ +/** Used to match wrap detail comments. */ +var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; + +/** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ +function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); +} + +module.exports = insertWrapDetails; diff --git a/src/hello/server/node_modules/lodash/_isFlattenable.js b/src/hello/server/node_modules/lodash/_isFlattenable.js new file mode 100644 index 00000000..4cc2c249 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isFlattenable.js @@ -0,0 +1,20 @@ +var Symbol = require('./_Symbol'), + isArguments = require('./isArguments'), + isArray = require('./isArray'); + +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +module.exports = isFlattenable; diff --git a/src/hello/server/node_modules/lodash/_isIndex.js b/src/hello/server/node_modules/lodash/_isIndex.js new file mode 100644 index 00000000..061cd390 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isIndex.js @@ -0,0 +1,25 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +module.exports = isIndex; diff --git a/src/hello/server/node_modules/lodash/_isIterateeCall.js b/src/hello/server/node_modules/lodash/_isIterateeCall.js new file mode 100644 index 00000000..a0bb5a9c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isIterateeCall.js @@ -0,0 +1,30 @@ +var eq = require('./eq'), + isArrayLike = require('./isArrayLike'), + isIndex = require('./_isIndex'), + isObject = require('./isObject'); + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +module.exports = isIterateeCall; diff --git a/src/hello/server/node_modules/lodash/_isKey.js b/src/hello/server/node_modules/lodash/_isKey.js new file mode 100644 index 00000000..ff08b068 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isKey.js @@ -0,0 +1,29 @@ +var isArray = require('./isArray'), + isSymbol = require('./isSymbol'); + +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); +} + +module.exports = isKey; diff --git a/src/hello/server/node_modules/lodash/_isKeyable.js b/src/hello/server/node_modules/lodash/_isKeyable.js new file mode 100644 index 00000000..39f1828d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isKeyable.js @@ -0,0 +1,15 @@ +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; diff --git a/src/hello/server/node_modules/lodash/_isLaziable.js b/src/hello/server/node_modules/lodash/_isLaziable.js new file mode 100644 index 00000000..a57c4f2d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isLaziable.js @@ -0,0 +1,28 @@ +var LazyWrapper = require('./_LazyWrapper'), + getData = require('./_getData'), + getFuncName = require('./_getFuncName'), + lodash = require('./wrapperLodash'); + +/** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ +function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; +} + +module.exports = isLaziable; diff --git a/src/hello/server/node_modules/lodash/_isMaskable.js b/src/hello/server/node_modules/lodash/_isMaskable.js new file mode 100644 index 00000000..eb98d09f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/src/hello/server/node_modules/lodash/_isMasked.js b/src/hello/server/node_modules/lodash/_isMasked.js new file mode 100644 index 00000000..4b0f21ba --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/src/hello/server/node_modules/lodash/_isPrototype.js b/src/hello/server/node_modules/lodash/_isPrototype.js new file mode 100644 index 00000000..0f29498d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isPrototype.js @@ -0,0 +1,18 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +module.exports = isPrototype; diff --git a/src/hello/server/node_modules/lodash/_isStrictComparable.js b/src/hello/server/node_modules/lodash/_isStrictComparable.js new file mode 100644 index 00000000..b59f40b8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_isStrictComparable.js @@ -0,0 +1,15 @@ +var isObject = require('./isObject'); + +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} + +module.exports = isStrictComparable; diff --git a/src/hello/server/node_modules/lodash/_iteratorToArray.js b/src/hello/server/node_modules/lodash/_iteratorToArray.js new file mode 100644 index 00000000..47685664 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_iteratorToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ +function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; +} + +module.exports = iteratorToArray; diff --git a/src/hello/server/node_modules/lodash/_lazyClone.js b/src/hello/server/node_modules/lodash/_lazyClone.js new file mode 100644 index 00000000..d8a51f87 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_lazyClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ +function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; +} + +module.exports = lazyClone; diff --git a/src/hello/server/node_modules/lodash/_lazyReverse.js b/src/hello/server/node_modules/lodash/_lazyReverse.js new file mode 100644 index 00000000..c5b52190 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_lazyReverse.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'); + +/** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ +function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; +} + +module.exports = lazyReverse; diff --git a/src/hello/server/node_modules/lodash/_lazyValue.js b/src/hello/server/node_modules/lodash/_lazyValue.js new file mode 100644 index 00000000..371ca8d2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_lazyValue.js @@ -0,0 +1,69 @@ +var baseWrapperValue = require('./_baseWrapperValue'), + getView = require('./_getView'), + isArray = require('./isArray'); + +/** Used to indicate the type of lazy iteratees. */ +var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ +function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; +} + +module.exports = lazyValue; diff --git a/src/hello/server/node_modules/lodash/_listCacheClear.js b/src/hello/server/node_modules/lodash/_listCacheClear.js new file mode 100644 index 00000000..acbe39a5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,13 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; diff --git a/src/hello/server/node_modules/lodash/_listCacheDelete.js b/src/hello/server/node_modules/lodash/_listCacheDelete.js new file mode 100644 index 00000000..b1384ade --- /dev/null +++ b/src/hello/server/node_modules/lodash/_listCacheDelete.js @@ -0,0 +1,35 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +module.exports = listCacheDelete; diff --git a/src/hello/server/node_modules/lodash/_listCacheGet.js b/src/hello/server/node_modules/lodash/_listCacheGet.js new file mode 100644 index 00000000..f8192fc3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/src/hello/server/node_modules/lodash/_listCacheHas.js b/src/hello/server/node_modules/lodash/_listCacheHas.js new file mode 100644 index 00000000..2adf6714 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_listCacheHas.js @@ -0,0 +1,16 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; diff --git a/src/hello/server/node_modules/lodash/_listCacheSet.js b/src/hello/server/node_modules/lodash/_listCacheSet.js new file mode 100644 index 00000000..5855c95e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,26 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/src/hello/server/node_modules/lodash/_mapCacheClear.js b/src/hello/server/node_modules/lodash/_mapCacheClear.js new file mode 100644 index 00000000..bc9ca204 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_mapCacheClear.js @@ -0,0 +1,21 @@ +var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), + Map = require('./_Map'); + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +module.exports = mapCacheClear; diff --git a/src/hello/server/node_modules/lodash/_mapCacheDelete.js b/src/hello/server/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 00000000..946ca3c9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; diff --git a/src/hello/server/node_modules/lodash/_mapCacheGet.js b/src/hello/server/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 00000000..f29f55cf --- /dev/null +++ b/src/hello/server/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/src/hello/server/node_modules/lodash/_mapCacheHas.js b/src/hello/server/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 00000000..a1214c02 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/src/hello/server/node_modules/lodash/_mapCacheSet.js b/src/hello/server/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 00000000..73468492 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,22 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; diff --git a/src/hello/server/node_modules/lodash/_mapToArray.js b/src/hello/server/node_modules/lodash/_mapToArray.js new file mode 100644 index 00000000..fe3dd531 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_mapToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; diff --git a/src/hello/server/node_modules/lodash/_matchesStrictComparable.js b/src/hello/server/node_modules/lodash/_matchesStrictComparable.js new file mode 100644 index 00000000..f608af9e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_matchesStrictComparable.js @@ -0,0 +1,20 @@ +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} + +module.exports = matchesStrictComparable; diff --git a/src/hello/server/node_modules/lodash/_memoizeCapped.js b/src/hello/server/node_modules/lodash/_memoizeCapped.js new file mode 100644 index 00000000..7f71c8fb --- /dev/null +++ b/src/hello/server/node_modules/lodash/_memoizeCapped.js @@ -0,0 +1,26 @@ +var memoize = require('./memoize'); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; + +/** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; +} + +module.exports = memoizeCapped; diff --git a/src/hello/server/node_modules/lodash/_mergeData.js b/src/hello/server/node_modules/lodash/_mergeData.js new file mode 100644 index 00000000..cb570f97 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_mergeData.js @@ -0,0 +1,90 @@ +var composeArgs = require('./_composeArgs'), + composeArgsRight = require('./_composeArgsRight'), + replaceHolders = require('./_replaceHolders'); + +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ +function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; +} + +module.exports = mergeData; diff --git a/src/hello/server/node_modules/lodash/_metaMap.js b/src/hello/server/node_modules/lodash/_metaMap.js new file mode 100644 index 00000000..0157a0b0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_metaMap.js @@ -0,0 +1,6 @@ +var WeakMap = require('./_WeakMap'); + +/** Used to store function metadata. */ +var metaMap = WeakMap && new WeakMap; + +module.exports = metaMap; diff --git a/src/hello/server/node_modules/lodash/_nativeCreate.js b/src/hello/server/node_modules/lodash/_nativeCreate.js new file mode 100644 index 00000000..c7aede85 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_nativeCreate.js @@ -0,0 +1,6 @@ +var getNative = require('./_getNative'); + +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; diff --git a/src/hello/server/node_modules/lodash/_nativeKeys.js b/src/hello/server/node_modules/lodash/_nativeKeys.js new file mode 100644 index 00000000..479a104a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_nativeKeys.js @@ -0,0 +1,6 @@ +var overArg = require('./_overArg'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +module.exports = nativeKeys; diff --git a/src/hello/server/node_modules/lodash/_nativeKeysIn.js b/src/hello/server/node_modules/lodash/_nativeKeysIn.js new file mode 100644 index 00000000..00ee5059 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_nativeKeysIn.js @@ -0,0 +1,20 @@ +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +module.exports = nativeKeysIn; diff --git a/src/hello/server/node_modules/lodash/_nodeUtil.js b/src/hello/server/node_modules/lodash/_nodeUtil.js new file mode 100644 index 00000000..983d78f7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_nodeUtil.js @@ -0,0 +1,30 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +module.exports = nodeUtil; diff --git a/src/hello/server/node_modules/lodash/_objectToString.js b/src/hello/server/node_modules/lodash/_objectToString.js new file mode 100644 index 00000000..c614ec09 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_objectToString.js @@ -0,0 +1,22 @@ +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +module.exports = objectToString; diff --git a/src/hello/server/node_modules/lodash/_overArg.js b/src/hello/server/node_modules/lodash/_overArg.js new file mode 100644 index 00000000..651c5c55 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_overArg.js @@ -0,0 +1,15 @@ +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; diff --git a/src/hello/server/node_modules/lodash/_overRest.js b/src/hello/server/node_modules/lodash/_overRest.js new file mode 100644 index 00000000..c7cdef33 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_overRest.js @@ -0,0 +1,36 @@ +var apply = require('./_apply'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +module.exports = overRest; diff --git a/src/hello/server/node_modules/lodash/_parent.js b/src/hello/server/node_modules/lodash/_parent.js new file mode 100644 index 00000000..f174328f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_parent.js @@ -0,0 +1,16 @@ +var baseGet = require('./_baseGet'), + baseSlice = require('./_baseSlice'); + +/** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ +function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); +} + +module.exports = parent; diff --git a/src/hello/server/node_modules/lodash/_reEscape.js b/src/hello/server/node_modules/lodash/_reEscape.js new file mode 100644 index 00000000..7f47eda6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_reEscape.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEscape = /<%-([\s\S]+?)%>/g; + +module.exports = reEscape; diff --git a/src/hello/server/node_modules/lodash/_reEvaluate.js b/src/hello/server/node_modules/lodash/_reEvaluate.js new file mode 100644 index 00000000..6adfc312 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_reEvaluate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reEvaluate = /<%([\s\S]+?)%>/g; + +module.exports = reEvaluate; diff --git a/src/hello/server/node_modules/lodash/_reInterpolate.js b/src/hello/server/node_modules/lodash/_reInterpolate.js new file mode 100644 index 00000000..d02ff0b2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_reInterpolate.js @@ -0,0 +1,4 @@ +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/src/hello/server/node_modules/lodash/_realNames.js b/src/hello/server/node_modules/lodash/_realNames.js new file mode 100644 index 00000000..aa0d5292 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_realNames.js @@ -0,0 +1,4 @@ +/** Used to lookup unminified function names. */ +var realNames = {}; + +module.exports = realNames; diff --git a/src/hello/server/node_modules/lodash/_reorder.js b/src/hello/server/node_modules/lodash/_reorder.js new file mode 100644 index 00000000..a3502b05 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_reorder.js @@ -0,0 +1,29 @@ +var copyArray = require('./_copyArray'), + isIndex = require('./_isIndex'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ +function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; +} + +module.exports = reorder; diff --git a/src/hello/server/node_modules/lodash/_replaceHolders.js b/src/hello/server/node_modules/lodash/_replaceHolders.js new file mode 100644 index 00000000..74360ec4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_replaceHolders.js @@ -0,0 +1,29 @@ +/** Used as the internal argument placeholder. */ +var PLACEHOLDER = '__lodash_placeholder__'; + +/** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ +function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; +} + +module.exports = replaceHolders; diff --git a/src/hello/server/node_modules/lodash/_root.js b/src/hello/server/node_modules/lodash/_root.js new file mode 100644 index 00000000..d2852bed --- /dev/null +++ b/src/hello/server/node_modules/lodash/_root.js @@ -0,0 +1,9 @@ +var freeGlobal = require('./_freeGlobal'); + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; diff --git a/src/hello/server/node_modules/lodash/_safeGet.js b/src/hello/server/node_modules/lodash/_safeGet.js new file mode 100644 index 00000000..b070897d --- /dev/null +++ b/src/hello/server/node_modules/lodash/_safeGet.js @@ -0,0 +1,21 @@ +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +module.exports = safeGet; diff --git a/src/hello/server/node_modules/lodash/_setCacheAdd.js b/src/hello/server/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 00000000..1081a744 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/src/hello/server/node_modules/lodash/_setCacheHas.js b/src/hello/server/node_modules/lodash/_setCacheHas.js new file mode 100644 index 00000000..9a492556 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/src/hello/server/node_modules/lodash/_setData.js b/src/hello/server/node_modules/lodash/_setData.js new file mode 100644 index 00000000..e5cf3eb9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_setData.js @@ -0,0 +1,20 @@ +var baseSetData = require('./_baseSetData'), + shortOut = require('./_shortOut'); + +/** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ +var setData = shortOut(baseSetData); + +module.exports = setData; diff --git a/src/hello/server/node_modules/lodash/_setToArray.js b/src/hello/server/node_modules/lodash/_setToArray.js new file mode 100644 index 00000000..b87f0741 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_setToArray.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; diff --git a/src/hello/server/node_modules/lodash/_setToPairs.js b/src/hello/server/node_modules/lodash/_setToPairs.js new file mode 100644 index 00000000..36ad37a0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/src/hello/server/node_modules/lodash/_setToString.js b/src/hello/server/node_modules/lodash/_setToString.js new file mode 100644 index 00000000..6ca84196 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_setToString.js @@ -0,0 +1,14 @@ +var baseSetToString = require('./_baseSetToString'), + shortOut = require('./_shortOut'); + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +module.exports = setToString; diff --git a/src/hello/server/node_modules/lodash/_setWrapToString.js b/src/hello/server/node_modules/lodash/_setWrapToString.js new file mode 100644 index 00000000..decdc449 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_setWrapToString.js @@ -0,0 +1,21 @@ +var getWrapDetails = require('./_getWrapDetails'), + insertWrapDetails = require('./_insertWrapDetails'), + setToString = require('./_setToString'), + updateWrapDetails = require('./_updateWrapDetails'); + +/** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ +function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); +} + +module.exports = setWrapToString; diff --git a/src/hello/server/node_modules/lodash/_shortOut.js b/src/hello/server/node_modules/lodash/_shortOut.js new file mode 100644 index 00000000..3300a079 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_shortOut.js @@ -0,0 +1,37 @@ +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +module.exports = shortOut; diff --git a/src/hello/server/node_modules/lodash/_shuffleSelf.js b/src/hello/server/node_modules/lodash/_shuffleSelf.js new file mode 100644 index 00000000..8bcc4f5c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_shuffleSelf.js @@ -0,0 +1,28 @@ +var baseRandom = require('./_baseRandom'); + +/** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ +function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; +} + +module.exports = shuffleSelf; diff --git a/src/hello/server/node_modules/lodash/_stackClear.js b/src/hello/server/node_modules/lodash/_stackClear.js new file mode 100644 index 00000000..ce8e5a92 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stackClear.js @@ -0,0 +1,15 @@ +var ListCache = require('./_ListCache'); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; diff --git a/src/hello/server/node_modules/lodash/_stackDelete.js b/src/hello/server/node_modules/lodash/_stackDelete.js new file mode 100644 index 00000000..ff9887ab --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stackDelete.js @@ -0,0 +1,18 @@ +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +module.exports = stackDelete; diff --git a/src/hello/server/node_modules/lodash/_stackGet.js b/src/hello/server/node_modules/lodash/_stackGet.js new file mode 100644 index 00000000..1cdf0040 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stackGet.js @@ -0,0 +1,14 @@ +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +module.exports = stackGet; diff --git a/src/hello/server/node_modules/lodash/_stackHas.js b/src/hello/server/node_modules/lodash/_stackHas.js new file mode 100644 index 00000000..16a3ad11 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stackHas.js @@ -0,0 +1,14 @@ +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +module.exports = stackHas; diff --git a/src/hello/server/node_modules/lodash/_stackSet.js b/src/hello/server/node_modules/lodash/_stackSet.js new file mode 100644 index 00000000..b790ac5f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stackSet.js @@ -0,0 +1,34 @@ +var ListCache = require('./_ListCache'), + Map = require('./_Map'), + MapCache = require('./_MapCache'); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +module.exports = stackSet; diff --git a/src/hello/server/node_modules/lodash/_strictIndexOf.js b/src/hello/server/node_modules/lodash/_strictIndexOf.js new file mode 100644 index 00000000..0486a495 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_strictIndexOf.js @@ -0,0 +1,23 @@ +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = strictIndexOf; diff --git a/src/hello/server/node_modules/lodash/_strictLastIndexOf.js b/src/hello/server/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 00000000..d7310dcc --- /dev/null +++ b/src/hello/server/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf; diff --git a/src/hello/server/node_modules/lodash/_stringSize.js b/src/hello/server/node_modules/lodash/_stringSize.js new file mode 100644 index 00000000..17ef462a --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stringSize.js @@ -0,0 +1,18 @@ +var asciiSize = require('./_asciiSize'), + hasUnicode = require('./_hasUnicode'), + unicodeSize = require('./_unicodeSize'); + +/** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ +function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); +} + +module.exports = stringSize; diff --git a/src/hello/server/node_modules/lodash/_stringToArray.js b/src/hello/server/node_modules/lodash/_stringToArray.js new file mode 100644 index 00000000..d161158c --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stringToArray.js @@ -0,0 +1,18 @@ +var asciiToArray = require('./_asciiToArray'), + hasUnicode = require('./_hasUnicode'), + unicodeToArray = require('./_unicodeToArray'); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; diff --git a/src/hello/server/node_modules/lodash/_stringToPath.js b/src/hello/server/node_modules/lodash/_stringToPath.js new file mode 100644 index 00000000..8f39f8a2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_stringToPath.js @@ -0,0 +1,27 @@ +var memoizeCapped = require('./_memoizeCapped'); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +module.exports = stringToPath; diff --git a/src/hello/server/node_modules/lodash/_toKey.js b/src/hello/server/node_modules/lodash/_toKey.js new file mode 100644 index 00000000..c6d645c4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_toKey.js @@ -0,0 +1,21 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; diff --git a/src/hello/server/node_modules/lodash/_toSource.js b/src/hello/server/node_modules/lodash/_toSource.js new file mode 100644 index 00000000..a020b386 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_toSource.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +module.exports = toSource; diff --git a/src/hello/server/node_modules/lodash/_trimmedEndIndex.js b/src/hello/server/node_modules/lodash/_trimmedEndIndex.js new file mode 100644 index 00000000..139439ad --- /dev/null +++ b/src/hello/server/node_modules/lodash/_trimmedEndIndex.js @@ -0,0 +1,19 @@ +/** Used to match a single whitespace character. */ +var reWhitespace = /\s/; + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ +function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; +} + +module.exports = trimmedEndIndex; diff --git a/src/hello/server/node_modules/lodash/_unescapeHtmlChar.js b/src/hello/server/node_modules/lodash/_unescapeHtmlChar.js new file mode 100644 index 00000000..a71fecb3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_unescapeHtmlChar.js @@ -0,0 +1,21 @@ +var basePropertyOf = require('./_basePropertyOf'); + +/** Used to map HTML entities to characters. */ +var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}; + +/** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ +var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + +module.exports = unescapeHtmlChar; diff --git a/src/hello/server/node_modules/lodash/_unicodeSize.js b/src/hello/server/node_modules/lodash/_unicodeSize.js new file mode 100644 index 00000000..68137ec2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_unicodeSize.js @@ -0,0 +1,44 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ +function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; +} + +module.exports = unicodeSize; diff --git a/src/hello/server/node_modules/lodash/_unicodeToArray.js b/src/hello/server/node_modules/lodash/_unicodeToArray.js new file mode 100644 index 00000000..2a725c06 --- /dev/null +++ b/src/hello/server/node_modules/lodash/_unicodeToArray.js @@ -0,0 +1,40 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; diff --git a/src/hello/server/node_modules/lodash/_unicodeWords.js b/src/hello/server/node_modules/lodash/_unicodeWords.js new file mode 100644 index 00000000..e72e6e0f --- /dev/null +++ b/src/hello/server/node_modules/lodash/_unicodeWords.js @@ -0,0 +1,69 @@ +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]", + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq; + +/** Used to match complex or compound words. */ +var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji +].join('|'), 'g'); + +/** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ +function unicodeWords(string) { + return string.match(reUnicodeWord) || []; +} + +module.exports = unicodeWords; diff --git a/src/hello/server/node_modules/lodash/_updateWrapDetails.js b/src/hello/server/node_modules/lodash/_updateWrapDetails.js new file mode 100644 index 00000000..8759fbdf --- /dev/null +++ b/src/hello/server/node_modules/lodash/_updateWrapDetails.js @@ -0,0 +1,46 @@ +var arrayEach = require('./_arrayEach'), + arrayIncludes = require('./_arrayIncludes'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + +/** Used to associate wrap methods with their bit flags. */ +var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] +]; + +/** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ +function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); +} + +module.exports = updateWrapDetails; diff --git a/src/hello/server/node_modules/lodash/_wrapperClone.js b/src/hello/server/node_modules/lodash/_wrapperClone.js new file mode 100644 index 00000000..7bb58a2e --- /dev/null +++ b/src/hello/server/node_modules/lodash/_wrapperClone.js @@ -0,0 +1,23 @@ +var LazyWrapper = require('./_LazyWrapper'), + LodashWrapper = require('./_LodashWrapper'), + copyArray = require('./_copyArray'); + +/** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ +function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; +} + +module.exports = wrapperClone; diff --git a/src/hello/server/node_modules/lodash/add.js b/src/hello/server/node_modules/lodash/add.js new file mode 100644 index 00000000..f0695156 --- /dev/null +++ b/src/hello/server/node_modules/lodash/add.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ +var add = createMathOperation(function(augend, addend) { + return augend + addend; +}, 0); + +module.exports = add; diff --git a/src/hello/server/node_modules/lodash/after.js b/src/hello/server/node_modules/lodash/after.js new file mode 100644 index 00000000..3900c979 --- /dev/null +++ b/src/hello/server/node_modules/lodash/after.js @@ -0,0 +1,42 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ +function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/src/hello/server/node_modules/lodash/array.js b/src/hello/server/node_modules/lodash/array.js new file mode 100644 index 00000000..af688d3e --- /dev/null +++ b/src/hello/server/node_modules/lodash/array.js @@ -0,0 +1,67 @@ +module.exports = { + 'chunk': require('./chunk'), + 'compact': require('./compact'), + 'concat': require('./concat'), + 'difference': require('./difference'), + 'differenceBy': require('./differenceBy'), + 'differenceWith': require('./differenceWith'), + 'drop': require('./drop'), + 'dropRight': require('./dropRight'), + 'dropRightWhile': require('./dropRightWhile'), + 'dropWhile': require('./dropWhile'), + 'fill': require('./fill'), + 'findIndex': require('./findIndex'), + 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), + 'flatten': require('./flatten'), + 'flattenDeep': require('./flattenDeep'), + 'flattenDepth': require('./flattenDepth'), + 'fromPairs': require('./fromPairs'), + 'head': require('./head'), + 'indexOf': require('./indexOf'), + 'initial': require('./initial'), + 'intersection': require('./intersection'), + 'intersectionBy': require('./intersectionBy'), + 'intersectionWith': require('./intersectionWith'), + 'join': require('./join'), + 'last': require('./last'), + 'lastIndexOf': require('./lastIndexOf'), + 'nth': require('./nth'), + 'pull': require('./pull'), + 'pullAll': require('./pullAll'), + 'pullAllBy': require('./pullAllBy'), + 'pullAllWith': require('./pullAllWith'), + 'pullAt': require('./pullAt'), + 'remove': require('./remove'), + 'reverse': require('./reverse'), + 'slice': require('./slice'), + 'sortedIndex': require('./sortedIndex'), + 'sortedIndexBy': require('./sortedIndexBy'), + 'sortedIndexOf': require('./sortedIndexOf'), + 'sortedLastIndex': require('./sortedLastIndex'), + 'sortedLastIndexBy': require('./sortedLastIndexBy'), + 'sortedLastIndexOf': require('./sortedLastIndexOf'), + 'sortedUniq': require('./sortedUniq'), + 'sortedUniqBy': require('./sortedUniqBy'), + 'tail': require('./tail'), + 'take': require('./take'), + 'takeRight': require('./takeRight'), + 'takeRightWhile': require('./takeRightWhile'), + 'takeWhile': require('./takeWhile'), + 'union': require('./union'), + 'unionBy': require('./unionBy'), + 'unionWith': require('./unionWith'), + 'uniq': require('./uniq'), + 'uniqBy': require('./uniqBy'), + 'uniqWith': require('./uniqWith'), + 'unzip': require('./unzip'), + 'unzipWith': require('./unzipWith'), + 'without': require('./without'), + 'xor': require('./xor'), + 'xorBy': require('./xorBy'), + 'xorWith': require('./xorWith'), + 'zip': require('./zip'), + 'zipObject': require('./zipObject'), + 'zipObjectDeep': require('./zipObjectDeep'), + 'zipWith': require('./zipWith') +}; diff --git a/src/hello/server/node_modules/lodash/ary.js b/src/hello/server/node_modules/lodash/ary.js new file mode 100644 index 00000000..70c87d09 --- /dev/null +++ b/src/hello/server/node_modules/lodash/ary.js @@ -0,0 +1,29 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_ARY_FLAG = 128; + +/** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/src/hello/server/node_modules/lodash/assign.js b/src/hello/server/node_modules/lodash/assign.js new file mode 100644 index 00000000..909db26a --- /dev/null +++ b/src/hello/server/node_modules/lodash/assign.js @@ -0,0 +1,58 @@ +var assignValue = require('./_assignValue'), + copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + isArrayLike = require('./isArrayLike'), + isPrototype = require('./_isPrototype'), + keys = require('./keys'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ +var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } +}); + +module.exports = assign; diff --git a/src/hello/server/node_modules/lodash/assignIn.js b/src/hello/server/node_modules/lodash/assignIn.js new file mode 100644 index 00000000..e663473a --- /dev/null +++ b/src/hello/server/node_modules/lodash/assignIn.js @@ -0,0 +1,40 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ +var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); +}); + +module.exports = assignIn; diff --git a/src/hello/server/node_modules/lodash/assignInWith.js b/src/hello/server/node_modules/lodash/assignInWith.js new file mode 100644 index 00000000..68fcc0b0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/assignInWith.js @@ -0,0 +1,38 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); +}); + +module.exports = assignInWith; diff --git a/src/hello/server/node_modules/lodash/assignWith.js b/src/hello/server/node_modules/lodash/assignWith.js new file mode 100644 index 00000000..7dc6c761 --- /dev/null +++ b/src/hello/server/node_modules/lodash/assignWith.js @@ -0,0 +1,37 @@ +var copyObject = require('./_copyObject'), + createAssigner = require('./_createAssigner'), + keys = require('./keys'); + +/** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); +}); + +module.exports = assignWith; diff --git a/src/hello/server/node_modules/lodash/at.js b/src/hello/server/node_modules/lodash/at.js new file mode 100644 index 00000000..781ee9e5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/at.js @@ -0,0 +1,23 @@ +var baseAt = require('./_baseAt'), + flatRest = require('./_flatRest'); + +/** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ +var at = flatRest(baseAt); + +module.exports = at; diff --git a/src/hello/server/node_modules/lodash/attempt.js b/src/hello/server/node_modules/lodash/attempt.js new file mode 100644 index 00000000..624d0152 --- /dev/null +++ b/src/hello/server/node_modules/lodash/attempt.js @@ -0,0 +1,35 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + isError = require('./isError'); + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } +}); + +module.exports = attempt; diff --git a/src/hello/server/node_modules/lodash/before.js b/src/hello/server/node_modules/lodash/before.js new file mode 100644 index 00000000..a3e0a16c --- /dev/null +++ b/src/hello/server/node_modules/lodash/before.js @@ -0,0 +1,40 @@ +var toInteger = require('./toInteger'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/src/hello/server/node_modules/lodash/bind.js b/src/hello/server/node_modules/lodash/bind.js new file mode 100644 index 00000000..b1076e93 --- /dev/null +++ b/src/hello/server/node_modules/lodash/bind.js @@ -0,0 +1,57 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/src/hello/server/node_modules/lodash/bindAll.js b/src/hello/server/node_modules/lodash/bindAll.js new file mode 100644 index 00000000..a35706de --- /dev/null +++ b/src/hello/server/node_modules/lodash/bindAll.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseAssignValue = require('./_baseAssignValue'), + bind = require('./bind'), + flatRest = require('./_flatRest'), + toKey = require('./_toKey'); + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. + */ +var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; +}); + +module.exports = bindAll; diff --git a/src/hello/server/node_modules/lodash/bindKey.js b/src/hello/server/node_modules/lodash/bindKey.js new file mode 100644 index 00000000..f7fd64cd --- /dev/null +++ b/src/hello/server/node_modules/lodash/bindKey.js @@ -0,0 +1,68 @@ +var baseRest = require('./_baseRest'), + createWrap = require('./_createWrap'), + getHolder = require('./_getHolder'), + replaceHolders = require('./_replaceHolders'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/src/hello/server/node_modules/lodash/camelCase.js b/src/hello/server/node_modules/lodash/camelCase.js new file mode 100644 index 00000000..d7390def --- /dev/null +++ b/src/hello/server/node_modules/lodash/camelCase.js @@ -0,0 +1,29 @@ +var capitalize = require('./capitalize'), + createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ +var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); +}); + +module.exports = camelCase; diff --git a/src/hello/server/node_modules/lodash/capitalize.js b/src/hello/server/node_modules/lodash/capitalize.js new file mode 100644 index 00000000..3e1600e7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/capitalize.js @@ -0,0 +1,23 @@ +var toString = require('./toString'), + upperFirst = require('./upperFirst'); + +/** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ +function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); +} + +module.exports = capitalize; diff --git a/src/hello/server/node_modules/lodash/castArray.js b/src/hello/server/node_modules/lodash/castArray.js new file mode 100644 index 00000000..e470bdb9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/castArray.js @@ -0,0 +1,44 @@ +var isArray = require('./isArray'); + +/** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ +function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; +} + +module.exports = castArray; diff --git a/src/hello/server/node_modules/lodash/ceil.js b/src/hello/server/node_modules/lodash/ceil.js new file mode 100644 index 00000000..56c8722c --- /dev/null +++ b/src/hello/server/node_modules/lodash/ceil.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded up to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. + * @example + * + * _.ceil(4.006); + * // => 5 + * + * _.ceil(6.004, 2); + * // => 6.01 + * + * _.ceil(6040, -2); + * // => 6100 + */ +var ceil = createRound('ceil'); + +module.exports = ceil; diff --git a/src/hello/server/node_modules/lodash/chain.js b/src/hello/server/node_modules/lodash/chain.js new file mode 100644 index 00000000..f6cd6475 --- /dev/null +++ b/src/hello/server/node_modules/lodash/chain.js @@ -0,0 +1,38 @@ +var lodash = require('./wrapperLodash'); + +/** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/src/hello/server/node_modules/lodash/chunk.js b/src/hello/server/node_modules/lodash/chunk.js new file mode 100644 index 00000000..5b562fef --- /dev/null +++ b/src/hello/server/node_modules/lodash/chunk.js @@ -0,0 +1,50 @@ +var baseSlice = require('./_baseSlice'), + isIterateeCall = require('./_isIterateeCall'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/src/hello/server/node_modules/lodash/clamp.js b/src/hello/server/node_modules/lodash/clamp.js new file mode 100644 index 00000000..91a72c97 --- /dev/null +++ b/src/hello/server/node_modules/lodash/clamp.js @@ -0,0 +1,39 @@ +var baseClamp = require('./_baseClamp'), + toNumber = require('./toNumber'); + +/** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ +function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); +} + +module.exports = clamp; diff --git a/src/hello/server/node_modules/lodash/clone.js b/src/hello/server/node_modules/lodash/clone.js new file mode 100644 index 00000000..dd439d63 --- /dev/null +++ b/src/hello/server/node_modules/lodash/clone.js @@ -0,0 +1,36 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ +function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); +} + +module.exports = clone; diff --git a/src/hello/server/node_modules/lodash/cloneDeep.js b/src/hello/server/node_modules/lodash/cloneDeep.js new file mode 100644 index 00000000..4425fbe8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/cloneDeep.js @@ -0,0 +1,29 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} + +module.exports = cloneDeep; diff --git a/src/hello/server/node_modules/lodash/cloneDeepWith.js b/src/hello/server/node_modules/lodash/cloneDeepWith.js new file mode 100644 index 00000000..fd9c6c05 --- /dev/null +++ b/src/hello/server/node_modules/lodash/cloneDeepWith.js @@ -0,0 +1,40 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ +function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneDeepWith; diff --git a/src/hello/server/node_modules/lodash/cloneWith.js b/src/hello/server/node_modules/lodash/cloneWith.js new file mode 100644 index 00000000..d2f4e756 --- /dev/null +++ b/src/hello/server/node_modules/lodash/cloneWith.js @@ -0,0 +1,42 @@ +var baseClone = require('./_baseClone'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_SYMBOLS_FLAG = 4; + +/** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ +function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); +} + +module.exports = cloneWith; diff --git a/src/hello/server/node_modules/lodash/collection.js b/src/hello/server/node_modules/lodash/collection.js new file mode 100644 index 00000000..77fe837f --- /dev/null +++ b/src/hello/server/node_modules/lodash/collection.js @@ -0,0 +1,30 @@ +module.exports = { + 'countBy': require('./countBy'), + 'each': require('./each'), + 'eachRight': require('./eachRight'), + 'every': require('./every'), + 'filter': require('./filter'), + 'find': require('./find'), + 'findLast': require('./findLast'), + 'flatMap': require('./flatMap'), + 'flatMapDeep': require('./flatMapDeep'), + 'flatMapDepth': require('./flatMapDepth'), + 'forEach': require('./forEach'), + 'forEachRight': require('./forEachRight'), + 'groupBy': require('./groupBy'), + 'includes': require('./includes'), + 'invokeMap': require('./invokeMap'), + 'keyBy': require('./keyBy'), + 'map': require('./map'), + 'orderBy': require('./orderBy'), + 'partition': require('./partition'), + 'reduce': require('./reduce'), + 'reduceRight': require('./reduceRight'), + 'reject': require('./reject'), + 'sample': require('./sample'), + 'sampleSize': require('./sampleSize'), + 'shuffle': require('./shuffle'), + 'size': require('./size'), + 'some': require('./some'), + 'sortBy': require('./sortBy') +}; diff --git a/src/hello/server/node_modules/lodash/commit.js b/src/hello/server/node_modules/lodash/commit.js new file mode 100644 index 00000000..fe4db717 --- /dev/null +++ b/src/hello/server/node_modules/lodash/commit.js @@ -0,0 +1,33 @@ +var LodashWrapper = require('./_LodashWrapper'); + +/** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/src/hello/server/node_modules/lodash/compact.js b/src/hello/server/node_modules/lodash/compact.js new file mode 100644 index 00000000..031fab4e --- /dev/null +++ b/src/hello/server/node_modules/lodash/compact.js @@ -0,0 +1,31 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/src/hello/server/node_modules/lodash/concat.js b/src/hello/server/node_modules/lodash/concat.js new file mode 100644 index 00000000..1da48a4f --- /dev/null +++ b/src/hello/server/node_modules/lodash/concat.js @@ -0,0 +1,43 @@ +var arrayPush = require('./_arrayPush'), + baseFlatten = require('./_baseFlatten'), + copyArray = require('./_copyArray'), + isArray = require('./isArray'); + +/** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); +} + +module.exports = concat; diff --git a/src/hello/server/node_modules/lodash/cond.js b/src/hello/server/node_modules/lodash/cond.js new file mode 100644 index 00000000..64555986 --- /dev/null +++ b/src/hello/server/node_modules/lodash/cond.js @@ -0,0 +1,60 @@ +var apply = require('./_apply'), + arrayMap = require('./_arrayMap'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. + * @example + * + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); + * + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' + * + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' + */ +function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = baseIteratee; + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); +} + +module.exports = cond; diff --git a/src/hello/server/node_modules/lodash/conforms.js b/src/hello/server/node_modules/lodash/conforms.js new file mode 100644 index 00000000..5501a949 --- /dev/null +++ b/src/hello/server/node_modules/lodash/conforms.js @@ -0,0 +1,35 @@ +var baseClone = require('./_baseClone'), + baseConforms = require('./_baseConforms'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; + * + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] + */ +function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); +} + +module.exports = conforms; diff --git a/src/hello/server/node_modules/lodash/conformsTo.js b/src/hello/server/node_modules/lodash/conformsTo.js new file mode 100644 index 00000000..b8a93ebf --- /dev/null +++ b/src/hello/server/node_modules/lodash/conformsTo.js @@ -0,0 +1,32 @@ +var baseConformsTo = require('./_baseConformsTo'), + keys = require('./keys'); + +/** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; diff --git a/src/hello/server/node_modules/lodash/constant.js b/src/hello/server/node_modules/lodash/constant.js new file mode 100644 index 00000000..655ece3f --- /dev/null +++ b/src/hello/server/node_modules/lodash/constant.js @@ -0,0 +1,26 @@ +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +module.exports = constant; diff --git a/src/hello/server/node_modules/lodash/core.js b/src/hello/server/node_modules/lodash/core.js new file mode 100644 index 00000000..be1d567d --- /dev/null +++ b/src/hello/server/node_modules/lodash/core.js @@ -0,0 +1,3877 @@ +/** + * @license + * Lodash (Custom Build) + * Build: `lodash core -o ./dist/lodash.core.js` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.21'; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_PARTIAL_FLAG = 32; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + numberTag = '[object Number]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + stringTag = '[object String]'; + + /** Used to match HTML entities and HTML characters. */ + var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /*--------------------------------------------------------------------------*/ + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + array.push.apply(array, values); + return array; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return baseMap(props, function(key) { + return object[key]; + }); + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /*--------------------------------------------------------------------------*/ + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Built-in value references. */ + var objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsFinite = root.isFinite, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + return value instanceof LodashWrapper + ? value + : new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + } + + LodashWrapper.prototype = baseCreate(lodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + object[key] = value; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !false) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return baseFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + return objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + var baseIsArguments = noop; + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : baseGetTag(object), + othTag = othIsArr ? arrayTag : baseGetTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + stack || (stack = []); + var objStack = find(stack, function(entry) { + return entry[0] == object; + }); + var othStack = find(stack, function(entry) { + return entry[0] == other; + }); + if (objStack && othStack) { + return objStack[1] == other; + } + stack.push([object, other]); + stack.push([other, object]); + if (isSameTag && !objIsObj) { + var result = (objIsArr) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + var result = equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + stack.pop(); + return result; + } + } + if (!isSameTag) { + return false; + } + var result = equalObjects(object, other, bitmask, customizer, equalFunc, stack); + stack.pop(); + return result; + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(func) { + if (typeof func == 'function') { + return func; + } + if (func == null) { + return identity; + } + return (typeof func == 'object' ? baseMatches : baseProperty)(func); + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var props = nativeKeys(source); + return function(object) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length]; + if (!(key in object && + baseIsEqual(source[key], object[key], COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG) + )) { + return false; + } + } + return true; + }; + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, props) { + object = Object(object); + return reduce(props, function(result, key) { + if (key in object) { + result[key] = object[key]; + } + return result; + }, {}); + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source) { + return baseSlice(source, 0, source.length); + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + return reduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = false; + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = false; + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = baseIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined; + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + var compared; + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + var compared; + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return func.apply(this, otherArgs); + }; + } + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = identity; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + return baseFilter(array, Boolean); + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else { + fromIndex = 0; + } + var index = (fromIndex || 0) - 1, + isReflexive = value === value; + + while (++index < length) { + var other = array[index]; + if ((isReflexive ? other === value : other !== other)) { + return index; + } + } + return -1; + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + start = start == null ? 0 : +start; + end = end === undefined ? length : +end; + return length ? baseSlice(array, start, end) : []; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseEvery(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ + function filter(collection, predicate) { + return baseFilter(collection, baseIteratee(predicate)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + return baseEach(collection, baseIteratee(iteratee)); + } + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + return baseMap(collection, baseIteratee(iteratee)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + collection = isArrayLike(collection) ? collection : nativeKeys(collection); + return collection.length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + predicate = guard ? undefined : predicate; + return baseSome(collection, baseIteratee(predicate)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ + function sortBy(collection, iteratee) { + var index = 0; + iteratee = baseIteratee(iteratee); + + return baseMap(baseMap(collection, function(value, key, collection) { + return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) }; + }).sort(function(object, other) { + return compareAscending(object.criteria, other.criteria) || (object.index - other.index); + }), baseProperty('value')); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + return createPartial(func, WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG, thisArg, partials); + }); + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + if (!isObject(value)) { + return value; + } + return isArray(value) ? copyArray(value) : copyObject(value, nativeKeys(value)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = baseIsDate; + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (isArrayLike(value) && + (isArray(value) || isString(value) || + isFunction(value.splice) || isArguments(value))) { + return !value.length; + } + return !nativeKeys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = baseIsRegExp; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!isArrayLike(value)) { + return values(value); + } + return value.length ? copyArray(value) : []; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + var toInteger = Number; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + var toNumber = Number; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + if (typeof value == 'string') { + return value; + } + return value == null ? '' : (value + ''); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + copyObject(source, nativeKeys(source), object); + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, nativeKeysIn(source), object); + }); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : assign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasOwnProperty.call(object, path); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = nativeKeys; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + var keysIn = nativeKeysIn; + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var value = object == null ? undefined : object[path]; + if (value === undefined) { + value = defaultValue; + } + return isFunction(value) ? value.call(object) : value; + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /*------------------------------------------------------------------------*/ + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ + var iteratee = baseIteratee; + + /** + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + * @example + * + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; + * + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] + */ + function matches(source) { + return baseMatches(assign({}, source)); + } + + /** + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. + * + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. + * @example + * + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); + * } + * + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] + * + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] + */ + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + baseEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; + } + + /** + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @returns {Function} Returns the `lodash` function. + * @example + * + * var lodash = _.noConflict(); + */ + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + + /** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ + function noop() { + // No operation performed. + } + + /** + * Generates a unique ID. If `prefix` is given, the ID is appended to it. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. + * @example + * + * _.uniqueId('contact_'); + * // => 'contact_104' + * + * _.uniqueId(); + * // => '105' + */ + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + + /*------------------------------------------------------------------------*/ + + /** + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + * @example + * + * _.max([4, 2, 8, 6]); + * // => 8 + * + * _.max([]); + * // => undefined + */ + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } + + /** + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + * @example + * + * _.min([4, 2, 8, 6]); + * // => 2 + * + * _.min([]); + * // => undefined + */ + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; + } + + /*------------------------------------------------------------------------*/ + + // Add methods that return wrapped values in chain sequences. + lodash.assignIn = assignIn; + lodash.before = before; + lodash.bind = bind; + lodash.chain = chain; + lodash.compact = compact; + lodash.concat = concat; + lodash.create = create; + lodash.defaults = defaults; + lodash.defer = defer; + lodash.delay = delay; + lodash.filter = filter; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.iteratee = iteratee; + lodash.keys = keys; + lodash.map = map; + lodash.matches = matches; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.once = once; + lodash.pick = pick; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.tap = tap; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.values = values; + + // Add aliases. + lodash.extend = assignIn; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.clone = clone; + lodash.escape = escape; + lodash.every = every; + lodash.find = find; + lodash.forEach = forEach; + lodash.has = has; + lodash.head = head; + lodash.identity = identity; + lodash.indexOf = indexOf; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isBoolean = isBoolean; + lodash.isDate = isDate; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isNaN = isNaN; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isRegExp = isRegExp; + lodash.isString = isString; + lodash.isUndefined = isUndefined; + lodash.last = last; + lodash.max = max; + lodash.min = min; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.reduce = reduce; + lodash.result = result; + lodash.size = size; + lodash.some = some; + lodash.uniqueId = uniqueId; + + // Add aliases. + lodash.each = forEach; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ + + /** + * The semantic version number. + * + * @static + * @memberOf _ + * @type {string} + */ + lodash.VERSION = VERSION; + + // Add `Array` methods to `lodash.prototype`. + baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName); + + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; + }); + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + /*--------------------------------------------------------------------------*/ + + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = lodash; + + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + define(function() { + return lodash; + }); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else if (freeModule) { + // Export for Node.js. + (freeModule.exports = lodash)._ = lodash; + // Export for CommonJS support. + freeExports._ = lodash; + } + else { + // Export to the global object. + root._ = lodash; + } +}.call(this)); diff --git a/src/hello/server/node_modules/lodash/core.min.js b/src/hello/server/node_modules/lodash/core.min.js new file mode 100644 index 00000000..e425e4d4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/core.min.js @@ -0,0 +1,29 @@ +/** + * @license + * Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * Build: `lodash core -o ./dist/lodash.core.js` + */ +;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function"); +return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++et}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){ +return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t, +r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return nt&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++ei))return false;var c=o.get(n),f=o.get(t);if(c&&f)return c==t&&f==n;for(var c=-1,f=true,a=2&r?[]:Z;++cr?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++rarguments.length,mn); +}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n; +return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n); +return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){ +return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i; +var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++or&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++re||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } +}); + +module.exports = countBy; diff --git a/src/hello/server/node_modules/lodash/create.js b/src/hello/server/node_modules/lodash/create.js new file mode 100644 index 00000000..919edb85 --- /dev/null +++ b/src/hello/server/node_modules/lodash/create.js @@ -0,0 +1,43 @@ +var baseAssign = require('./_baseAssign'), + baseCreate = require('./_baseCreate'); + +/** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ +function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); +} + +module.exports = create; diff --git a/src/hello/server/node_modules/lodash/curry.js b/src/hello/server/node_modules/lodash/curry.js new file mode 100644 index 00000000..918db1a4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/curry.js @@ -0,0 +1,57 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_FLAG = 8; + +/** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; +} + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/src/hello/server/node_modules/lodash/curryRight.js b/src/hello/server/node_modules/lodash/curryRight.js new file mode 100644 index 00000000..c85b6f33 --- /dev/null +++ b/src/hello/server/node_modules/lodash/curryRight.js @@ -0,0 +1,54 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; +} + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/src/hello/server/node_modules/lodash/date.js b/src/hello/server/node_modules/lodash/date.js new file mode 100644 index 00000000..cbf5b410 --- /dev/null +++ b/src/hello/server/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./now') +}; diff --git a/src/hello/server/node_modules/lodash/debounce.js b/src/hello/server/node_modules/lodash/debounce.js new file mode 100644 index 00000000..8f751d53 --- /dev/null +++ b/src/hello/server/node_modules/lodash/debounce.js @@ -0,0 +1,191 @@ +var isObject = require('./isObject'), + now = require('./now'), + toNumber = require('./toNumber'); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ +function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; +} + +module.exports = debounce; diff --git a/src/hello/server/node_modules/lodash/deburr.js b/src/hello/server/node_modules/lodash/deburr.js new file mode 100644 index 00000000..f85e314a --- /dev/null +++ b/src/hello/server/node_modules/lodash/deburr.js @@ -0,0 +1,45 @@ +var deburrLetter = require('./_deburrLetter'), + toString = require('./toString'); + +/** Used to match Latin Unicode letters (excluding mathematical operators). */ +var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + +/** Used to compose unicode character classes. */ +var rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + +/** Used to compose unicode capture groups. */ +var rsCombo = '[' + rsComboRange + ']'; + +/** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ +var reComboMark = RegExp(rsCombo, 'g'); + +/** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ +function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); +} + +module.exports = deburr; diff --git a/src/hello/server/node_modules/lodash/defaultTo.js b/src/hello/server/node_modules/lodash/defaultTo.js new file mode 100644 index 00000000..5b333592 --- /dev/null +++ b/src/hello/server/node_modules/lodash/defaultTo.js @@ -0,0 +1,25 @@ +/** + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. + * @returns {*} Returns the resolved value. + * @example + * + * _.defaultTo(1, 10); + * // => 1 + * + * _.defaultTo(undefined, 10); + * // => 10 + */ +function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; +} + +module.exports = defaultTo; diff --git a/src/hello/server/node_modules/lodash/defaults.js b/src/hello/server/node_modules/lodash/defaults.js new file mode 100644 index 00000000..c74df044 --- /dev/null +++ b/src/hello/server/node_modules/lodash/defaults.js @@ -0,0 +1,64 @@ +var baseRest = require('./_baseRest'), + eq = require('./eq'), + isIterateeCall = require('./_isIterateeCall'), + keysIn = require('./keysIn'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; +}); + +module.exports = defaults; diff --git a/src/hello/server/node_modules/lodash/defaultsDeep.js b/src/hello/server/node_modules/lodash/defaultsDeep.js new file mode 100644 index 00000000..9b5fa3ee --- /dev/null +++ b/src/hello/server/node_modules/lodash/defaultsDeep.js @@ -0,0 +1,30 @@ +var apply = require('./_apply'), + baseRest = require('./_baseRest'), + customDefaultsMerge = require('./_customDefaultsMerge'), + mergeWith = require('./mergeWith'); + +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); + +module.exports = defaultsDeep; diff --git a/src/hello/server/node_modules/lodash/defer.js b/src/hello/server/node_modules/lodash/defer.js new file mode 100644 index 00000000..f6d6c6fa --- /dev/null +++ b/src/hello/server/node_modules/lodash/defer.js @@ -0,0 +1,26 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ +var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/src/hello/server/node_modules/lodash/delay.js b/src/hello/server/node_modules/lodash/delay.js new file mode 100644 index 00000000..bd554796 --- /dev/null +++ b/src/hello/server/node_modules/lodash/delay.js @@ -0,0 +1,28 @@ +var baseDelay = require('./_baseDelay'), + baseRest = require('./_baseRest'), + toNumber = require('./toNumber'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ +var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); +}); + +module.exports = delay; diff --git a/src/hello/server/node_modules/lodash/difference.js b/src/hello/server/node_modules/lodash/difference.js new file mode 100644 index 00000000..fa28bb30 --- /dev/null +++ b/src/hello/server/node_modules/lodash/difference.js @@ -0,0 +1,33 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'); + +/** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ +var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; +}); + +module.exports = difference; diff --git a/src/hello/server/node_modules/lodash/differenceBy.js b/src/hello/server/node_modules/lodash/differenceBy.js new file mode 100644 index 00000000..2cd63e7e --- /dev/null +++ b/src/hello/server/node_modules/lodash/differenceBy.js @@ -0,0 +1,44 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ +var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = differenceBy; diff --git a/src/hello/server/node_modules/lodash/differenceWith.js b/src/hello/server/node_modules/lodash/differenceWith.js new file mode 100644 index 00000000..c0233f4b --- /dev/null +++ b/src/hello/server/node_modules/lodash/differenceWith.js @@ -0,0 +1,40 @@ +var baseDifference = require('./_baseDifference'), + baseFlatten = require('./_baseFlatten'), + baseRest = require('./_baseRest'), + isArrayLikeObject = require('./isArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ +var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; +}); + +module.exports = differenceWith; diff --git a/src/hello/server/node_modules/lodash/divide.js b/src/hello/server/node_modules/lodash/divide.js new file mode 100644 index 00000000..8cae0cd1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/divide.js @@ -0,0 +1,22 @@ +var createMathOperation = require('./_createMathOperation'); + +/** + * Divide two numbers. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. + * @example + * + * _.divide(6, 4); + * // => 1.5 + */ +var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; +}, 1); + +module.exports = divide; diff --git a/src/hello/server/node_modules/lodash/drop.js b/src/hello/server/node_modules/lodash/drop.js new file mode 100644 index 00000000..d5c3cbaa --- /dev/null +++ b/src/hello/server/node_modules/lodash/drop.js @@ -0,0 +1,38 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); +} + +module.exports = drop; diff --git a/src/hello/server/node_modules/lodash/dropRight.js b/src/hello/server/node_modules/lodash/dropRight.js new file mode 100644 index 00000000..441fe996 --- /dev/null +++ b/src/hello/server/node_modules/lodash/dropRight.js @@ -0,0 +1,39 @@ +var baseSlice = require('./_baseSlice'), + toInteger = require('./toInteger'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/src/hello/server/node_modules/lodash/dropRightWhile.js b/src/hello/server/node_modules/lodash/dropRightWhile.js new file mode 100644 index 00000000..9ad36a04 --- /dev/null +++ b/src/hello/server/node_modules/lodash/dropRightWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/src/hello/server/node_modules/lodash/dropWhile.js b/src/hello/server/node_modules/lodash/dropWhile.js new file mode 100644 index 00000000..903ef568 --- /dev/null +++ b/src/hello/server/node_modules/lodash/dropWhile.js @@ -0,0 +1,45 @@ +var baseIteratee = require('./_baseIteratee'), + baseWhile = require('./_baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, baseIteratee(predicate, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/src/hello/server/node_modules/lodash/each.js b/src/hello/server/node_modules/lodash/each.js new file mode 100644 index 00000000..8800f420 --- /dev/null +++ b/src/hello/server/node_modules/lodash/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/src/hello/server/node_modules/lodash/eachRight.js b/src/hello/server/node_modules/lodash/eachRight.js new file mode 100644 index 00000000..3252b2ab --- /dev/null +++ b/src/hello/server/node_modules/lodash/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/src/hello/server/node_modules/lodash/endsWith.js b/src/hello/server/node_modules/lodash/endsWith.js new file mode 100644 index 00000000..76fc866e --- /dev/null +++ b/src/hello/server/node_modules/lodash/endsWith.js @@ -0,0 +1,43 @@ +var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), + toInteger = require('./toInteger'), + toString = require('./toString'); + +/** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ +function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; +} + +module.exports = endsWith; diff --git a/src/hello/server/node_modules/lodash/entries.js b/src/hello/server/node_modules/lodash/entries.js new file mode 100644 index 00000000..7a88df20 --- /dev/null +++ b/src/hello/server/node_modules/lodash/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/src/hello/server/node_modules/lodash/entriesIn.js b/src/hello/server/node_modules/lodash/entriesIn.js new file mode 100644 index 00000000..f6c6331c --- /dev/null +++ b/src/hello/server/node_modules/lodash/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/src/hello/server/node_modules/lodash/eq.js b/src/hello/server/node_modules/lodash/eq.js new file mode 100644 index 00000000..a9406880 --- /dev/null +++ b/src/hello/server/node_modules/lodash/eq.js @@ -0,0 +1,37 @@ +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +module.exports = eq; diff --git a/src/hello/server/node_modules/lodash/escape.js b/src/hello/server/node_modules/lodash/escape.js new file mode 100644 index 00000000..9247e002 --- /dev/null +++ b/src/hello/server/node_modules/lodash/escape.js @@ -0,0 +1,43 @@ +var escapeHtmlChar = require('./_escapeHtmlChar'), + toString = require('./toString'); + +/** Used to match HTML entities and HTML characters. */ +var reUnescapedHtml = /[&<>"']/g, + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + +/** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ +function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; +} + +module.exports = escape; diff --git a/src/hello/server/node_modules/lodash/escapeRegExp.js b/src/hello/server/node_modules/lodash/escapeRegExp.js new file mode 100644 index 00000000..0a58c69f --- /dev/null +++ b/src/hello/server/node_modules/lodash/escapeRegExp.js @@ -0,0 +1,32 @@ +var toString = require('./toString'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + +/** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ +function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; +} + +module.exports = escapeRegExp; diff --git a/src/hello/server/node_modules/lodash/every.js b/src/hello/server/node_modules/lodash/every.js new file mode 100644 index 00000000..25080dac --- /dev/null +++ b/src/hello/server/node_modules/lodash/every.js @@ -0,0 +1,56 @@ +var arrayEvery = require('./_arrayEvery'), + baseEvery = require('./_baseEvery'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = every; diff --git a/src/hello/server/node_modules/lodash/extend.js b/src/hello/server/node_modules/lodash/extend.js new file mode 100644 index 00000000..e00166c2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/src/hello/server/node_modules/lodash/extendWith.js b/src/hello/server/node_modules/lodash/extendWith.js new file mode 100644 index 00000000..dbdcb3b4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/src/hello/server/node_modules/lodash/fill.js b/src/hello/server/node_modules/lodash/fill.js new file mode 100644 index 00000000..ae13aa1c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fill.js @@ -0,0 +1,45 @@ +var baseFill = require('./_baseFill'), + isIterateeCall = require('./_isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ +function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/src/hello/server/node_modules/lodash/filter.js b/src/hello/server/node_modules/lodash/filter.js new file mode 100644 index 00000000..89e0c8c4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/filter.js @@ -0,0 +1,52 @@ +var arrayFilter = require('./_arrayFilter'), + baseFilter = require('./_baseFilter'), + baseIteratee = require('./_baseIteratee'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ +function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); +} + +module.exports = filter; diff --git a/src/hello/server/node_modules/lodash/find.js b/src/hello/server/node_modules/lodash/find.js new file mode 100644 index 00000000..de732ccb --- /dev/null +++ b/src/hello/server/node_modules/lodash/find.js @@ -0,0 +1,42 @@ +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ +var find = createFind(findIndex); + +module.exports = find; diff --git a/src/hello/server/node_modules/lodash/findIndex.js b/src/hello/server/node_modules/lodash/findIndex.js new file mode 100644 index 00000000..4689069f --- /dev/null +++ b/src/hello/server/node_modules/lodash/findIndex.js @@ -0,0 +1,55 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ +function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); +} + +module.exports = findIndex; diff --git a/src/hello/server/node_modules/lodash/findKey.js b/src/hello/server/node_modules/lodash/findKey.js new file mode 100644 index 00000000..cac0248a --- /dev/null +++ b/src/hello/server/node_modules/lodash/findKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwn = require('./_baseForOwn'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ +function findKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); +} + +module.exports = findKey; diff --git a/src/hello/server/node_modules/lodash/findLast.js b/src/hello/server/node_modules/lodash/findLast.js new file mode 100644 index 00000000..70b4271d --- /dev/null +++ b/src/hello/server/node_modules/lodash/findLast.js @@ -0,0 +1,25 @@ +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; diff --git a/src/hello/server/node_modules/lodash/findLastIndex.js b/src/hello/server/node_modules/lodash/findLastIndex.js new file mode 100644 index 00000000..7da3431f --- /dev/null +++ b/src/hello/server/node_modules/lodash/findLastIndex.js @@ -0,0 +1,59 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); +} + +module.exports = findLastIndex; diff --git a/src/hello/server/node_modules/lodash/findLastKey.js b/src/hello/server/node_modules/lodash/findLastKey.js new file mode 100644 index 00000000..66fb9fbc --- /dev/null +++ b/src/hello/server/node_modules/lodash/findLastKey.js @@ -0,0 +1,44 @@ +var baseFindKey = require('./_baseFindKey'), + baseForOwnRight = require('./_baseForOwnRight'), + baseIteratee = require('./_baseIteratee'); + +/** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ +function findLastKey(object, predicate) { + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); +} + +module.exports = findLastKey; diff --git a/src/hello/server/node_modules/lodash/first.js b/src/hello/server/node_modules/lodash/first.js new file mode 100644 index 00000000..53f4ad13 --- /dev/null +++ b/src/hello/server/node_modules/lodash/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/src/hello/server/node_modules/lodash/flake.lock b/src/hello/server/node_modules/lodash/flake.lock new file mode 100644 index 00000000..dd032521 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flake.lock @@ -0,0 +1,40 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1613582597, + "narHash": "sha256-6LvipIvFuhyorHpUqK3HjySC5Y6gshXHFBhU9EJ4DoM=", + "path": "/nix/store/srvplqq673sqd9vyfhyc5w1p88y1gfm4-source", + "rev": "6b1057b452c55bb3b463f0d7055bc4ec3fd1f381", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "utils": { + "locked": { + "lastModified": 1610051610, + "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/src/hello/server/node_modules/lodash/flake.nix b/src/hello/server/node_modules/lodash/flake.nix new file mode 100644 index 00000000..15a451c6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flake.nix @@ -0,0 +1,20 @@ +{ + inputs = { + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, utils }: + utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages."${system}"; + in rec { + devShell = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + yarn + nodejs-14_x + nodePackages.typescript-language-server + nodePackages.eslint + ]; + }; + }); +} diff --git a/src/hello/server/node_modules/lodash/flatMap.js b/src/hello/server/node_modules/lodash/flatMap.js new file mode 100644 index 00000000..e6685068 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flatMap.js @@ -0,0 +1,29 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; diff --git a/src/hello/server/node_modules/lodash/flatMapDeep.js b/src/hello/server/node_modules/lodash/flatMapDeep.js new file mode 100644 index 00000000..4653d603 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flatMapDeep.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); +} + +module.exports = flatMapDeep; diff --git a/src/hello/server/node_modules/lodash/flatMapDepth.js b/src/hello/server/node_modules/lodash/flatMapDepth.js new file mode 100644 index 00000000..6d72005c --- /dev/null +++ b/src/hello/server/node_modules/lodash/flatMapDepth.js @@ -0,0 +1,31 @@ +var baseFlatten = require('./_baseFlatten'), + map = require('./map'), + toInteger = require('./toInteger'); + +/** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ +function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); +} + +module.exports = flatMapDepth; diff --git a/src/hello/server/node_modules/lodash/flatten.js b/src/hello/server/node_modules/lodash/flatten.js new file mode 100644 index 00000000..3f09f7f7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flatten.js @@ -0,0 +1,22 @@ +var baseFlatten = require('./_baseFlatten'); + +/** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; +} + +module.exports = flatten; diff --git a/src/hello/server/node_modules/lodash/flattenDeep.js b/src/hello/server/node_modules/lodash/flattenDeep.js new file mode 100644 index 00000000..8ad585cf --- /dev/null +++ b/src/hello/server/node_modules/lodash/flattenDeep.js @@ -0,0 +1,25 @@ +var baseFlatten = require('./_baseFlatten'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; +} + +module.exports = flattenDeep; diff --git a/src/hello/server/node_modules/lodash/flattenDepth.js b/src/hello/server/node_modules/lodash/flattenDepth.js new file mode 100644 index 00000000..441fdcc2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flattenDepth.js @@ -0,0 +1,33 @@ +var baseFlatten = require('./_baseFlatten'), + toInteger = require('./toInteger'); + +/** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ +function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); +} + +module.exports = flattenDepth; diff --git a/src/hello/server/node_modules/lodash/flip.js b/src/hello/server/node_modules/lodash/flip.js new file mode 100644 index 00000000..c28dd789 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flip.js @@ -0,0 +1,28 @@ +var createWrap = require('./_createWrap'); + +/** Used to compose bitmasks for function metadata. */ +var WRAP_FLIP_FLAG = 512; + +/** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ +function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); +} + +module.exports = flip; diff --git a/src/hello/server/node_modules/lodash/floor.js b/src/hello/server/node_modules/lodash/floor.js new file mode 100644 index 00000000..ab6dfa28 --- /dev/null +++ b/src/hello/server/node_modules/lodash/floor.js @@ -0,0 +1,26 @@ +var createRound = require('./_createRound'); + +/** + * Computes `number` rounded down to `precision`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. + * @example + * + * _.floor(4.006); + * // => 4 + * + * _.floor(0.046, 2); + * // => 0.04 + * + * _.floor(4060, -2); + * // => 4000 + */ +var floor = createRound('floor'); + +module.exports = floor; diff --git a/src/hello/server/node_modules/lodash/flow.js b/src/hello/server/node_modules/lodash/flow.js new file mode 100644 index 00000000..74b6b62d --- /dev/null +++ b/src/hello/server/node_modules/lodash/flow.js @@ -0,0 +1,27 @@ +var createFlow = require('./_createFlow'); + +/** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/src/hello/server/node_modules/lodash/flowRight.js b/src/hello/server/node_modules/lodash/flowRight.js new file mode 100644 index 00000000..11461410 --- /dev/null +++ b/src/hello/server/node_modules/lodash/flowRight.js @@ -0,0 +1,26 @@ +var createFlow = require('./_createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. + * + * @static + * @since 3.0.0 + * @memberOf _ + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/src/hello/server/node_modules/lodash/forEach.js b/src/hello/server/node_modules/lodash/forEach.js new file mode 100644 index 00000000..c64eaa73 --- /dev/null +++ b/src/hello/server/node_modules/lodash/forEach.js @@ -0,0 +1,41 @@ +var arrayEach = require('./_arrayEach'), + baseEach = require('./_baseEach'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEach; diff --git a/src/hello/server/node_modules/lodash/forEachRight.js b/src/hello/server/node_modules/lodash/forEachRight.js new file mode 100644 index 00000000..7390ebaf --- /dev/null +++ b/src/hello/server/node_modules/lodash/forEachRight.js @@ -0,0 +1,31 @@ +var arrayEachRight = require('./_arrayEachRight'), + baseEachRight = require('./_baseEachRight'), + castFunction = require('./_castFunction'), + isArray = require('./isArray'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ +function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, castFunction(iteratee)); +} + +module.exports = forEachRight; diff --git a/src/hello/server/node_modules/lodash/forIn.js b/src/hello/server/node_modules/lodash/forIn.js new file mode 100644 index 00000000..583a5963 --- /dev/null +++ b/src/hello/server/node_modules/lodash/forIn.js @@ -0,0 +1,39 @@ +var baseFor = require('./_baseFor'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ +function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, castFunction(iteratee), keysIn); +} + +module.exports = forIn; diff --git a/src/hello/server/node_modules/lodash/forInRight.js b/src/hello/server/node_modules/lodash/forInRight.js new file mode 100644 index 00000000..4aedf58a --- /dev/null +++ b/src/hello/server/node_modules/lodash/forInRight.js @@ -0,0 +1,37 @@ +var baseForRight = require('./_baseForRight'), + castFunction = require('./_castFunction'), + keysIn = require('./keysIn'); + +/** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ +function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, castFunction(iteratee), keysIn); +} + +module.exports = forInRight; diff --git a/src/hello/server/node_modules/lodash/forOwn.js b/src/hello/server/node_modules/lodash/forOwn.js new file mode 100644 index 00000000..94eed840 --- /dev/null +++ b/src/hello/server/node_modules/lodash/forOwn.js @@ -0,0 +1,36 @@ +var baseForOwn = require('./_baseForOwn'), + castFunction = require('./_castFunction'); + +/** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ +function forOwn(object, iteratee) { + return object && baseForOwn(object, castFunction(iteratee)); +} + +module.exports = forOwn; diff --git a/src/hello/server/node_modules/lodash/forOwnRight.js b/src/hello/server/node_modules/lodash/forOwnRight.js new file mode 100644 index 00000000..86f338f0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/forOwnRight.js @@ -0,0 +1,34 @@ +var baseForOwnRight = require('./_baseForOwnRight'), + castFunction = require('./_castFunction'); + +/** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ +function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, castFunction(iteratee)); +} + +module.exports = forOwnRight; diff --git a/src/hello/server/node_modules/lodash/fp.js b/src/hello/server/node_modules/lodash/fp.js new file mode 100644 index 00000000..e372dbbd --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp.js @@ -0,0 +1,2 @@ +var _ = require('./lodash.min').runInContext(); +module.exports = require('./fp/_baseConvert')(_, _); diff --git a/src/hello/server/node_modules/lodash/fp/F.js b/src/hello/server/node_modules/lodash/fp/F.js new file mode 100644 index 00000000..a05a63ad --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/F.js @@ -0,0 +1 @@ +module.exports = require('./stubFalse'); diff --git a/src/hello/server/node_modules/lodash/fp/T.js b/src/hello/server/node_modules/lodash/fp/T.js new file mode 100644 index 00000000..e2ba8ea5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/T.js @@ -0,0 +1 @@ +module.exports = require('./stubTrue'); diff --git a/src/hello/server/node_modules/lodash/fp/__.js b/src/hello/server/node_modules/lodash/fp/__.js new file mode 100644 index 00000000..4af98deb --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/__.js @@ -0,0 +1 @@ +module.exports = require('./placeholder'); diff --git a/src/hello/server/node_modules/lodash/fp/_baseConvert.js b/src/hello/server/node_modules/lodash/fp/_baseConvert.js new file mode 100644 index 00000000..9baf8e19 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/_baseConvert.js @@ -0,0 +1,569 @@ +var mapping = require('./_mapping'), + fallbackHolder = require('./placeholder'); + +/** Built-in value reference. */ +var push = Array.prototype.push; + +/** + * Creates a function, with an arity of `n`, that invokes `func` with the + * arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} n The arity of the new function. + * @returns {Function} Returns the new function. + */ +function baseArity(func, n) { + return n == 2 + ? function(a, b) { return func.apply(undefined, arguments); } + : function(a) { return func.apply(undefined, arguments); }; +} + +/** + * Creates a function that invokes `func`, with up to `n` arguments, ignoring + * any additional arguments. + * + * @private + * @param {Function} func The function to cap arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ +function baseAry(func, n) { + return n == 2 + ? function(a, b) { return func(a, b); } + : function(a) { return func(a); }; +} + +/** + * Creates a clone of `array`. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the cloned array. + */ +function cloneArray(array) { + var length = array ? array.length : 0, + result = Array(length); + + while (length--) { + result[length] = array[length]; + } + return result; +} + +/** + * Creates a function that clones a given object using the assignment `func`. + * + * @private + * @param {Function} func The assignment function. + * @returns {Function} Returns the new cloner function. + */ +function createCloner(func) { + return function(object) { + return func({}, object); + }; +} + +/** + * A specialized version of `_.spread` which flattens the spread array into + * the arguments of the invoked `func`. + * + * @private + * @param {Function} func The function to spread arguments over. + * @param {number} start The start position of the spread. + * @returns {Function} Returns the new function. + */ +function flatSpread(func, start) { + return function() { + var length = arguments.length, + lastIndex = length - 1, + args = Array(length); + + while (length--) { + args[length] = arguments[length]; + } + var array = args[start], + otherArgs = args.slice(0, start); + + if (array) { + push.apply(otherArgs, array); + } + if (start != lastIndex) { + push.apply(otherArgs, args.slice(start + 1)); + } + return func.apply(this, otherArgs); + }; +} + +/** + * Creates a function that wraps `func` and uses `cloner` to clone the first + * argument it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} cloner The function to clone arguments. + * @returns {Function} Returns the new immutable function. + */ +function wrapImmutable(func, cloner) { + return function() { + var length = arguments.length; + if (!length) { + return; + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var result = args[0] = cloner.apply(undefined, args); + func.apply(undefined, args); + return result; + }; +} + +/** + * The base implementation of `convert` which accepts a `util` object of methods + * required to perform conversions. + * + * @param {Object} util The util object. + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @param {Object} [options] The options object. + * @param {boolean} [options.cap=true] Specify capping iteratee arguments. + * @param {boolean} [options.curry=true] Specify currying. + * @param {boolean} [options.fixed=true] Specify fixed arity. + * @param {boolean} [options.immutable=true] Specify immutable operations. + * @param {boolean} [options.rearg=true] Specify rearranging arguments. + * @returns {Function|Object} Returns the converted function or object. + */ +function baseConvert(util, name, func, options) { + var isLib = typeof name == 'function', + isObj = name === Object(name); + + if (isObj) { + options = func; + func = name; + name = undefined; + } + if (func == null) { + throw new TypeError; + } + options || (options = {}); + + var config = { + 'cap': 'cap' in options ? options.cap : true, + 'curry': 'curry' in options ? options.curry : true, + 'fixed': 'fixed' in options ? options.fixed : true, + 'immutable': 'immutable' in options ? options.immutable : true, + 'rearg': 'rearg' in options ? options.rearg : true + }; + + var defaultHolder = isLib ? func : fallbackHolder, + forceCurry = ('curry' in options) && options.curry, + forceFixed = ('fixed' in options) && options.fixed, + forceRearg = ('rearg' in options) && options.rearg, + pristine = isLib ? func.runInContext() : undefined; + + var helpers = isLib ? func : { + 'ary': util.ary, + 'assign': util.assign, + 'clone': util.clone, + 'curry': util.curry, + 'forEach': util.forEach, + 'isArray': util.isArray, + 'isError': util.isError, + 'isFunction': util.isFunction, + 'isWeakMap': util.isWeakMap, + 'iteratee': util.iteratee, + 'keys': util.keys, + 'rearg': util.rearg, + 'toInteger': util.toInteger, + 'toPath': util.toPath + }; + + var ary = helpers.ary, + assign = helpers.assign, + clone = helpers.clone, + curry = helpers.curry, + each = helpers.forEach, + isArray = helpers.isArray, + isError = helpers.isError, + isFunction = helpers.isFunction, + isWeakMap = helpers.isWeakMap, + keys = helpers.keys, + rearg = helpers.rearg, + toInteger = helpers.toInteger, + toPath = helpers.toPath; + + var aryMethodKeys = keys(mapping.aryMethod); + + var wrappers = { + 'castArray': function(castArray) { + return function() { + var value = arguments[0]; + return isArray(value) + ? castArray(cloneArray(value)) + : castArray.apply(undefined, arguments); + }; + }, + 'iteratee': function(iteratee) { + return function() { + var func = arguments[0], + arity = arguments[1], + result = iteratee(func, arity), + length = result.length; + + if (config.cap && typeof arity == 'number') { + arity = arity > 2 ? (arity - 2) : 1; + return (length && length <= arity) ? result : baseAry(result, arity); + } + return result; + }; + }, + 'mixin': function(mixin) { + return function(source) { + var func = this; + if (!isFunction(func)) { + return mixin(func, Object(source)); + } + var pairs = []; + each(keys(source), function(key) { + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); + } + }); + + mixin(func, Object(source)); + + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; + } else { + delete func.prototype[pair[0]]; + } + }); + return func; + }; + }, + 'nthArg': function(nthArg) { + return function(n) { + var arity = n < 0 ? 1 : (toInteger(n) + 1); + return curry(nthArg(n), arity); + }; + }, + 'rearg': function(rearg) { + return function(func, indexes) { + var arity = indexes ? indexes.length : 0; + return curry(rearg(func, indexes), arity); + }; + }, + 'runInContext': function(runInContext) { + return function(context) { + return baseConvert(util, runInContext(context), options); + }; + } + }; + + /*--------------------------------------------------------------------------*/ + + /** + * Casts `func` to a function with an arity capped iteratee if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @returns {Function} Returns the cast function. + */ + function castCap(name, func) { + if (config.cap) { + var indexes = mapping.iterateeRearg[name]; + if (indexes) { + return iterateeRearg(func, indexes); + } + var n = !isLib && mapping.iterateeAry[name]; + if (n) { + return iterateeAry(func, n); + } + } + return func; + } + + /** + * Casts `func` to a curried function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castCurry(name, func, n) { + return (forceCurry || (config.curry && n > 1)) + ? curry(func, n) + : func; + } + + /** + * Casts `func` to a fixed arity function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity cap. + * @returns {Function} Returns the cast function. + */ + function castFixed(name, func, n) { + if (config.fixed && (forceFixed || !mapping.skipFixed[name])) { + var data = mapping.methodSpread[name], + start = data && data.start; + + return start === undefined ? ary(func, n) : flatSpread(func, start); + } + return func; + } + + /** + * Casts `func` to an rearged function if needed. + * + * @private + * @param {string} name The name of the function to inspect. + * @param {Function} func The function to inspect. + * @param {number} n The arity of `func`. + * @returns {Function} Returns the cast function. + */ + function castRearg(name, func, n) { + return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name])) + ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) + : func; + } + + /** + * Creates a clone of `object` by `path`. + * + * @private + * @param {Object} object The object to clone. + * @param {Array|string} path The path to clone by. + * @returns {Object} Returns the cloned object. + */ + function cloneByPath(object, path) { + path = toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + result = clone(Object(object)), + nested = result; + + while (nested != null && ++index < length) { + var key = path[index], + value = nested[key]; + + if (value != null && + !(isFunction(value) || isError(value) || isWeakMap(value))) { + nested[key] = clone(index == lastIndex ? value : Object(value)); + } + nested = nested[key]; + } + return result; + } + + /** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ + function convertLib(options) { + return _.runInContext.convert(options)(undefined); + } + + /** + * Create a converter function for `func` of `name`. + * + * @param {string} name The name of the function to convert. + * @param {Function} func The function to convert. + * @returns {Function} Returns the new converter function. + */ + function createConverter(name, func) { + var realName = mapping.aliasToReal[name] || name, + methodName = mapping.remap[realName] || realName, + oldOptions = options; + + return function(options) { + var newUtil = isLib ? pristine : helpers, + newFunc = isLib ? pristine[methodName] : func, + newOptions = assign(assign({}, oldOptions), options); + + return baseConvert(newUtil, realName, newFunc, newOptions); + }; + } + + /** + * Creates a function that wraps `func` to invoke its iteratee, with up to `n` + * arguments, ignoring any additional arguments. + * + * @private + * @param {Function} func The function to cap iteratee arguments for. + * @param {number} n The arity cap. + * @returns {Function} Returns the new function. + */ + function iterateeAry(func, n) { + return overArg(func, function(func) { + return typeof func == 'function' ? baseAry(func, n) : func; + }); + } + + /** + * Creates a function that wraps `func` to invoke its iteratee with arguments + * arranged according to the specified `indexes` where the argument value at + * the first index is provided as the first argument, the argument value at + * the second index is provided as the second argument, and so on. + * + * @private + * @param {Function} func The function to rearrange iteratee arguments for. + * @param {number[]} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + */ + function iterateeRearg(func, indexes) { + return overArg(func, function(func) { + var n = indexes.length; + return baseArity(rearg(baseAry(func, n), indexes), n); + }); + } + + /** + * Creates a function that invokes `func` with its first argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function() { + var length = arguments.length; + if (!length) { + return func(); + } + var args = Array(length); + while (length--) { + args[length] = arguments[length]; + } + var index = config.rearg ? 0 : (length - 1); + args[index] = transform(args[index]); + return func.apply(undefined, args); + }; + } + + /** + * Creates a function that wraps `func` and applys the conversions + * rules by `name`. + * + * @private + * @param {string} name The name of the function to wrap. + * @param {Function} func The function to wrap. + * @returns {Function} Returns the converted function. + */ + function wrap(name, func, placeholder) { + var result, + realName = mapping.aliasToReal[name] || name, + wrapped = func, + wrapper = wrappers[realName]; + + if (wrapper) { + wrapped = wrapper(func); + } + else if (config.immutable) { + if (mapping.mutate.array[realName]) { + wrapped = wrapImmutable(func, cloneArray); + } + else if (mapping.mutate.object[realName]) { + wrapped = wrapImmutable(func, createCloner(func)); + } + else if (mapping.mutate.set[realName]) { + wrapped = wrapImmutable(func, cloneByPath); + } + } + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(otherName) { + if (realName == otherName) { + var data = mapping.methodSpread[realName], + afterRearg = data && data.afterRearg; + + result = afterRearg + ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) + : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey); + + result = castCap(realName, result); + result = castCurry(realName, result, aryKey); + return false; + } + }); + return !result; + }); + + result || (result = wrapped); + if (result == func) { + result = forceCurry ? curry(result, 1) : function() { + return func.apply(this, arguments); + }; + } + result.convert = createConverter(realName, func); + result.placeholder = func.placeholder = placeholder; + + return result; + } + + /*--------------------------------------------------------------------------*/ + + if (!isObj) { + return wrap(name, func, defaultHolder); + } + var _ = func; + + // Convert methods by ary cap. + var pairs = []; + each(aryMethodKeys, function(aryKey) { + each(mapping.aryMethod[aryKey], function(key) { + var func = _[mapping.remap[key] || key]; + if (func) { + pairs.push([key, wrap(key, func, _)]); + } + }); + }); + + // Convert remaining methods. + each(keys(_), function(key) { + var func = _[key]; + if (typeof func == 'function') { + var length = pairs.length; + while (length--) { + if (pairs[length][0] == key) { + return; + } + } + func.convert = createConverter(key, func); + pairs.push([key, func]); + } + }); + + // Assign to `_` leaving `_.prototype` unchanged to allow chaining. + each(pairs, function(pair) { + _[pair[0]] = pair[1]; + }); + + _.convert = convertLib; + _.placeholder = _; + + // Assign aliases. + each(keys(_), function(key) { + each(mapping.realToAlias[key] || [], function(alias) { + _[alias] = _[key]; + }); + }); + + return _; +} + +module.exports = baseConvert; diff --git a/src/hello/server/node_modules/lodash/fp/_convertBrowser.js b/src/hello/server/node_modules/lodash/fp/_convertBrowser.js new file mode 100644 index 00000000..bde030dc --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/_convertBrowser.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'); + +/** + * Converts `lodash` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. + * + * @param {Function} lodash The lodash function to convert. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function} Returns the converted `lodash`. + */ +function browserConvert(lodash, options) { + return baseConvert(lodash, lodash, options); +} + +if (typeof _ == 'function' && typeof _.runInContext == 'function') { + _ = browserConvert(_.runInContext()); +} +module.exports = browserConvert; diff --git a/src/hello/server/node_modules/lodash/fp/_falseOptions.js b/src/hello/server/node_modules/lodash/fp/_falseOptions.js new file mode 100644 index 00000000..773235e3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/_falseOptions.js @@ -0,0 +1,7 @@ +module.exports = { + 'cap': false, + 'curry': false, + 'fixed': false, + 'immutable': false, + 'rearg': false +}; diff --git a/src/hello/server/node_modules/lodash/fp/_mapping.js b/src/hello/server/node_modules/lodash/fp/_mapping.js new file mode 100644 index 00000000..a642ec05 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/_mapping.js @@ -0,0 +1,358 @@ +/** Used to map aliases to their real names. */ +exports.aliasToReal = { + + // Lodash aliases. + 'each': 'forEach', + 'eachRight': 'forEachRight', + 'entries': 'toPairs', + 'entriesIn': 'toPairsIn', + 'extend': 'assignIn', + 'extendAll': 'assignInAll', + 'extendAllWith': 'assignInAllWith', + 'extendWith': 'assignInWith', + 'first': 'head', + + // Methods that are curried variants of others. + 'conforms': 'conformsTo', + 'matches': 'isMatch', + 'property': 'get', + + // Ramda aliases. + '__': 'placeholder', + 'F': 'stubFalse', + 'T': 'stubTrue', + 'all': 'every', + 'allPass': 'overEvery', + 'always': 'constant', + 'any': 'some', + 'anyPass': 'overSome', + 'apply': 'spread', + 'assoc': 'set', + 'assocPath': 'set', + 'complement': 'negate', + 'compose': 'flowRight', + 'contains': 'includes', + 'dissoc': 'unset', + 'dissocPath': 'unset', + 'dropLast': 'dropRight', + 'dropLastWhile': 'dropRightWhile', + 'equals': 'isEqual', + 'identical': 'eq', + 'indexBy': 'keyBy', + 'init': 'initial', + 'invertObj': 'invert', + 'juxt': 'over', + 'omitAll': 'omit', + 'nAry': 'ary', + 'path': 'get', + 'pathEq': 'matchesProperty', + 'pathOr': 'getOr', + 'paths': 'at', + 'pickAll': 'pick', + 'pipe': 'flow', + 'pluck': 'map', + 'prop': 'get', + 'propEq': 'matchesProperty', + 'propOr': 'getOr', + 'props': 'at', + 'symmetricDifference': 'xor', + 'symmetricDifferenceBy': 'xorBy', + 'symmetricDifferenceWith': 'xorWith', + 'takeLast': 'takeRight', + 'takeLastWhile': 'takeRightWhile', + 'unapply': 'rest', + 'unnest': 'flatten', + 'useWith': 'overArgs', + 'where': 'conformsTo', + 'whereEq': 'isMatch', + 'zipObj': 'zipObject' +}; + +/** Used to map ary to method names. */ +exports.aryMethod = { + '1': [ + 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', + 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', + 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', + 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse', + 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', + 'uniqueId', 'words', 'zipAll' + ], + '2': [ + 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', + 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', + 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', + 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', + 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', + 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', + 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', + 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', + 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', + 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', + 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', + 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', + 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', + 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', + 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', + 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', + 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', + 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', + 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', + 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', + 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', + 'zipObjectDeep' + ], + '3': [ + 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', + 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', + 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', + 'xorWith', 'zipWith' + ], + '4': [ + 'fill', 'setWith', 'updateWith' + ] +}; + +/** Used to map ary to rearg configs. */ +exports.aryRearg = { + '2': [1, 0], + '3': [2, 0, 1], + '4': [3, 2, 0, 1] +}; + +/** Used to map method names to their iteratee ary. */ +exports.iterateeAry = { + 'dropRightWhile': 1, + 'dropWhile': 1, + 'every': 1, + 'filter': 1, + 'find': 1, + 'findFrom': 1, + 'findIndex': 1, + 'findIndexFrom': 1, + 'findKey': 1, + 'findLast': 1, + 'findLastFrom': 1, + 'findLastIndex': 1, + 'findLastIndexFrom': 1, + 'findLastKey': 1, + 'flatMap': 1, + 'flatMapDeep': 1, + 'flatMapDepth': 1, + 'forEach': 1, + 'forEachRight': 1, + 'forIn': 1, + 'forInRight': 1, + 'forOwn': 1, + 'forOwnRight': 1, + 'map': 1, + 'mapKeys': 1, + 'mapValues': 1, + 'partition': 1, + 'reduce': 2, + 'reduceRight': 2, + 'reject': 1, + 'remove': 1, + 'some': 1, + 'takeRightWhile': 1, + 'takeWhile': 1, + 'times': 1, + 'transform': 2 +}; + +/** Used to map method names to iteratee rearg configs. */ +exports.iterateeRearg = { + 'mapKeys': [1], + 'reduceRight': [1, 0] +}; + +/** Used to map method names to rearg configs. */ +exports.methodRearg = { + 'assignInAllWith': [1, 0], + 'assignInWith': [1, 2, 0], + 'assignAllWith': [1, 0], + 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], + 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], + 'isEqualWith': [1, 2, 0], + 'isMatchWith': [2, 1, 0], + 'mergeAllWith': [1, 0], + 'mergeWith': [1, 2, 0], + 'padChars': [2, 1, 0], + 'padCharsEnd': [2, 1, 0], + 'padCharsStart': [2, 1, 0], + 'pullAllBy': [2, 1, 0], + 'pullAllWith': [2, 1, 0], + 'rangeStep': [1, 2, 0], + 'rangeStepRight': [1, 2, 0], + 'setWith': [3, 1, 2, 0], + 'sortedIndexBy': [2, 1, 0], + 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], + 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], + 'zipWith': [1, 2, 0] +}; + +/** Used to map method names to spread configs. */ +exports.methodSpread = { + 'assignAll': { 'start': 0 }, + 'assignAllWith': { 'start': 0 }, + 'assignInAll': { 'start': 0 }, + 'assignInAllWith': { 'start': 0 }, + 'defaultsAll': { 'start': 0 }, + 'defaultsDeepAll': { 'start': 0 }, + 'invokeArgs': { 'start': 2 }, + 'invokeArgsMap': { 'start': 2 }, + 'mergeAll': { 'start': 0 }, + 'mergeAllWith': { 'start': 0 }, + 'partial': { 'start': 1 }, + 'partialRight': { 'start': 1 }, + 'without': { 'start': 1 }, + 'zipAll': { 'start': 0 } +}; + +/** Used to identify methods which mutate arrays or objects. */ +exports.mutate = { + 'array': { + 'fill': true, + 'pull': true, + 'pullAll': true, + 'pullAllBy': true, + 'pullAllWith': true, + 'pullAt': true, + 'remove': true, + 'reverse': true + }, + 'object': { + 'assign': true, + 'assignAll': true, + 'assignAllWith': true, + 'assignIn': true, + 'assignInAll': true, + 'assignInAllWith': true, + 'assignInWith': true, + 'assignWith': true, + 'defaults': true, + 'defaultsAll': true, + 'defaultsDeep': true, + 'defaultsDeepAll': true, + 'merge': true, + 'mergeAll': true, + 'mergeAllWith': true, + 'mergeWith': true, + }, + 'set': { + 'set': true, + 'setWith': true, + 'unset': true, + 'update': true, + 'updateWith': true + } +}; + +/** Used to map real names to their aliases. */ +exports.realToAlias = (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + object = exports.aliasToReal, + result = {}; + + for (var key in object) { + var value = object[key]; + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + return result; +}()); + +/** Used to map method names to other names. */ +exports.remap = { + 'assignAll': 'assign', + 'assignAllWith': 'assignWith', + 'assignInAll': 'assignIn', + 'assignInAllWith': 'assignInWith', + 'curryN': 'curry', + 'curryRightN': 'curryRight', + 'defaultsAll': 'defaults', + 'defaultsDeepAll': 'defaultsDeep', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', + 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', + 'invokeArgs': 'invoke', + 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', + 'mergeAll': 'merge', + 'mergeAllWith': 'mergeWith', + 'padChars': 'pad', + 'padCharsEnd': 'padEnd', + 'padCharsStart': 'padStart', + 'propertyOf': 'get', + 'rangeStep': 'range', + 'rangeStepRight': 'rangeRight', + 'restFrom': 'rest', + 'spreadFrom': 'spread', + 'trimChars': 'trim', + 'trimCharsEnd': 'trimEnd', + 'trimCharsStart': 'trimStart', + 'zipAll': 'zip' +}; + +/** Used to track methods that skip fixing their arity. */ +exports.skipFixed = { + 'castArray': true, + 'flow': true, + 'flowRight': true, + 'iteratee': true, + 'mixin': true, + 'rearg': true, + 'runInContext': true +}; + +/** Used to track methods that skip rearranging arguments. */ +exports.skipRearg = { + 'add': true, + 'assign': true, + 'assignIn': true, + 'bind': true, + 'bindKey': true, + 'concat': true, + 'difference': true, + 'divide': true, + 'eq': true, + 'gt': true, + 'gte': true, + 'isEqual': true, + 'lt': true, + 'lte': true, + 'matchesProperty': true, + 'merge': true, + 'multiply': true, + 'overArgs': true, + 'partial': true, + 'partialRight': true, + 'propertyOf': true, + 'random': true, + 'range': true, + 'rangeRight': true, + 'subtract': true, + 'zip': true, + 'zipObject': true, + 'zipObjectDeep': true +}; diff --git a/src/hello/server/node_modules/lodash/fp/_util.js b/src/hello/server/node_modules/lodash/fp/_util.js new file mode 100644 index 00000000..1dbf36f5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/_util.js @@ -0,0 +1,16 @@ +module.exports = { + 'ary': require('../ary'), + 'assign': require('../_baseAssign'), + 'clone': require('../clone'), + 'curry': require('../curry'), + 'forEach': require('../_arrayEach'), + 'isArray': require('../isArray'), + 'isError': require('../isError'), + 'isFunction': require('../isFunction'), + 'isWeakMap': require('../isWeakMap'), + 'iteratee': require('../iteratee'), + 'keys': require('../_baseKeys'), + 'rearg': require('../rearg'), + 'toInteger': require('../toInteger'), + 'toPath': require('../toPath') +}; diff --git a/src/hello/server/node_modules/lodash/fp/add.js b/src/hello/server/node_modules/lodash/fp/add.js new file mode 100644 index 00000000..816eeece --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/add.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('add', require('../add')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/after.js b/src/hello/server/node_modules/lodash/fp/after.js new file mode 100644 index 00000000..21a0167a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/after.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('after', require('../after')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/all.js b/src/hello/server/node_modules/lodash/fp/all.js new file mode 100644 index 00000000..d0839f77 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/src/hello/server/node_modules/lodash/fp/allPass.js b/src/hello/server/node_modules/lodash/fp/allPass.js new file mode 100644 index 00000000..79b73ef8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/allPass.js @@ -0,0 +1 @@ +module.exports = require('./overEvery'); diff --git a/src/hello/server/node_modules/lodash/fp/always.js b/src/hello/server/node_modules/lodash/fp/always.js new file mode 100644 index 00000000..98877030 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/always.js @@ -0,0 +1 @@ +module.exports = require('./constant'); diff --git a/src/hello/server/node_modules/lodash/fp/any.js b/src/hello/server/node_modules/lodash/fp/any.js new file mode 100644 index 00000000..900ac25e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/src/hello/server/node_modules/lodash/fp/anyPass.js b/src/hello/server/node_modules/lodash/fp/anyPass.js new file mode 100644 index 00000000..2774ab37 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/anyPass.js @@ -0,0 +1 @@ +module.exports = require('./overSome'); diff --git a/src/hello/server/node_modules/lodash/fp/apply.js b/src/hello/server/node_modules/lodash/fp/apply.js new file mode 100644 index 00000000..2b757129 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/apply.js @@ -0,0 +1 @@ +module.exports = require('./spread'); diff --git a/src/hello/server/node_modules/lodash/fp/array.js b/src/hello/server/node_modules/lodash/fp/array.js new file mode 100644 index 00000000..fe939c2c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/array.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../array')); diff --git a/src/hello/server/node_modules/lodash/fp/ary.js b/src/hello/server/node_modules/lodash/fp/ary.js new file mode 100644 index 00000000..8edf1877 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/ary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ary', require('../ary')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assign.js b/src/hello/server/node_modules/lodash/fp/assign.js new file mode 100644 index 00000000..23f47af1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assign.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assign', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assignAll.js b/src/hello/server/node_modules/lodash/fp/assignAll.js new file mode 100644 index 00000000..b1d36c7e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assignAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAll', require('../assign')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assignAllWith.js b/src/hello/server/node_modules/lodash/fp/assignAllWith.js new file mode 100644 index 00000000..21e836e6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assignAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignAllWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assignIn.js b/src/hello/server/node_modules/lodash/fp/assignIn.js new file mode 100644 index 00000000..6e7c65fa --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assignIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignIn', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assignInAll.js b/src/hello/server/node_modules/lodash/fp/assignInAll.js new file mode 100644 index 00000000..7ba75dba --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assignInAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAll', require('../assignIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assignInAllWith.js b/src/hello/server/node_modules/lodash/fp/assignInAllWith.js new file mode 100644 index 00000000..e766903d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assignInAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInAllWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assignInWith.js b/src/hello/server/node_modules/lodash/fp/assignInWith.js new file mode 100644 index 00000000..acb59236 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assignInWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignInWith', require('../assignInWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assignWith.js b/src/hello/server/node_modules/lodash/fp/assignWith.js new file mode 100644 index 00000000..eb925212 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assignWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('assignWith', require('../assignWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/assoc.js b/src/hello/server/node_modules/lodash/fp/assoc.js new file mode 100644 index 00000000..7648820c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assoc.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/src/hello/server/node_modules/lodash/fp/assocPath.js b/src/hello/server/node_modules/lodash/fp/assocPath.js new file mode 100644 index 00000000..7648820c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/assocPath.js @@ -0,0 +1 @@ +module.exports = require('./set'); diff --git a/src/hello/server/node_modules/lodash/fp/at.js b/src/hello/server/node_modules/lodash/fp/at.js new file mode 100644 index 00000000..cc39d257 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/at.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('at', require('../at')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/attempt.js b/src/hello/server/node_modules/lodash/fp/attempt.js new file mode 100644 index 00000000..26ca42ea --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/attempt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('attempt', require('../attempt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/before.js b/src/hello/server/node_modules/lodash/fp/before.js new file mode 100644 index 00000000..7a2de65d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/before.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('before', require('../before')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/bind.js b/src/hello/server/node_modules/lodash/fp/bind.js new file mode 100644 index 00000000..5cbe4f30 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/bind.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bind', require('../bind')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/bindAll.js b/src/hello/server/node_modules/lodash/fp/bindAll.js new file mode 100644 index 00000000..6b4a4a0f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/bindAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindAll', require('../bindAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/bindKey.js b/src/hello/server/node_modules/lodash/fp/bindKey.js new file mode 100644 index 00000000..6a46c6b1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/bindKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('bindKey', require('../bindKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/camelCase.js b/src/hello/server/node_modules/lodash/fp/camelCase.js new file mode 100644 index 00000000..87b77b49 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/camelCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('camelCase', require('../camelCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/capitalize.js b/src/hello/server/node_modules/lodash/fp/capitalize.js new file mode 100644 index 00000000..cac74e14 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/capitalize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('capitalize', require('../capitalize'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/castArray.js b/src/hello/server/node_modules/lodash/fp/castArray.js new file mode 100644 index 00000000..8681c099 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/castArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('castArray', require('../castArray')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/ceil.js b/src/hello/server/node_modules/lodash/fp/ceil.js new file mode 100644 index 00000000..f416b729 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/ceil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('ceil', require('../ceil')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/chain.js b/src/hello/server/node_modules/lodash/fp/chain.js new file mode 100644 index 00000000..604fe398 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/chain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chain', require('../chain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/chunk.js b/src/hello/server/node_modules/lodash/fp/chunk.js new file mode 100644 index 00000000..871ab085 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/chunk.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('chunk', require('../chunk')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/clamp.js b/src/hello/server/node_modules/lodash/fp/clamp.js new file mode 100644 index 00000000..3b06c01c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/clamp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clamp', require('../clamp')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/clone.js b/src/hello/server/node_modules/lodash/fp/clone.js new file mode 100644 index 00000000..cadb59c9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/clone.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('clone', require('../clone'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/cloneDeep.js b/src/hello/server/node_modules/lodash/fp/cloneDeep.js new file mode 100644 index 00000000..a6107aac --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/cloneDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/cloneDeepWith.js b/src/hello/server/node_modules/lodash/fp/cloneDeepWith.js new file mode 100644 index 00000000..6f01e44a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/cloneDeepWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneDeepWith', require('../cloneDeepWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/cloneWith.js b/src/hello/server/node_modules/lodash/fp/cloneWith.js new file mode 100644 index 00000000..aa885781 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/cloneWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cloneWith', require('../cloneWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/collection.js b/src/hello/server/node_modules/lodash/fp/collection.js new file mode 100644 index 00000000..fc8b328a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/collection.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../collection')); diff --git a/src/hello/server/node_modules/lodash/fp/commit.js b/src/hello/server/node_modules/lodash/fp/commit.js new file mode 100644 index 00000000..130a894f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/commit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('commit', require('../commit'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/compact.js b/src/hello/server/node_modules/lodash/fp/compact.js new file mode 100644 index 00000000..ce8f7a1a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/compact.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('compact', require('../compact'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/complement.js b/src/hello/server/node_modules/lodash/fp/complement.js new file mode 100644 index 00000000..93eb462b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/complement.js @@ -0,0 +1 @@ +module.exports = require('./negate'); diff --git a/src/hello/server/node_modules/lodash/fp/compose.js b/src/hello/server/node_modules/lodash/fp/compose.js new file mode 100644 index 00000000..1954e942 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/src/hello/server/node_modules/lodash/fp/concat.js b/src/hello/server/node_modules/lodash/fp/concat.js new file mode 100644 index 00000000..e59346ad --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/concat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('concat', require('../concat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/cond.js b/src/hello/server/node_modules/lodash/fp/cond.js new file mode 100644 index 00000000..6a0120ef --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/cond.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('cond', require('../cond'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/conforms.js b/src/hello/server/node_modules/lodash/fp/conforms.js new file mode 100644 index 00000000..3247f64a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/conforms.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/src/hello/server/node_modules/lodash/fp/conformsTo.js b/src/hello/server/node_modules/lodash/fp/conformsTo.js new file mode 100644 index 00000000..aa7f41ec --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/conformsTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('conformsTo', require('../conformsTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/constant.js b/src/hello/server/node_modules/lodash/fp/constant.js new file mode 100644 index 00000000..9e406fc0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/constant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('constant', require('../constant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/contains.js b/src/hello/server/node_modules/lodash/fp/contains.js new file mode 100644 index 00000000..594722af --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/src/hello/server/node_modules/lodash/fp/convert.js b/src/hello/server/node_modules/lodash/fp/convert.js new file mode 100644 index 00000000..4795dc42 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/convert.js @@ -0,0 +1,18 @@ +var baseConvert = require('./_baseConvert'), + util = require('./_util'); + +/** + * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last + * version with conversion `options` applied. If `name` is an object its methods + * will be converted. + * + * @param {string} name The name of the function to wrap. + * @param {Function} [func] The function to wrap. + * @param {Object} [options] The options object. See `baseConvert` for more details. + * @returns {Function|Object} Returns the converted function or object. + */ +function convert(name, func, options) { + return baseConvert(util, name, func, options); +} + +module.exports = convert; diff --git a/src/hello/server/node_modules/lodash/fp/countBy.js b/src/hello/server/node_modules/lodash/fp/countBy.js new file mode 100644 index 00000000..dfa46432 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/countBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('countBy', require('../countBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/create.js b/src/hello/server/node_modules/lodash/fp/create.js new file mode 100644 index 00000000..752025fb --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/create.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('create', require('../create')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/curry.js b/src/hello/server/node_modules/lodash/fp/curry.js new file mode 100644 index 00000000..b0b4168c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/curry.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curry', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/curryN.js b/src/hello/server/node_modules/lodash/fp/curryN.js new file mode 100644 index 00000000..2ae7d00a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/curryN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryN', require('../curry')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/curryRight.js b/src/hello/server/node_modules/lodash/fp/curryRight.js new file mode 100644 index 00000000..cb619eb5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/curryRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRight', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/curryRightN.js b/src/hello/server/node_modules/lodash/fp/curryRightN.js new file mode 100644 index 00000000..2495afc8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/curryRightN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('curryRightN', require('../curryRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/date.js b/src/hello/server/node_modules/lodash/fp/date.js new file mode 100644 index 00000000..82cb952b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/date.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../date')); diff --git a/src/hello/server/node_modules/lodash/fp/debounce.js b/src/hello/server/node_modules/lodash/fp/debounce.js new file mode 100644 index 00000000..26122293 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/debounce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('debounce', require('../debounce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/deburr.js b/src/hello/server/node_modules/lodash/fp/deburr.js new file mode 100644 index 00000000..96463ab8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/deburr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('deburr', require('../deburr'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/defaultTo.js b/src/hello/server/node_modules/lodash/fp/defaultTo.js new file mode 100644 index 00000000..d6b52a44 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/defaultTo.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultTo', require('../defaultTo')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/defaults.js b/src/hello/server/node_modules/lodash/fp/defaults.js new file mode 100644 index 00000000..e1a8e6e7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/defaults.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaults', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/defaultsAll.js b/src/hello/server/node_modules/lodash/fp/defaultsAll.js new file mode 100644 index 00000000..238fcc3c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/defaultsAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsAll', require('../defaults')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/defaultsDeep.js b/src/hello/server/node_modules/lodash/fp/defaultsDeep.js new file mode 100644 index 00000000..1f172ff9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/defaultsDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeep', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/defaultsDeepAll.js b/src/hello/server/node_modules/lodash/fp/defaultsDeepAll.js new file mode 100644 index 00000000..6835f2f0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/defaultsDeepAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defaultsDeepAll', require('../defaultsDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/defer.js b/src/hello/server/node_modules/lodash/fp/defer.js new file mode 100644 index 00000000..ec7990fe --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/defer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('defer', require('../defer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/delay.js b/src/hello/server/node_modules/lodash/fp/delay.js new file mode 100644 index 00000000..556dbd56 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/delay.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('delay', require('../delay')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/difference.js b/src/hello/server/node_modules/lodash/fp/difference.js new file mode 100644 index 00000000..2d037654 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/difference.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('difference', require('../difference')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/differenceBy.js b/src/hello/server/node_modules/lodash/fp/differenceBy.js new file mode 100644 index 00000000..2f914910 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/differenceBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceBy', require('../differenceBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/differenceWith.js b/src/hello/server/node_modules/lodash/fp/differenceWith.js new file mode 100644 index 00000000..bcf5ad2e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/differenceWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('differenceWith', require('../differenceWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/dissoc.js b/src/hello/server/node_modules/lodash/fp/dissoc.js new file mode 100644 index 00000000..7ec7be19 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/dissoc.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/src/hello/server/node_modules/lodash/fp/dissocPath.js b/src/hello/server/node_modules/lodash/fp/dissocPath.js new file mode 100644 index 00000000..7ec7be19 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/dissocPath.js @@ -0,0 +1 @@ +module.exports = require('./unset'); diff --git a/src/hello/server/node_modules/lodash/fp/divide.js b/src/hello/server/node_modules/lodash/fp/divide.js new file mode 100644 index 00000000..82048c5e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/divide.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('divide', require('../divide')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/drop.js b/src/hello/server/node_modules/lodash/fp/drop.js new file mode 100644 index 00000000..2fa9b4fa --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/drop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('drop', require('../drop')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/dropLast.js b/src/hello/server/node_modules/lodash/fp/dropLast.js new file mode 100644 index 00000000..174e5255 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/dropLast.js @@ -0,0 +1 @@ +module.exports = require('./dropRight'); diff --git a/src/hello/server/node_modules/lodash/fp/dropLastWhile.js b/src/hello/server/node_modules/lodash/fp/dropLastWhile.js new file mode 100644 index 00000000..be2a9d24 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/dropLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./dropRightWhile'); diff --git a/src/hello/server/node_modules/lodash/fp/dropRight.js b/src/hello/server/node_modules/lodash/fp/dropRight.js new file mode 100644 index 00000000..e98881fc --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/dropRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRight', require('../dropRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/dropRightWhile.js b/src/hello/server/node_modules/lodash/fp/dropRightWhile.js new file mode 100644 index 00000000..cacaa701 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/dropRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropRightWhile', require('../dropRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/dropWhile.js b/src/hello/server/node_modules/lodash/fp/dropWhile.js new file mode 100644 index 00000000..285f864d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/dropWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('dropWhile', require('../dropWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/each.js b/src/hello/server/node_modules/lodash/fp/each.js new file mode 100644 index 00000000..8800f420 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/src/hello/server/node_modules/lodash/fp/eachRight.js b/src/hello/server/node_modules/lodash/fp/eachRight.js new file mode 100644 index 00000000..3252b2ab --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/src/hello/server/node_modules/lodash/fp/endsWith.js b/src/hello/server/node_modules/lodash/fp/endsWith.js new file mode 100644 index 00000000..17dc2a49 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/endsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('endsWith', require('../endsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/entries.js b/src/hello/server/node_modules/lodash/fp/entries.js new file mode 100644 index 00000000..7a88df20 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/entries.js @@ -0,0 +1 @@ +module.exports = require('./toPairs'); diff --git a/src/hello/server/node_modules/lodash/fp/entriesIn.js b/src/hello/server/node_modules/lodash/fp/entriesIn.js new file mode 100644 index 00000000..f6c6331c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/entriesIn.js @@ -0,0 +1 @@ +module.exports = require('./toPairsIn'); diff --git a/src/hello/server/node_modules/lodash/fp/eq.js b/src/hello/server/node_modules/lodash/fp/eq.js new file mode 100644 index 00000000..9a3d21bf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/eq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('eq', require('../eq')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/equals.js b/src/hello/server/node_modules/lodash/fp/equals.js new file mode 100644 index 00000000..e6a5ce0c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/equals.js @@ -0,0 +1 @@ +module.exports = require('./isEqual'); diff --git a/src/hello/server/node_modules/lodash/fp/escape.js b/src/hello/server/node_modules/lodash/fp/escape.js new file mode 100644 index 00000000..52c1fbba --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/escape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escape', require('../escape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/escapeRegExp.js b/src/hello/server/node_modules/lodash/fp/escapeRegExp.js new file mode 100644 index 00000000..369b2eff --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/escapeRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/every.js b/src/hello/server/node_modules/lodash/fp/every.js new file mode 100644 index 00000000..95c2776c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/every.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('every', require('../every')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/extend.js b/src/hello/server/node_modules/lodash/fp/extend.js new file mode 100644 index 00000000..e00166c2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/extend.js @@ -0,0 +1 @@ +module.exports = require('./assignIn'); diff --git a/src/hello/server/node_modules/lodash/fp/extendAll.js b/src/hello/server/node_modules/lodash/fp/extendAll.js new file mode 100644 index 00000000..cc55b64f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/extendAll.js @@ -0,0 +1 @@ +module.exports = require('./assignInAll'); diff --git a/src/hello/server/node_modules/lodash/fp/extendAllWith.js b/src/hello/server/node_modules/lodash/fp/extendAllWith.js new file mode 100644 index 00000000..6679d208 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/extendAllWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInAllWith'); diff --git a/src/hello/server/node_modules/lodash/fp/extendWith.js b/src/hello/server/node_modules/lodash/fp/extendWith.js new file mode 100644 index 00000000..dbdcb3b4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/extendWith.js @@ -0,0 +1 @@ +module.exports = require('./assignInWith'); diff --git a/src/hello/server/node_modules/lodash/fp/fill.js b/src/hello/server/node_modules/lodash/fp/fill.js new file mode 100644 index 00000000..b2d47e84 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/fill.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fill', require('../fill')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/filter.js b/src/hello/server/node_modules/lodash/fp/filter.js new file mode 100644 index 00000000..796d501c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/filter.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('filter', require('../filter')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/find.js b/src/hello/server/node_modules/lodash/fp/find.js new file mode 100644 index 00000000..f805d336 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/find.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('find', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findFrom.js b/src/hello/server/node_modules/lodash/fp/findFrom.js new file mode 100644 index 00000000..da8275e8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findIndex.js b/src/hello/server/node_modules/lodash/fp/findIndex.js new file mode 100644 index 00000000..8c15fd11 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndex', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findIndexFrom.js b/src/hello/server/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 00000000..32e98cb9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findKey.js b/src/hello/server/node_modules/lodash/fp/findKey.js new file mode 100644 index 00000000..475bcfa8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findKey', require('../findKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findLast.js b/src/hello/server/node_modules/lodash/fp/findLast.js new file mode 100644 index 00000000..093fe94e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findLast.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLast', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findLastFrom.js b/src/hello/server/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 00000000..76c38fba --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findLastIndex.js b/src/hello/server/node_modules/lodash/fp/findLastIndex.js new file mode 100644 index 00000000..36986df0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndex', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findLastIndexFrom.js b/src/hello/server/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 00000000..34c8176c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/findLastKey.js b/src/hello/server/node_modules/lodash/fp/findLastKey.js new file mode 100644 index 00000000..5f81b604 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/findLastKey.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastKey', require('../findLastKey')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/first.js b/src/hello/server/node_modules/lodash/fp/first.js new file mode 100644 index 00000000..53f4ad13 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/src/hello/server/node_modules/lodash/fp/flatMap.js b/src/hello/server/node_modules/lodash/fp/flatMap.js new file mode 100644 index 00000000..d01dc4d0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flatMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMap', require('../flatMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flatMapDeep.js b/src/hello/server/node_modules/lodash/fp/flatMapDeep.js new file mode 100644 index 00000000..569c42eb --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flatMapDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDeep', require('../flatMapDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flatMapDepth.js b/src/hello/server/node_modules/lodash/fp/flatMapDepth.js new file mode 100644 index 00000000..6eb68fde --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flatMapDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatMapDepth', require('../flatMapDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flatten.js b/src/hello/server/node_modules/lodash/fp/flatten.js new file mode 100644 index 00000000..30425d89 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flatten.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flatten', require('../flatten'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flattenDeep.js b/src/hello/server/node_modules/lodash/fp/flattenDeep.js new file mode 100644 index 00000000..aed5db27 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flattenDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDeep', require('../flattenDeep'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flattenDepth.js b/src/hello/server/node_modules/lodash/fp/flattenDepth.js new file mode 100644 index 00000000..ad65e378 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flattenDepth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flattenDepth', require('../flattenDepth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flip.js b/src/hello/server/node_modules/lodash/fp/flip.js new file mode 100644 index 00000000..0547e7b4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flip', require('../flip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/floor.js b/src/hello/server/node_modules/lodash/fp/floor.js new file mode 100644 index 00000000..a6cf3358 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/floor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('floor', require('../floor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flow.js b/src/hello/server/node_modules/lodash/fp/flow.js new file mode 100644 index 00000000..cd83677a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flow.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flow', require('../flow')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/flowRight.js b/src/hello/server/node_modules/lodash/fp/flowRight.js new file mode 100644 index 00000000..972a5b9b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/flowRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('flowRight', require('../flowRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/forEach.js b/src/hello/server/node_modules/lodash/fp/forEach.js new file mode 100644 index 00000000..2f494521 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/forEach.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEach', require('../forEach')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/forEachRight.js b/src/hello/server/node_modules/lodash/fp/forEachRight.js new file mode 100644 index 00000000..3ff97336 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/forEachRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forEachRight', require('../forEachRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/forIn.js b/src/hello/server/node_modules/lodash/fp/forIn.js new file mode 100644 index 00000000..9341749b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/forIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forIn', require('../forIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/forInRight.js b/src/hello/server/node_modules/lodash/fp/forInRight.js new file mode 100644 index 00000000..cecf8bbf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/forInRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forInRight', require('../forInRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/forOwn.js b/src/hello/server/node_modules/lodash/fp/forOwn.js new file mode 100644 index 00000000..246449e9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/forOwn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwn', require('../forOwn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/forOwnRight.js b/src/hello/server/node_modules/lodash/fp/forOwnRight.js new file mode 100644 index 00000000..c5e826e0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/forOwnRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('forOwnRight', require('../forOwnRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/fromPairs.js b/src/hello/server/node_modules/lodash/fp/fromPairs.js new file mode 100644 index 00000000..f8cc5968 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/fromPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('fromPairs', require('../fromPairs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/function.js b/src/hello/server/node_modules/lodash/fp/function.js new file mode 100644 index 00000000..dfe69b1f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/function.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../function')); diff --git a/src/hello/server/node_modules/lodash/fp/functions.js b/src/hello/server/node_modules/lodash/fp/functions.js new file mode 100644 index 00000000..09d1bb1b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/functions.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functions', require('../functions'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/functionsIn.js b/src/hello/server/node_modules/lodash/fp/functionsIn.js new file mode 100644 index 00000000..2cfeb83e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/functionsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('functionsIn', require('../functionsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/get.js b/src/hello/server/node_modules/lodash/fp/get.js new file mode 100644 index 00000000..6d3a3286 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/get.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('get', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/getOr.js b/src/hello/server/node_modules/lodash/fp/getOr.js new file mode 100644 index 00000000..7dbf771f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/getOr.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('getOr', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/groupBy.js b/src/hello/server/node_modules/lodash/fp/groupBy.js new file mode 100644 index 00000000..fc0bc78a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/groupBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('groupBy', require('../groupBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/gt.js b/src/hello/server/node_modules/lodash/fp/gt.js new file mode 100644 index 00000000..9e57c808 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/gt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gt', require('../gt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/gte.js b/src/hello/server/node_modules/lodash/fp/gte.js new file mode 100644 index 00000000..45847863 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/gte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('gte', require('../gte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/has.js b/src/hello/server/node_modules/lodash/fp/has.js new file mode 100644 index 00000000..b9012983 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/has.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('has', require('../has')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/hasIn.js b/src/hello/server/node_modules/lodash/fp/hasIn.js new file mode 100644 index 00000000..b3c3d1a3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/hasIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('hasIn', require('../hasIn')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/head.js b/src/hello/server/node_modules/lodash/fp/head.js new file mode 100644 index 00000000..2694f0a2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/head.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('head', require('../head'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/identical.js b/src/hello/server/node_modules/lodash/fp/identical.js new file mode 100644 index 00000000..85563f4a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/identical.js @@ -0,0 +1 @@ +module.exports = require('./eq'); diff --git a/src/hello/server/node_modules/lodash/fp/identity.js b/src/hello/server/node_modules/lodash/fp/identity.js new file mode 100644 index 00000000..096415a5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/identity.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('identity', require('../identity'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/inRange.js b/src/hello/server/node_modules/lodash/fp/inRange.js new file mode 100644 index 00000000..202d940b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/inRange.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('inRange', require('../inRange')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/includes.js b/src/hello/server/node_modules/lodash/fp/includes.js new file mode 100644 index 00000000..11467805 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/includes.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includes', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/includesFrom.js b/src/hello/server/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 00000000..683afdb4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/indexBy.js b/src/hello/server/node_modules/lodash/fp/indexBy.js new file mode 100644 index 00000000..7e64bc0f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/indexBy.js @@ -0,0 +1 @@ +module.exports = require('./keyBy'); diff --git a/src/hello/server/node_modules/lodash/fp/indexOf.js b/src/hello/server/node_modules/lodash/fp/indexOf.js new file mode 100644 index 00000000..524658eb --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/indexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOf', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/indexOfFrom.js b/src/hello/server/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 00000000..d99c822f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/init.js b/src/hello/server/node_modules/lodash/fp/init.js new file mode 100644 index 00000000..2f88d8b0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/init.js @@ -0,0 +1 @@ +module.exports = require('./initial'); diff --git a/src/hello/server/node_modules/lodash/fp/initial.js b/src/hello/server/node_modules/lodash/fp/initial.js new file mode 100644 index 00000000..b732ba0b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/initial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('initial', require('../initial'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/intersection.js b/src/hello/server/node_modules/lodash/fp/intersection.js new file mode 100644 index 00000000..52936d56 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/intersection.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersection', require('../intersection')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/intersectionBy.js b/src/hello/server/node_modules/lodash/fp/intersectionBy.js new file mode 100644 index 00000000..72629f27 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/intersectionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionBy', require('../intersectionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/intersectionWith.js b/src/hello/server/node_modules/lodash/fp/intersectionWith.js new file mode 100644 index 00000000..e064f400 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/intersectionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('intersectionWith', require('../intersectionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/invert.js b/src/hello/server/node_modules/lodash/fp/invert.js new file mode 100644 index 00000000..2d5d1f0d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/invert.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invert', require('../invert')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/invertBy.js b/src/hello/server/node_modules/lodash/fp/invertBy.js new file mode 100644 index 00000000..63ca97ec --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/invertBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invertBy', require('../invertBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/invertObj.js b/src/hello/server/node_modules/lodash/fp/invertObj.js new file mode 100644 index 00000000..f1d842e4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/invertObj.js @@ -0,0 +1 @@ +module.exports = require('./invert'); diff --git a/src/hello/server/node_modules/lodash/fp/invoke.js b/src/hello/server/node_modules/lodash/fp/invoke.js new file mode 100644 index 00000000..fcf17f0d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/invoke.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invoke', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/invokeArgs.js b/src/hello/server/node_modules/lodash/fp/invokeArgs.js new file mode 100644 index 00000000..d3f2953f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/invokeArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgs', require('../invoke')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/invokeArgsMap.js b/src/hello/server/node_modules/lodash/fp/invokeArgsMap.js new file mode 100644 index 00000000..eaa9f84f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/invokeArgsMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeArgsMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/invokeMap.js b/src/hello/server/node_modules/lodash/fp/invokeMap.js new file mode 100644 index 00000000..6515fd73 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/invokeMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('invokeMap', require('../invokeMap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isArguments.js b/src/hello/server/node_modules/lodash/fp/isArguments.js new file mode 100644 index 00000000..1d93c9e5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isArguments.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArguments', require('../isArguments'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isArray.js b/src/hello/server/node_modules/lodash/fp/isArray.js new file mode 100644 index 00000000..ba7ade8d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArray', require('../isArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isArrayBuffer.js b/src/hello/server/node_modules/lodash/fp/isArrayBuffer.js new file mode 100644 index 00000000..5088513f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isArrayBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayBuffer', require('../isArrayBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isArrayLike.js b/src/hello/server/node_modules/lodash/fp/isArrayLike.js new file mode 100644 index 00000000..8f1856bf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isArrayLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLike', require('../isArrayLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isArrayLikeObject.js b/src/hello/server/node_modules/lodash/fp/isArrayLikeObject.js new file mode 100644 index 00000000..21084984 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isArrayLikeObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isArrayLikeObject', require('../isArrayLikeObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isBoolean.js b/src/hello/server/node_modules/lodash/fp/isBoolean.js new file mode 100644 index 00000000..9339f75b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isBoolean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBoolean', require('../isBoolean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isBuffer.js b/src/hello/server/node_modules/lodash/fp/isBuffer.js new file mode 100644 index 00000000..e60b1238 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isBuffer.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isBuffer', require('../isBuffer'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isDate.js b/src/hello/server/node_modules/lodash/fp/isDate.js new file mode 100644 index 00000000..dc41d089 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isDate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isDate', require('../isDate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isElement.js b/src/hello/server/node_modules/lodash/fp/isElement.js new file mode 100644 index 00000000..18ee039a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isElement.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isElement', require('../isElement'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isEmpty.js b/src/hello/server/node_modules/lodash/fp/isEmpty.js new file mode 100644 index 00000000..0f4ae841 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isEmpty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEmpty', require('../isEmpty'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isEqual.js b/src/hello/server/node_modules/lodash/fp/isEqual.js new file mode 100644 index 00000000..41383865 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isEqual.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqual', require('../isEqual')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isEqualWith.js b/src/hello/server/node_modules/lodash/fp/isEqualWith.js new file mode 100644 index 00000000..029ff5cd --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isEqualWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isEqualWith', require('../isEqualWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isError.js b/src/hello/server/node_modules/lodash/fp/isError.js new file mode 100644 index 00000000..3dfd81cc --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isError.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isError', require('../isError'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isFinite.js b/src/hello/server/node_modules/lodash/fp/isFinite.js new file mode 100644 index 00000000..0b647b84 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFinite', require('../isFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isFunction.js b/src/hello/server/node_modules/lodash/fp/isFunction.js new file mode 100644 index 00000000..ff8e5c45 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isFunction.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isFunction', require('../isFunction'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isInteger.js b/src/hello/server/node_modules/lodash/fp/isInteger.js new file mode 100644 index 00000000..67af4ff6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isInteger', require('../isInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isLength.js b/src/hello/server/node_modules/lodash/fp/isLength.js new file mode 100644 index 00000000..fc101c5a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isLength', require('../isLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isMap.js b/src/hello/server/node_modules/lodash/fp/isMap.js new file mode 100644 index 00000000..a209aa66 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMap', require('../isMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isMatch.js b/src/hello/server/node_modules/lodash/fp/isMatch.js new file mode 100644 index 00000000..6264ca17 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isMatch.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatch', require('../isMatch')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isMatchWith.js b/src/hello/server/node_modules/lodash/fp/isMatchWith.js new file mode 100644 index 00000000..d95f3193 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isMatchWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isMatchWith', require('../isMatchWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isNaN.js b/src/hello/server/node_modules/lodash/fp/isNaN.js new file mode 100644 index 00000000..66a978f1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isNaN.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNaN', require('../isNaN'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isNative.js b/src/hello/server/node_modules/lodash/fp/isNative.js new file mode 100644 index 00000000..3d775ba9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isNative.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNative', require('../isNative'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isNil.js b/src/hello/server/node_modules/lodash/fp/isNil.js new file mode 100644 index 00000000..5952c028 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isNil.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNil', require('../isNil'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isNull.js b/src/hello/server/node_modules/lodash/fp/isNull.js new file mode 100644 index 00000000..f201a354 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isNull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNull', require('../isNull'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isNumber.js b/src/hello/server/node_modules/lodash/fp/isNumber.js new file mode 100644 index 00000000..a2b5fa04 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isNumber', require('../isNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isObject.js b/src/hello/server/node_modules/lodash/fp/isObject.js new file mode 100644 index 00000000..231ace03 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObject', require('../isObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isObjectLike.js b/src/hello/server/node_modules/lodash/fp/isObjectLike.js new file mode 100644 index 00000000..f16082e6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isObjectLike.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isObjectLike', require('../isObjectLike'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isPlainObject.js b/src/hello/server/node_modules/lodash/fp/isPlainObject.js new file mode 100644 index 00000000..b5bea90d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isPlainObject', require('../isPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isRegExp.js b/src/hello/server/node_modules/lodash/fp/isRegExp.js new file mode 100644 index 00000000..12a1a3d7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isRegExp.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isRegExp', require('../isRegExp'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isSafeInteger.js b/src/hello/server/node_modules/lodash/fp/isSafeInteger.js new file mode 100644 index 00000000..7230f552 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSafeInteger', require('../isSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isSet.js b/src/hello/server/node_modules/lodash/fp/isSet.js new file mode 100644 index 00000000..35c01f6f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSet', require('../isSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isString.js b/src/hello/server/node_modules/lodash/fp/isString.js new file mode 100644 index 00000000..1fd0679e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isString', require('../isString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isSymbol.js b/src/hello/server/node_modules/lodash/fp/isSymbol.js new file mode 100644 index 00000000..38676956 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isSymbol.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isTypedArray.js b/src/hello/server/node_modules/lodash/fp/isTypedArray.js new file mode 100644 index 00000000..85679538 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isTypedArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isTypedArray', require('../isTypedArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isUndefined.js b/src/hello/server/node_modules/lodash/fp/isUndefined.js new file mode 100644 index 00000000..ddbca31c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isUndefined.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isUndefined', require('../isUndefined'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isWeakMap.js b/src/hello/server/node_modules/lodash/fp/isWeakMap.js new file mode 100644 index 00000000..ef60c613 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isWeakMap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakMap', require('../isWeakMap'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/isWeakSet.js b/src/hello/server/node_modules/lodash/fp/isWeakSet.js new file mode 100644 index 00000000..c99bfaa6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/isWeakSet.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/iteratee.js b/src/hello/server/node_modules/lodash/fp/iteratee.js new file mode 100644 index 00000000..9f0f7173 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/iteratee.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('iteratee', require('../iteratee')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/join.js b/src/hello/server/node_modules/lodash/fp/join.js new file mode 100644 index 00000000..a220e003 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/join.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('join', require('../join')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/juxt.js b/src/hello/server/node_modules/lodash/fp/juxt.js new file mode 100644 index 00000000..f71e04e0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/juxt.js @@ -0,0 +1 @@ +module.exports = require('./over'); diff --git a/src/hello/server/node_modules/lodash/fp/kebabCase.js b/src/hello/server/node_modules/lodash/fp/kebabCase.js new file mode 100644 index 00000000..60737f17 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/kebabCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('kebabCase', require('../kebabCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/keyBy.js b/src/hello/server/node_modules/lodash/fp/keyBy.js new file mode 100644 index 00000000..9a6a85d4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/keyBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keyBy', require('../keyBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/keys.js b/src/hello/server/node_modules/lodash/fp/keys.js new file mode 100644 index 00000000..e12bb07f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/keys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keys', require('../keys'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/keysIn.js b/src/hello/server/node_modules/lodash/fp/keysIn.js new file mode 100644 index 00000000..f3eb36a8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/keysIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('keysIn', require('../keysIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/lang.js b/src/hello/server/node_modules/lodash/fp/lang.js new file mode 100644 index 00000000..08cc9c14 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/lang.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../lang')); diff --git a/src/hello/server/node_modules/lodash/fp/last.js b/src/hello/server/node_modules/lodash/fp/last.js new file mode 100644 index 00000000..0f716993 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/last.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('last', require('../last'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/lastIndexOf.js b/src/hello/server/node_modules/lodash/fp/lastIndexOf.js new file mode 100644 index 00000000..ddf39c30 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/lastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOf', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/lastIndexOfFrom.js b/src/hello/server/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 00000000..1ff6a0b5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/lowerCase.js b/src/hello/server/node_modules/lodash/fp/lowerCase.js new file mode 100644 index 00000000..ea64bc15 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/lowerCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerCase', require('../lowerCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/lowerFirst.js b/src/hello/server/node_modules/lodash/fp/lowerFirst.js new file mode 100644 index 00000000..539720a3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/lowerFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lowerFirst', require('../lowerFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/lt.js b/src/hello/server/node_modules/lodash/fp/lt.js new file mode 100644 index 00000000..a31d21ec --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/lt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lt', require('../lt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/lte.js b/src/hello/server/node_modules/lodash/fp/lte.js new file mode 100644 index 00000000..d795d10e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/lte.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lte', require('../lte')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/map.js b/src/hello/server/node_modules/lodash/fp/map.js new file mode 100644 index 00000000..cf987943 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/map.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('map', require('../map')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/mapKeys.js b/src/hello/server/node_modules/lodash/fp/mapKeys.js new file mode 100644 index 00000000..16845870 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/mapKeys.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapKeys', require('../mapKeys')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/mapValues.js b/src/hello/server/node_modules/lodash/fp/mapValues.js new file mode 100644 index 00000000..40049727 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/mapValues.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mapValues', require('../mapValues')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/matches.js b/src/hello/server/node_modules/lodash/fp/matches.js new file mode 100644 index 00000000..29d1e1e4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/matches.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/src/hello/server/node_modules/lodash/fp/matchesProperty.js b/src/hello/server/node_modules/lodash/fp/matchesProperty.js new file mode 100644 index 00000000..4575bd24 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/matchesProperty.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('matchesProperty', require('../matchesProperty')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/math.js b/src/hello/server/node_modules/lodash/fp/math.js new file mode 100644 index 00000000..e8f50f79 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/math.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../math')); diff --git a/src/hello/server/node_modules/lodash/fp/max.js b/src/hello/server/node_modules/lodash/fp/max.js new file mode 100644 index 00000000..a66acac2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/max.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('max', require('../max'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/maxBy.js b/src/hello/server/node_modules/lodash/fp/maxBy.js new file mode 100644 index 00000000..d083fd64 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/maxBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('maxBy', require('../maxBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/mean.js b/src/hello/server/node_modules/lodash/fp/mean.js new file mode 100644 index 00000000..31172460 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/mean.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mean', require('../mean'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/meanBy.js b/src/hello/server/node_modules/lodash/fp/meanBy.js new file mode 100644 index 00000000..556f25ed --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/meanBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('meanBy', require('../meanBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/memoize.js b/src/hello/server/node_modules/lodash/fp/memoize.js new file mode 100644 index 00000000..638eec63 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/memoize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('memoize', require('../memoize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/merge.js b/src/hello/server/node_modules/lodash/fp/merge.js new file mode 100644 index 00000000..ac66adde --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/merge.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('merge', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/mergeAll.js b/src/hello/server/node_modules/lodash/fp/mergeAll.js new file mode 100644 index 00000000..a3674d67 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/mergeAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAll', require('../merge')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/mergeAllWith.js b/src/hello/server/node_modules/lodash/fp/mergeAllWith.js new file mode 100644 index 00000000..4bd4206d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/mergeAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeAllWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/mergeWith.js b/src/hello/server/node_modules/lodash/fp/mergeWith.js new file mode 100644 index 00000000..00d44d5e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/mergeWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mergeWith', require('../mergeWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/method.js b/src/hello/server/node_modules/lodash/fp/method.js new file mode 100644 index 00000000..f4060c68 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/method.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('method', require('../method')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/methodOf.js b/src/hello/server/node_modules/lodash/fp/methodOf.js new file mode 100644 index 00000000..61399056 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/methodOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('methodOf', require('../methodOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/min.js b/src/hello/server/node_modules/lodash/fp/min.js new file mode 100644 index 00000000..d12c6b40 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/min.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('min', require('../min'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/minBy.js b/src/hello/server/node_modules/lodash/fp/minBy.js new file mode 100644 index 00000000..fdb9e24d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/minBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('minBy', require('../minBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/mixin.js b/src/hello/server/node_modules/lodash/fp/mixin.js new file mode 100644 index 00000000..332e6fbf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/mixin.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('mixin', require('../mixin')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/multiply.js b/src/hello/server/node_modules/lodash/fp/multiply.js new file mode 100644 index 00000000..4dcf0b0d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/multiply.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('multiply', require('../multiply')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/nAry.js b/src/hello/server/node_modules/lodash/fp/nAry.js new file mode 100644 index 00000000..f262a76c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/nAry.js @@ -0,0 +1 @@ +module.exports = require('./ary'); diff --git a/src/hello/server/node_modules/lodash/fp/negate.js b/src/hello/server/node_modules/lodash/fp/negate.js new file mode 100644 index 00000000..8b6dc7c5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/negate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('negate', require('../negate'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/next.js b/src/hello/server/node_modules/lodash/fp/next.js new file mode 100644 index 00000000..140155e2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/next.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('next', require('../next'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/noop.js b/src/hello/server/node_modules/lodash/fp/noop.js new file mode 100644 index 00000000..b9e32cc8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/noop.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('noop', require('../noop'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/now.js b/src/hello/server/node_modules/lodash/fp/now.js new file mode 100644 index 00000000..6de2068a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/now.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('now', require('../now'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/nth.js b/src/hello/server/node_modules/lodash/fp/nth.js new file mode 100644 index 00000000..da4fda74 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/nth.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nth', require('../nth')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/nthArg.js b/src/hello/server/node_modules/lodash/fp/nthArg.js new file mode 100644 index 00000000..fce31659 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/nthArg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('nthArg', require('../nthArg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/number.js b/src/hello/server/node_modules/lodash/fp/number.js new file mode 100644 index 00000000..5c10b884 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/number.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../number')); diff --git a/src/hello/server/node_modules/lodash/fp/object.js b/src/hello/server/node_modules/lodash/fp/object.js new file mode 100644 index 00000000..ae39a134 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/object.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../object')); diff --git a/src/hello/server/node_modules/lodash/fp/omit.js b/src/hello/server/node_modules/lodash/fp/omit.js new file mode 100644 index 00000000..fd685291 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/omit.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omit', require('../omit')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/omitAll.js b/src/hello/server/node_modules/lodash/fp/omitAll.js new file mode 100644 index 00000000..144cf4b9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/omitAll.js @@ -0,0 +1 @@ +module.exports = require('./omit'); diff --git a/src/hello/server/node_modules/lodash/fp/omitBy.js b/src/hello/server/node_modules/lodash/fp/omitBy.js new file mode 100644 index 00000000..90df7380 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/omitBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('omitBy', require('../omitBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/once.js b/src/hello/server/node_modules/lodash/fp/once.js new file mode 100644 index 00000000..f8f0a5c7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/once.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('once', require('../once'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/orderBy.js b/src/hello/server/node_modules/lodash/fp/orderBy.js new file mode 100644 index 00000000..848e2107 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/orderBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('orderBy', require('../orderBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/over.js b/src/hello/server/node_modules/lodash/fp/over.js new file mode 100644 index 00000000..01eba7b9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/over.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('over', require('../over')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/overArgs.js b/src/hello/server/node_modules/lodash/fp/overArgs.js new file mode 100644 index 00000000..738556f0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/overArgs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overArgs', require('../overArgs')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/overEvery.js b/src/hello/server/node_modules/lodash/fp/overEvery.js new file mode 100644 index 00000000..9f5a032d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/overEvery.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overEvery', require('../overEvery')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/overSome.js b/src/hello/server/node_modules/lodash/fp/overSome.js new file mode 100644 index 00000000..15939d58 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/overSome.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('overSome', require('../overSome')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pad.js b/src/hello/server/node_modules/lodash/fp/pad.js new file mode 100644 index 00000000..f1dea4a9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pad.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pad', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/padChars.js b/src/hello/server/node_modules/lodash/fp/padChars.js new file mode 100644 index 00000000..d6e0804c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/padChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padChars', require('../pad')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/padCharsEnd.js b/src/hello/server/node_modules/lodash/fp/padCharsEnd.js new file mode 100644 index 00000000..d4ab79ad --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/padCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/padCharsStart.js b/src/hello/server/node_modules/lodash/fp/padCharsStart.js new file mode 100644 index 00000000..a08a3000 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/padCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padCharsStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/padEnd.js b/src/hello/server/node_modules/lodash/fp/padEnd.js new file mode 100644 index 00000000..a8522ec3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/padEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padEnd', require('../padEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/padStart.js b/src/hello/server/node_modules/lodash/fp/padStart.js new file mode 100644 index 00000000..f4ca79d4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/padStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('padStart', require('../padStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/parseInt.js b/src/hello/server/node_modules/lodash/fp/parseInt.js new file mode 100644 index 00000000..27314ccb --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/parseInt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('parseInt', require('../parseInt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/partial.js b/src/hello/server/node_modules/lodash/fp/partial.js new file mode 100644 index 00000000..5d460159 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/partial.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partial', require('../partial')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/partialRight.js b/src/hello/server/node_modules/lodash/fp/partialRight.js new file mode 100644 index 00000000..7f05fed0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/partialRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partialRight', require('../partialRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/partition.js b/src/hello/server/node_modules/lodash/fp/partition.js new file mode 100644 index 00000000..2ebcacc1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/partition.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('partition', require('../partition')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/path.js b/src/hello/server/node_modules/lodash/fp/path.js new file mode 100644 index 00000000..b29cfb21 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/path.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/src/hello/server/node_modules/lodash/fp/pathEq.js b/src/hello/server/node_modules/lodash/fp/pathEq.js new file mode 100644 index 00000000..36c027a3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pathEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/src/hello/server/node_modules/lodash/fp/pathOr.js b/src/hello/server/node_modules/lodash/fp/pathOr.js new file mode 100644 index 00000000..4ab58209 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pathOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/src/hello/server/node_modules/lodash/fp/paths.js b/src/hello/server/node_modules/lodash/fp/paths.js new file mode 100644 index 00000000..1eb7950a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/paths.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/src/hello/server/node_modules/lodash/fp/pick.js b/src/hello/server/node_modules/lodash/fp/pick.js new file mode 100644 index 00000000..197393de --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pick.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pick', require('../pick')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pickAll.js b/src/hello/server/node_modules/lodash/fp/pickAll.js new file mode 100644 index 00000000..a8ecd461 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pickAll.js @@ -0,0 +1 @@ +module.exports = require('./pick'); diff --git a/src/hello/server/node_modules/lodash/fp/pickBy.js b/src/hello/server/node_modules/lodash/fp/pickBy.js new file mode 100644 index 00000000..d832d16b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pickBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pickBy', require('../pickBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pipe.js b/src/hello/server/node_modules/lodash/fp/pipe.js new file mode 100644 index 00000000..b2e1e2cc --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pipe.js @@ -0,0 +1 @@ +module.exports = require('./flow'); diff --git a/src/hello/server/node_modules/lodash/fp/placeholder.js b/src/hello/server/node_modules/lodash/fp/placeholder.js new file mode 100644 index 00000000..1ce17393 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/placeholder.js @@ -0,0 +1,6 @@ +/** + * The default argument placeholder value for methods. + * + * @type {Object} + */ +module.exports = {}; diff --git a/src/hello/server/node_modules/lodash/fp/plant.js b/src/hello/server/node_modules/lodash/fp/plant.js new file mode 100644 index 00000000..eca8f32b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/plant.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('plant', require('../plant'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pluck.js b/src/hello/server/node_modules/lodash/fp/pluck.js new file mode 100644 index 00000000..0d1e1abf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pluck.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/src/hello/server/node_modules/lodash/fp/prop.js b/src/hello/server/node_modules/lodash/fp/prop.js new file mode 100644 index 00000000..b29cfb21 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/prop.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/src/hello/server/node_modules/lodash/fp/propEq.js b/src/hello/server/node_modules/lodash/fp/propEq.js new file mode 100644 index 00000000..36c027a3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/propEq.js @@ -0,0 +1 @@ +module.exports = require('./matchesProperty'); diff --git a/src/hello/server/node_modules/lodash/fp/propOr.js b/src/hello/server/node_modules/lodash/fp/propOr.js new file mode 100644 index 00000000..4ab58209 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/propOr.js @@ -0,0 +1 @@ +module.exports = require('./getOr'); diff --git a/src/hello/server/node_modules/lodash/fp/property.js b/src/hello/server/node_modules/lodash/fp/property.js new file mode 100644 index 00000000..b29cfb21 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/property.js @@ -0,0 +1 @@ +module.exports = require('./get'); diff --git a/src/hello/server/node_modules/lodash/fp/propertyOf.js b/src/hello/server/node_modules/lodash/fp/propertyOf.js new file mode 100644 index 00000000..f6273ee4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/propertyOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('propertyOf', require('../get')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/props.js b/src/hello/server/node_modules/lodash/fp/props.js new file mode 100644 index 00000000..1eb7950a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/props.js @@ -0,0 +1 @@ +module.exports = require('./at'); diff --git a/src/hello/server/node_modules/lodash/fp/pull.js b/src/hello/server/node_modules/lodash/fp/pull.js new file mode 100644 index 00000000..8d7084f0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pull.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pull', require('../pull')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pullAll.js b/src/hello/server/node_modules/lodash/fp/pullAll.js new file mode 100644 index 00000000..98d5c9a7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pullAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAll', require('../pullAll')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pullAllBy.js b/src/hello/server/node_modules/lodash/fp/pullAllBy.js new file mode 100644 index 00000000..876bc3bf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pullAllBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllBy', require('../pullAllBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pullAllWith.js b/src/hello/server/node_modules/lodash/fp/pullAllWith.js new file mode 100644 index 00000000..f71ba4d7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pullAllWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAllWith', require('../pullAllWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/pullAt.js b/src/hello/server/node_modules/lodash/fp/pullAt.js new file mode 100644 index 00000000..e8b3bb61 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/pullAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('pullAt', require('../pullAt')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/random.js b/src/hello/server/node_modules/lodash/fp/random.js new file mode 100644 index 00000000..99d852e4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/random.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('random', require('../random')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/range.js b/src/hello/server/node_modules/lodash/fp/range.js new file mode 100644 index 00000000..a6bb5911 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/range.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('range', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/rangeRight.js b/src/hello/server/node_modules/lodash/fp/rangeRight.js new file mode 100644 index 00000000..fdb712f9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/rangeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/rangeStep.js b/src/hello/server/node_modules/lodash/fp/rangeStep.js new file mode 100644 index 00000000..d72dfc20 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/rangeStep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStep', require('../range')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/rangeStepRight.js b/src/hello/server/node_modules/lodash/fp/rangeStepRight.js new file mode 100644 index 00000000..8b2a67bc --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/rangeStepRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rangeStepRight', require('../rangeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/rearg.js b/src/hello/server/node_modules/lodash/fp/rearg.js new file mode 100644 index 00000000..678e02a3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/rearg.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rearg', require('../rearg')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/reduce.js b/src/hello/server/node_modules/lodash/fp/reduce.js new file mode 100644 index 00000000..4cef0a00 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/reduce.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduce', require('../reduce')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/reduceRight.js b/src/hello/server/node_modules/lodash/fp/reduceRight.js new file mode 100644 index 00000000..caf5bb51 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/reduceRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reduceRight', require('../reduceRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/reject.js b/src/hello/server/node_modules/lodash/fp/reject.js new file mode 100644 index 00000000..c1632738 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/reject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reject', require('../reject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/remove.js b/src/hello/server/node_modules/lodash/fp/remove.js new file mode 100644 index 00000000..e9d13273 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/remove.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('remove', require('../remove')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/repeat.js b/src/hello/server/node_modules/lodash/fp/repeat.js new file mode 100644 index 00000000..08470f24 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/repeat.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('repeat', require('../repeat')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/replace.js b/src/hello/server/node_modules/lodash/fp/replace.js new file mode 100644 index 00000000..2227db62 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/replace.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('replace', require('../replace')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/rest.js b/src/hello/server/node_modules/lodash/fp/rest.js new file mode 100644 index 00000000..c1f3d64b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/rest.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('rest', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/restFrom.js b/src/hello/server/node_modules/lodash/fp/restFrom.js new file mode 100644 index 00000000..714e42b5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/restFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('restFrom', require('../rest')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/result.js b/src/hello/server/node_modules/lodash/fp/result.js new file mode 100644 index 00000000..f86ce071 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/result.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('result', require('../result')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/reverse.js b/src/hello/server/node_modules/lodash/fp/reverse.js new file mode 100644 index 00000000..07c9f5e4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/reverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('reverse', require('../reverse')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/round.js b/src/hello/server/node_modules/lodash/fp/round.js new file mode 100644 index 00000000..4c0e5c82 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/round.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('round', require('../round')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sample.js b/src/hello/server/node_modules/lodash/fp/sample.js new file mode 100644 index 00000000..6bea1254 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sample.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sample', require('../sample'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sampleSize.js b/src/hello/server/node_modules/lodash/fp/sampleSize.js new file mode 100644 index 00000000..359ed6fc --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sampleSize.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sampleSize', require('../sampleSize')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/seq.js b/src/hello/server/node_modules/lodash/fp/seq.js new file mode 100644 index 00000000..d8f42b0a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/seq.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../seq')); diff --git a/src/hello/server/node_modules/lodash/fp/set.js b/src/hello/server/node_modules/lodash/fp/set.js new file mode 100644 index 00000000..0b56a56c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/set.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('set', require('../set')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/setWith.js b/src/hello/server/node_modules/lodash/fp/setWith.js new file mode 100644 index 00000000..0b584952 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/setWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('setWith', require('../setWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/shuffle.js b/src/hello/server/node_modules/lodash/fp/shuffle.js new file mode 100644 index 00000000..aa3a1ca5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/shuffle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('shuffle', require('../shuffle'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/size.js b/src/hello/server/node_modules/lodash/fp/size.js new file mode 100644 index 00000000..7490136e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/size.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('size', require('../size'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/slice.js b/src/hello/server/node_modules/lodash/fp/slice.js new file mode 100644 index 00000000..15945d32 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/slice.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('slice', require('../slice')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/snakeCase.js b/src/hello/server/node_modules/lodash/fp/snakeCase.js new file mode 100644 index 00000000..a0ff7808 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/snakeCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('snakeCase', require('../snakeCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/some.js b/src/hello/server/node_modules/lodash/fp/some.js new file mode 100644 index 00000000..a4fa2d00 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/some.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('some', require('../some')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortBy.js b/src/hello/server/node_modules/lodash/fp/sortBy.js new file mode 100644 index 00000000..e0790ad5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortBy', require('../sortBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedIndex.js b/src/hello/server/node_modules/lodash/fp/sortedIndex.js new file mode 100644 index 00000000..364a0543 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndex', require('../sortedIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedIndexBy.js b/src/hello/server/node_modules/lodash/fp/sortedIndexBy.js new file mode 100644 index 00000000..9593dbd1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexBy', require('../sortedIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedIndexOf.js b/src/hello/server/node_modules/lodash/fp/sortedIndexOf.js new file mode 100644 index 00000000..c9084cab --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedIndexOf', require('../sortedIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedLastIndex.js b/src/hello/server/node_modules/lodash/fp/sortedLastIndex.js new file mode 100644 index 00000000..47fe241a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedLastIndex.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndex', require('../sortedLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedLastIndexBy.js b/src/hello/server/node_modules/lodash/fp/sortedLastIndexBy.js new file mode 100644 index 00000000..0f9a3473 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedLastIndexBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexBy', require('../sortedLastIndexBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedLastIndexOf.js b/src/hello/server/node_modules/lodash/fp/sortedLastIndexOf.js new file mode 100644 index 00000000..0d4d9327 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedLastIndexOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedLastIndexOf', require('../sortedLastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedUniq.js b/src/hello/server/node_modules/lodash/fp/sortedUniq.js new file mode 100644 index 00000000..882d2837 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedUniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniq', require('../sortedUniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sortedUniqBy.js b/src/hello/server/node_modules/lodash/fp/sortedUniqBy.js new file mode 100644 index 00000000..033db91c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sortedUniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sortedUniqBy', require('../sortedUniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/split.js b/src/hello/server/node_modules/lodash/fp/split.js new file mode 100644 index 00000000..14de1a7e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/split.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('split', require('../split')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/spread.js b/src/hello/server/node_modules/lodash/fp/spread.js new file mode 100644 index 00000000..2d11b707 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/spread.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spread', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/spreadFrom.js b/src/hello/server/node_modules/lodash/fp/spreadFrom.js new file mode 100644 index 00000000..0b630df1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/spreadFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('spreadFrom', require('../spread')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/startCase.js b/src/hello/server/node_modules/lodash/fp/startCase.js new file mode 100644 index 00000000..ada98c94 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/startCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startCase', require('../startCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/startsWith.js b/src/hello/server/node_modules/lodash/fp/startsWith.js new file mode 100644 index 00000000..985e2f29 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/startsWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('startsWith', require('../startsWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/string.js b/src/hello/server/node_modules/lodash/fp/string.js new file mode 100644 index 00000000..773b0370 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/string.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../string')); diff --git a/src/hello/server/node_modules/lodash/fp/stubArray.js b/src/hello/server/node_modules/lodash/fp/stubArray.js new file mode 100644 index 00000000..cd604cb4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/stubFalse.js b/src/hello/server/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 00000000..32966645 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/stubObject.js b/src/hello/server/node_modules/lodash/fp/stubObject.js new file mode 100644 index 00000000..c6c8ec47 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/stubString.js b/src/hello/server/node_modules/lodash/fp/stubString.js new file mode 100644 index 00000000..701051e8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/stubTrue.js b/src/hello/server/node_modules/lodash/fp/stubTrue.js new file mode 100644 index 00000000..9249082c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/subtract.js b/src/hello/server/node_modules/lodash/fp/subtract.js new file mode 100644 index 00000000..d32b16d4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/subtract.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('subtract', require('../subtract')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sum.js b/src/hello/server/node_modules/lodash/fp/sum.js new file mode 100644 index 00000000..5cce12b3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sum.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sum', require('../sum'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/sumBy.js b/src/hello/server/node_modules/lodash/fp/sumBy.js new file mode 100644 index 00000000..c8826565 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/sumBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('sumBy', require('../sumBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/symmetricDifference.js b/src/hello/server/node_modules/lodash/fp/symmetricDifference.js new file mode 100644 index 00000000..78c16add --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/symmetricDifference.js @@ -0,0 +1 @@ +module.exports = require('./xor'); diff --git a/src/hello/server/node_modules/lodash/fp/symmetricDifferenceBy.js b/src/hello/server/node_modules/lodash/fp/symmetricDifferenceBy.js new file mode 100644 index 00000000..298fc7ff --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/symmetricDifferenceBy.js @@ -0,0 +1 @@ +module.exports = require('./xorBy'); diff --git a/src/hello/server/node_modules/lodash/fp/symmetricDifferenceWith.js b/src/hello/server/node_modules/lodash/fp/symmetricDifferenceWith.js new file mode 100644 index 00000000..70bc6faf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/symmetricDifferenceWith.js @@ -0,0 +1 @@ +module.exports = require('./xorWith'); diff --git a/src/hello/server/node_modules/lodash/fp/tail.js b/src/hello/server/node_modules/lodash/fp/tail.js new file mode 100644 index 00000000..f122f0ac --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/tail.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tail', require('../tail'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/take.js b/src/hello/server/node_modules/lodash/fp/take.js new file mode 100644 index 00000000..9af98a7b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/take.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('take', require('../take')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/takeLast.js b/src/hello/server/node_modules/lodash/fp/takeLast.js new file mode 100644 index 00000000..e98c84a1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/takeLast.js @@ -0,0 +1 @@ +module.exports = require('./takeRight'); diff --git a/src/hello/server/node_modules/lodash/fp/takeLastWhile.js b/src/hello/server/node_modules/lodash/fp/takeLastWhile.js new file mode 100644 index 00000000..5367968a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/takeLastWhile.js @@ -0,0 +1 @@ +module.exports = require('./takeRightWhile'); diff --git a/src/hello/server/node_modules/lodash/fp/takeRight.js b/src/hello/server/node_modules/lodash/fp/takeRight.js new file mode 100644 index 00000000..b82950a6 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/takeRight.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRight', require('../takeRight')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/takeRightWhile.js b/src/hello/server/node_modules/lodash/fp/takeRightWhile.js new file mode 100644 index 00000000..8ffb0a28 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/takeRightWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeRightWhile', require('../takeRightWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/takeWhile.js b/src/hello/server/node_modules/lodash/fp/takeWhile.js new file mode 100644 index 00000000..28136644 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/takeWhile.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('takeWhile', require('../takeWhile')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/tap.js b/src/hello/server/node_modules/lodash/fp/tap.js new file mode 100644 index 00000000..d33ad6ec --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/tap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('tap', require('../tap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/template.js b/src/hello/server/node_modules/lodash/fp/template.js new file mode 100644 index 00000000..74857e1c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/template.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('template', require('../template')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/templateSettings.js b/src/hello/server/node_modules/lodash/fp/templateSettings.js new file mode 100644 index 00000000..7bcc0a82 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/templateSettings.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('templateSettings', require('../templateSettings'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/throttle.js b/src/hello/server/node_modules/lodash/fp/throttle.js new file mode 100644 index 00000000..77fff142 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/throttle.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('throttle', require('../throttle')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/thru.js b/src/hello/server/node_modules/lodash/fp/thru.js new file mode 100644 index 00000000..d42b3b1d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/thru.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('thru', require('../thru')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/times.js b/src/hello/server/node_modules/lodash/fp/times.js new file mode 100644 index 00000000..0dab06da --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/times.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('times', require('../times')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toArray.js b/src/hello/server/node_modules/lodash/fp/toArray.js new file mode 100644 index 00000000..f0c360ac --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toArray', require('../toArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toFinite.js b/src/hello/server/node_modules/lodash/fp/toFinite.js new file mode 100644 index 00000000..3a47687d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toInteger.js b/src/hello/server/node_modules/lodash/fp/toInteger.js new file mode 100644 index 00000000..e0af6a75 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toInteger', require('../toInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toIterator.js b/src/hello/server/node_modules/lodash/fp/toIterator.js new file mode 100644 index 00000000..65e6baa9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toIterator.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toIterator', require('../toIterator'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toJSON.js b/src/hello/server/node_modules/lodash/fp/toJSON.js new file mode 100644 index 00000000..2d718d0b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toJSON.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toJSON', require('../toJSON'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toLength.js b/src/hello/server/node_modules/lodash/fp/toLength.js new file mode 100644 index 00000000..b97cdd93 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toLength.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLength', require('../toLength'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toLower.js b/src/hello/server/node_modules/lodash/fp/toLower.js new file mode 100644 index 00000000..616ef36a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toLower.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toLower', require('../toLower'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toNumber.js b/src/hello/server/node_modules/lodash/fp/toNumber.js new file mode 100644 index 00000000..d0c6f4d3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toNumber.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toNumber', require('../toNumber'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toPairs.js b/src/hello/server/node_modules/lodash/fp/toPairs.js new file mode 100644 index 00000000..af783786 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toPairs.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairs', require('../toPairs'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toPairsIn.js b/src/hello/server/node_modules/lodash/fp/toPairsIn.js new file mode 100644 index 00000000..66504abf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toPairsIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPairsIn', require('../toPairsIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toPath.js b/src/hello/server/node_modules/lodash/fp/toPath.js new file mode 100644 index 00000000..b4d5e50f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toPath.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPath', require('../toPath'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toPlainObject.js b/src/hello/server/node_modules/lodash/fp/toPlainObject.js new file mode 100644 index 00000000..278bb863 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toPlainObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toPlainObject', require('../toPlainObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toSafeInteger.js b/src/hello/server/node_modules/lodash/fp/toSafeInteger.js new file mode 100644 index 00000000..367a26fd --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toSafeInteger.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toSafeInteger', require('../toSafeInteger'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toString.js b/src/hello/server/node_modules/lodash/fp/toString.js new file mode 100644 index 00000000..cec4f8e2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toString', require('../toString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/toUpper.js b/src/hello/server/node_modules/lodash/fp/toUpper.js new file mode 100644 index 00000000..54f9a560 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/toUpper.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toUpper', require('../toUpper'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/transform.js b/src/hello/server/node_modules/lodash/fp/transform.js new file mode 100644 index 00000000..759d088f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/transform.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('transform', require('../transform')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/trim.js b/src/hello/server/node_modules/lodash/fp/trim.js new file mode 100644 index 00000000..e6319a74 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/trim.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trim', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/trimChars.js b/src/hello/server/node_modules/lodash/fp/trimChars.js new file mode 100644 index 00000000..c9294de4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/trimChars.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimChars', require('../trim')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/trimCharsEnd.js b/src/hello/server/node_modules/lodash/fp/trimCharsEnd.js new file mode 100644 index 00000000..284bc2f8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/trimCharsEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/trimCharsStart.js b/src/hello/server/node_modules/lodash/fp/trimCharsStart.js new file mode 100644 index 00000000..ff0ee65d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/trimCharsStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimCharsStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/trimEnd.js b/src/hello/server/node_modules/lodash/fp/trimEnd.js new file mode 100644 index 00000000..71908805 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/trimEnd.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimEnd', require('../trimEnd')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/trimStart.js b/src/hello/server/node_modules/lodash/fp/trimStart.js new file mode 100644 index 00000000..fda902c3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/trimStart.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('trimStart', require('../trimStart')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/truncate.js b/src/hello/server/node_modules/lodash/fp/truncate.js new file mode 100644 index 00000000..d265c1de --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/truncate.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('truncate', require('../truncate')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/unapply.js b/src/hello/server/node_modules/lodash/fp/unapply.js new file mode 100644 index 00000000..c5dfe779 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unapply.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/src/hello/server/node_modules/lodash/fp/unary.js b/src/hello/server/node_modules/lodash/fp/unary.js new file mode 100644 index 00000000..286c945f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unary.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unary', require('../unary'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/unescape.js b/src/hello/server/node_modules/lodash/fp/unescape.js new file mode 100644 index 00000000..fddcb46e --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unescape.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unescape', require('../unescape'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/union.js b/src/hello/server/node_modules/lodash/fp/union.js new file mode 100644 index 00000000..ef8228d7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/union.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('union', require('../union')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/unionBy.js b/src/hello/server/node_modules/lodash/fp/unionBy.js new file mode 100644 index 00000000..603687a1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unionBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionBy', require('../unionBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/unionWith.js b/src/hello/server/node_modules/lodash/fp/unionWith.js new file mode 100644 index 00000000..65bb3a79 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unionWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unionWith', require('../unionWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/uniq.js b/src/hello/server/node_modules/lodash/fp/uniq.js new file mode 100644 index 00000000..bc185249 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/uniq.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniq', require('../uniq'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/uniqBy.js b/src/hello/server/node_modules/lodash/fp/uniqBy.js new file mode 100644 index 00000000..634c6a8b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/uniqBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqBy', require('../uniqBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/uniqWith.js b/src/hello/server/node_modules/lodash/fp/uniqWith.js new file mode 100644 index 00000000..0ec601a9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/uniqWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqWith', require('../uniqWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/uniqueId.js b/src/hello/server/node_modules/lodash/fp/uniqueId.js new file mode 100644 index 00000000..aa8fc2f7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/uniqueId.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('uniqueId', require('../uniqueId')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/unnest.js b/src/hello/server/node_modules/lodash/fp/unnest.js new file mode 100644 index 00000000..5d34060a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unnest.js @@ -0,0 +1 @@ +module.exports = require('./flatten'); diff --git a/src/hello/server/node_modules/lodash/fp/unset.js b/src/hello/server/node_modules/lodash/fp/unset.js new file mode 100644 index 00000000..ea203a0f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unset.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unset', require('../unset')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/unzip.js b/src/hello/server/node_modules/lodash/fp/unzip.js new file mode 100644 index 00000000..cc364b3c --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unzip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzip', require('../unzip'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/unzipWith.js b/src/hello/server/node_modules/lodash/fp/unzipWith.js new file mode 100644 index 00000000..182eaa10 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/unzipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('unzipWith', require('../unzipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/update.js b/src/hello/server/node_modules/lodash/fp/update.js new file mode 100644 index 00000000..b8ce2cc9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/update.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('update', require('../update')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/updateWith.js b/src/hello/server/node_modules/lodash/fp/updateWith.js new file mode 100644 index 00000000..d5e8282d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/updateWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('updateWith', require('../updateWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/upperCase.js b/src/hello/server/node_modules/lodash/fp/upperCase.js new file mode 100644 index 00000000..c886f202 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/upperCase.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperCase', require('../upperCase'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/upperFirst.js b/src/hello/server/node_modules/lodash/fp/upperFirst.js new file mode 100644 index 00000000..d8c04df5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/upperFirst.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('upperFirst', require('../upperFirst'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/useWith.js b/src/hello/server/node_modules/lodash/fp/useWith.js new file mode 100644 index 00000000..d8b3df5a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/useWith.js @@ -0,0 +1 @@ +module.exports = require('./overArgs'); diff --git a/src/hello/server/node_modules/lodash/fp/util.js b/src/hello/server/node_modules/lodash/fp/util.js new file mode 100644 index 00000000..18c00bae --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/util.js @@ -0,0 +1,2 @@ +var convert = require('./convert'); +module.exports = convert(require('../util')); diff --git a/src/hello/server/node_modules/lodash/fp/value.js b/src/hello/server/node_modules/lodash/fp/value.js new file mode 100644 index 00000000..555eec7a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/value.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('value', require('../value'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/valueOf.js b/src/hello/server/node_modules/lodash/fp/valueOf.js new file mode 100644 index 00000000..f968807d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/valueOf.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valueOf', require('../valueOf'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/values.js b/src/hello/server/node_modules/lodash/fp/values.js new file mode 100644 index 00000000..2dfc5613 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/values.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('values', require('../values'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/valuesIn.js b/src/hello/server/node_modules/lodash/fp/valuesIn.js new file mode 100644 index 00000000..a1b2bb87 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/valuesIn.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('valuesIn', require('../valuesIn'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/where.js b/src/hello/server/node_modules/lodash/fp/where.js new file mode 100644 index 00000000..3247f64a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/where.js @@ -0,0 +1 @@ +module.exports = require('./conformsTo'); diff --git a/src/hello/server/node_modules/lodash/fp/whereEq.js b/src/hello/server/node_modules/lodash/fp/whereEq.js new file mode 100644 index 00000000..29d1e1e4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/whereEq.js @@ -0,0 +1 @@ +module.exports = require('./isMatch'); diff --git a/src/hello/server/node_modules/lodash/fp/without.js b/src/hello/server/node_modules/lodash/fp/without.js new file mode 100644 index 00000000..bad9e125 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/without.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('without', require('../without')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/words.js b/src/hello/server/node_modules/lodash/fp/words.js new file mode 100644 index 00000000..4a901414 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/words.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('words', require('../words')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/wrap.js b/src/hello/server/node_modules/lodash/fp/wrap.js new file mode 100644 index 00000000..e93bd8a1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/wrap.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrap', require('../wrap')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/wrapperAt.js b/src/hello/server/node_modules/lodash/fp/wrapperAt.js new file mode 100644 index 00000000..8f0a310f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/wrapperAt.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/wrapperChain.js b/src/hello/server/node_modules/lodash/fp/wrapperChain.js new file mode 100644 index 00000000..2a48ea2b --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/wrapperChain.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperChain', require('../wrapperChain'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/wrapperLodash.js b/src/hello/server/node_modules/lodash/fp/wrapperLodash.js new file mode 100644 index 00000000..a7162d08 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/wrapperLodash.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperLodash', require('../wrapperLodash'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/wrapperReverse.js b/src/hello/server/node_modules/lodash/fp/wrapperReverse.js new file mode 100644 index 00000000..e1481aab --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/wrapperReverse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperReverse', require('../wrapperReverse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/wrapperValue.js b/src/hello/server/node_modules/lodash/fp/wrapperValue.js new file mode 100644 index 00000000..8eb9112f --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/wrapperValue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('wrapperValue', require('../wrapperValue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/xor.js b/src/hello/server/node_modules/lodash/fp/xor.js new file mode 100644 index 00000000..29e28194 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/xor.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xor', require('../xor')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/xorBy.js b/src/hello/server/node_modules/lodash/fp/xorBy.js new file mode 100644 index 00000000..b355686d --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/xorBy.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorBy', require('../xorBy')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/xorWith.js b/src/hello/server/node_modules/lodash/fp/xorWith.js new file mode 100644 index 00000000..8e05739a --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/xorWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('xorWith', require('../xorWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/zip.js b/src/hello/server/node_modules/lodash/fp/zip.js new file mode 100644 index 00000000..69e147a4 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/zip.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zip', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/zipAll.js b/src/hello/server/node_modules/lodash/fp/zipAll.js new file mode 100644 index 00000000..efa8ccbf --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/zipAll.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipAll', require('../zip')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/zipObj.js b/src/hello/server/node_modules/lodash/fp/zipObj.js new file mode 100644 index 00000000..f4a34531 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/zipObj.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/src/hello/server/node_modules/lodash/fp/zipObject.js b/src/hello/server/node_modules/lodash/fp/zipObject.js new file mode 100644 index 00000000..462dbb68 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/zipObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObject', require('../zipObject')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/zipObjectDeep.js b/src/hello/server/node_modules/lodash/fp/zipObjectDeep.js new file mode 100644 index 00000000..53a5d338 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/zipObjectDeep.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipObjectDeep', require('../zipObjectDeep')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fp/zipWith.js b/src/hello/server/node_modules/lodash/fp/zipWith.js new file mode 100644 index 00000000..c5cf9e21 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fp/zipWith.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('zipWith', require('../zipWith')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/src/hello/server/node_modules/lodash/fromPairs.js b/src/hello/server/node_modules/lodash/fromPairs.js new file mode 100644 index 00000000..ee7940d2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/fromPairs.js @@ -0,0 +1,28 @@ +/** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ +function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; +} + +module.exports = fromPairs; diff --git a/src/hello/server/node_modules/lodash/function.js b/src/hello/server/node_modules/lodash/function.js new file mode 100644 index 00000000..b0fc6d93 --- /dev/null +++ b/src/hello/server/node_modules/lodash/function.js @@ -0,0 +1,25 @@ +module.exports = { + 'after': require('./after'), + 'ary': require('./ary'), + 'before': require('./before'), + 'bind': require('./bind'), + 'bindKey': require('./bindKey'), + 'curry': require('./curry'), + 'curryRight': require('./curryRight'), + 'debounce': require('./debounce'), + 'defer': require('./defer'), + 'delay': require('./delay'), + 'flip': require('./flip'), + 'memoize': require('./memoize'), + 'negate': require('./negate'), + 'once': require('./once'), + 'overArgs': require('./overArgs'), + 'partial': require('./partial'), + 'partialRight': require('./partialRight'), + 'rearg': require('./rearg'), + 'rest': require('./rest'), + 'spread': require('./spread'), + 'throttle': require('./throttle'), + 'unary': require('./unary'), + 'wrap': require('./wrap') +}; diff --git a/src/hello/server/node_modules/lodash/functions.js b/src/hello/server/node_modules/lodash/functions.js new file mode 100644 index 00000000..9722928f --- /dev/null +++ b/src/hello/server/node_modules/lodash/functions.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keys = require('./keys'); + +/** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ +function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); +} + +module.exports = functions; diff --git a/src/hello/server/node_modules/lodash/functionsIn.js b/src/hello/server/node_modules/lodash/functionsIn.js new file mode 100644 index 00000000..f00345d0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/functionsIn.js @@ -0,0 +1,31 @@ +var baseFunctions = require('./_baseFunctions'), + keysIn = require('./keysIn'); + +/** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); +} + +module.exports = functionsIn; diff --git a/src/hello/server/node_modules/lodash/get.js b/src/hello/server/node_modules/lodash/get.js new file mode 100644 index 00000000..8805ff92 --- /dev/null +++ b/src/hello/server/node_modules/lodash/get.js @@ -0,0 +1,33 @@ +var baseGet = require('./_baseGet'); + +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} + +module.exports = get; diff --git a/src/hello/server/node_modules/lodash/groupBy.js b/src/hello/server/node_modules/lodash/groupBy.js new file mode 100644 index 00000000..babf4f6b --- /dev/null +++ b/src/hello/server/node_modules/lodash/groupBy.js @@ -0,0 +1,41 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } +}); + +module.exports = groupBy; diff --git a/src/hello/server/node_modules/lodash/gt.js b/src/hello/server/node_modules/lodash/gt.js new file mode 100644 index 00000000..3a662828 --- /dev/null +++ b/src/hello/server/node_modules/lodash/gt.js @@ -0,0 +1,29 @@ +var baseGt = require('./_baseGt'), + createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ +var gt = createRelationalOperation(baseGt); + +module.exports = gt; diff --git a/src/hello/server/node_modules/lodash/gte.js b/src/hello/server/node_modules/lodash/gte.js new file mode 100644 index 00000000..4180a687 --- /dev/null +++ b/src/hello/server/node_modules/lodash/gte.js @@ -0,0 +1,30 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + +/** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ +var gte = createRelationalOperation(function(value, other) { + return value >= other; +}); + +module.exports = gte; diff --git a/src/hello/server/node_modules/lodash/has.js b/src/hello/server/node_modules/lodash/has.js new file mode 100644 index 00000000..34df55e8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/has.js @@ -0,0 +1,35 @@ +var baseHas = require('./_baseHas'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ +function has(object, path) { + return object != null && hasPath(object, path, baseHas); +} + +module.exports = has; diff --git a/src/hello/server/node_modules/lodash/hasIn.js b/src/hello/server/node_modules/lodash/hasIn.js new file mode 100644 index 00000000..06a36865 --- /dev/null +++ b/src/hello/server/node_modules/lodash/hasIn.js @@ -0,0 +1,34 @@ +var baseHasIn = require('./_baseHasIn'), + hasPath = require('./_hasPath'); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; diff --git a/src/hello/server/node_modules/lodash/head.js b/src/hello/server/node_modules/lodash/head.js new file mode 100644 index 00000000..dee9d1f1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/head.js @@ -0,0 +1,23 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ +function head(array) { + return (array && array.length) ? array[0] : undefined; +} + +module.exports = head; diff --git a/src/hello/server/node_modules/lodash/identity.js b/src/hello/server/node_modules/lodash/identity.js new file mode 100644 index 00000000..2d5d963c --- /dev/null +++ b/src/hello/server/node_modules/lodash/identity.js @@ -0,0 +1,21 @@ +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +module.exports = identity; diff --git a/src/hello/server/node_modules/lodash/inRange.js b/src/hello/server/node_modules/lodash/inRange.js new file mode 100644 index 00000000..f20728d9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/inRange.js @@ -0,0 +1,55 @@ +var baseInRange = require('./_baseInRange'), + toFinite = require('./toFinite'), + toNumber = require('./toNumber'); + +/** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ +function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); +} + +module.exports = inRange; diff --git a/src/hello/server/node_modules/lodash/includes.js b/src/hello/server/node_modules/lodash/includes.js new file mode 100644 index 00000000..ae0deedc --- /dev/null +++ b/src/hello/server/node_modules/lodash/includes.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('./_baseIndexOf'), + isArrayLike = require('./isArrayLike'), + isString = require('./isString'), + toInteger = require('./toInteger'), + values = require('./values'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); +} + +module.exports = includes; diff --git a/src/hello/server/node_modules/lodash/index.js b/src/hello/server/node_modules/lodash/index.js new file mode 100644 index 00000000..5d063e21 --- /dev/null +++ b/src/hello/server/node_modules/lodash/index.js @@ -0,0 +1 @@ +module.exports = require('./lodash'); \ No newline at end of file diff --git a/src/hello/server/node_modules/lodash/indexOf.js b/src/hello/server/node_modules/lodash/indexOf.js new file mode 100644 index 00000000..3c644af2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/indexOf.js @@ -0,0 +1,42 @@ +var baseIndexOf = require('./_baseIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ +function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); +} + +module.exports = indexOf; diff --git a/src/hello/server/node_modules/lodash/initial.js b/src/hello/server/node_modules/lodash/initial.js new file mode 100644 index 00000000..f47fc509 --- /dev/null +++ b/src/hello/server/node_modules/lodash/initial.js @@ -0,0 +1,22 @@ +var baseSlice = require('./_baseSlice'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; +} + +module.exports = initial; diff --git a/src/hello/server/node_modules/lodash/intersection.js b/src/hello/server/node_modules/lodash/intersection.js new file mode 100644 index 00000000..a94c1351 --- /dev/null +++ b/src/hello/server/node_modules/lodash/intersection.js @@ -0,0 +1,30 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'); + +/** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); + +module.exports = intersection; diff --git a/src/hello/server/node_modules/lodash/intersectionBy.js b/src/hello/server/node_modules/lodash/intersectionBy.js new file mode 100644 index 00000000..31461aae --- /dev/null +++ b/src/hello/server/node_modules/lodash/intersectionBy.js @@ -0,0 +1,45 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseIteratee = require('./_baseIteratee'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ +var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, baseIteratee(iteratee, 2)) + : []; +}); + +module.exports = intersectionBy; diff --git a/src/hello/server/node_modules/lodash/intersectionWith.js b/src/hello/server/node_modules/lodash/intersectionWith.js new file mode 100644 index 00000000..63cabfaa --- /dev/null +++ b/src/hello/server/node_modules/lodash/intersectionWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('./_arrayMap'), + baseIntersection = require('./_baseIntersection'), + baseRest = require('./_baseRest'), + castArrayLikeObject = require('./_castArrayLikeObject'), + last = require('./last'); + +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; +}); + +module.exports = intersectionWith; diff --git a/src/hello/server/node_modules/lodash/invert.js b/src/hello/server/node_modules/lodash/invert.js new file mode 100644 index 00000000..8c479509 --- /dev/null +++ b/src/hello/server/node_modules/lodash/invert.js @@ -0,0 +1,42 @@ +var constant = require('./constant'), + createInverter = require('./_createInverter'), + identity = require('./identity'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ +var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; +}, constant(identity)); + +module.exports = invert; diff --git a/src/hello/server/node_modules/lodash/invertBy.js b/src/hello/server/node_modules/lodash/invertBy.js new file mode 100644 index 00000000..3f4f7e53 --- /dev/null +++ b/src/hello/server/node_modules/lodash/invertBy.js @@ -0,0 +1,56 @@ +var baseIteratee = require('./_baseIteratee'), + createInverter = require('./_createInverter'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ +var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } +}, baseIteratee); + +module.exports = invertBy; diff --git a/src/hello/server/node_modules/lodash/invoke.js b/src/hello/server/node_modules/lodash/invoke.js new file mode 100644 index 00000000..97d51eb5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/invoke.js @@ -0,0 +1,24 @@ +var baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'); + +/** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ +var invoke = baseRest(baseInvoke); + +module.exports = invoke; diff --git a/src/hello/server/node_modules/lodash/invokeMap.js b/src/hello/server/node_modules/lodash/invokeMap.js new file mode 100644 index 00000000..8da5126c --- /dev/null +++ b/src/hello/server/node_modules/lodash/invokeMap.js @@ -0,0 +1,41 @@ +var apply = require('./_apply'), + baseEach = require('./_baseEach'), + baseInvoke = require('./_baseInvoke'), + baseRest = require('./_baseRest'), + isArrayLike = require('./isArrayLike'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; +}); + +module.exports = invokeMap; diff --git a/src/hello/server/node_modules/lodash/isArguments.js b/src/hello/server/node_modules/lodash/isArguments.js new file mode 100644 index 00000000..8b9ed66c --- /dev/null +++ b/src/hello/server/node_modules/lodash/isArguments.js @@ -0,0 +1,36 @@ +var baseIsArguments = require('./_baseIsArguments'), + isObjectLike = require('./isObjectLike'); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +module.exports = isArguments; diff --git a/src/hello/server/node_modules/lodash/isArray.js b/src/hello/server/node_modules/lodash/isArray.js new file mode 100644 index 00000000..88ab55fd --- /dev/null +++ b/src/hello/server/node_modules/lodash/isArray.js @@ -0,0 +1,26 @@ +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +module.exports = isArray; diff --git a/src/hello/server/node_modules/lodash/isArrayBuffer.js b/src/hello/server/node_modules/lodash/isArrayBuffer.js new file mode 100644 index 00000000..12904a64 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isArrayBuffer.js @@ -0,0 +1,27 @@ +var baseIsArrayBuffer = require('./_baseIsArrayBuffer'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer; + +/** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ +var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + +module.exports = isArrayBuffer; diff --git a/src/hello/server/node_modules/lodash/isArrayLike.js b/src/hello/server/node_modules/lodash/isArrayLike.js new file mode 100644 index 00000000..0f966805 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isArrayLike.js @@ -0,0 +1,33 @@ +var isFunction = require('./isFunction'), + isLength = require('./isLength'); + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +module.exports = isArrayLike; diff --git a/src/hello/server/node_modules/lodash/isArrayLikeObject.js b/src/hello/server/node_modules/lodash/isArrayLikeObject.js new file mode 100644 index 00000000..6c4812a8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isArrayLikeObject.js @@ -0,0 +1,33 @@ +var isArrayLike = require('./isArrayLike'), + isObjectLike = require('./isObjectLike'); + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +module.exports = isArrayLikeObject; diff --git a/src/hello/server/node_modules/lodash/isBoolean.js b/src/hello/server/node_modules/lodash/isBoolean.js new file mode 100644 index 00000000..a43ed4b8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isBoolean.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; + +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} + +module.exports = isBoolean; diff --git a/src/hello/server/node_modules/lodash/isBuffer.js b/src/hello/server/node_modules/lodash/isBuffer.js new file mode 100644 index 00000000..c103cc74 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isBuffer.js @@ -0,0 +1,38 @@ +var root = require('./_root'), + stubFalse = require('./stubFalse'); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +module.exports = isBuffer; diff --git a/src/hello/server/node_modules/lodash/isDate.js b/src/hello/server/node_modules/lodash/isDate.js new file mode 100644 index 00000000..7f0209fc --- /dev/null +++ b/src/hello/server/node_modules/lodash/isDate.js @@ -0,0 +1,27 @@ +var baseIsDate = require('./_baseIsDate'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsDate = nodeUtil && nodeUtil.isDate; + +/** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ +var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + +module.exports = isDate; diff --git a/src/hello/server/node_modules/lodash/isElement.js b/src/hello/server/node_modules/lodash/isElement.js new file mode 100644 index 00000000..76ae29c3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isElement.js @@ -0,0 +1,25 @@ +var isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ +function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); +} + +module.exports = isElement; diff --git a/src/hello/server/node_modules/lodash/isEmpty.js b/src/hello/server/node_modules/lodash/isEmpty.js new file mode 100644 index 00000000..3597294a --- /dev/null +++ b/src/hello/server/node_modules/lodash/isEmpty.js @@ -0,0 +1,77 @@ +var baseKeys = require('./_baseKeys'), + getTag = require('./_getTag'), + isArguments = require('./isArguments'), + isArray = require('./isArray'), + isArrayLike = require('./isArrayLike'), + isBuffer = require('./isBuffer'), + isPrototype = require('./_isPrototype'), + isTypedArray = require('./isTypedArray'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; +} + +module.exports = isEmpty; diff --git a/src/hello/server/node_modules/lodash/isEqual.js b/src/hello/server/node_modules/lodash/isEqual.js new file mode 100644 index 00000000..5e23e76c --- /dev/null +++ b/src/hello/server/node_modules/lodash/isEqual.js @@ -0,0 +1,35 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} + +module.exports = isEqual; diff --git a/src/hello/server/node_modules/lodash/isEqualWith.js b/src/hello/server/node_modules/lodash/isEqualWith.js new file mode 100644 index 00000000..21bdc7ff --- /dev/null +++ b/src/hello/server/node_modules/lodash/isEqualWith.js @@ -0,0 +1,41 @@ +var baseIsEqual = require('./_baseIsEqual'); + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; +} + +module.exports = isEqualWith; diff --git a/src/hello/server/node_modules/lodash/isError.js b/src/hello/server/node_modules/lodash/isError.js new file mode 100644 index 00000000..b4f41e00 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isError.js @@ -0,0 +1,36 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'), + isPlainObject = require('./isPlainObject'); + +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); +} + +module.exports = isError; diff --git a/src/hello/server/node_modules/lodash/isFinite.js b/src/hello/server/node_modules/lodash/isFinite.js new file mode 100644 index 00000000..601842bc --- /dev/null +++ b/src/hello/server/node_modules/lodash/isFinite.js @@ -0,0 +1,36 @@ +var root = require('./_root'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite; + +/** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); +} + +module.exports = isFinite; diff --git a/src/hello/server/node_modules/lodash/isFunction.js b/src/hello/server/node_modules/lodash/isFunction.js new file mode 100644 index 00000000..907a8cd8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isFunction.js @@ -0,0 +1,37 @@ +var baseGetTag = require('./_baseGetTag'), + isObject = require('./isObject'); + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +module.exports = isFunction; diff --git a/src/hello/server/node_modules/lodash/isInteger.js b/src/hello/server/node_modules/lodash/isInteger.js new file mode 100644 index 00000000..66aa87d5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isInteger.js @@ -0,0 +1,33 @@ +var toInteger = require('./toInteger'); + +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} + +module.exports = isInteger; diff --git a/src/hello/server/node_modules/lodash/isLength.js b/src/hello/server/node_modules/lodash/isLength.js new file mode 100644 index 00000000..3a95caa9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isLength.js @@ -0,0 +1,35 @@ +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +module.exports = isLength; diff --git a/src/hello/server/node_modules/lodash/isMap.js b/src/hello/server/node_modules/lodash/isMap.js new file mode 100644 index 00000000..44f8517e --- /dev/null +++ b/src/hello/server/node_modules/lodash/isMap.js @@ -0,0 +1,27 @@ +var baseIsMap = require('./_baseIsMap'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; + +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + +module.exports = isMap; diff --git a/src/hello/server/node_modules/lodash/isMatch.js b/src/hello/server/node_modules/lodash/isMatch.js new file mode 100644 index 00000000..9773a18c --- /dev/null +++ b/src/hello/server/node_modules/lodash/isMatch.js @@ -0,0 +1,36 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ +function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); +} + +module.exports = isMatch; diff --git a/src/hello/server/node_modules/lodash/isMatchWith.js b/src/hello/server/node_modules/lodash/isMatchWith.js new file mode 100644 index 00000000..187b6a61 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isMatchWith.js @@ -0,0 +1,41 @@ +var baseIsMatch = require('./_baseIsMatch'), + getMatchData = require('./_getMatchData'); + +/** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ +function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); +} + +module.exports = isMatchWith; diff --git a/src/hello/server/node_modules/lodash/isNaN.js b/src/hello/server/node_modules/lodash/isNaN.js new file mode 100644 index 00000000..7d0d783b --- /dev/null +++ b/src/hello/server/node_modules/lodash/isNaN.js @@ -0,0 +1,38 @@ +var isNumber = require('./isNumber'); + +/** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ +function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; +} + +module.exports = isNaN; diff --git a/src/hello/server/node_modules/lodash/isNative.js b/src/hello/server/node_modules/lodash/isNative.js new file mode 100644 index 00000000..f0cb8d58 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isNative.js @@ -0,0 +1,40 @@ +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); + +/** Error message constants. */ +var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.'; + +/** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ +function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); +} + +module.exports = isNative; diff --git a/src/hello/server/node_modules/lodash/isNil.js b/src/hello/server/node_modules/lodash/isNil.js new file mode 100644 index 00000000..79f05052 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isNil.js @@ -0,0 +1,25 @@ +/** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ +function isNil(value) { + return value == null; +} + +module.exports = isNil; diff --git a/src/hello/server/node_modules/lodash/isNull.js b/src/hello/server/node_modules/lodash/isNull.js new file mode 100644 index 00000000..c0a374d7 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isNull.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; diff --git a/src/hello/server/node_modules/lodash/isNumber.js b/src/hello/server/node_modules/lodash/isNumber.js new file mode 100644 index 00000000..cd34ee46 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isNumber.js @@ -0,0 +1,38 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var numberTag = '[object Number]'; + +/** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ +function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); +} + +module.exports = isNumber; diff --git a/src/hello/server/node_modules/lodash/isObject.js b/src/hello/server/node_modules/lodash/isObject.js new file mode 100644 index 00000000..1dc89391 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isObject.js @@ -0,0 +1,31 @@ +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +module.exports = isObject; diff --git a/src/hello/server/node_modules/lodash/isObjectLike.js b/src/hello/server/node_modules/lodash/isObjectLike.js new file mode 100644 index 00000000..301716b5 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isObjectLike.js @@ -0,0 +1,29 @@ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +module.exports = isObjectLike; diff --git a/src/hello/server/node_modules/lodash/isPlainObject.js b/src/hello/server/node_modules/lodash/isPlainObject.js new file mode 100644 index 00000000..23873731 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isPlainObject.js @@ -0,0 +1,62 @@ +var baseGetTag = require('./_baseGetTag'), + getPrototype = require('./_getPrototype'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +module.exports = isPlainObject; diff --git a/src/hello/server/node_modules/lodash/isRegExp.js b/src/hello/server/node_modules/lodash/isRegExp.js new file mode 100644 index 00000000..76c9b6e9 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isRegExp.js @@ -0,0 +1,27 @@ +var baseIsRegExp = require('./_baseIsRegExp'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; + +/** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ +var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + +module.exports = isRegExp; diff --git a/src/hello/server/node_modules/lodash/isSafeInteger.js b/src/hello/server/node_modules/lodash/isSafeInteger.js new file mode 100644 index 00000000..2a48526e --- /dev/null +++ b/src/hello/server/node_modules/lodash/isSafeInteger.js @@ -0,0 +1,37 @@ +var isInteger = require('./isInteger'); + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ +function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; +} + +module.exports = isSafeInteger; diff --git a/src/hello/server/node_modules/lodash/isSet.js b/src/hello/server/node_modules/lodash/isSet.js new file mode 100644 index 00000000..ab88bdf8 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isSet.js @@ -0,0 +1,27 @@ +var baseIsSet = require('./_baseIsSet'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; + +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + +module.exports = isSet; diff --git a/src/hello/server/node_modules/lodash/isString.js b/src/hello/server/node_modules/lodash/isString.js new file mode 100644 index 00000000..627eb9c3 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isString.js @@ -0,0 +1,30 @@ +var baseGetTag = require('./_baseGetTag'), + isArray = require('./isArray'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); +} + +module.exports = isString; diff --git a/src/hello/server/node_modules/lodash/isSymbol.js b/src/hello/server/node_modules/lodash/isSymbol.js new file mode 100644 index 00000000..dfb60b97 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isSymbol.js @@ -0,0 +1,29 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; diff --git a/src/hello/server/node_modules/lodash/isTypedArray.js b/src/hello/server/node_modules/lodash/isTypedArray.js new file mode 100644 index 00000000..da3f8dd1 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isTypedArray.js @@ -0,0 +1,27 @@ +var baseIsTypedArray = require('./_baseIsTypedArray'), + baseUnary = require('./_baseUnary'), + nodeUtil = require('./_nodeUtil'); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +module.exports = isTypedArray; diff --git a/src/hello/server/node_modules/lodash/isUndefined.js b/src/hello/server/node_modules/lodash/isUndefined.js new file mode 100644 index 00000000..377d121a --- /dev/null +++ b/src/hello/server/node_modules/lodash/isUndefined.js @@ -0,0 +1,22 @@ +/** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ +function isUndefined(value) { + return value === undefined; +} + +module.exports = isUndefined; diff --git a/src/hello/server/node_modules/lodash/isWeakMap.js b/src/hello/server/node_modules/lodash/isWeakMap.js new file mode 100644 index 00000000..8d36f663 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isWeakMap.js @@ -0,0 +1,28 @@ +var getTag = require('./_getTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakMapTag = '[object WeakMap]'; + +/** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ +function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; +} + +module.exports = isWeakMap; diff --git a/src/hello/server/node_modules/lodash/isWeakSet.js b/src/hello/server/node_modules/lodash/isWeakSet.js new file mode 100644 index 00000000..e628b261 --- /dev/null +++ b/src/hello/server/node_modules/lodash/isWeakSet.js @@ -0,0 +1,28 @@ +var baseGetTag = require('./_baseGetTag'), + isObjectLike = require('./isObjectLike'); + +/** `Object#toString` result references. */ +var weakSetTag = '[object WeakSet]'; + +/** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ +function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; +} + +module.exports = isWeakSet; diff --git a/src/hello/server/node_modules/lodash/iteratee.js b/src/hello/server/node_modules/lodash/iteratee.js new file mode 100644 index 00000000..61b73a8c --- /dev/null +++ b/src/hello/server/node_modules/lodash/iteratee.js @@ -0,0 +1,53 @@ +var baseClone = require('./_baseClone'), + baseIteratee = require('./_baseIteratee'); + +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1; + +/** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] + * + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] + * + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] + */ +function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); +} + +module.exports = iteratee; diff --git a/src/hello/server/node_modules/lodash/join.js b/src/hello/server/node_modules/lodash/join.js new file mode 100644 index 00000000..45de079f --- /dev/null +++ b/src/hello/server/node_modules/lodash/join.js @@ -0,0 +1,26 @@ +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeJoin = arrayProto.join; + +/** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ +function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); +} + +module.exports = join; diff --git a/src/hello/server/node_modules/lodash/kebabCase.js b/src/hello/server/node_modules/lodash/kebabCase.js new file mode 100644 index 00000000..8a52be64 --- /dev/null +++ b/src/hello/server/node_modules/lodash/kebabCase.js @@ -0,0 +1,28 @@ +var createCompounder = require('./_createCompounder'); + +/** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ +var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); +}); + +module.exports = kebabCase; diff --git a/src/hello/server/node_modules/lodash/keyBy.js b/src/hello/server/node_modules/lodash/keyBy.js new file mode 100644 index 00000000..acc007a0 --- /dev/null +++ b/src/hello/server/node_modules/lodash/keyBy.js @@ -0,0 +1,36 @@ +var baseAssignValue = require('./_baseAssignValue'), + createAggregator = require('./_createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ +var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); +}); + +module.exports = keyBy; diff --git a/src/hello/server/node_modules/lodash/keys.js b/src/hello/server/node_modules/lodash/keys.js new file mode 100644 index 00000000..d143c718 --- /dev/null +++ b/src/hello/server/node_modules/lodash/keys.js @@ -0,0 +1,37 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeys = require('./_baseKeys'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +module.exports = keys; diff --git a/src/hello/server/node_modules/lodash/keysIn.js b/src/hello/server/node_modules/lodash/keysIn.js new file mode 100644 index 00000000..a62308f2 --- /dev/null +++ b/src/hello/server/node_modules/lodash/keysIn.js @@ -0,0 +1,32 @@ +var arrayLikeKeys = require('./_arrayLikeKeys'), + baseKeysIn = require('./_baseKeysIn'), + isArrayLike = require('./isArrayLike'); + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +module.exports = keysIn; diff --git a/src/hello/server/node_modules/lodash/lang.js b/src/hello/server/node_modules/lodash/lang.js new file mode 100644 index 00000000..a3962169 --- /dev/null +++ b/src/hello/server/node_modules/lodash/lang.js @@ -0,0 +1,58 @@ +module.exports = { + 'castArray': require('./castArray'), + 'clone': require('./clone'), + 'cloneDeep': require('./cloneDeep'), + 'cloneDeepWith': require('./cloneDeepWith'), + 'cloneWith': require('./cloneWith'), + 'conformsTo': require('./conformsTo'), + 'eq': require('./eq'), + 'gt': require('./gt'), + 'gte': require('./gte'), + 'isArguments': require('./isArguments'), + 'isArray': require('./isArray'), + 'isArrayBuffer': require('./isArrayBuffer'), + 'isArrayLike': require('./isArrayLike'), + 'isArrayLikeObject': require('./isArrayLikeObject'), + 'isBoolean': require('./isBoolean'), + 'isBuffer': require('./isBuffer'), + 'isDate': require('./isDate'), + 'isElement': require('./isElement'), + 'isEmpty': require('./isEmpty'), + 'isEqual': require('./isEqual'), + 'isEqualWith': require('./isEqualWith'), + 'isError': require('./isError'), + 'isFinite': require('./isFinite'), + 'isFunction': require('./isFunction'), + 'isInteger': require('./isInteger'), + 'isLength': require('./isLength'), + 'isMap': require('./isMap'), + 'isMatch': require('./isMatch'), + 'isMatchWith': require('./isMatchWith'), + 'isNaN': require('./isNaN'), + 'isNative': require('./isNative'), + 'isNil': require('./isNil'), + 'isNull': require('./isNull'), + 'isNumber': require('./isNumber'), + 'isObject': require('./isObject'), + 'isObjectLike': require('./isObjectLike'), + 'isPlainObject': require('./isPlainObject'), + 'isRegExp': require('./isRegExp'), + 'isSafeInteger': require('./isSafeInteger'), + 'isSet': require('./isSet'), + 'isString': require('./isString'), + 'isSymbol': require('./isSymbol'), + 'isTypedArray': require('./isTypedArray'), + 'isUndefined': require('./isUndefined'), + 'isWeakMap': require('./isWeakMap'), + 'isWeakSet': require('./isWeakSet'), + 'lt': require('./lt'), + 'lte': require('./lte'), + 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), + 'toInteger': require('./toInteger'), + 'toLength': require('./toLength'), + 'toNumber': require('./toNumber'), + 'toPlainObject': require('./toPlainObject'), + 'toSafeInteger': require('./toSafeInteger'), + 'toString': require('./toString') +}; diff --git a/src/hello/server/node_modules/lodash/last.js b/src/hello/server/node_modules/lodash/last.js new file mode 100644 index 00000000..cad1eafa --- /dev/null +++ b/src/hello/server/node_modules/lodash/last.js @@ -0,0 +1,20 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/src/hello/server/node_modules/lodash/lastIndexOf.js b/src/hello/server/node_modules/lodash/lastIndexOf.js new file mode 100644 index 00000000..dabfb613 --- /dev/null +++ b/src/hello/server/node_modules/lodash/lastIndexOf.js @@ -0,0 +1,46 @@ +var baseFindIndex = require('./_baseFindIndex'), + baseIsNaN = require('./_baseIsNaN'), + strictLastIndexOf = require('./_strictLastIndexOf'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); +} + +module.exports = lastIndexOf; diff --git a/src/hello/server/node_modules/lodash/lodash.js b/src/hello/server/node_modules/lodash/lodash.js new file mode 100644 index 00000000..4131e936 --- /dev/null +++ b/src/hello/server/node_modules/lodash/lodash.js @@ -0,0 +1,17209 @@ +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.21'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function', + INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; + + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** + * Used to validate the `validate` option in `_.template` variable. + * + * Forbids characters which could potentially change the meaning of the function argument definition: + * - "()," (modification of function parameters) + * - "=" (default value) + * - "[]{}" (destructuring of function parameters) + * - "/" (beginning of a comment) + * - whitespace + */ + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } + + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } + + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; + } + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; + } + + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } + + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } + + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; + + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; + + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } + + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; + + var index = -1, + seen = caches[0]; + + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; + + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + var low = 0, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + + value = iteratee(value); + var valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. + */ + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * Casts `value` to `identity` if it's not a function. + * + * @private + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. + */ + function castFunction(value) { + return typeof value == 'function' ? value : identity; + } + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; + } + + /** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; + } + + /** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + + /** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + + /** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + + /** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + + /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + + /** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + + /** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; + } + } + stack['delete'](array); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; + + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); + + case errorTag: + return object.name == other.name && object.message == other.message; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; + } + + /** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); + } + + /** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + + /** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + + /** + * Creates an array of the own enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + var getTag = baseGetTag; + + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; + } + + /** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; + } + + /** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ + function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + + /** + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] + */ + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * Recursively flattens `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] + */ + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] + */ + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] + */ + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] + */ + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = MapCache; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); + } + + /** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ + var isBuffer = nativeIsBuffer || stubFalse; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + function isEqual(value, other) { + return baseIsEqual(value, other); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + + /** + * Checks if `value` is `undefined`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } + */ + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' + +``` + +The library can also be installed through [bower][bower] + +```bash +$ bower install validator-js +``` + +CDN + +```html + +``` + +## Validators + +Here is a list of the validators currently available. + +Validator | Description +--------------------------------------- | -------------------------------------- +**contains(str, seed [, options])** | check if the string contains the seed.

`options` is an object that defaults to `{ ignoreCase: false, minOccurrences: 1 }`.
Options:
`ignoreCase`: Ignore case when doing comparison, default false.
`minOccurrences`: Minimum number of occurrences for the seed in the string. Defaults to 1. +**equals(str, comparison)** | check if the string matches the comparison. +**isAbaRouting(str)** | check if the string is an ABA routing number for US bank account / cheque. +**isAfter(str [, options])** | check if the string is a date that is after the specified date.

`options` is an object that defaults to `{ comparisonDate: Date().toString() }`.
**Options:**
`comparisonDate`: Date to compare to. Defaults to `Date().toString()` (now). +**isAlpha(str [, locale, options])** | check if the string contains only letters (a-zA-Z).

`locale` is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'bn', 'bn-IN', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'eo', 'es-ES', 'fa-IR', 'fi-FI', 'fr-CA', 'fr-FR', 'gu-IN', 'he', 'hi-IN', 'hu-HU', 'it-IT', 'ja-JP', 'kk-KZ', 'kn-IN', 'ko-KR', 'ku-IQ', 'ml-IN', 'nb-NO', 'nl-NL', 'nn-NO', 'or-IN', 'pa-IN', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'si-LK', 'sk-SK', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'ta-IN', 'te-IN', 'th-TH', 'tr-TR', 'uk-UA']` and defaults to `en-US`. Locale list is `validator.isAlphaLocales`. `options` is an optional object that can be supplied with the following key(s): `ignore` which can either be a String or RegExp of characters to be ignored e.g. " -" will ignore spaces and -'s. +**isAlphanumeric(str [, locale, options])** | check if the string contains only letters and numbers (a-zA-Z0-9).

`locale` is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'bn', 'bn-IN', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'eo', 'es-ES', 'fa-IR', 'fi-FI', 'fr-CA', 'fr-FR', 'gu-IN', 'he', 'hi-IN', 'hu-HU', 'it-IT', 'ja-JP', 'kk-KZ', 'kn-IN', 'ko-KR', 'ku-IQ', 'ml-IN', 'nb-NO', 'nl-NL', 'nn-NO', 'or-IN', 'pa-IN', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'si-LK', 'sk-SK', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'ta-IN', 'te-IN', 'th-TH', 'tr-TR', 'uk-UA']`) and defaults to `en-US`. Locale list is `validator.isAlphanumericLocales`. `options` is an optional object that can be supplied with the following key(s): `ignore` which can either be a String or RegExp of characters to be ignored e.g. " -" will ignore spaces and -'s. +**isAscii(str)** | check if the string contains ASCII chars only. +**isBase32(str [, options])** | check if the string is base32 encoded. `options` is optional and defaults to `{ crockford: false }`.
When `crockford` is true it tests the given base32 encoded string using [Crockford's base32 alternative][Crockford Base32]. +**isBase58(str)** | check if the string is base58 encoded. +**isBase64(str [, options])** | check if the string is base64 encoded. `options` is optional and defaults to `{ urlSafe: false, padding: true }`
when `urlSafe` is true default value for `padding` is false and it tests the given base64 encoded string is [url safe][Base64 URL Safe]. +**isBefore(str [, options])** | check if the string is a date that is before the specified date.

`options` is an object that defaults to `{ comparisonDate: Date().toString() }`.

**Options:**
`comparisonDate`: Date to compare to. Defaults to `Date().toString()` (now). +**isBIC(str)** | check if the string is a BIC (Bank Identification Code) or SWIFT code. +**isBoolean(str [, options])** | check if the string is a boolean.
`options` is an object which defaults to `{ loose: false }`. If `loose` is set to false, the validator will strictly match ['true', 'false', '0', '1']. If `loose` is set to true, the validator will also match 'yes', 'no', and will match a valid boolean string of any case. (e.g.: ['true', 'True', 'TRUE']). +**isBtcAddress(str)** | check if the string is a valid BTC address. +**isByteLength(str [, options])** | check if the string's length (in UTF-8 bytes) falls in a range.

`options` is an object which defaults to `{ min: 0, max: undefined }`. +**isCreditCard(str [, options])** | check if the string is a credit card number.

`options` is an optional object that can be supplied with the following key(s): `provider` is an optional key whose value should be a string, and defines the company issuing the credit card. Valid values include `['amex', 'dinersclub', 'discover', 'jcb', 'mastercard', 'unionpay', 'visa']` or blank will check for any provider. +**isCurrency(str [, options])** | check if the string is a valid currency amount.

`options` is an object which defaults to `{ symbol: '$', require_symbol: false, allow_space_after_symbol: false, symbol_after_digits: false, allow_negatives: true, parens_for_negatives: false, negative_sign_before_digits: false, negative_sign_after_digits: false, allow_negative_sign_placeholder: false, thousands_separator: ',', decimal_separator: '.', allow_decimal: true, require_decimal: false, digits_after_decimal: [2], allow_space_after_digits: false }`.
**Note:** The array `digits_after_decimal` is filled with the exact number of digits allowed not a range, for example a range 1 to 3 will be given as [1, 2, 3]. +**isDataURI(str)** | check if the string is a [data uri format][Data URI Format]. +**isDate(str [, options])** | check if the string is a valid date. e.g. [`2002-07-15`, new Date()].

`options` is an object which can contain the keys `format`, `strictMode` and/or `delimiters`.

`format` is a string and defaults to `YYYY/MM/DD`.

`strictMode` is a boolean and defaults to `false`. If `strictMode` is set to true, the validator will reject strings different from `format`.

`delimiters` is an array of allowed date delimiters and defaults to `['/', '-']`. +**isDecimal(str [, options])** | check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc.

`options` is an object which defaults to `{force_decimal: false, decimal_digits: '1,', locale: 'en-US'}`.

`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'eo', 'es-ES', 'fa', 'fa-AF', 'fa-IR', 'fr-FR', 'fr-CA', 'hu-HU', 'id-ID', 'it-IT', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pl-Pl', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN']`.
**Note:** `decimal_digits` is given as a range like '1,3', a specific value like '3' or min like '1,'. +**isDivisibleBy(str, number)** | check if the string is a number that is divisible by another. +**isEAN(str)** | check if the string is an [EAN (European Article Number)][European Article Number]. +**isEmail(str [, options])** | check if the string is an email.

`options` is an object which defaults to `{ allow_display_name: false, require_display_name: false, allow_utf8_local_part: true, require_tld: true, allow_ip_domain: false, allow_underscores: false, domain_specific_validation: false, blacklisted_chars: '', host_blacklist: [] }`. If `allow_display_name` is set to true, the validator will also match `Display Name `. If `require_display_name` is set to true, the validator will reject strings without the format `Display Name `. If `allow_utf8_local_part` is set to false, the validator will not allow any non-English UTF8 character in email address' local part. If `require_tld` is set to false, email addresses without a TLD in their domain will also be matched. If `ignore_max_length` is set to true, the validator will not check for the standard max length of an email. If `allow_ip_domain` is set to true, the validator will allow IP addresses in the host part. If `domain_specific_validation` is true, some additional validation will be enabled, e.g. disallowing certain syntactically valid email addresses that are rejected by Gmail. If `blacklisted_chars` receives a string, then the validator will reject emails that include any of the characters in the string, in the name part. If `host_blacklist` is set to an array of strings or regexp, and the part of the email after the `@` symbol matches one of the strings defined in it, the validation fails. If `host_whitelist` is set to an array of strings or regexp, and the part of the email after the `@` symbol matches none of the strings defined in it, the validation fails. +**isEmpty(str [, options])** | check if the string has a length of zero.

`options` is an object which defaults to `{ ignore_whitespace: false }`. +**isEthereumAddress(str)** | check if the string is an [Ethereum][Ethereum] address. Does not validate address checksums. +**isFloat(str [, options])** | check if the string is a float.

`options` is an object which can contain the keys `min`, `max`, `gt`, and/or `lt` to validate the float is within boundaries (e.g. `{ min: 7.22, max: 9.55 }`) it also has `locale` as an option.

`min` and `max` are equivalent to 'greater or equal' and 'less or equal', respectively while `gt` and `lt` are their strict counterparts.

`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'eo', 'es-ES', 'fr-CA', 'fr-FR', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`. Locale list is `validator.isFloatLocales`. +**isFQDN(str [, options])** | check if the string is a fully qualified domain name (e.g. domain.com).

`options` is an object which defaults to `{ require_tld: true, allow_underscores: false, allow_trailing_dot: false, allow_numeric_tld: false, allow_wildcard: false, ignore_max_length: false }`.

`require_tld` - If set to false the validator will not check if the domain includes a TLD.
`allow_underscores` - if set to true, the validator will allow underscores in the domain.
`allow_trailing_dot` - if set to true, the validator will allow the domain to end with a `.` character.
`allow_numeric_tld` - if set to true, the validator will allow the TLD of the domain to be made up solely of numbers.
`allow_wildcard` - if set to true, the validator will allow domains starting with `*.` (e.g. `*.example.com` or `*.shop.example.com`).
`ignore_max_length` - if set to true, the validator will not check for the standard max length of a domain.
+**isFreightContainerID(str)** | alias for `isISO6346`, check if the string is a valid [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) shipping container identification. +**isFullWidth(str)** | check if the string contains any full-width chars. +**isHalfWidth(str)** | check if the string contains any half-width chars. +**isHash(str, algorithm)** | check if the string is a hash of type algorithm.

Algorithm is one of `['crc32', 'crc32b', 'md4', 'md5', 'ripemd128', 'ripemd160', 'sha1', 'sha256', 'sha384', 'sha512', 'tiger128', 'tiger160', 'tiger192']`. +**isHexadecimal(str)** | check if the string is a hexadecimal number. +**isHexColor(str [, options])** | check if the string is a hexadecimal color.

`options` is an object that defaults to `{ require_hashtag: false }`.
Options:
`require_hashtag`: Enforce # prefix, default false. +**isHSL(str)** | check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on [CSS Colors Level 4 specification][CSS Colors Level 4 Specification].

Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: `hsl(200grad+.1%62%/1)`). +**isIBAN(str, [, options])** | check if the string is an IBAN (International Bank Account Number).

`options` is an object which accepts two attributes: `whitelist`: where you can restrict IBAN codes you want to receive data from and `blacklist`: where you can remove some of the countries from the current list. For both you can use an array with the following values `['AD','AE','AL','AT','AZ','BA','BE','BG','BH','BR','BY','CH','CR','CY','CZ','DE','DK','DO','EE','EG','ES','FI','FO','FR','GB','GE','GI','GL','GR','GT','HR','HU','IE','IL','IQ','IR','IS','IT','JO','KW','KZ','LB','LC','LI','LT','LU','LV','MC','MD','ME','MK','MR','MT','MU','MZ','NL','NO','PK','PL','PS','PT','QA','RO','RS','SA','SC','SE','SI','SK','SM','SV','TL','TN','TR','UA','VA','VG','XK']`. +**isIdentityCard(str [, locale])** | check if the string is a valid identity card code.

`locale` is one of `['LK', 'PL', 'ES', 'FI', 'IN', 'IT', 'IR', 'MZ', 'NO', 'TH', 'zh-TW', 'he-IL', 'ar-LY', 'ar-TN', 'zh-CN', 'zh-HK', 'PK']` OR `'any'`. If 'any' is used, function will check if any of the locales match.

Defaults to 'any'. +**isIMEI(str [, options]))** | check if the string is a valid [IMEI number][IMEI]. IMEI should be of format `###############` or `##-######-######-#`.

`options` is an object which can contain the keys `allow_hyphens`. Defaults to first format. If `allow_hyphens` is set to true, the validator will validate the second format. +**isIn(str, values)** | check if the string is in an array of allowed values. +**isInt(str [, options])** | check if the string is an integer.

`options` is an object which can contain the keys `min` and/or `max` to check the integer is within boundaries (e.g. `{ min: 10, max: 99 }`). `options` can also contain the key `allow_leading_zeroes`, which when set to false will disallow integer values with leading zeroes (e.g. `{ allow_leading_zeroes: false }`). Finally, `options` can contain the keys `gt` and/or `lt` which will enforce integers being greater than or less than, respectively, the value provided (e.g. `{gt: 1, lt: 4}` for a number between 1 and 4). +**isIP(str [, options])** | check if the string is an IP address (version 4 or 6).

`options` is an object that defaults to `{ version: '' }`.

**Options:**
`version`: defines which IP version to compare to. Accepted values: `4`, `6`, `'4'`, `'6'`. +**isIPRange(str [, version])** | check if the string is an IP Range (version 4 or 6). +**isISBN(str [, options])** | check if the string is an [ISBN][ISBN].

`options` is an object that has no default.
**Options:**
`version`: ISBN version to compare to. Accepted values are '10' and '13'. If none provided, both will be tested. +**isISIN(str)** | check if the string is an [ISIN][ISIN] (stock/security identifier). +**isISO6346(str)** | check if the string is a valid [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) shipping container identification. +**isISO6391(str)** | check if the string is a valid [ISO 639-1][ISO 639-1] language code. +**isISO8601(str [, options])** | check if the string is a valid [ISO 8601][ISO 8601] date.
`options` is an object which defaults to `{ strict: false, strictSeparator: false }`. If `strict` is true, date strings with invalid dates like `2009-02-29` will be invalid. If `strictSeparator` is true, date strings with date and time separated by anything other than a T will be invalid. +**isISO15924(str)** | check if the string is a valid [ISO 15924][ISO 15924] officially assigned script code. +**isISO31661Alpha2(str)** | check if the string is a valid [ISO 3166-1 alpha-2][ISO 3166-1 alpha-2] officially assigned country code. +**isISO31661Alpha3(str)** | check if the string is a valid [ISO 3166-1 alpha-3][ISO 3166-1 alpha-3] officially assigned country code. +**isISO31661Numeric(str)** | check if the string is a valid [ISO 3166-1 numeric][ISO 3166-1 numeric] officially assigned country code. +**isISO4217(str)** | check if the string is a valid [ISO 4217][ISO 4217] officially assigned currency code. +**isISRC(str)** | check if the string is an [ISRC][ISRC]. +**isISSN(str [, options])** | check if the string is an [ISSN][ISSN].

`options` is an object which defaults to `{ case_sensitive: false, require_hyphen: false }`. If `case_sensitive` is true, ISSNs with a lowercase `'x'` as the check digit are rejected. +**isJSON(str [, options])** | check if the string is valid JSON (note: uses JSON.parse).

`options` is an object which defaults to `{ allow_primitives: false }`. If `allow_primitives` is true, the primitives 'true', 'false' and 'null' are accepted as valid JSON values. +**isJWT(str)** | check if the string is valid JWT token. +**isLatLong(str [, options])** | check if the string is a valid latitude-longitude coordinate in the format `lat,long` or `lat, long`.

`options` is an object that defaults to `{ checkDMS: false }`. Pass `checkDMS` as `true` to validate DMS(degrees, minutes, and seconds) latitude-longitude format. +**isLength(str [, options])** | check if the string's length falls in a range and equal to any of the integers of the `discreteLengths` array if provided.

`options` is an object which defaults to `{ min: 0, max: undefined, discreteLengths: undefined }`. Note: this function takes into account surrogate pairs. +**isLicensePlate(str, locale)** | check if the string matches the format of a country's license plate.

`locale` is one of `['cs-CZ', 'de-DE', 'de-LI', 'en-IN', 'en-SG', 'en-PK', 'es-AR', 'hu-HU', 'pt-BR', 'pt-PT', 'sq-AL', 'sv-SE']` or `'any'`. +**isLocale(str)** | check if the string is a locale. +**isLowercase(str)** | check if the string is lowercase. +**isLuhnNumber(str)** | check if the string passes the [Luhn algorithm check](https://en.wikipedia.org/wiki/Luhn_algorithm). +**isMACAddress(str [, options])** | check if the string is a MAC address.

`options` is an object which defaults to `{ no_separators: false }`. It allows the use of hyphens, spaces or dots e.g. '01 02 03 04 05 ab', '01-02-03-04-05-ab' or '0102.0304.05ab'. If `no_separators` is true, the validator will then only check MAC addresses without separators. The options also allow a `eui` property to specify if it needs to be validated against EUI-48 or EUI-64. The accepted values of `eui` are: 48, 64. +**isMagnetURI(str)** | check if the string is a [Magnet URI format][Magnet URI Format]. +**isMailtoURI(str, [, options])** | check if the string is a [Mailto URI format][Mailto URI Format].

`options` is an object of validating emails inside the URI (check `isEmail`s options for details). +**isMD5(str)** | check if the string is a MD5 hash.

Please note that you can also use the `isHash(str, 'md5')` function. Keep in mind that MD5 has some collision weaknesses compared to other algorithms (e.g., SHA). +**isMimeType(str)** | check if the string matches to a valid [MIME type][MIME Type] format. +**isMobilePhone(str [, locale [, options]])** | check if the string is a mobile phone number,

`locale` is either an array of locales (e.g. `['sk-SK', 'sr-RS']`) OR one of `['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-EH', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-PS', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'az-AZ', 'az-LB', 'az-LY', 'be-BY', 'bg-BG', 'bn-BD', 'bs-BA', 'ca-AD', 'cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'de-LU', 'dv-MV', 'dz-BT', 'el-CY', 'el-GR', 'en-AG', 'en-AI', 'en-AU', 'en-BM', 'en-BS', 'en-BW', 'en-CA', 'en-GB', 'en-GG', 'en-GH', 'en-GY', 'en-HK', 'en-IE', 'en-IN', 'en-JM', 'en-KE', 'en-KI', 'en-KN', 'en-LS', 'en-MO', 'en-MT', 'en-MU', 'en-MW', 'en-NG', 'en-NZ', 'en-PG', 'en-PH', 'en-PK', 'en-RW', 'en-SG', 'en-SL', 'en-SS', 'en-TZ', 'en-UG', 'en-US', 'en-ZA', 'en-ZM', 'en-ZW', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-CU', 'es-DO', 'es-EC', 'es-ES', 'es-GT','es-HN', 'es-MX', 'es-NI', 'es-PA', 'es-PE', 'es-PY', 'es-SV', 'es-UY', 'es-VE', 'et-EE', 'fa-AF', 'fa-IR', 'fi-FI', 'fj-FJ', 'fo-FO', 'fr-BE', 'fr-BF', 'fr-BJ', 'fr-CD', 'fr-CF', 'fr-FR', 'fr-GF', 'fr-GP', 'fr-MQ', 'fr-PF', 'fr-RE', 'fr-WF', 'ga-IE', 'he-IL', 'hu-HU', 'id-ID', 'ir-IR', 'it-IT', 'it-SM', 'ja-JP', 'ka-GE', 'kk-KZ', 'kl-GL', 'ko-KR', 'ky-KG', 'lt-LT', 'mg-MG', 'mn-MN', 'mk-MK', 'ms-MY', 'my-MM', 'mz-MZ', 'nb-NO', 'ne-NP', 'nl-AW', 'nl-BE', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-AO', 'pt-BR', 'pt-PT', 'ro-Md', 'ro-RO', 'ru-RU', 'si-LK', 'sk-SK', 'sl-SI', 'so-SO', 'sq-AL', 'sr-RS', 'sv-SE', 'tg-TJ', 'th-TH', 'tk-TM', 'tr-TR', 'uk-UA', 'uz-UZ', 'vi-VN', 'zh-CN', 'zh-HK', 'zh-MO', 'zh-TW']` OR defaults to `'any'`. If 'any' or a falsey value is used, function will check if any of the locales match).

`options` is an optional object that can be supplied with the following keys: `strictMode`, if this is set to `true`, the mobile phone number must be supplied with the country code and therefore must start with `+`. Locale list is `validator.isMobilePhoneLocales`. +**isMongoId(str)** | check if the string is a valid hex-encoded representation of a [MongoDB ObjectId][mongoid]. +**isMultibyte(str)** | check if the string contains one or more multibyte chars. +**isNumeric(str [, options])** | check if the string contains only numbers.

`options` is an object which defaults to `{ no_symbols: false }` it also has `locale` as an option. If `no_symbols` is true, the validator will reject numeric strings that feature a symbol (e.g. `+`, `-`, or `.`).

`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'eo', 'es-ES', 'fr-FR', 'fr-CA', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`. +**isOctal(str)** | check if the string is a valid octal number. +**isPassportNumber(str, countryCode)** | check if the string is a valid passport number.

`countryCode` is one of `['AM', 'AR', 'AT', 'AU', 'AZ', 'BE', 'BG', 'BY', 'BR', 'CA', 'CH', 'CN', 'CY', 'CZ', 'DE', 'DK', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IN', 'IR', 'ID', 'IS', 'IT', 'JM', 'JP', 'KR', 'KZ', 'LI', 'LT', 'LU', 'LV', 'LY', 'MT', 'MX', 'MY', 'MZ', 'NL', 'NZ', 'PH', 'PK', 'PL', 'PT', 'RO', 'RU', 'SE', 'SL', 'SK', 'TH', 'TR', 'UA', 'US', 'ZA']`. Locale list is `validator.passportNumberLocales`. +**isPort(str)** | check if the string is a valid port number. +**isPostalCode(str, locale)** | check if the string is a postal code.

`locale` is one of `['AD', 'AT', 'AU', 'AZ', 'BA', 'BD', 'BE', 'BG', 'BR', 'BY', 'CA', 'CH', 'CN', 'CO', 'CZ', 'DE', 'DK', 'DO', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IN', 'IR', 'IS', 'IT', 'JP', 'KE', 'KR', 'LI', 'LK', 'LT', 'LU', 'LV', 'MG', 'MT', 'MX', 'MY', 'NL', 'NO', 'NP', 'NZ', 'PK', 'PL', 'PR', 'PT', 'RO', 'RU', 'SA', 'SE', 'SG', 'SI', 'SK', 'TH', 'TN', 'TW', 'UA', 'US', 'ZA', 'ZM']` OR `'any'`. If 'any' is used, function will check if any of the locales match. Locale list is `validator.isPostalCodeLocales`. +**isRFC3339(str)** | check if the string is a valid [RFC 3339][RFC 3339] date. +**isRgbColor(str [,options])** | check if the string is a rgb or rgba color.

`options` is an object with the following properties

`includePercentValues` defaults to `true`. If you don't want to allow to set `rgb` or `rgba` values with percents, like `rgb(5%,5%,5%)`, or `rgba(90%,90%,90%,.3)`, then set it to false.

`allowSpaces` defaults to `true`, which prohibits whitespace. If set to false, whitespace between color values is allowed, such as `rgb(255, 255, 255)` or even `rgba(255, 128, 0, 0.7)`. +**isSemVer(str)** | check if the string is a Semantic Versioning Specification (SemVer). +**isSurrogatePair(str)** | check if the string contains any surrogate pairs chars. +**isUppercase(str)** | check if the string is uppercase. +**isSlug(str)** | check if the string is of type slug. +**isStrongPassword(str [, options])** | check if the string can be considered a strong password or not. Allows for custom requirements or scoring rules. If `returnScore` is true, then the function returns an integer score for the password rather than a boolean.
Default options:
`{ minLength: 8, minLowercase: 1, minUppercase: 1, minNumbers: 1, minSymbols: 1, returnScore: false, pointsPerUnique: 1, pointsPerRepeat: 0.5, pointsForContainingLower: 10, pointsForContainingUpper: 10, pointsForContainingNumber: 10, pointsForContainingSymbol: 10 }` +**isTime(str [, options])** | check if the string is a valid time e.g. [`23:01:59`, new Date().toLocaleTimeString()].

`options` is an object which can contain the keys `hourFormat` or `mode`.

`hourFormat` is a key and defaults to `'hour24'`.

`mode` is a key and defaults to `'default'`.

`hourFormat` can contain the values `'hour12'` or `'hour24'`, `'hour24'` will validate hours in 24 format and `'hour12'` will validate hours in 12 format.

`mode` can contain the values `'default', 'withSeconds', withOptionalSeconds`, `'default'` will validate `HH:MM` format, `'withSeconds'` will validate the `HH:MM:SS` format, `'withOptionalSeconds'` will validate `'HH:MM'` and `'HH:MM:SS'` formats. +**isTaxID(str, locale)** | check if the string is a valid Tax Identification Number. Default locale is `en-US`.

More info about exact TIN support can be found in `src/lib/isTaxID.js`.

Supported locales: `[ 'bg-BG', 'cs-CZ', 'de-AT', 'de-DE', 'dk-DK', 'el-CY', 'el-GR', 'en-CA', 'en-GB', 'en-IE', 'en-US', 'es-AR', 'es-ES', 'et-EE', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'hr-HR', 'hu-HU', 'it-IT', 'lb-LU', 'lt-LT', 'lv-LV', 'mt-MT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ro-RO', 'sk-SK', 'sl-SI', 'sv-SE', 'uk-UA']`. +**isURL(str [, options])** | check if the string is a URL.

`options` is an object which defaults to `{ protocols: ['http','https','ftp'], require_tld: true, require_protocol: false, require_host: true, require_port: false, require_valid_protocol: true, allow_underscores: false, host_whitelist: false, host_blacklist: false, allow_trailing_dot: false, allow_protocol_relative_urls: false, allow_fragments: true, allow_query_components: true, disallow_auth: false, validate_length: true }`.

`protocols` - valid protocols can be modified with this option.
`require_tld` - If set to false isURL will not check if the URL's host includes a top-level domain.
`require_protocol` - **RECOMMENDED** if set to true isURL will return false if protocol is not present in the URL. Without this setting, some malicious URLs cannot be distinguishable from a valid URL with authentication information.
`require_host` - if set to false isURL will not check if host is present in the URL.
`require_port` - if set to true isURL will check if port is present in the URL.
`require_valid_protocol` - isURL will check if the URL's protocol is present in the protocols option.
`allow_underscores` - if set to true, the validator will allow underscores in the URL.
`host_whitelist` - if set to an array of strings or regexp, and the domain matches none of the strings defined in it, the validation fails.
`host_blacklist` - if set to an array of strings or regexp, and the domain matches any of the strings defined in it, the validation fails.
`allow_trailing_dot` - if set to true, the validator will allow the domain to end with a `.` character.
`allow_protocol_relative_urls` - if set to true protocol relative URLs will be allowed.
`allow_fragments` - if set to false isURL will return false if fragments are present.
`allow_query_components` - if set to false isURL will return false if query components are present.
`disallow_auth` - if set to true, the validator will fail if the URL contains an authentication component, e.g. `http://username:password@example.com`.
`validate_length` - if set to false isURL will skip string length validation. `max_allowed_length` will be ignored if this is set as `false`.
`max_allowed_length` - if set, isURL will not allow URLs longer than the specified value (default is 2084 that IE maximum URL length).
+**isULID(str)** | check if the string is a [ULID](https://github.com/ulid/spec). +**isUUID(str [, version])** | check if the string is an RFC9562 UUID.
`version` is one of `'1'`-`'8'`, `'nil'`, `'max'`, `'all'` or `'loose'`. The `'loose'` option checks if the string is a UUID-like string with hexadecimal values, ignoring RFC9565. +**isVariableWidth(str)** | check if the string contains a mixture of full and half-width chars. +**isVAT(str, countryCode)** | check if the string is a [valid VAT number][VAT Number] if validation is available for the given country code matching [ISO 3166-1 alpha-2][ISO 3166-1 alpha-2].

`countryCode` is one of `['AL', 'AR', 'AT', 'AU', 'BE', 'BG', 'BO', 'BR', 'BY', 'CA', 'CH', 'CL', 'CO', 'CR', 'CY', 'CZ', 'DE', 'DK', 'DO', 'EC', 'EE', 'EL', 'ES', 'FI', 'FR', 'GB', 'GT', 'HN', 'HR', 'HU', 'ID', 'IE', 'IL', 'IN', 'IS', 'IT', 'KZ', 'LT', 'LU', 'LV', 'MK', 'MT', 'MX', 'NG', 'NI', 'NL', 'NO', 'NZ', 'PA', 'PE', 'PH', 'PL', 'PT', 'PY', 'RO', 'RS', 'RU', 'SA', 'SE', 'SI', 'SK', 'SM', 'SV', 'TR', 'UA', 'UY', 'UZ', 'VE']`. +**isWhitelisted(str, chars)** | check if the string consists only of characters that appear in the whitelist `chars`. +**matches(str, pattern [, modifiers])** | check if the string matches the pattern.

Either `matches('foo', /foo/i)` or `matches('foo', 'foo', 'i')`.
**Note:** The pattern is not checked for possible ReDoS attacks. We do not recommend that the user can provide their own pattern. + +## Sanitizers + +Here is a list of the sanitizers currently available. + +Sanitizer | Description +-------------------------------------- | ------------------------------- +**blacklist(input, chars)** | remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `blacklist(input, '\\[\\]')`. +**escape(input)** | replace `<`, `>`, `&`, `'`, `"`, `` ` ``, `\` and `/` with HTML entities. +**ltrim(input [, chars])** | trim characters from the left-side of the input. +**normalizeEmail(email [, options])** | canonicalize an email address. (This doesn't validate that the input is an email, if you want to validate the email use isEmail beforehand).

`options` is an object with the following keys and default values:
  • *all_lowercase: true* - Transforms the local part (before the @ symbol) of all email addresses to lowercase. Please note that this may violate RFC 5321, which gives providers the possibility to treat the local part of email addresses in a case sensitive way (although in practice most - yet not all - providers don't). The domain part of the email address is always lowercased, as it is case insensitive per RFC 1035.
  • *gmail_lowercase: true* - Gmail addresses are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Gmail addresses are lowercased regardless of the value of this setting.
  • *gmail_remove_dots: true*: Removes dots from the local part of the email address, as Gmail ignores them (e.g. "john.doe" and "johndoe" are considered equal).
  • *gmail_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@gmail.com" becomes "foo@gmail.com").
  • *gmail_convert_googlemaildotcom: true*: Converts addresses with domain @googlemail.com to @gmail.com, as they're equivalent.
  • *outlookdotcom_lowercase: true* - Outlook.com addresses (including Windows Live and Hotmail) are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Outlook.com addresses are lowercased regardless of the value of this setting.
  • *outlookdotcom_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@outlook.com" becomes "foo@outlook.com").
  • *yahoo_lowercase: true* - Yahoo Mail addresses are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Yahoo Mail addresses are lowercased regardless of the value of this setting.
  • *yahoo_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "-" sign (e.g. "foo-bar@yahoo.com" becomes "foo@yahoo.com").
  • *icloud_lowercase: true* - iCloud addresses (including MobileMe) are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, iCloud addresses are lowercased regardless of the value of this setting.
  • *icloud_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@icloud.com" becomes "foo@icloud.com").
+**rtrim(input [, chars])** | trim characters from the right-side of the input. +**stripLow(input [, keep_new_lines])** | remove characters with a numerical value < 32 and 127, mostly control characters. If `keep_new_lines` is `true`, newline characters are preserved (`\n` and `\r`, hex `0xA` and `0xD`). Unicode-safe in JavaScript. +**toBoolean(input [, strict])** | convert the input string to a boolean. Everything except for `'0'`, `'false'` and `''` returns `true`. In strict mode only `'1'` and `'true'` return `true`. +**toDate(input)** | convert the input string to a date, or `null` if the input is not a date. +**toFloat(input)** | convert the input string to a float, or `NaN` if the input is not a float. +**toInt(input [, radix])** | convert the input string to an integer, or `NaN` if the input is not an integer. +**trim(input [, chars])** | trim characters (whitespace by default) from both sides of the input. +**unescape(input)** | replace HTML encoded entities with `<`, `>`, `&`, `'`, `"`, `` ` ``, `\` and `/`. +**whitelist(input, chars)** | remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `whitelist(input, '\\[\\]')`. + +### XSS Sanitization + +XSS sanitization was removed from the library in [2d5d6999](https://github.com/validatorjs/validator.js/commit/2d5d6999541add350fb396ef02dc42ca3215049e). + +For an alternative, have a look at Yahoo's [xss-filters library](https://github.com/yahoo/xss-filters) or at [DOMPurify](https://github.com/cure53/DOMPurify). + +## Maintainers + +- [chriso](https://github.com/chriso) - **Chris O'Hara** (author) +- [profnandaa](https://github.com/profnandaa) - **Anthony Nandaa** +- [rubiin](https://github.com/rubiin) - **Rubin Bhandari** +- [wikirik](https://github.com/wikirik) - **Rik Smale** +- [ezkemboi](https://github.com/ezkemboi) - **Ezrqn Kemboi** +- [tux-tn](https://github.com/tux-tn) - **Sarhan Aissi** + +## Reading + +Remember, validating can be troublesome sometimes. See [A list of articles about programming assumptions commonly made that aren't true](https://github.com/jameslk/awesome-falsehoods). + +## Contributing + +We welcome contributions from the community! If you're interested in contributing to this project, please read our [Contribution Guide](CONTRIBUTING.md) to get started. + +## License + +This project is licensed under the [MIT](LICENSE). See the [LICENSE](LICENSE) file for details. + +[downloads-image]: http://img.shields.io/npm/dm/validator.svg + +[npm-url]: https://npmjs.org/package/validator +[npm-image]: http://img.shields.io/npm/v/validator.svg + +[codecov-url]: https://codecov.io/gh/validatorjs/validator.js +[codecov-image]: https://codecov.io/gh/validatorjs/validator.js/branch/master/graph/badge.svg + +[ci-url]: https://github.com/validatorjs/validator.js/actions?query=workflow%3ACI +[ci-image]: https://github.com/validatorjs/validator.js/workflows/CI/badge.svg?branch=master + +[gitter-url]: https://gitter.im/validatorjs/community +[gitter-image]: https://badges.gitter.im/validatorjs/community.svg + +[huntr-url]: https://huntr.dev/bounties/disclose/?target=https://github.com/validatorjs/validator.js +[huntr-image]: https://cdn.huntr.dev/huntr_security_badge_mono.svg + +[amd]: http://requirejs.org/docs/whyamd.html +[bower]: http://bower.io/ + +[Crockford Base32]: http://www.crockford.com/base32.html +[Base64 URL Safe]: https://base64.guru/standards/base64url +[Data URI Format]: https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs +[European Article Number]: https://en.wikipedia.org/wiki/International_Article_Number +[Ethereum]: https://ethereum.org/ +[CSS Colors Level 4 Specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value +[IMEI]: https://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity +[ISBN]: https://en.wikipedia.org/wiki/ISBN +[ISIN]: https://en.wikipedia.org/wiki/International_Securities_Identification_Number +[ISO 639-1]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes +[ISO 8601]: https://en.wikipedia.org/wiki/ISO_8601 +[ISO 15924]: https://en.wikipedia.org/wiki/ISO_15924 +[ISO 3166-1 alpha-2]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +[ISO 3166-1 alpha-3]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 +[ISO 3166-1 numeric]: https://en.wikipedia.org/wiki/ISO_3166-1_numeric +[ISO 4217]: https://en.wikipedia.org/wiki/ISO_4217 +[ISRC]: https://en.wikipedia.org/wiki/International_Standard_Recording_Code +[ISSN]: https://en.wikipedia.org/wiki/International_Standard_Serial_Number +[Luhn Check]: https://en.wikipedia.org/wiki/Luhn_algorithm +[Magnet URI Format]: https://en.wikipedia.org/wiki/Magnet_URI_scheme +[Mailto URI Format]: https://en.wikipedia.org/wiki/Mailto +[MIME Type]: https://en.wikipedia.org/wiki/Media_type +[mongoid]: http://docs.mongodb.org/manual/reference/object-id/ +[RFC 3339]: https://tools.ietf.org/html/rfc3339 +[VAT Number]: https://en.wikipedia.org/wiki/VAT_identification_number diff --git a/src/hello/server/node_modules/validator/es/index.js b/src/hello/server/node_modules/validator/es/index.js new file mode 100644 index 00000000..2b6a3ac1 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/index.js @@ -0,0 +1,218 @@ +import toDate from './lib/toDate'; +import toFloat from './lib/toFloat'; +import toInt from './lib/toInt'; +import toBoolean from './lib/toBoolean'; +import equals from './lib/equals'; +import contains from './lib/contains'; +import matches from './lib/matches'; +import isEmail from './lib/isEmail'; +import isURL from './lib/isURL'; +import isMACAddress from './lib/isMACAddress'; +import isIP from './lib/isIP'; +import isIPRange from './lib/isIPRange'; +import isFQDN from './lib/isFQDN'; +import isDate from './lib/isDate'; +import isTime from './lib/isTime'; +import isBoolean from './lib/isBoolean'; +import isLocale from './lib/isLocale'; +import isAbaRouting from './lib/isAbaRouting'; +import isAlpha, { locales as isAlphaLocales } from './lib/isAlpha'; +import isAlphanumeric, { locales as isAlphanumericLocales } from './lib/isAlphanumeric'; +import isNumeric from './lib/isNumeric'; +import isPassportNumber, { locales as passportNumberLocales } from './lib/isPassportNumber'; +import isPort from './lib/isPort'; +import isLowercase from './lib/isLowercase'; +import isUppercase from './lib/isUppercase'; +import isIMEI from './lib/isIMEI'; +import isAscii from './lib/isAscii'; +import isFullWidth from './lib/isFullWidth'; +import isHalfWidth from './lib/isHalfWidth'; +import isVariableWidth from './lib/isVariableWidth'; +import isMultibyte from './lib/isMultibyte'; +import isSemVer from './lib/isSemVer'; +import isSurrogatePair from './lib/isSurrogatePair'; +import isInt from './lib/isInt'; +import isFloat, { locales as isFloatLocales } from './lib/isFloat'; +import isDecimal from './lib/isDecimal'; +import isHexadecimal from './lib/isHexadecimal'; +import isOctal from './lib/isOctal'; +import isDivisibleBy from './lib/isDivisibleBy'; +import isHexColor from './lib/isHexColor'; +import isRgbColor from './lib/isRgbColor'; +import isHSL from './lib/isHSL'; +import isISRC from './lib/isISRC'; +import isIBAN, { locales as ibanLocales } from './lib/isIBAN'; +import isBIC from './lib/isBIC'; +import isMD5 from './lib/isMD5'; +import isHash from './lib/isHash'; +import isJWT from './lib/isJWT'; +import isJSON from './lib/isJSON'; +import isEmpty from './lib/isEmpty'; +import isLength from './lib/isLength'; +import isByteLength from './lib/isByteLength'; +import isULID from './lib/isULID'; +import isUUID from './lib/isUUID'; +import isMongoId from './lib/isMongoId'; +import isAfter from './lib/isAfter'; +import isBefore from './lib/isBefore'; +import isIn from './lib/isIn'; +import isLuhnNumber from './lib/isLuhnNumber'; +import isCreditCard from './lib/isCreditCard'; +import isIdentityCard from './lib/isIdentityCard'; +import isEAN from './lib/isEAN'; +import isISIN from './lib/isISIN'; +import isISBN from './lib/isISBN'; +import isISSN from './lib/isISSN'; +import isTaxID from './lib/isTaxID'; +import isMobilePhone, { locales as isMobilePhoneLocales } from './lib/isMobilePhone'; +import isEthereumAddress from './lib/isEthereumAddress'; +import isCurrency from './lib/isCurrency'; +import isBtcAddress from './lib/isBtcAddress'; +import { isISO6346, isFreightContainerID } from './lib/isISO6346'; +import isISO6391 from './lib/isISO6391'; +import isISO8601 from './lib/isISO8601'; +import isRFC3339 from './lib/isRFC3339'; +import isISO15924 from './lib/isISO15924'; +import isISO31661Alpha2 from './lib/isISO31661Alpha2'; +import isISO31661Alpha3 from './lib/isISO31661Alpha3'; +import isISO31661Numeric from './lib/isISO31661Numeric'; +import isISO4217 from './lib/isISO4217'; +import isBase32 from './lib/isBase32'; +import isBase58 from './lib/isBase58'; +import isBase64 from './lib/isBase64'; +import isDataURI from './lib/isDataURI'; +import isMagnetURI from './lib/isMagnetURI'; +import isMailtoURI from './lib/isMailtoURI'; +import isMimeType from './lib/isMimeType'; +import isLatLong from './lib/isLatLong'; +import isPostalCode, { locales as isPostalCodeLocales } from './lib/isPostalCode'; +import ltrim from './lib/ltrim'; +import rtrim from './lib/rtrim'; +import trim from './lib/trim'; +import escape from './lib/escape'; +import unescape from './lib/unescape'; +import stripLow from './lib/stripLow'; +import whitelist from './lib/whitelist'; +import blacklist from './lib/blacklist'; +import isWhitelisted from './lib/isWhitelisted'; +import normalizeEmail from './lib/normalizeEmail'; +import isSlug from './lib/isSlug'; +import isLicensePlate from './lib/isLicensePlate'; +import isStrongPassword from './lib/isStrongPassword'; +import isVAT from './lib/isVAT'; +var version = '13.15.26'; +var validator = { + version: version, + toDate: toDate, + toFloat: toFloat, + toInt: toInt, + toBoolean: toBoolean, + equals: equals, + contains: contains, + matches: matches, + isEmail: isEmail, + isURL: isURL, + isMACAddress: isMACAddress, + isIP: isIP, + isIPRange: isIPRange, + isFQDN: isFQDN, + isBoolean: isBoolean, + isIBAN: isIBAN, + isBIC: isBIC, + isAbaRouting: isAbaRouting, + isAlpha: isAlpha, + isAlphaLocales: isAlphaLocales, + isAlphanumeric: isAlphanumeric, + isAlphanumericLocales: isAlphanumericLocales, + isNumeric: isNumeric, + isPassportNumber: isPassportNumber, + passportNumberLocales: passportNumberLocales, + isPort: isPort, + isLowercase: isLowercase, + isUppercase: isUppercase, + isAscii: isAscii, + isFullWidth: isFullWidth, + isHalfWidth: isHalfWidth, + isVariableWidth: isVariableWidth, + isMultibyte: isMultibyte, + isSemVer: isSemVer, + isSurrogatePair: isSurrogatePair, + isInt: isInt, + isIMEI: isIMEI, + isFloat: isFloat, + isFloatLocales: isFloatLocales, + isDecimal: isDecimal, + isHexadecimal: isHexadecimal, + isOctal: isOctal, + isDivisibleBy: isDivisibleBy, + isHexColor: isHexColor, + isRgbColor: isRgbColor, + isHSL: isHSL, + isISRC: isISRC, + isMD5: isMD5, + isHash: isHash, + isJWT: isJWT, + isJSON: isJSON, + isEmpty: isEmpty, + isLength: isLength, + isLocale: isLocale, + isByteLength: isByteLength, + isULID: isULID, + isUUID: isUUID, + isMongoId: isMongoId, + isAfter: isAfter, + isBefore: isBefore, + isIn: isIn, + isLuhnNumber: isLuhnNumber, + isCreditCard: isCreditCard, + isIdentityCard: isIdentityCard, + isEAN: isEAN, + isISIN: isISIN, + isISBN: isISBN, + isISSN: isISSN, + isMobilePhone: isMobilePhone, + isMobilePhoneLocales: isMobilePhoneLocales, + isPostalCode: isPostalCode, + isPostalCodeLocales: isPostalCodeLocales, + isEthereumAddress: isEthereumAddress, + isCurrency: isCurrency, + isBtcAddress: isBtcAddress, + isISO6346: isISO6346, + isFreightContainerID: isFreightContainerID, + isISO6391: isISO6391, + isISO8601: isISO8601, + isISO15924: isISO15924, + isRFC3339: isRFC3339, + isISO31661Alpha2: isISO31661Alpha2, + isISO31661Alpha3: isISO31661Alpha3, + isISO31661Numeric: isISO31661Numeric, + isISO4217: isISO4217, + isBase32: isBase32, + isBase58: isBase58, + isBase64: isBase64, + isDataURI: isDataURI, + isMagnetURI: isMagnetURI, + isMailtoURI: isMailtoURI, + isMimeType: isMimeType, + isLatLong: isLatLong, + ltrim: ltrim, + rtrim: rtrim, + trim: trim, + escape: escape, + unescape: unescape, + stripLow: stripLow, + whitelist: whitelist, + blacklist: blacklist, + isWhitelisted: isWhitelisted, + normalizeEmail: normalizeEmail, + toString: toString, + isSlug: isSlug, + isStrongPassword: isStrongPassword, + isTaxID: isTaxID, + isDate: isDate, + isTime: isTime, + isLicensePlate: isLicensePlate, + isVAT: isVAT, + ibanLocales: ibanLocales +}; +export default validator; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/alpha.js b/src/hello/server/node_modules/validator/es/lib/alpha.js new file mode 100644 index 00000000..3bc1b672 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/alpha.js @@ -0,0 +1,151 @@ +export var alpha = { + 'en-US': /^[A-Z]+$/i, + 'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i, + 'bg-BG': /^[А-Я]+$/i, + 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[A-ZÆØÅ]+$/i, + 'de-DE': /^[A-ZÄÖÜß]+$/i, + 'el-GR': /^[Α-ώ]+$/i, + 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, + 'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i, + 'fi-FI': /^[A-ZÅÄÖ]+$/i, + 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + 'nb-NO': /^[A-ZÆØÅ]+$/i, + 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[A-ZÆØÅ]+$/i, + 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + 'ru-RU': /^[А-ЯЁ]+$/i, + 'kk-KZ': /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + 'sl-SI': /^[A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[A-ZÅÄÖ]+$/i, + 'th-TH': /^[ก-๐\s]+$/i, + 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i, + 'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + 'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[א-ת]+$/, + fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + 'hi-IN': /^[\u0900-\u0961]+[\u0972-\u097F]*$/i, + 'si-LK': /^[\u0D80-\u0DFF]+$/, + 'ta-IN': /^[\u0B80-\u0BFF]+$/i, + 'te-IN': /^[\u0C00-\u0C7F]+$/i, + 'kn-IN': /^[\u0C80-\u0CFF]+$/i, + 'ml-IN': /^[\u0D00-\u0D7F]+$/i, + 'gu-IN': /^[\u0A80-\u0AFF]+$/i, + 'pa-IN': /^[\u0A00-\u0A7F]+$/i, + 'or-IN': /^[\u0B00-\u0B7F]+$/i +}; +export var alphanumeric = { + 'en-US': /^[0-9A-Z]+$/i, + 'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i, + 'bg-BG': /^[0-9А-Я]+$/i, + 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[0-9A-ZÆØÅ]+$/i, + 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, + 'el-GR': /^[0-9Α-ω]+$/i, + 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + 'fi-FI': /^[0-9A-ZÅÄÖ]+$/i, + 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'nb-NO': /^[0-9A-ZÆØÅ]+$/i, + 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[0-9A-ZÆØÅ]+$/i, + 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + 'ru-RU': /^[0-9А-ЯЁ]+$/i, + 'kk-KZ': /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + 'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i, + 'th-TH': /^[ก-๙\s]+$/i, + 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, + 'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + 'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[0-9א-ת]+$/, + fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + 'hi-IN': /^[\u0900-\u0963]+[\u0966-\u097F]*$/i, + 'si-LK': /^[0-9\u0D80-\u0DFF]+$/, + 'ta-IN': /^[0-9\u0B80-\u0BFF.]+$/i, + 'te-IN': /^[0-9\u0C00-\u0C7F.]+$/i, + 'kn-IN': /^[0-9\u0C80-\u0CFF.]+$/i, + 'ml-IN': /^[0-9\u0D00-\u0D7F.]+$/i, + 'gu-IN': /^[0-9\u0A80-\u0AFF.]+$/i, + 'pa-IN': /^[0-9\u0A00-\u0A7F.]+$/i, + 'or-IN': /^[0-9\u0B00-\u0B7F.]+$/i +}; +export var decimal = { + 'en-US': '.', + ar: '٫' +}; +export var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; +for (var locale, i = 0; i < englishLocales.length; i++) { + locale = "en-".concat(englishLocales[i]); + alpha[locale] = alpha['en-US']; + alphanumeric[locale] = alphanumeric['en-US']; + decimal[locale] = decimal['en-US']; +} + +// Source: http://www.localeplanet.com/java/ +export var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; +for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { + _locale = "ar-".concat(arabicLocales[_i]); + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; + decimal[_locale] = decimal.ar; +} +export var farsiLocales = ['IR', 'AF']; +for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) { + _locale2 = "fa-".concat(farsiLocales[_i2]); + alphanumeric[_locale2] = alphanumeric.fa; + decimal[_locale2] = decimal.ar; +} +export var bengaliLocales = ['BD', 'IN']; +for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) { + _locale3 = "bn-".concat(bengaliLocales[_i3]); + alpha[_locale3] = alpha.bn; + alphanumeric[_locale3] = alphanumeric.bn; + decimal[_locale3] = decimal['en-US']; +} + +// Source: https://en.wikipedia.org/wiki/Decimal_mark +export var dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY']; +export var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'eo', 'es-ES', 'fr-CA', 'fr-FR', 'gu-IN', 'hi-IN', 'hu-HU', 'id-ID', 'it-IT', 'kk-KZ', 'kn-IN', 'ku-IQ', 'ml-IN', 'nb-NO', 'nl-NL', 'nn-NO', 'or-IN', 'pa-IN', 'pl-PL', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'ta-IN', 'te-IN', 'tr-TR', 'uk-UA', 'vi-VN']; +for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) { + decimal[dotDecimal[_i4]] = decimal['en-US']; +} +for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) { + decimal[commaDecimal[_i5]] = ','; +} +alpha['fr-CA'] = alpha['fr-FR']; +alphanumeric['fr-CA'] = alphanumeric['fr-FR']; +alpha['pt-BR'] = alpha['pt-PT']; +alphanumeric['pt-BR'] = alphanumeric['pt-PT']; +decimal['pt-BR'] = decimal['pt-PT']; + +// see #862 +alpha['pl-Pl'] = alpha['pl-PL']; +alphanumeric['pl-Pl'] = alphanumeric['pl-PL']; +decimal['pl-Pl'] = decimal['pl-PL']; + +// see #1455 +alpha['fa-AF'] = alpha.fa; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/blacklist.js b/src/hello/server/node_modules/validator/es/lib/blacklist.js new file mode 100644 index 00000000..77c0e5cf --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/blacklist.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function blacklist(str, chars) { + assertString(str); + return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), ''); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/contains.js b/src/hello/server/node_modules/validator/es/lib/contains.js new file mode 100644 index 00000000..222d52e2 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/contains.js @@ -0,0 +1,15 @@ +import assertString from './util/assertString'; +import toString from './util/toString'; +import merge from './util/merge'; +var defaultContainsOptions = { + ignoreCase: false, + minOccurrences: 1 +}; +export default function contains(str, elem, options) { + assertString(str); + options = merge(options, defaultContainsOptions); + if (options.ignoreCase) { + return str.toLowerCase().split(toString(elem).toLowerCase()).length > options.minOccurrences; + } + return str.split(toString(elem)).length > options.minOccurrences; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/equals.js b/src/hello/server/node_modules/validator/es/lib/equals.js new file mode 100644 index 00000000..87a9ded0 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/equals.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function equals(str, comparison) { + assertString(str); + return str === comparison; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/escape.js b/src/hello/server/node_modules/validator/es/lib/escape.js new file mode 100644 index 00000000..e9bb6de3 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/escape.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function escape(str) { + assertString(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/\\/g, '\').replace(/`/g, '`'); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isAbaRouting.js b/src/hello/server/node_modules/validator/es/lib/isAbaRouting.js new file mode 100644 index 00000000..a63a44cb --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isAbaRouting.js @@ -0,0 +1,15 @@ +import assertString from './util/assertString'; + +// http://www.brainjar.com/js/validation/ +// https://www.aba.com/news-research/research-analysis/routing-number-policy-procedures +// series reserved for future use are excluded +var isRoutingReg = /^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/; +export default function isAbaRouting(str) { + assertString(str); + if (!isRoutingReg.test(str)) return false; + var checkSumVal = 0; + for (var i = 0; i < str.length; i++) { + if (i % 3 === 0) checkSumVal += str[i] * 3;else if (i % 3 === 1) checkSumVal += str[i] * 7;else checkSumVal += str[i] * 1; + } + return checkSumVal % 10 === 0; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isAfter.js b/src/hello/server/node_modules/validator/es/lib/isAfter.js new file mode 100644 index 00000000..3eb86a82 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isAfter.js @@ -0,0 +1,10 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +import toDate from './toDate'; +export default function isAfter(date, options) { + // For backwards compatibility: + // isAfter(str [, date]), i.e. `options` could be used as argument for the legacy `date` + var comparisonDate = (_typeof(options) === 'object' ? options.comparisonDate : options) || Date().toString(); + var comparison = toDate(comparisonDate); + var original = toDate(date); + return !!(original && comparison && original > comparison); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isAlpha.js b/src/hello/server/node_modules/validator/es/lib/isAlpha.js new file mode 100644 index 00000000..64d91040 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isAlpha.js @@ -0,0 +1,23 @@ +import assertString from './util/assertString'; +import { alpha } from './alpha'; +export default function isAlpha(_str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + assertString(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ''); + } else if (typeof ignore === 'string') { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&'), "]"), 'g'), ''); // escape regex for ignore + } else { + throw new Error('ignore should be instance of a String or RegExp'); + } + } + if (locale in alpha) { + return alpha[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +export var locales = Object.keys(alpha); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isAlphanumeric.js b/src/hello/server/node_modules/validator/es/lib/isAlphanumeric.js new file mode 100644 index 00000000..cf0aeda8 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isAlphanumeric.js @@ -0,0 +1,23 @@ +import assertString from './util/assertString'; +import { alphanumeric } from './alpha'; +export default function isAlphanumeric(_str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + assertString(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ''); + } else if (typeof ignore === 'string') { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&'), "]"), 'g'), ''); // escape regex for ignore + } else { + throw new Error('ignore should be instance of a String or RegExp'); + } + } + if (locale in alphanumeric) { + return alphanumeric[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +export var locales = Object.keys(alphanumeric); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isAscii.js b/src/hello/server/node_modules/validator/es/lib/isAscii.js new file mode 100644 index 00000000..61dfe4de --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isAscii.js @@ -0,0 +1,10 @@ +import assertString from './util/assertString'; + +/* eslint-disable no-control-regex */ +var ascii = /^[\x00-\x7F]+$/; +/* eslint-enable no-control-regex */ + +export default function isAscii(str) { + assertString(str); + return ascii.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isBIC.js b/src/hello/server/node_modules/validator/es/lib/isBIC.js new file mode 100644 index 00000000..8e7892b7 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isBIC.js @@ -0,0 +1,16 @@ +import assertString from './util/assertString'; +import { CountryCodes } from './isISO31661Alpha2'; + +// https://en.wikipedia.org/wiki/ISO_9362 +var isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/; +export default function isBIC(str) { + assertString(str); + + // toUpperCase() should be removed when a new major version goes out that changes + // the regex to [A-Z] (per the spec). + var countryCode = str.slice(4, 6).toUpperCase(); + if (!CountryCodes.has(countryCode) && countryCode !== 'XK') { + return false; + } + return isBICReg.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isBase32.js b/src/hello/server/node_modules/validator/es/lib/isBase32.js new file mode 100644 index 00000000..9cc3e69d --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isBase32.js @@ -0,0 +1,19 @@ +import assertString from './util/assertString'; +import merge from './util/merge'; +var base32 = /^[A-Z2-7]+=*$/; +var crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/; +var defaultBase32Options = { + crockford: false +}; +export default function isBase32(str, options) { + assertString(str); + options = merge(options, defaultBase32Options); + if (options.crockford) { + return crockfordBase32.test(str); + } + var len = str.length; + if (len % 8 === 0 && base32.test(str)) { + return true; + } + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isBase58.js b/src/hello/server/node_modules/validator/es/lib/isBase58.js new file mode 100644 index 00000000..0fb2dec9 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isBase58.js @@ -0,0 +1,11 @@ +import assertString from './util/assertString'; + +// Accepted chars - 123456789ABCDEFGH JKLMN PQRSTUVWXYZabcdefghijk mnopqrstuvwxyz +var base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/; +export default function isBase58(str) { + assertString(str); + if (base58Reg.test(str)) { + return true; + } + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isBase64.js b/src/hello/server/node_modules/validator/es/lib/isBase64.js new file mode 100644 index 00000000..865d6dc9 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isBase64.js @@ -0,0 +1,23 @@ +import assertString from './util/assertString'; +import merge from './util/merge'; +var base64WithPadding = /^[A-Za-z0-9+/]+={0,2}$/; +var base64WithoutPadding = /^[A-Za-z0-9+/]+$/; +var base64UrlWithPadding = /^[A-Za-z0-9_-]+={0,2}$/; +var base64UrlWithoutPadding = /^[A-Za-z0-9_-]+$/; +export default function isBase64(str, options) { + var _options; + assertString(str); + options = merge(options, { + urlSafe: false, + padding: !((_options = options) !== null && _options !== void 0 && _options.urlSafe) + }); + if (str === '') return true; + if (options.padding && str.length % 4 !== 0) return false; + var regex; + if (options.urlSafe) { + regex = options.padding ? base64UrlWithPadding : base64UrlWithoutPadding; + } else { + regex = options.padding ? base64WithPadding : base64WithoutPadding; + } + return (!options.padding || str.length % 4 === 0) && regex.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isBefore.js b/src/hello/server/node_modules/validator/es/lib/isBefore.js new file mode 100644 index 00000000..b86ed0a0 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isBefore.js @@ -0,0 +1,10 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +import toDate from './toDate'; +export default function isBefore(date, options) { + // For backwards compatibility: + // isBefore(str [, date]), i.e. `options` could be used as argument for the legacy `date` + var comparisonDate = (_typeof(options) === 'object' ? options.comparisonDate : options) || Date().toString(); + var comparison = toDate(comparisonDate); + var original = toDate(date); + return !!(original && comparison && original < comparison); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isBoolean.js b/src/hello/server/node_modules/validator/es/lib/isBoolean.js new file mode 100644 index 00000000..bf3f56ce --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isBoolean.js @@ -0,0 +1,15 @@ +import assertString from './util/assertString'; +import includes from './util/includesArray'; +var defaultOptions = { + loose: false +}; +var strictBooleans = ['true', 'false', '1', '0']; +var looseBooleans = [].concat(strictBooleans, ['yes', 'no']); +export default function isBoolean(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions; + assertString(str); + if (options.loose) { + return includes(looseBooleans, str.toLowerCase()); + } + return includes(strictBooleans, str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isBtcAddress.js b/src/hello/server/node_modules/validator/es/lib/isBtcAddress.js new file mode 100644 index 00000000..a27221cf --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isBtcAddress.js @@ -0,0 +1,7 @@ +import assertString from './util/assertString'; +var bech32 = /^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/; +var base58 = /^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/; +export default function isBtcAddress(str) { + assertString(str); + return bech32.test(str) || base58.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isByteLength.js b/src/hello/server/node_modules/validator/es/lib/isByteLength.js new file mode 100644 index 00000000..320963c7 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isByteLength.js @@ -0,0 +1,19 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +import assertString from './util/assertString'; + +/* eslint-disable prefer-rest-params */ +export default function isByteLength(str, options) { + assertString(str); + var min; + var max; + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isByteLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === 'undefined' || len <= max); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isCreditCard.js b/src/hello/server/node_modules/validator/es/lib/isCreditCard.js new file mode 100644 index 00000000..66900e4e --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isCreditCard.js @@ -0,0 +1,43 @@ +import assertString from './util/assertString'; +import isLuhnValid from './isLuhnNumber'; +var cards = { + amex: /^3[47][0-9]{13}$/, + dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/, + discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/, + jcb: /^(?:2131|1800|35\d{3})\d{11}$/, + mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/, + // /^[25][1-7][0-9]{14}$/; + unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/, + visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/ +}; +var allCards = function () { + var tmpCardsArray = []; + for (var cardProvider in cards) { + // istanbul ignore else + if (cards.hasOwnProperty(cardProvider)) { + tmpCardsArray.push(cards[cardProvider]); + } + } + return tmpCardsArray; +}(); +export default function isCreditCard(card) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(card); + var provider = options.provider; + var sanitized = card.replace(/[- ]+/g, ''); + if (provider && provider.toLowerCase() in cards) { + // specific provider in the list + if (!cards[provider.toLowerCase()].test(sanitized)) { + return false; + } + } else if (provider && !(provider.toLowerCase() in cards)) { + /* specific provider not in the list */ + throw new Error("".concat(provider, " is not a valid credit card provider.")); + } else if (!allCards.some(function (cardProvider) { + return cardProvider.test(sanitized); + })) { + // no specific provider + return false; + } + return isLuhnValid(card); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isCurrency.js b/src/hello/server/node_modules/validator/es/lib/isCurrency.js new file mode 100644 index 00000000..13565a8a --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isCurrency.js @@ -0,0 +1,74 @@ +import merge from './util/merge'; +import assertString from './util/assertString'; +function currencyRegex(options) { + var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}"); + options.digits_after_decimal.forEach(function (digit, index) { + if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}"); + }); + var symbol = "(".concat(options.symbol.replace(/\W/, function (m) { + return "\\".concat(m); + }), ")").concat(options.require_symbol ? '' : '?'), + negative = '-?', + whole_dollar_amount_without_sep = '[1-9]\\d*', + whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"), + valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], + whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join('|'), ")?"), + decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? '' : '?'); + var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ''); + + // default is negative sign before symbol, but there are two other options (besides parens) + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } + + // South African Rand, for example, uses R 123 (space) and R-123 (no space) + if (options.allow_negative_sign_placeholder) { + pattern = "( (?!\\-))?".concat(pattern); + } else if (options.allow_space_after_symbol) { + pattern = " ?".concat(pattern); + } else if (options.allow_space_after_digits) { + pattern += '( (?!$))?'; + } + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")"); + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } + + // ensure there's a dollar and/or decimal amount, and that + // it doesn't start with a space or a negative sign followed by a space + return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$")); +} +var default_currency_options = { + symbol: '$', + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ',', + decimal_separator: '.', + allow_decimal: true, + require_decimal: false, + digits_after_decimal: [2], + allow_space_after_digits: false +}; +export default function isCurrency(str, options) { + assertString(str); + options = merge(options, default_currency_options); + return currencyRegex(options).test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isDataURI.js b/src/hello/server/node_modules/validator/es/lib/isDataURI.js new file mode 100644 index 00000000..ee96625a --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isDataURI.js @@ -0,0 +1,31 @@ +import assertString from './util/assertString'; +var validMediaType = /^[a-z]+\/[a-z0-9\-\+\._]+$/i; +var validAttribute = /^[a-z\-]+=[a-z0-9\-]+$/i; +var validData = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i; +export default function isDataURI(str) { + assertString(str); + var data = str.split(','); + if (data.length < 2) { + return false; + } + var attributes = data.shift().trim().split(';'); + var schemeAndMediaType = attributes.shift(); + if (schemeAndMediaType.slice(0, 5) !== 'data:') { + return false; + } + var mediaType = schemeAndMediaType.slice(5); + if (mediaType !== '' && !validMediaType.test(mediaType)) { + return false; + } + for (var i = 0; i < attributes.length; i++) { + if (!(i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') && !validAttribute.test(attributes[i])) { + return false; + } + } + for (var _i = 0; _i < data.length; _i++) { + if (!validData.test(data[_i])) { + return false; + } + } + return true; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isDate.js b/src/hello/server/node_modules/validator/es/lib/isDate.js new file mode 100644 index 00000000..5df67fc4 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isDate.js @@ -0,0 +1,93 @@ +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +import merge from './util/merge'; +var default_date_options = { + format: 'YYYY/MM/DD', + delimiters: ['/', '-'], + strictMode: false +}; +function isValidFormat(format) { + return /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(format); +} +function zip(date, format) { + var zippedArr = [], + len = Math.max(date.length, format.length); + for (var i = 0; i < len; i++) { + zippedArr.push([date[i], format[i]]); + } + return zippedArr; +} +export default function isDate(input, options) { + if (typeof options === 'string') { + // Allow backward compatibility for old format isDate(input [, format]) + options = merge({ + format: options + }, default_date_options); + } else { + options = merge(options, default_date_options); + } + if (typeof input === 'string' && isValidFormat(options.format)) { + if (options.strictMode && input.length !== options.format.length) return false; + var formatDelimiter = options.delimiters.find(function (delimiter) { + return options.format.indexOf(delimiter) !== -1; + }); + var dateDelimiter = options.strictMode ? formatDelimiter : options.delimiters.find(function (delimiter) { + return input.indexOf(delimiter) !== -1; + }); + var dateAndFormat = zip(input.split(dateDelimiter), options.format.toLowerCase().split(formatDelimiter)); + var dateObj = {}; + var _iterator = _createForOfIteratorHelper(dateAndFormat), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _slicedToArray(_step.value, 2), + dateWord = _step$value[0], + formatWord = _step$value[1]; + if (!dateWord || !formatWord || dateWord.length !== formatWord.length) { + return false; + } + dateObj[formatWord.charAt(0)] = dateWord; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + var fullYear = dateObj.y; + + // Check if the year starts with a hyphen + if (fullYear.startsWith('-')) { + return false; // Hyphen before year is not allowed + } + if (dateObj.y.length === 2) { + var parsedYear = parseInt(dateObj.y, 10); + if (isNaN(parsedYear)) { + return false; + } + var currentYearLastTwoDigits = new Date().getFullYear() % 100; + if (parsedYear < currentYearLastTwoDigits) { + fullYear = "20".concat(dateObj.y); + } else { + fullYear = "19".concat(dateObj.y); + } + } + var month = dateObj.m; + if (dateObj.m.length === 1) { + month = "0".concat(dateObj.m); + } + var day = dateObj.d; + if (dateObj.d.length === 1) { + day = "0".concat(dateObj.d); + } + return new Date("".concat(fullYear, "-").concat(month, "-").concat(day, "T00:00:00.000Z")).getUTCDate() === +dateObj.d; + } + if (!options.strictMode) { + return Object.prototype.toString.call(input) === '[object Date]' && isFinite(input); + } + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isDecimal.js b/src/hello/server/node_modules/validator/es/lib/isDecimal.js new file mode 100644 index 00000000..8872ff70 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isDecimal.js @@ -0,0 +1,22 @@ +import merge from './util/merge'; +import assertString from './util/assertString'; +import includes from './util/includesArray'; +import { decimal } from './alpha'; +function decimalRegExp(options) { + var regExp = new RegExp("^[-+]?([0-9]+)?(\\".concat(decimal[options.locale], "[0-9]{").concat(options.decimal_digits, "})").concat(options.force_decimal ? '' : '?', "$")); + return regExp; +} +var default_decimal_options = { + force_decimal: false, + decimal_digits: '1,', + locale: 'en-US' +}; +var blacklist = ['', '-', '+']; +export default function isDecimal(str, options) { + assertString(str); + options = merge(options, default_decimal_options); + if (options.locale in decimal) { + return !includes(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str); + } + throw new Error("Invalid locale '".concat(options.locale, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isDivisibleBy.js b/src/hello/server/node_modules/validator/es/lib/isDivisibleBy.js new file mode 100644 index 00000000..f71d5f4e --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isDivisibleBy.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +import toFloat from './toFloat'; +export default function isDivisibleBy(str, num) { + assertString(str); + return toFloat(str) % parseInt(num, 10) === 0; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isEAN.js b/src/hello/server/node_modules/validator/es/lib/isEAN.js new file mode 100644 index 00000000..73288ee7 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isEAN.js @@ -0,0 +1,70 @@ +/** + * The most commonly used EAN standard is + * the thirteen-digit EAN-13, while the + * less commonly used 8-digit EAN-8 barcode was + * introduced for use on small packages. + * Also EAN/UCC-14 is used for Grouping of individual + * trade items above unit level(Intermediate, Carton or Pallet). + * For more info about EAN-14 checkout: https://www.gtin.info/itf-14-barcodes/ + * EAN consists of: + * GS1 prefix, manufacturer code, product code and check digit + * Reference: https://en.wikipedia.org/wiki/International_Article_Number + * Reference: https://www.gtin.info/ + */ + +import assertString from './util/assertString'; + +/** + * Define EAN Lengths; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14 + * and Regular Expression for valid EANs (EAN-8, EAN-13, EAN-14), + * with exact numeric matching of 8 or 13 or 14 digits [0-9] + */ +var LENGTH_EAN_8 = 8; +var LENGTH_EAN_14 = 14; +var validEanRegex = /^(\d{8}|\d{13}|\d{14})$/; + +/** + * Get position weight given: + * EAN length and digit index/position + * + * @param {number} length + * @param {number} index + * @return {number} + */ +function getPositionWeightThroughLengthAndIndex(length, index) { + if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) { + return index % 2 === 0 ? 3 : 1; + } + return index % 2 === 0 ? 1 : 3; +} + +/** + * Calculate EAN Check Digit + * Reference: https://en.wikipedia.org/wiki/International_Article_Number#Calculation_of_checksum_digit + * + * @param {string} ean + * @return {number} + */ +function calculateCheckDigit(ean) { + var checksum = ean.slice(0, -1).split('').map(function (_char, index) { + return Number(_char) * getPositionWeightThroughLengthAndIndex(ean.length, index); + }).reduce(function (acc, partialSum) { + return acc + partialSum; + }, 0); + var remainder = 10 - checksum % 10; + return remainder < 10 ? remainder : 0; +} + +/** + * Check if string is valid EAN: + * Matches EAN-8/EAN-13/EAN-14 regex + * Has valid check digit. + * + * @param {string} str + * @return {boolean} + */ +export default function isEAN(str) { + assertString(str); + var actualCheckDigit = Number(str.slice(-1)); + return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isEmail.js b/src/hello/server/node_modules/validator/es/lib/isEmail.js new file mode 100644 index 00000000..23fd49ef --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isEmail.js @@ -0,0 +1,165 @@ +import assertString from './util/assertString'; +import checkHost from './util/checkHost'; +import isByteLength from './isByteLength'; +import isFQDN from './isFQDN'; +import isIP from './isIP'; +import merge from './util/merge'; +var default_email_options = { + allow_display_name: false, + allow_underscores: false, + require_display_name: false, + allow_utf8_local_part: true, + require_tld: true, + blacklisted_chars: '', + ignore_max_length: false, + host_blacklist: [], + host_whitelist: [] +}; + +/* eslint-disable max-len */ +/* eslint-disable no-control-regex */ +var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)]/.test(display_name_without_quotes); + if (contains_illegal) { + // if contains illegal characters, + // must to be enclosed in double-quotes, otherwise it's not a valid display name + if (display_name_without_quotes === display_name) { + return false; + } + + // the quotes in display name must start with character symbol \ + var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length; + if (!all_start_with_back_slash) { + return false; + } + } + return true; +} +export default function isEmail(str, options) { + assertString(str); + options = merge(options, default_email_options); + if (options.require_display_name || options.allow_display_name) { + var display_email = str.match(splitNameAddress); + if (display_email) { + var display_name = display_email[1]; + + // Remove display name and angle brackets to get email address + // Can be done in the regex but will introduce a ReDOS (See #1597 for more info) + str = str.replace(display_name, '').replace(/(^<|>$)/g, ''); + + // sometimes need to trim the last space to get the display name + // because there may be a space between display name and email address + // eg. myname + // the display name is `myname` instead of `myname `, so need to trim the last space + if (display_name.endsWith(' ')) { + display_name = display_name.slice(0, -1); + } + if (!validateDisplayName(display_name)) { + return false; + } + } else if (options.require_display_name) { + return false; + } + } + if (!options.ignore_max_length && str.length > defaultMaxEmailLength) { + return false; + } + var parts = str.split('@'); + var domain = parts.pop(); + var lower_domain = domain.toLowerCase(); + if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) { + return false; + } + if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) { + return false; + } + var user = parts.join('@'); + if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) { + /* + Previously we removed dots for gmail addresses before validating. + This was removed because it allows `multiple..dots@gmail.com` + to be reported as valid, but it is not. + Gmail only normalizes single dots, removing them from here is pointless, + should be done in normalizeEmail + */ + user = user.toLowerCase(); + + // Removing sub-address from username before gmail validation + var username = user.split('+')[0]; + + // Dots are not included in gmail length restriction + if (!isByteLength(username.replace(/\./g, ''), { + min: 6, + max: 30 + })) { + return false; + } + var _user_parts = username.split('.'); + for (var i = 0; i < _user_parts.length; i++) { + if (!gmailUserPart.test(_user_parts[i])) { + return false; + } + } + } + if (options.ignore_max_length === false && (!isByteLength(user, { + max: 64 + }) || !isByteLength(domain, { + max: 254 + }))) { + return false; + } + if (!isFQDN(domain, { + require_tld: options.require_tld, + ignore_max_length: options.ignore_max_length, + allow_underscores: options.allow_underscores + })) { + if (!options.allow_ip_domain) { + return false; + } + if (!isIP(domain)) { + if (!domain.startsWith('[') || !domain.endsWith(']')) { + return false; + } + var noBracketdomain = domain.slice(1, -1); + if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) { + return false; + } + } + } + if (options.blacklisted_chars) { + if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), 'g')) !== -1) return false; + } + if (user[0] === '"' && user[user.length - 1] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + var user_parts = user.split('.'); + for (var _i = 0; _i < user_parts.length; _i++) { + if (!pattern.test(user_parts[_i])) { + return false; + } + } + return true; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isEmpty.js b/src/hello/server/node_modules/validator/es/lib/isEmpty.js new file mode 100644 index 00000000..79e29f74 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isEmpty.js @@ -0,0 +1,10 @@ +import assertString from './util/assertString'; +import merge from './util/merge'; +var default_is_empty_options = { + ignore_whitespace: false +}; +export default function isEmpty(str, options) { + assertString(str); + options = merge(options, default_is_empty_options); + return (options.ignore_whitespace ? str.trim().length : str.length) === 0; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isEthereumAddress.js b/src/hello/server/node_modules/validator/es/lib/isEthereumAddress.js new file mode 100644 index 00000000..9c70f64c --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isEthereumAddress.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +var eth = /^(0x)[0-9a-f]{40}$/i; +export default function isEthereumAddress(str) { + assertString(str); + return eth.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isFQDN.js b/src/hello/server/node_modules/validator/es/lib/isFQDN.js new file mode 100644 index 00000000..61d9a03b --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isFQDN.js @@ -0,0 +1,67 @@ +import assertString from './util/assertString'; +import merge from './util/merge'; +var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_numeric_tld: false, + allow_wildcard: false, + ignore_max_length: false +}; +export default function isFQDN(str, options) { + assertString(str); + options = merge(options, default_fqdn_options); + + /* Remove the optional trailing dot before checking validity */ + if (options.allow_trailing_dot && str[str.length - 1] === '.') { + str = str.substring(0, str.length - 1); + } + + /* Remove the optional wildcard before checking validity */ + if (options.allow_wildcard === true && str.indexOf('*.') === 0) { + str = str.substring(2); + } + var parts = str.split('.'); + var tld = parts[parts.length - 1]; + if (options.require_tld) { + // disallow fqdns without tld + if (parts.length < 2) { + return false; + } + if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } + + // disallow spaces + if (/\s/.test(tld)) { + return false; + } + } + + // reject numeric TLDs + if (!options.allow_numeric_tld && /^\d+$/.test(tld)) { + return false; + } + return parts.every(function (part) { + if (part.length > 63 && !options.ignore_max_length) { + return false; + } + if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } + + // disallow full-width chars + if (/[\uff01-\uff5e]/.test(part)) { + return false; + } + + // disallow parts starting or ending with hyphen + if (/^-|-$/.test(part)) { + return false; + } + if (!options.allow_underscores && /_/.test(part)) { + return false; + } + return true; + }); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isFloat.js b/src/hello/server/node_modules/validator/es/lib/isFloat.js new file mode 100644 index 00000000..e6ae8d6e --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isFloat.js @@ -0,0 +1,14 @@ +import assertString from './util/assertString'; +import isNullOrUndefined from './util/nullUndefinedCheck'; +import { decimal } from './alpha'; +export default function isFloat(str, options) { + assertString(str); + options = options || {}; + var _float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? decimal[options.locale] : '.', "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$")); + if (str === '' || str === '.' || str === ',' || str === '-' || str === '+') { + return false; + } + var value = parseFloat(str.replace(',', '.')); + return _float.test(str) && (!options.hasOwnProperty('min') || isNullOrUndefined(options.min) || value >= options.min) && (!options.hasOwnProperty('max') || isNullOrUndefined(options.max) || value <= options.max) && (!options.hasOwnProperty('lt') || isNullOrUndefined(options.lt) || value < options.lt) && (!options.hasOwnProperty('gt') || isNullOrUndefined(options.gt) || value > options.gt); +} +export var locales = Object.keys(decimal); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isFullWidth.js b/src/hello/server/node_modules/validator/es/lib/isFullWidth.js new file mode 100644 index 00000000..ae546295 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isFullWidth.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +export var fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +export default function isFullWidth(str) { + assertString(str); + return fullWidth.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isHSL.js b/src/hello/server/node_modules/validator/es/lib/isHSL.js new file mode 100644 index 00000000..ca99a435 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isHSL.js @@ -0,0 +1,13 @@ +import assertString from './util/assertString'; +var hslComma = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i; +var hslSpace = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i; +export default function isHSL(str) { + assertString(str); + + // Strip duplicate spaces before calling the validation regex (See #1598 for more info) + var strippedStr = str.replace(/\s+/g, ' ').replace(/\s?(hsla?\(|\)|,)\s?/ig, '$1'); + if (strippedStr.indexOf(',') !== -1) { + return hslComma.test(strippedStr); + } + return hslSpace.test(strippedStr); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isHalfWidth.js b/src/hello/server/node_modules/validator/es/lib/isHalfWidth.js new file mode 100644 index 00000000..b0c87957 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isHalfWidth.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +export var halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +export default function isHalfWidth(str) { + assertString(str); + return halfWidth.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isHash.js b/src/hello/server/node_modules/validator/es/lib/isHash.js new file mode 100644 index 00000000..3495486a --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isHash.js @@ -0,0 +1,21 @@ +import assertString from './util/assertString'; +var lengths = { + md5: 32, + md4: 32, + sha1: 40, + sha256: 64, + sha384: 96, + sha512: 128, + ripemd128: 32, + ripemd160: 40, + tiger128: 32, + tiger160: 40, + tiger192: 48, + crc32: 8, + crc32b: 8 +}; +export default function isHash(str, algorithm) { + assertString(str); + var hash = new RegExp("^[a-fA-F0-9]{".concat(lengths[algorithm], "}$")); + return hash.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isHexColor.js b/src/hello/server/node_modules/validator/es/lib/isHexColor.js new file mode 100644 index 00000000..5f698469 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isHexColor.js @@ -0,0 +1,13 @@ +import assertString from './util/assertString'; +import merge from './util/merge'; +var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; +var hexcolor_with_prefix = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; +var default_is_hexcolor_options = { + require_hashtag: false +}; +export default function isHexColor(str, options) { + assertString(str); + options = merge(options, default_is_hexcolor_options); + var hexcolor_regex = options.require_hashtag ? hexcolor_with_prefix : hexcolor; + return hexcolor_regex.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isHexadecimal.js b/src/hello/server/node_modules/validator/es/lib/isHexadecimal.js new file mode 100644 index 00000000..6654de40 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isHexadecimal.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i; +export default function isHexadecimal(str) { + assertString(str); + return hexadecimal.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isIBAN.js b/src/hello/server/node_modules/validator/es/lib/isIBAN.js new file mode 100644 index 00000000..0e995813 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isIBAN.js @@ -0,0 +1,174 @@ +import assertString from './util/assertString'; +import includes from './util/includesArray'; + +/** + * List of country codes with + * corresponding IBAN regular expression + * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number + */ +var ibanRegexThroughCountryCode = { + AD: /^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/, + AE: /^(AE[0-9]{2})\d{3}\d{16}$/, + AL: /^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/, + AT: /^(AT[0-9]{2})\d{16}$/, + AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/, + BA: /^(BA[0-9]{2})\d{16}$/, + BE: /^(BE[0-9]{2})\d{12}$/, + BG: /^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/, + BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/, + BR: /^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/, + BY: /^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/, + CH: /^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/, + CR: /^(CR[0-9]{2})\d{18}$/, + CY: /^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/, + CZ: /^(CZ[0-9]{2})\d{20}$/, + DE: /^(DE[0-9]{2})\d{18}$/, + DK: /^(DK[0-9]{2})\d{14}$/, + DO: /^(DO[0-9]{2})[A-Z]{4}\d{20}$/, + DZ: /^(DZ\d{24})$/, + EE: /^(EE[0-9]{2})\d{16}$/, + EG: /^(EG[0-9]{2})\d{25}$/, + ES: /^(ES[0-9]{2})\d{20}$/, + FI: /^(FI[0-9]{2})\d{14}$/, + FO: /^(FO[0-9]{2})\d{14}$/, + FR: /^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + GB: /^(GB[0-9]{2})[A-Z]{4}\d{14}$/, + GE: /^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/, + GI: /^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/, + GL: /^(GL[0-9]{2})\d{14}$/, + GR: /^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/, + GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/, + HR: /^(HR[0-9]{2})\d{17}$/, + HU: /^(HU[0-9]{2})\d{24}$/, + IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/, + IL: /^(IL[0-9]{2})\d{19}$/, + IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/, + IR: /^(IR[0-9]{2})\d{22}$/, + IS: /^(IS[0-9]{2})\d{22}$/, + IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/, + KW: /^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/, + KZ: /^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LB: /^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/, + LC: /^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/, + LI: /^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/, + LT: /^(LT[0-9]{2})\d{16}$/, + LU: /^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/, + MA: /^(MA[0-9]{26})$/, + MC: /^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/, + ME: /^(ME[0-9]{2})\d{18}$/, + MK: /^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/, + MR: /^(MR[0-9]{2})\d{23}$/, + MT: /^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/, + MU: /^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/, + MZ: /^(MZ[0-9]{2})\d{21}$/, + NL: /^(NL[0-9]{2})[A-Z]{4}\d{10}$/, + NO: /^(NO[0-9]{2})\d{11}$/, + PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/, + PL: /^(PL[0-9]{2})\d{24}$/, + PS: /^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + PT: /^(PT[0-9]{2})\d{21}$/, + QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/, + RS: /^(RS[0-9]{2})\d{18}$/, + SA: /^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/, + SC: /^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/, + SE: /^(SE[0-9]{2})\d{20}$/, + SI: /^(SI[0-9]{2})\d{15}$/, + SK: /^(SK[0-9]{2})\d{20}$/, + SM: /^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + SV: /^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/, + TL: /^(TL[0-9]{2})\d{19}$/, + TN: /^(TN[0-9]{2})\d{20}$/, + TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/, + UA: /^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/, + VA: /^(VA[0-9]{2})\d{18}$/, + VG: /^(VG[0-9]{2})[A-Z]{4}\d{16}$/, + XK: /^(XK[0-9]{2})\d{16}$/ +}; + +/** + * Check if the country codes passed are valid using the + * ibanRegexThroughCountryCode as a reference + * + * @param {array} countryCodeArray + * @return {boolean} + */ + +function hasOnlyValidCountryCodes(countryCodeArray) { + var countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(function (countryCode) { + return !(countryCode in ibanRegexThroughCountryCode); + }); + if (countryCodeArrayFilteredWithObjectIbanCode.length > 0) { + return false; + } + return true; +} + +/** + * Check whether string has correct universal IBAN format + * The IBAN consists of up to 34 alphanumeric characters, as follows: + * Country Code using ISO 3166-1 alpha-2, two letters + * check digits, two digits and + * Basic Bank Account Number (BBAN), up to 30 alphanumeric characters. + * NOTE: Permitted IBAN characters are: digits [0-9] and the 26 latin alphabetic [A-Z] + * + * @param {string} str - string under validation + * @param {object} options - object to pass the countries to be either whitelisted or blacklisted + * @return {boolean} + */ +function hasValidIbanFormat(str, options) { + // Strip white spaces and hyphens + var strippedStr = str.replace(/[\s\-]+/gi, '').toUpperCase(); + var isoCountryCode = strippedStr.slice(0, 2).toUpperCase(); + var isoCountryCodeInIbanRegexCodeObject = isoCountryCode in ibanRegexThroughCountryCode; + if (options.whitelist) { + if (!hasOnlyValidCountryCodes(options.whitelist)) { + return false; + } + var isoCountryCodeInWhiteList = includes(options.whitelist, isoCountryCode); + if (!isoCountryCodeInWhiteList) { + return false; + } + } + if (options.blacklist) { + var isoCountryCodeInBlackList = includes(options.blacklist, isoCountryCode); + if (isoCountryCodeInBlackList) { + return false; + } + } + return isoCountryCodeInIbanRegexCodeObject && ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr); +} + +/** + * Check whether string has valid IBAN Checksum + * by performing basic mod-97 operation and + * the remainder should equal 1 + * -- Start by rearranging the IBAN by moving the four initial characters to the end of the string + * -- Replace each letter in the string with two digits, A -> 10, B = 11, Z = 35 + * -- Interpret the string as a decimal integer and + * -- compute the remainder on division by 97 (mod 97) + * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number + * + * @param {string} str + * @return {boolean} + */ +function hasValidIbanChecksum(str) { + var strippedStr = str.replace(/[^A-Z0-9]+/gi, '').toUpperCase(); // Keep only digits and A-Z latin alphabetic + var rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4); + var alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, function (_char) { + return _char.charCodeAt(0) - 55; + }); + var remainder = alphaCapsReplacedWithDigits.match(/\d{1,7}/g).reduce(function (acc, value) { + return Number(acc + value) % 97; + }, ''); + return remainder === 1; +} +export default function isIBAN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(str); + return hasValidIbanFormat(str, options) && hasValidIbanChecksum(str); +} +export var locales = Object.keys(ibanRegexThroughCountryCode); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isIMEI.js b/src/hello/server/node_modules/validator/es/lib/isIMEI.js new file mode 100644 index 00000000..d731a3ac --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isIMEI.js @@ -0,0 +1,40 @@ +import assertString from './util/assertString'; +var imeiRegexWithoutHyphens = /^[0-9]{15}$/; +var imeiRegexWithHyphens = /^\d{2}-\d{6}-\d{6}-\d{1}$/; +export default function isIMEI(str, options) { + assertString(str); + options = options || {}; + + // default regex for checking imei is the one without hyphens + + var imeiRegex = imeiRegexWithoutHyphens; + if (options.allow_hyphens) { + imeiRegex = imeiRegexWithHyphens; + } + if (!imeiRegex.test(str)) { + return false; + } + str = str.replace(/-/g, ''); + var sum = 0, + mul = 2, + l = 14; + for (var i = 0; i < l; i++) { + var digit = str.substring(l - i - 1, l - i); + var tp = parseInt(digit, 10) * mul; + if (tp >= 10) { + sum += tp % 10 + 1; + } else { + sum += tp; + } + if (mul === 1) { + mul += 1; + } else { + mul -= 1; + } + } + var chk = (10 - sum % 10) % 10; + if (chk !== parseInt(str.substring(14, 15), 10)) { + return false; + } + return true; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isIP.js b/src/hello/server/node_modules/validator/es/lib/isIP.js new file mode 100644 index 00000000..c2929e70 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isIP.js @@ -0,0 +1,58 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +import assertString from './util/assertString'; +/** +11.3. Examples + + The following addresses + + fe80::1234 (on the 1st link of the node) + ff02::5678 (on the 5th link of the node) + ff08::9abc (on the 10th organization of the node) + + would be represented as follows: + + fe80::1234%1 + ff02::5678%5 + ff08::9abc%10 + + (Here we assume a natural translation from a zone index to the + part, where the Nth zone of any scope is translated into + "N".) + + If we use interface names as , those addresses could also be + represented as follows: + + fe80::1234%ne0 + ff02::5678%pvc1.3 + ff08::9abc%interface10 + + where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs + to the 5th link, and "interface10" belongs to the 10th organization. + * * */ +var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; +var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat); +var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$")); +var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})'; +var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z.]{1,})?$'); +export default function isIP(ipAddress) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(ipAddress); + + // accessing 'arguments' for backwards compatibility: isIP(ipAddress [, version]) + // eslint-disable-next-line prefer-rest-params + var version = (_typeof(options) === 'object' ? options.version : arguments[1]) || ''; + if (!version) { + return isIP(ipAddress, { + version: 4 + }) || isIP(ipAddress, { + version: 6 + }); + } + if (version.toString() === '4') { + return IPv4AddressRegExp.test(ipAddress); + } + if (version.toString() === '6') { + return IPv6AddressRegExp.test(ipAddress); + } + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isIPRange.js b/src/hello/server/node_modules/validator/es/lib/isIPRange.js new file mode 100644 index 00000000..c9c6a4f3 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isIPRange.js @@ -0,0 +1,41 @@ +import assertString from './util/assertString'; +import isIP from './isIP'; +var subnetMaybe = /^\d{1,3}$/; +var v4Subnet = 32; +var v6Subnet = 128; +export default function isIPRange(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + assertString(str); + var parts = str.split('/'); + + // parts[0] -> ip, parts[1] -> subnet + if (parts.length !== 2) { + return false; + } + if (!subnetMaybe.test(parts[1])) { + return false; + } + + // Disallow preceding 0 i.e. 01, 02, ... + if (parts[1].length > 1 && parts[1].startsWith('0')) { + return false; + } + var isValidIP = isIP(parts[0], version); + if (!isValidIP) { + return false; + } + + // Define valid subnet according to IP's version + var expectedSubnet = null; + switch (String(version)) { + case '4': + expectedSubnet = v4Subnet; + break; + case '6': + expectedSubnet = v6Subnet; + break; + default: + expectedSubnet = isIP(parts[0], '6') ? v6Subnet : v4Subnet; + } + return parts[1] <= expectedSubnet && parts[1] >= 0; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISBN.js b/src/hello/server/node_modules/validator/es/lib/isISBN.js new file mode 100644 index 00000000..86d23f83 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISBN.js @@ -0,0 +1,47 @@ +import assertString from './util/assertString'; +var possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/; +var possibleIsbn13 = /^(?:[0-9]{13})$/; +var factor = [1, 3]; +export default function isISBN(isbn, options) { + assertString(isbn); + + // For backwards compatibility: + // isISBN(str [, version]), i.e. `options` could be used as argument for the legacy `version` + var version = String((options === null || options === void 0 ? void 0 : options.version) || options); + if (!(options !== null && options !== void 0 && options.version || options)) { + return isISBN(isbn, { + version: 10 + }) || isISBN(isbn, { + version: 13 + }); + } + var sanitizedIsbn = isbn.replace(/[\s-]+/g, ''); + var checksum = 0; + if (version === '10') { + if (!possibleIsbn10.test(sanitizedIsbn)) { + return false; + } + for (var i = 0; i < version - 1; i++) { + checksum += (i + 1) * sanitizedIsbn.charAt(i); + } + if (sanitizedIsbn.charAt(9) === 'X') { + checksum += 10 * 10; + } else { + checksum += 10 * sanitizedIsbn.charAt(9); + } + if (checksum % 11 === 0) { + return true; + } + } else if (version === '13') { + if (!possibleIsbn13.test(sanitizedIsbn)) { + return false; + } + for (var _i = 0; _i < 12; _i++) { + checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i); + } + if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return true; + } + } + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISIN.js b/src/hello/server/node_modules/validator/es/lib/isISIN.js new file mode 100644 index 00000000..f09cb058 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISIN.js @@ -0,0 +1,55 @@ +import assertString from './util/assertString'; +var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + +// this link details how the check digit is calculated: +// https://www.isin.org/isin-format/. it is a little bit +// odd in that it works with digits, not numbers. in order +// to make only one pass through the ISIN characters, the +// each alpha character is handled as 2 characters within +// the loop. + +export default function isISIN(str) { + assertString(str); + if (!isin.test(str)) { + return false; + } + var _double = true; + var sum = 0; + // convert values + for (var i = str.length - 2; i >= 0; i--) { + if (str[i] >= 'A' && str[i] <= 'Z') { + var value = str[i].charCodeAt(0) - 55; + var lo = value % 10; + var hi = Math.trunc(value / 10); + // letters have two digits, so handle the low order + // and high order digits separately. + for (var _i = 0, _arr = [lo, hi]; _i < _arr.length; _i++) { + var digit = _arr[_i]; + if (_double) { + if (digit >= 5) { + sum += 1 + (digit - 5) * 2; + } else { + sum += digit * 2; + } + } else { + sum += digit; + } + _double = !_double; + } + } else { + var _digit = str[i].charCodeAt(0) - '0'.charCodeAt(0); + if (_double) { + if (_digit >= 5) { + sum += 1 + (_digit - 5) * 2; + } else { + sum += _digit * 2; + } + } else { + sum += _digit; + } + _double = !_double; + } + } + var check = Math.trunc((sum + 9) / 10) * 10 - sum; + return +str[str.length - 1] === check; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO15924.js b/src/hello/server/node_modules/validator/es/lib/isISO15924.js new file mode 100644 index 00000000..1251cf2c --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO15924.js @@ -0,0 +1,9 @@ +import assertString from './util/assertString'; + +// from https://www.unicode.org/iso15924/iso15924-codes.html +var validISO15924Codes = new Set(['Adlm', 'Afak', 'Aghb', 'Ahom', 'Arab', 'Aran', 'Armi', 'Armn', 'Avst', 'Bali', 'Bamu', 'Bass', 'Batk', 'Beng', 'Bhks', 'Blis', 'Bopo', 'Brah', 'Brai', 'Bugi', 'Buhd', 'Cakm', 'Cans', 'Cari', 'Cham', 'Cher', 'Chis', 'Chrs', 'Cirt', 'Copt', 'Cpmn', 'Cprt', 'Cyrl', 'Cyrs', 'Deva', 'Diak', 'Dogr', 'Dsrt', 'Dupl', 'Egyd', 'Egyh', 'Egyp', 'Elba', 'Elym', 'Ethi', 'Gara', 'Geok', 'Geor', 'Glag', 'Gong', 'Gonm', 'Goth', 'Gran', 'Grek', 'Gujr', 'Gukh', 'Guru', 'Hanb', 'Hang', 'Hani', 'Hano', 'Hans', 'Hant', 'Hatr', 'Hebr', 'Hira', 'Hluw', 'Hmng', 'Hmnp', 'Hrkt', 'Hung', 'Inds', 'Ital', 'Jamo', 'Java', 'Jpan', 'Jurc', 'Kali', 'Kana', 'Kawi', 'Khar', 'Khmr', 'Khoj', 'Kitl', 'Kits', 'Knda', 'Kore', 'Kpel', 'Krai', 'Kthi', 'Lana', 'Laoo', 'Latf', 'Latg', 'Latn', 'Leke', 'Lepc', 'Limb', 'Lina', 'Linb', 'Lisu', 'Loma', 'Lyci', 'Lydi', 'Mahj', 'Maka', 'Mand', 'Mani', 'Marc', 'Maya', 'Medf', 'Mend', 'Merc', 'Mero', 'Mlym', 'Modi', 'Mong', 'Moon', 'Mroo', 'Mtei', 'Mult', 'Mymr', 'Nagm', 'Nand', 'Narb', 'Nbat', 'Newa', 'Nkdb', 'Nkgb', 'Nkoo', 'Nshu', 'Ogam', 'Olck', 'Onao', 'Orkh', 'Orya', 'Osge', 'Osma', 'Ougr', 'Palm', 'Pauc', 'Pcun', 'Pelm', 'Perm', 'Phag', 'Phli', 'Phlp', 'Phlv', 'Phnx', 'Plrd', 'Piqd', 'Prti', 'Psin', 'Qaaa', 'Qaab', 'Qaac', 'Qaad', 'Qaae', 'Qaaf', 'Qaag', 'Qaah', 'Qaai', 'Qaaj', 'Qaak', 'Qaal', 'Qaam', 'Qaan', 'Qaao', 'Qaap', 'Qaaq', 'Qaar', 'Qaas', 'Qaat', 'Qaau', 'Qaav', 'Qaaw', 'Qaax', 'Qaay', 'Qaaz', 'Qaba', 'Qabb', 'Qabc', 'Qabd', 'Qabe', 'Qabf', 'Qabg', 'Qabh', 'Qabi', 'Qabj', 'Qabk', 'Qabl', 'Qabm', 'Qabn', 'Qabo', 'Qabp', 'Qabq', 'Qabr', 'Qabs', 'Qabt', 'Qabu', 'Qabv', 'Qabw', 'Qabx', 'Ranj', 'Rjng', 'Rohg', 'Roro', 'Runr', 'Samr', 'Sara', 'Sarb', 'Saur', 'Sgnw', 'Shaw', 'Shrd', 'Shui', 'Sidd', 'Sidt', 'Sind', 'Sinh', 'Sogd', 'Sogo', 'Sora', 'Soyo', 'Sund', 'Sunu', 'Sylo', 'Syrc', 'Syre', 'Syrj', 'Syrn', 'Tagb', 'Takr', 'Tale', 'Talu', 'Taml', 'Tang', 'Tavt', 'Tayo', 'Telu', 'Teng', 'Tfng', 'Tglg', 'Thaa', 'Thai', 'Tibt', 'Tirh', 'Tnsa', 'Todr', 'Tols', 'Toto', 'Tutg', 'Ugar', 'Vaii', 'Visp', 'Vith', 'Wara', 'Wcho', 'Wole', 'Xpeo', 'Xsux', 'Yezi', 'Yiii', 'Zanb', 'Zinh', 'Zmth', 'Zsye', 'Zsym', 'Zxxx', 'Zyyy', 'Zzzz']); +export default function isISO15924(str) { + assertString(str); + return validISO15924Codes.has(str); +} +export var ScriptCodes = validISO15924Codes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO31661Alpha2.js b/src/hello/server/node_modules/validator/es/lib/isISO31661Alpha2.js new file mode 100644 index 00000000..fc2c5b2f --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO31661Alpha2.js @@ -0,0 +1,9 @@ +import assertString from './util/assertString'; + +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +var validISO31661Alpha2CountriesCodes = new Set(['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW']); +export default function isISO31661Alpha2(str) { + assertString(str); + return validISO31661Alpha2CountriesCodes.has(str.toUpperCase()); +} +export var CountryCodes = validISO31661Alpha2CountriesCodes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO31661Alpha3.js b/src/hello/server/node_modules/validator/es/lib/isISO31661Alpha3.js new file mode 100644 index 00000000..37dc602a --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO31661Alpha3.js @@ -0,0 +1,8 @@ +import assertString from './util/assertString'; + +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 +var validISO31661Alpha3CountriesCodes = new Set(['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']); +export default function isISO31661Alpha3(str) { + assertString(str); + return validISO31661Alpha3CountriesCodes.has(str.toUpperCase()); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO31661Numeric.js b/src/hello/server/node_modules/validator/es/lib/isISO31661Numeric.js new file mode 100644 index 00000000..a3514d96 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO31661Numeric.js @@ -0,0 +1,8 @@ +import assertString from './util/assertString'; + +// from https://en.wikipedia.org/wiki/ISO_3166-1_numeric +var validISO31661NumericCountriesCodes = new Set(['004', '008', '010', '012', '016', '020', '024', '028', '031', '032', '036', '040', '044', '048', '050', '051', '052', '056', '060', '064', '068', '070', '072', '074', '076', '084', '086', '090', '092', '096', '100', '104', '108', '112', '116', '120', '124', '132', '136', '140', '144', '148', '152', '156', '158', '162', '166', '170', '174', '175', '178', '180', '184', '188', '191', '192', '196', '203', '204', '208', '212', '214', '218', '222', '226', '231', '232', '233', '234', '238', '239', '242', '246', '248', '250', '254', '258', '260', '262', '266', '268', '270', '275', '276', '288', '292', '296', '300', '304', '308', '312', '316', '320', '324', '328', '332', '334', '336', '340', '344', '348', '352', '356', '360', '364', '368', '372', '376', '380', '384', '388', '392', '398', '400', '404', '408', '410', '414', '417', '418', '422', '426', '428', '430', '434', '438', '440', '442', '446', '450', '454', '458', '462', '466', '470', '474', '478', '480', '484', '492', '496', '498', '499', '500', '504', '508', '512', '516', '520', '524', '528', '531', '533', '534', '535', '540', '548', '554', '558', '562', '566', '570', '574', '578', '580', '581', '583', '584', '585', '586', '591', '598', '600', '604', '608', '612', '616', '620', '624', '626', '630', '634', '638', '642', '643', '646', '652', '654', '659', '660', '662', '663', '666', '670', '674', '678', '682', '686', '688', '690', '694', '702', '703', '704', '705', '706', '710', '716', '724', '728', '729', '732', '740', '744', '748', '752', '756', '760', '762', '764', '768', '772', '776', '780', '784', '788', '792', '795', '796', '798', '800', '804', '807', '818', '826', '831', '832', '833', '834', '840', '850', '854', '858', '860', '862', '876', '882', '887', '894']); +export default function isISO31661Numeric(str) { + assertString(str); + return validISO31661NumericCountriesCodes.has(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO4217.js b/src/hello/server/node_modules/validator/es/lib/isISO4217.js new file mode 100644 index 00000000..4b49d892 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO4217.js @@ -0,0 +1,9 @@ +import assertString from './util/assertString'; + +// from https://en.wikipedia.org/wiki/ISO_4217 +var validISO4217CurrencyCodes = new Set(['AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLE', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'USN', 'UYI', 'UYU', 'UYW', 'UZS', 'VED', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XCD', 'XDR', 'XOF', 'XPD', 'XPF', 'XPT', 'XSU', 'XTS', 'XUA', 'XXX', 'YER', 'ZAR', 'ZMW', 'ZWL']); +export default function isISO4217(str) { + assertString(str); + return validISO4217CurrencyCodes.has(str.toUpperCase()); +} +export var CurrencyCodes = validISO4217CurrencyCodes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO6346.js b/src/hello/server/node_modules/validator/es/lib/isISO6346.js new file mode 100644 index 00000000..a06d3b57 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO6346.js @@ -0,0 +1,28 @@ +import assertString from './util/assertString'; + +// https://en.wikipedia.org/wiki/ISO_6346 +// according to ISO6346 standard, checksum digit is mandatory for freight container but recommended +// for other container types (J and Z) +var isISO6346Str = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/; +var isDigit = /^[0-9]$/; +export function isISO6346(str) { + assertString(str); + str = str.toUpperCase(); + if (!isISO6346Str.test(str)) return false; + if (str.length === 11) { + var sum = 0; + for (var i = 0; i < str.length - 1; i++) { + if (!isDigit.test(str[i])) { + var convertedCode = void 0; + var letterCode = str.charCodeAt(i) - 55; + if (letterCode < 11) convertedCode = letterCode;else if (letterCode >= 11 && letterCode <= 20) convertedCode = 12 + letterCode % 11;else if (letterCode >= 21 && letterCode <= 30) convertedCode = 23 + letterCode % 21;else convertedCode = 34 + letterCode % 31; + sum += convertedCode * Math.pow(2, i); + } else sum += str[i] * Math.pow(2, i); + } + var checkSumDigit = sum % 11; + if (checkSumDigit === 10) checkSumDigit = 0; + return Number(str[str.length - 1]) === checkSumDigit; + } + return true; +} +export var isFreightContainerID = isISO6346; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO6391.js b/src/hello/server/node_modules/validator/es/lib/isISO6391.js new file mode 100644 index 00000000..5f7d4ead --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO6391.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +var isISO6391Set = new Set(['aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'io', 'is', 'it', 'iu', 'ja', 'jv', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc', 'sd', 'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've', 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu']); +export default function isISO6391(str) { + assertString(str); + return isISO6391Set.has(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISO8601.js b/src/hello/server/node_modules/validator/es/lib/isISO8601.js new file mode 100644 index 00000000..e2df6404 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISO8601.js @@ -0,0 +1,42 @@ +import assertString from './util/assertString'; + +/* eslint-disable max-len */ +// from http://goo.gl/0ejHHW +var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +// same as above, except with a strict 'T' separator between date and time +var iso8601StrictSeparator = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +/* eslint-enable max-len */ +var isValidDate = function isValidDate(str) { + // str must have passed the ISO8601 check + // this check is meant to catch invalid dates + // like 2009-02-31 + // first check for ordinal dates + var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/); + if (ordinalMatch) { + var oYear = Number(ordinalMatch[1]); + var oDay = Number(ordinalMatch[2]); + // if is leap year + if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366; + return oDay <= 365; + } + var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number); + var year = match[1]; + var month = match[2]; + var day = match[3]; + var monthString = month ? "0".concat(month).slice(-2) : month; + var dayString = day ? "0".concat(day).slice(-2) : day; + + // create a date object and compare + var d = new Date("".concat(year, "-").concat(monthString || '01', "-").concat(dayString || '01')); + if (month && day) { + return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day; + } + return true; +}; +export default function isISO8601(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(str); + var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str); + if (check && options.strict) return isValidDate(str); + return check; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISRC.js b/src/hello/server/node_modules/validator/es/lib/isISRC.js new file mode 100644 index 00000000..8ffbb7f6 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISRC.js @@ -0,0 +1,8 @@ +import assertString from './util/assertString'; + +// see http://isrc.ifpi.org/en/isrc-standard/code-syntax +var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; +export default function isISRC(str) { + assertString(str); + return isrc.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isISSN.js b/src/hello/server/node_modules/validator/es/lib/isISSN.js new file mode 100644 index 00000000..e335d3c9 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isISSN.js @@ -0,0 +1,19 @@ +import assertString from './util/assertString'; +var issn = '^\\d{4}-?\\d{3}[\\dX]$'; +export default function isISSN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(str); + var testIssn = issn; + testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn; + testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i'); + if (!testIssn.test(str)) { + return false; + } + var digits = str.replace('-', '').toUpperCase(); + var checksum = 0; + for (var i = 0; i < digits.length; i++) { + var digit = digits[i]; + checksum += (digit === 'X' ? 10 : +digit) * (8 - i); + } + return checksum % 11 === 0; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isIdentityCard.js b/src/hello/server/node_modules/validator/es/lib/isIdentityCard.js new file mode 100644 index 00000000..8b306ac3 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isIdentityCard.js @@ -0,0 +1,417 @@ +import assertString from './util/assertString'; +import includes from './util/includesArray'; +import isInt from './isInt'; +var validators = { + PL: function PL(str) { + assertString(str); + var weightOfDigits = { + 1: 1, + 2: 3, + 3: 7, + 4: 9, + 5: 1, + 6: 3, + 7: 7, + 8: 9, + 9: 1, + 10: 3, + 11: 0 + }; + if (str != null && str.length === 11 && isInt(str, { + allow_leading_zeroes: true + })) { + var digits = str.split('').slice(0, -1); + var sum = digits.reduce(function (acc, digit, index) { + return acc + Number(digit) * weightOfDigits[index + 1]; + }, 0); + var modulo = sum % 10; + var lastDigit = Number(str.charAt(str.length - 1)); + if (modulo === 0 && lastDigit === 0 || lastDigit === 10 - modulo) { + return true; + } + } + return false; + }, + ES: function ES(str) { + assertString(str); + var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/; + var charsValue = { + X: 0, + Y: 1, + Z: 2 + }; + var controlDigits = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; + + // sanitize user input + var sanitized = str.trim().toUpperCase(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + + // validate the control digit + var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function (_char) { + return charsValue[_char]; + }); + return sanitized.endsWith(controlDigits[number % 23]); + }, + FI: function FI(str) { + // https://dvv.fi/en/personal-identity-code#:~:text=control%20character%20for%20a-,personal,-identity%20code%20calculated + assertString(str); + if (str.length !== 11) { + return false; + } + if (!str.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)) { + return false; + } + var checkDigits = '0123456789ABCDEFHJKLMNPRSTUVWXY'; + var idAsNumber = parseInt(str.slice(0, 6), 10) * 1000 + parseInt(str.slice(7, 10), 10); + var remainder = idAsNumber % 31; + var checkDigit = checkDigits[remainder]; + return checkDigit === str.slice(10, 11); + }, + IN: function IN(str) { + var DNI = /^[1-9]\d{3}\s?\d{4}\s?\d{4}$/; + + // multiplication table + var d = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + + // permutation table + var p = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + var c = 0; + var invertedArray = sanitized.replace(/\s/g, '').split('').map(Number).reverse(); + invertedArray.forEach(function (val, i) { + c = d[c][p[i % 8][val]]; + }); + return c === 0; + }, + IR: function IR(str) { + if (!str.match(/^\d{10}$/)) return false; + str = "0000".concat(str).slice(str.length - 6); + if (parseInt(str.slice(3, 9), 10) === 0) return false; + var lastNumber = parseInt(str.slice(9, 10), 10); + var sum = 0; + for (var i = 0; i < 9; i++) { + sum += parseInt(str.slice(i, i + 1), 10) * (10 - i); + } + sum %= 11; + return sum < 2 && lastNumber === sum || sum >= 2 && lastNumber === 11 - sum; + }, + IT: function IT(str) { + if (str.length !== 9) return false; + if (str === 'CA00000AA') return false; // https://it.wikipedia.org/wiki/Carta_d%27identit%C3%A0_elettronica_italiana + return str.search(/C[A-Z]\d{5}[A-Z]{2}/i) > -1; + }, + NO: function NO(str) { + var sanitized = str.trim(); + if (isNaN(Number(sanitized))) return false; + if (sanitized.length !== 11) return false; + if (sanitized === '00000000000') return false; + + // https://no.wikipedia.org/wiki/F%C3%B8dselsnummer + var f = sanitized.split('').map(Number); + var k1 = (11 - (3 * f[0] + 7 * f[1] + 6 * f[2] + 1 * f[3] + 8 * f[4] + 9 * f[5] + 4 * f[6] + 5 * f[7] + 2 * f[8]) % 11) % 11; + var k2 = (11 - (5 * f[0] + 4 * f[1] + 3 * f[2] + 2 * f[3] + 7 * f[4] + 6 * f[5] + 5 * f[6] + 4 * f[7] + 3 * f[8] + 2 * k1) % 11) % 11; + if (k1 !== f[9] || k2 !== f[10]) return false; + return true; + }, + TH: function TH(str) { + if (!str.match(/^[1-8]\d{12}$/)) return false; + + // validate check digit + var sum = 0; + for (var i = 0; i < 12; i++) { + sum += parseInt(str[i], 10) * (13 - i); + } + return str[12] === ((11 - sum % 11) % 10).toString(); + }, + LK: function LK(str) { + var old_nic = /^[1-9]\d{8}[vx]$/i; + var new_nic = /^[1-9]\d{11}$/i; + if (str.length === 10 && old_nic.test(str)) return true;else if (str.length === 12 && new_nic.test(str)) return true; + return false; + }, + 'he-IL': function heIL(str) { + var DNI = /^\d{9}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + var id = sanitized; + var sum = 0, + incNum; + for (var i = 0; i < id.length; i++) { + incNum = Number(id[i]) * (i % 2 + 1); // Multiply number by 1 or 2 + sum += incNum > 9 ? incNum - 9 : incNum; // Sum the digits up and add to total + } + return sum % 10 === 0; + }, + 'ar-LY': function arLY(str) { + // Libya National Identity Number NIN is 12 digits, the first digit is either 1 or 2 + var NIN = /^(1|2)\d{11}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!NIN.test(sanitized)) { + return false; + } + return true; + }, + 'ar-TN': function arTN(str) { + var DNI = /^\d{8}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + return true; + }, + 'zh-CN': function zhCN(str) { + var provincesAndCities = ['11', + // 北京 + '12', + // 天津 + '13', + // 河北 + '14', + // 山西 + '15', + // 内蒙古 + '21', + // 辽宁 + '22', + // 吉林 + '23', + // 黑龙江 + '31', + // 上海 + '32', + // 江苏 + '33', + // 浙江 + '34', + // 安徽 + '35', + // 福建 + '36', + // 江西 + '37', + // 山东 + '41', + // 河南 + '42', + // 湖北 + '43', + // 湖南 + '44', + // 广东 + '45', + // 广西 + '46', + // 海南 + '50', + // 重庆 + '51', + // 四川 + '52', + // 贵州 + '53', + // 云南 + '54', + // 西藏 + '61', + // 陕西 + '62', + // 甘肃 + '63', + // 青海 + '64', + // 宁夏 + '65', + // 新疆 + '71', + // 台湾 + '81', + // 香港 + '82', + // 澳门 + '91' // 国外 + ]; + var powers = ['7', '9', '10', '5', '8', '4', '2', '1', '6', '3', '7', '9', '10', '5', '8', '4', '2']; + var parityBit = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2']; + var checkAddressCode = function checkAddressCode(addressCode) { + return includes(provincesAndCities, addressCode); + }; + var checkBirthDayCode = function checkBirthDayCode(birDayCode) { + var yyyy = parseInt(birDayCode.substring(0, 4), 10); + var mm = parseInt(birDayCode.substring(4, 6), 10); + var dd = parseInt(birDayCode.substring(6), 10); + var xdata = new Date(yyyy, mm - 1, dd); + if (xdata > new Date()) { + return false; + // eslint-disable-next-line max-len + } else if (xdata.getFullYear() === yyyy && xdata.getMonth() === mm - 1 && xdata.getDate() === dd) { + return true; + } + return false; + }; + var getParityBit = function getParityBit(idCardNo) { + var id17 = idCardNo.substring(0, 17); + var power = 0; + for (var i = 0; i < 17; i++) { + power += parseInt(id17.charAt(i), 10) * parseInt(powers[i], 10); + } + var mod = power % 11; + return parityBit[mod]; + }; + var checkParityBit = function checkParityBit(idCardNo) { + return getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase(); + }; + var check15IdCardNo = function check15IdCardNo(idCardNo) { + var check = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = "19".concat(idCardNo.substring(6, 12)); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return true; + }; + var check18IdCardNo = function check18IdCardNo(idCardNo) { + var check = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = idCardNo.substring(6, 14); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return checkParityBit(idCardNo); + }; + var checkIdCardNo = function checkIdCardNo(idCardNo) { + var check = /^\d{15}|(\d{17}(\d|x|X))$/.test(idCardNo); + if (!check) return false; + if (idCardNo.length === 15) { + return check15IdCardNo(idCardNo); + } + return check18IdCardNo(idCardNo); + }; + return checkIdCardNo(str); + }, + 'zh-HK': function zhHK(str) { + // sanitize user input + str = str.trim(); + + // HKID number starts with 1 or 2 letters, followed by 6 digits, + // then a checksum contained in square / round brackets or nothing + var regexHKID = /^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/; + var regexIsDigit = /^[0-9]$/; + + // convert the user input to all uppercase and apply regex + str = str.toUpperCase(); + if (!regexHKID.test(str)) return false; + str = str.replace(/\[|\]|\(|\)/g, ''); + if (str.length === 8) str = "3".concat(str); + var checkSumVal = 0; + for (var i = 0; i <= 7; i++) { + var convertedChar = void 0; + if (!regexIsDigit.test(str[i])) convertedChar = (str[i].charCodeAt(0) - 55) % 11;else convertedChar = str[i]; + checkSumVal += convertedChar * (9 - i); + } + checkSumVal %= 11; + var checkSumConverted; + if (checkSumVal === 0) checkSumConverted = '0';else if (checkSumVal === 1) checkSumConverted = 'A';else checkSumConverted = String(11 - checkSumVal); + if (checkSumConverted === str[str.length - 1]) return true; + return false; + }, + 'zh-TW': function zhTW(str) { + var ALPHABET_CODES = { + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + G: 16, + H: 17, + I: 34, + J: 18, + K: 19, + L: 20, + M: 21, + N: 22, + O: 35, + P: 23, + Q: 24, + R: 25, + S: 26, + T: 27, + U: 28, + V: 29, + W: 32, + X: 30, + Y: 31, + Z: 33 + }; + var sanitized = str.trim().toUpperCase(); + if (!/^[A-Z][0-9]{9}$/.test(sanitized)) return false; + return Array.from(sanitized).reduce(function (sum, number, index) { + if (index === 0) { + var code = ALPHABET_CODES[number]; + return code % 10 * 9 + Math.floor(code / 10); + } + if (index === 9) { + return (10 - sum % 10 - Number(number)) % 10 === 0; + } + return sum + Number(number) * (9 - index); + }, 0); + }, + PK: function PK(str) { + // Pakistani National Identity Number CNIC is 13 digits + var CNIC = /^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + return CNIC.test(sanitized); + } +}; +export default function isIdentityCard(str, locale) { + assertString(str); + if (locale in validators) { + return validators[locale](str); + } else if (locale === 'any') { + for (var key in validators) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (validators.hasOwnProperty(key)) { + var validator = validators[key]; + if (validator(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isIn.js b/src/hello/server/node_modules/validator/es/lib/isIn.js new file mode 100644 index 00000000..3b786aad --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isIn.js @@ -0,0 +1,23 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +import assertString from './util/assertString'; +import toString from './util/toString'; +export default function isIn(str, options) { + assertString(str); + var i; + if (Object.prototype.toString.call(options) === '[object Array]') { + var array = []; + for (i in options) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if ({}.hasOwnProperty.call(options, i)) { + array[i] = toString(options[i]); + } + } + return array.indexOf(str) >= 0; + } else if (_typeof(options) === 'object') { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === 'function') { + return options.indexOf(str) >= 0; + } + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isInt.js b/src/hello/server/node_modules/validator/es/lib/isInt.js new file mode 100644 index 00000000..71075fa3 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isInt.js @@ -0,0 +1,19 @@ +import assertString from './util/assertString'; +import isNullOrUndefined from './util/nullUndefinedCheck'; +var _int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; +var intLeadingZeroes = /^[-+]?[0-9]+$/; +export default function isInt(str, options) { + assertString(str); + options = options || {}; + + // Get the regex to use for testing, based on whether + // leading zeroes are allowed or not. + var regex = options.allow_leading_zeroes === false ? _int : intLeadingZeroes; + + // Check min/max/lt/gt + var minCheckPassed = !options.hasOwnProperty('min') || isNullOrUndefined(options.min) || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty('max') || isNullOrUndefined(options.max) || str <= options.max; + var ltCheckPassed = !options.hasOwnProperty('lt') || isNullOrUndefined(options.lt) || str < options.lt; + var gtCheckPassed = !options.hasOwnProperty('gt') || isNullOrUndefined(options.gt) || str > options.gt; + return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isJSON.js b/src/hello/server/node_modules/validator/es/lib/isJSON.js new file mode 100644 index 00000000..022319c9 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isJSON.js @@ -0,0 +1,20 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +import assertString from './util/assertString'; +import includes from './util/includesArray'; +import merge from './util/merge'; +var default_json_options = { + allow_primitives: false +}; +export default function isJSON(str, options) { + assertString(str); + try { + options = merge(options, default_json_options); + var primitives = []; + if (options.allow_primitives) { + primitives = [null, false, true]; + } + var obj = JSON.parse(str); + return includes(primitives, obj) || !!obj && _typeof(obj) === 'object'; + } catch (e) {/* ignore */} + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isJWT.js b/src/hello/server/node_modules/validator/es/lib/isJWT.js new file mode 100644 index 00000000..bdd024d7 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isJWT.js @@ -0,0 +1,15 @@ +import assertString from './util/assertString'; +import isBase64 from './isBase64'; +export default function isJWT(str) { + assertString(str); + var dotSplit = str.split('.'); + var len = dotSplit.length; + if (len !== 3) { + return false; + } + return dotSplit.reduce(function (acc, currElem) { + return acc && isBase64(currElem, { + urlSafe: true + }); + }, true); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isLatLong.js b/src/hello/server/node_modules/validator/es/lib/isLatLong.js new file mode 100644 index 00000000..07b76487 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isLatLong.js @@ -0,0 +1,21 @@ +import assertString from './util/assertString'; +import merge from './util/merge'; +import includes from './util/includesString'; +var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/; +var _long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/; +var latDMS = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i; +var longDMS = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i; +var defaultLatLongOptions = { + checkDMS: false +}; +export default function isLatLong(str, options) { + assertString(str); + options = merge(options, defaultLatLongOptions); + if (!includes(str, ',')) return false; + var pair = str.split(','); + if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false; + if (options.checkDMS) { + return latDMS.test(pair[0]) && longDMS.test(pair[1]); + } + return lat.test(pair[0]) && _long.test(pair[1]); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isLength.js b/src/hello/server/node_modules/validator/es/lib/isLength.js new file mode 100644 index 00000000..82b129a8 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isLength.js @@ -0,0 +1,27 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +import assertString from './util/assertString'; + +/* eslint-disable prefer-rest-params */ +export default function isLength(str, options) { + assertString(str); + var min; + var max; + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isLength(str, min [, max]) + min = arguments[1] || 0; + max = arguments[2]; + } + var presentationSequences = str.match(/[^\uFE0F\uFE0E][\uFE0F\uFE0E]/g) || []; + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - presentationSequences.length - surrogatePairs.length; + var isInsideRange = len >= min && (typeof max === 'undefined' || len <= max); + if (isInsideRange && Array.isArray(options === null || options === void 0 ? void 0 : options.discreteLengths)) { + return options.discreteLengths.some(function (discreteLen) { + return discreteLen === len; + }); + } + return isInsideRange; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isLicensePlate.js b/src/hello/server/node_modules/validator/es/lib/isLicensePlate.js new file mode 100644 index 00000000..f65a253d --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isLicensePlate.js @@ -0,0 +1,58 @@ +import assertString from './util/assertString'; +var validators = { + 'cs-CZ': function csCZ(str) { + return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str); + }, + 'de-DE': function deDE(str) { + return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG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ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(str); + }, + 'de-LI': function deLI(str) { + return /^FL[- ]?\d{1,5}[UZ]?$/.test(str); + }, + 'en-IN': function enIN(str) { + return /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(str); + }, + 'en-SG': function enSG(str) { + return /^[A-Z]{3}[ -]?[\d]{4}[ -]?[A-Z]{1}$/.test(str); + }, + 'es-AR': function esAR(str) { + return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str); + }, + 'fi-FI': function fiFI(str) { + return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str); + }, + 'hu-HU': function huHU(str) { + return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(str); + }, + 'pt-BR': function ptBR(str) { + return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str); + }, + 'pt-PT': function ptPT(str) { + return /^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(str); + }, + 'sq-AL': function sqAL(str) { + return /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(str); + }, + 'sv-SE': function svSE(str) { + return /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim()); + }, + 'en-PK': function enPK(str) { + return /(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(str.trim()); + } +}; +export default function isLicensePlate(str, locale) { + assertString(str); + if (locale in validators) { + return validators[locale](str); + } else if (locale === 'any') { + for (var key in validators) { + /* eslint guard-for-in: 0 */ + var validator = validators[key]; + if (validator(str)) { + return true; + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isLocale.js b/src/hello/server/node_modules/validator/es/lib/isLocale.js new file mode 100644 index 00000000..c47a038e --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isLocale.js @@ -0,0 +1,107 @@ +import assertString from './util/assertString'; + +/* + = 3ALPHA ; selected ISO 639 codes + *2("-" 3ALPHA) ; permanently reserved + */ +var extlang = '([A-Za-z]{3}(-[A-Za-z]{3}){0,2})'; + +/* + = 2*3ALPHA ; shortest ISO 639 code + ["-" extlang] ; sometimes followed by + ; extended language subtags + / 4ALPHA ; or reserved for future use + / 5*8ALPHA ; or registered language subtag + */ +var language = "(([a-zA-Z]{2,3}(-".concat(extlang, ")?)|([a-zA-Z]{5,8}))"); + +/* + = 4ALPHA ; ISO 15924 code + */ +var script = '([A-Za-z]{4})'; + +/* + = 2ALPHA ; ISO 3166-1 code + / 3DIGIT ; UN M.49 code + */ +var region = '([A-Za-z]{2}|\\d{3})'; + +/* + = 5*8alphanum ; registered variants + / (DIGIT 3alphanum) + */ +var variant = '([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))'; + +/* + = DIGIT ; 0 - 9 + / %x41-57 ; A - W + / %x59-5A ; Y - Z + / %x61-77 ; a - w + / %x79-7A ; y - z + */ +var singleton = '(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])'; + +/* + = singleton 1*("-" (2*8alphanum)) + ; Single alphanumerics + ; "x" reserved for private use + */ +var extension = "(".concat(singleton, "(-[A-Za-z0-9]{2,8})+)"); + +/* + = "x" 1*("-" (1*8alphanum)) + */ +var privateuse = '(x(-[A-Za-z0-9]{1,8})+)'; + +// irregular tags do not match the 'langtag' production and would not +// otherwise be considered 'well-formed'. These tags are all valid, but +// most are deprecated in favor of more modern subtags or subtag combination + +var irregular = '((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|' + '(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|' + '(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))'; + +// regular tags match the 'langtag' production, but their subtags are not +// extended language or variant subtags: their meaning is defined by +// their registration and all of these are deprecated in favor of a more +// modern subtag or sequence of subtags + +var regular = '((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|' + '(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))'; + +/* + = irregular ; non-redundant tags registered + / regular ; during the RFC 3066 era + + */ +var grandfathered = "(".concat(irregular, "|").concat(regular, ")"); + +/* + RFC 5646 defines delimitation of subtags via a hyphen: + + "Subtag" refers to a specific section of a tag, delimited by a + hyphen, such as the subtags 'zh', 'Hant', and 'CN' in the tag "zh- + Hant-CN". Examples of subtags in this document are enclosed in + single quotes ('Hant') + + However, we need to add "_" to maintain the existing behaviour. + */ +var delimiter = '(-|_)'; + +/* + = language + ["-" script] + ["-" region] + *("-" variant) + *("-" extension) + ["-" privateuse] + */ +var langtag = "".concat(language, "(").concat(delimiter).concat(script, ")?(").concat(delimiter).concat(region, ")?(").concat(delimiter).concat(variant, ")*(").concat(delimiter).concat(extension, ")*(").concat(delimiter).concat(privateuse, ")?"); + +/* + Regex implementation based on BCP RFC 5646 + Tags for Identifying Languages + https://www.rfc-editor.org/rfc/rfc5646.html + */ +var languageTagRegex = new RegExp("(^".concat(privateuse, "$)|(^").concat(grandfathered, "$)|(^").concat(langtag, "$)")); +export default function isLocale(str) { + assertString(str); + return languageTagRegex.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isLowercase.js b/src/hello/server/node_modules/validator/es/lib/isLowercase.js new file mode 100644 index 00000000..03478564 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isLowercase.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function isLowercase(str) { + assertString(str); + return str === str.toLowerCase(); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isLuhnNumber.js b/src/hello/server/node_modules/validator/es/lib/isLuhnNumber.js new file mode 100644 index 00000000..27deb072 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isLuhnNumber.js @@ -0,0 +1,25 @@ +import assertString from './util/assertString'; +export default function isLuhnNumber(str) { + assertString(str); + var sanitized = str.replace(/[- ]+/g, ''); + var sum = 0; + var digit; + var tmpNum; + var shouldDouble; + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + return !!(sum % 10 === 0 ? sanitized : false); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMACAddress.js b/src/hello/server/node_modules/validator/es/lib/isMACAddress.js new file mode 100644 index 00000000..bc4e5d80 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMACAddress.js @@ -0,0 +1,36 @@ +import assertString from './util/assertString'; +var macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/; +var macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/; +var macAddress48WithDots = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/; +var macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/; +var macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/; +var macAddress64WithDots = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/; +export default function isMACAddress(str, options) { + assertString(str); + if (options !== null && options !== void 0 && options.eui) { + options.eui = String(options.eui); + } + /** + * @deprecated `no_colons` TODO: remove it in the next major + */ + if (options !== null && options !== void 0 && options.no_colons || options !== null && options !== void 0 && options.no_separators) { + if (options.eui === '48') { + return macAddress48NoSeparators.test(str); + } + if (options.eui === '64') { + return macAddress64NoSeparators.test(str); + } + return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === '48') { + return macAddress48.test(str) || macAddress48WithDots.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === '64') { + return macAddress64.test(str) || macAddress64WithDots.test(str); + } + return isMACAddress(str, { + eui: '48' + }) || isMACAddress(str, { + eui: '64' + }); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMD5.js b/src/hello/server/node_modules/validator/es/lib/isMD5.js new file mode 100644 index 00000000..701ed7b3 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMD5.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +var md5 = /^[a-f0-9]{32}$/; +export default function isMD5(str) { + assertString(str); + return md5.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMagnetURI.js b/src/hello/server/node_modules/validator/es/lib/isMagnetURI.js new file mode 100644 index 00000000..5775c9e8 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMagnetURI.js @@ -0,0 +1,9 @@ +import assertString from './util/assertString'; +var magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i; +export default function isMagnetURI(url) { + assertString(url); + if (url.indexOf('magnet:?') !== 0) { + return false; + } + return magnetURIComponent.test(url); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMailtoURI.js b/src/hello/server/node_modules/validator/es/lib/isMailtoURI.js new file mode 100644 index 00000000..663752aa --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMailtoURI.js @@ -0,0 +1,75 @@ +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +import trim from './trim'; +import isEmail from './isEmail'; +import assertString from './util/assertString'; +function parseMailtoQueryString(queryString) { + var allowedParams = new Set(['subject', 'body', 'cc', 'bcc']), + query = { + cc: '', + bcc: '' + }; + var isParseFailed = false; + var queryParams = queryString.split('&'); + if (queryParams.length > 4) { + return false; + } + var _iterator = _createForOfIteratorHelper(queryParams), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var q = _step.value; + var _q$split = q.split('='), + _q$split2 = _slicedToArray(_q$split, 2), + key = _q$split2[0], + value = _q$split2[1]; + + // checked for invalid and duplicated query params + if (key && !allowedParams.has(key)) { + isParseFailed = true; + break; + } + if (value && (key === 'cc' || key === 'bcc')) { + query[key] = value; + } + if (key) { + allowedParams["delete"](key); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + return isParseFailed ? false : query; +} +export default function isMailtoURI(url, options) { + assertString(url); + if (url.indexOf('mailto:') !== 0) { + return false; + } + var _url$replace$split = url.replace('mailto:', '').split('?'), + _url$replace$split2 = _slicedToArray(_url$replace$split, 2), + to = _url$replace$split2[0], + _url$replace$split2$ = _url$replace$split2[1], + queryString = _url$replace$split2$ === void 0 ? '' : _url$replace$split2$; + if (!to && !queryString) { + return true; + } + var query = parseMailtoQueryString(queryString); + if (!query) { + return false; + } + return "".concat(to, ",").concat(query.cc, ",").concat(query.bcc).split(',').every(function (email) { + email = trim(email, ' '); + if (email) { + return isEmail(email, options); + } + return true; + }); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMimeType.js b/src/hello/server/node_modules/validator/es/lib/isMimeType.js new file mode 100644 index 00000000..08600891 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMimeType.js @@ -0,0 +1,40 @@ +import assertString from './util/assertString'; + +/* + Checks if the provided string matches to a correct Media type format (MIME type) + + This function only checks is the string format follows the + established rules by the according RFC specifications. + This function supports 'charset' in textual media types + (https://tools.ietf.org/html/rfc6657). + + This function does not check against all the media types listed + by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml) + because of lightness purposes : it would require to include + all these MIME types in this library, which would weigh it + significantly. This kind of effort maybe is not worth for the use that + this function has in this entire library. + + More information in the RFC specifications : + - https://tools.ietf.org/html/rfc2045 + - https://tools.ietf.org/html/rfc2046 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.1 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.5 +*/ + +// Match simple MIME types +// NB : +// Subtype length must not exceed 100 characters. +// This rule does not comply to the RFC specs (what is the max length ?). +var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i; // eslint-disable-line max-len + +// Handle "charset" in "text/*" +var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len + +// Handle "boundary" in "multipart/*" +var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len + +export default function isMimeType(str) { + assertString(str); + return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMobilePhone.js b/src/hello/server/node_modules/validator/es/lib/isMobilePhone.js new file mode 100644 index 00000000..3e9349a7 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMobilePhone.js @@ -0,0 +1,211 @@ +import assertString from './util/assertString'; + +/* eslint-disable max-len */ +var phones = { + 'am-AM': /^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/, + 'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/, + 'ar-BH': /^(\+?973)?(3|6)\d{7}$/, + 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, + 'ar-LB': /^(\+?961)?((3|81)\d{6}|7\d{7})$/, + 'ar-EG': /^((\+?20)|0)?1[0125]\d{8}$/, + 'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/, + 'ar-JO': /^(\+?962|0)?7[789]\d{7}$/, + 'ar-KW': /^(\+?965)([569]\d{7}|41\d{6})$/, + 'ar-LY': /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/, + 'ar-MA': /^(?:(?:\+|00)212|0)[5-7]\d{8}$/, + 'ar-OM': /^((\+|00)968)?([79][1-9])\d{6}$/, + 'ar-PS': /^(\+?970|0)5[6|9](\d{7})$/, + 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, + 'ar-SD': /^((\+?249)|0)?(9[012369]|1[012])\d{7}$/, + 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, + 'ar-TN': /^(\+?216)?[2459]\d{7}$/, + 'az-AZ': /^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/, + 'ar-QA': /^(\+?974|0)?([3567]\d{7})$/, + 'bs-BA': /^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/, + 'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/, + 'bg-BG': /^(\+?359|0)?8[789]\d{7}$/, + 'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/, + 'ca-AD': /^(\+376)?[346]\d{5}$/, + 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'de-DE': /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/, + 'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/, + 'de-CH': /^(\+41|0)([1-9])\d{1,9}$/, + 'de-LU': /^(\+352)?((6\d1)\d{6})$/, + 'dv-MV': /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/, + 'el-GR': /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/, + 'el-CY': /^(\+?357?)?(9(9|7|6|5|4)\d{6})$/, + 'en-AI': /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/, + 'en-AU': /^(\+?61|0)4\d{8}$/, + 'en-AG': /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/, + 'en-BM': /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/, + 'en-BS': /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/, + 'en-GB': /^(\+?44|0)7[1-9]\d{8}$/, + 'en-GG': /^(\+?44|0)1481\d{6}$/, + 'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/, + 'en-GY': /^(\+592|0)6\d{6}$/, + 'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/, + 'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/, + 'en-IE': /^(\+?353|0)8[356789]\d{7}$/, + 'en-IN': /^(\+?91|0)?[6789]\d{9}$/, + 'en-JM': /^(\+?876)?\d{7}$/, + 'en-KE': /^(\+?254|0)(7|1)\d{8}$/, + 'fr-CF': /^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/, + 'en-SS': /^(\+?211|0)(9[1257])\d{7}$/, + 'en-KI': /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/, + 'en-KN': /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/, + 'en-LS': /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/, + 'en-MT': /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/, + 'en-MU': /^(\+?230|0)?\d{8}$/, + 'en-MW': /^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/, + 'en-NA': /^(\+?264|0)(6|8)\d{7}$/, + 'en-NG': /^(\+?234|0)?[789]\d{9}$/, + 'en-NZ': /^(\+?64|0)[28]\d{7,9}$/, + 'en-PG': /^(\+?675|0)?(7\d|8[18])\d{6}$/, + 'en-PK': /^((00|\+)?92|0)3[0-6]\d{8}$/, + 'en-PH': /^(09|\+639)\d{9}$/, + 'en-RW': /^(\+?250|0)?[7]\d{8}$/, + 'en-SG': /^(\+65)?[3689]\d{7}$/, + 'en-SL': /^(\+?232|0)\d{8}$/, + 'en-TZ': /^(\+?255|0)?[67]\d{8}$/, + 'en-UG': /^(\+?256|0)?[7]\d{8}$/, + 'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/, + 'en-ZA': /^(\+?27|0)\d{9}$/, + 'en-ZM': /^(\+?26)?0[79][567]\d{7}$/, + 'en-ZW': /^(\+263)[0-9]{9}$/, + 'en-BW': /^(\+?267)?(7[1-8]{1})\d{6}$/, + 'es-AR': /^\+?549(11|[2368]\d)\d{8}$/, + 'es-BO': /^(\+?591)?(6|7)\d{7}$/, + 'es-CO': /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/, + 'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/, + 'es-CR': /^(\+506)?[2-8]\d{7}$/, + 'es-CU': /^(\+53|0053)?5\d{7}$/, + 'es-DO': /^(\+?1)?8[024]9\d{7}$/, + 'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/, + 'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, + 'es-ES': /^(\+?34)?[6|7]\d{8}$/, + 'es-GT': /^(\+?502)?[2|6|7]\d{7}$/, + 'es-PE': /^(\+?51)?9\d{8}$/, + 'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/, + 'es-NI': /^(\+?505)\d{7,8}$/, + 'es-PA': /^(\+?507)\d{7,8}$/, + 'es-PY': /^(\+?595|0)9[9876]\d{7}$/, + 'es-SV': /^(\+?503)?[67]\d{7}$/, + 'es-UY': /^(\+598|0)9[1-9][\d]{6}$/, + 'es-VE': /^(\+?58)?(2|4)\d{9}$/, + 'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, + 'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, + 'fi-FI': /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/, + 'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/, + 'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'fr-BF': /^(\+226|0)[67]\d{7}$/, + 'fr-BJ': /^(\+229)\d{8}$/, + 'fr-CD': /^(\+?243|0)?(8|9)\d{8}$/, + 'fr-CM': /^(\+?237)6[0-9]{8}$/, + 'fr-FR': /^(\+?33|0)[67]\d{8}$/, + 'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/, + 'fr-GP': /^(\+?590|0|00590)[67]\d{8}$/, + 'fr-MQ': /^(\+?596|0|00596)[67]\d{8}$/, + 'fr-PF': /^(\+?689)?8[789]\d{6}$/, + 'fr-RE': /^(\+?262|0|00262)[67]\d{8}$/, + 'fr-WF': /^(\+681)?\d{6}$/, + 'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, + 'hu-HU': /^(\+?36|06)(20|30|31|50|70)\d{7}$/, + 'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, + 'ir-IR': /^(\+98|0)?9\d{9}$/, + 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + 'it-SM': /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/, + 'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/, + 'ka-GE': /^(\+?995)?(79\d{7}|5\d{8})$/, + 'kk-KZ': /^(\+?7|8)?7\d{9}$/, + 'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, + 'ky-KG': /^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/, + 'lt-LT': /^(\+370|8)\d{8}$/, + 'lv-LV': /^(\+?371)2\d{7}$/, + 'mg-MG': /^((\+?261|0)(2|3)\d)?\d{7}$/, + 'mn-MN': /^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/, + 'my-MM': /^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/, + 'ms-MY': /^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/, + 'mz-MZ': /^(\+?258)?8[234567]\d{7}$/, + 'nb-NO': /^(\+?47)?[49]\d{7}$/, + 'ne-NP': /^(\+?977)?9[78]\d{8}$/, + 'nl-BE': /^(\+?32|0)4\d{8}$/, + 'nl-NL': /^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/, + 'nl-AW': /^(\+)?297(56|59|64|73|74|99)\d{5}$/, + 'nn-NO': /^(\+?47)?[49]\d{7}$/, + 'pl-PL': /^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/, + 'pt-BR': /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/, + 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, + 'pt-AO': /^(\+?244)?9\d{8}$/, + 'ro-MD': /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/, + 'ro-RO': /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/, + 'ru-RU': /^(\+?7|8)?9\d{9}$/, + 'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/, + 'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/, + 'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'so-SO': /^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/, + 'sq-AL': /^(\+355|0)6[2-9]\d{7}$/, + 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, + 'sv-SE': /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/, + 'tg-TJ': /^(\+?992)?[5][5]\d{7}$/, + 'th-TH': /^(\+66|66|0)\d{9}$/, + 'tr-TR': /^(\+?90|0)?5\d{9}$/, + 'tk-TM': /^(\+993|993|8)\d{8}$/, + 'uk-UA': /^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/, + 'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/, + 'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/, + 'zh-CN': /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/, + 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/, + 'dz-BT': /^(\+?975|0)?(17|16|77|02)\d{6}$/, + 'ar-YE': /^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/, + 'ar-EH': /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/, + 'fa-AF': /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/, + 'mk-MK': /^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/ +}; +/* eslint-enable max-len */ + +// aliases +phones['en-CA'] = phones['en-US']; +phones['fr-CA'] = phones['en-CA']; +phones['fr-BE'] = phones['nl-BE']; +phones['zh-HK'] = phones['en-HK']; +phones['zh-MO'] = phones['en-MO']; +phones['ga-IE'] = phones['en-IE']; +phones['fr-CH'] = phones['de-CH']; +phones['it-CH'] = phones['fr-CH']; +export default function isMobilePhone(str, locale, options) { + assertString(str); + if (options && options.strictMode && !str.startsWith('+')) { + return false; + } + if (Array.isArray(locale)) { + return locale.some(function (key) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + if (phone.test(str)) { + return true; + } + } + return false; + }); + } else if (locale in phones) { + return phones[locale].test(str); + // alias falsey locale as 'any' + } else if (!locale || locale === 'any') { + for (var key in phones) { + // istanbul ignore else + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + if (phone.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +export var locales = Object.keys(phones); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMongoId.js b/src/hello/server/node_modules/validator/es/lib/isMongoId.js new file mode 100644 index 00000000..fc87b89e --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMongoId.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +import isHexadecimal from './isHexadecimal'; +export default function isMongoId(str) { + assertString(str); + return isHexadecimal(str) && str.length === 24; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isMultibyte.js b/src/hello/server/node_modules/validator/es/lib/isMultibyte.js new file mode 100644 index 00000000..0872e3ec --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isMultibyte.js @@ -0,0 +1,10 @@ +import assertString from './util/assertString'; + +/* eslint-disable no-control-regex */ +var multibyte = /[^\x00-\x7F]/; +/* eslint-enable no-control-regex */ + +export default function isMultibyte(str) { + assertString(str); + return multibyte.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isNumeric.js b/src/hello/server/node_modules/validator/es/lib/isNumeric.js new file mode 100644 index 00000000..df3a46a9 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isNumeric.js @@ -0,0 +1,10 @@ +import assertString from './util/assertString'; +import { decimal } from './alpha'; +var numericNoSymbols = /^[0-9]+$/; +export default function isNumeric(str, options) { + assertString(str); + if (options && options.no_symbols) { + return numericNoSymbols.test(str); + } + return new RegExp("^[+-]?([0-9]*[".concat((options || {}).locale ? decimal[options.locale] : '.', "])?[0-9]+$")).test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isOctal.js b/src/hello/server/node_modules/validator/es/lib/isOctal.js new file mode 100644 index 00000000..3ec51dd9 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isOctal.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +var octal = /^(0o)?[0-7]+$/i; +export default function isOctal(str) { + assertString(str); + return octal.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isPassportNumber.js b/src/hello/server/node_modules/validator/es/lib/isPassportNumber.js new file mode 100644 index 00000000..1273b2d8 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isPassportNumber.js @@ -0,0 +1,145 @@ +import assertString from './util/assertString'; + +/** + * Reference: + * https://en.wikipedia.org/ -- Wikipedia + * https://docs.microsoft.com/en-us/microsoft-365/compliance/eu-passport-number -- EU Passport Number + * https://countrycode.org/ -- Country Codes + */ +var passportRegexByCountryCode = { + AM: /^[A-Z]{2}\d{7}$/, + // ARMENIA + AR: /^[A-Z]{3}\d{6}$/, + // ARGENTINA + AT: /^[A-Z]\d{7}$/, + // AUSTRIA + AU: /^[A-Z]\d{7}$/, + // AUSTRALIA + AZ: /^[A-Z]{1}\d{8}$/, + // AZERBAIJAN + BE: /^[A-Z]{2}\d{6}$/, + // BELGIUM + BG: /^\d{9}$/, + // BULGARIA + BR: /^[A-Z]{2}\d{6}$/, + // BRAZIL + BY: /^[A-Z]{2}\d{7}$/, + // BELARUS + CA: /^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/, + // CANADA + CH: /^[A-Z]\d{7}$/, + // SWITZERLAND + CN: /^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/, + // CHINA [G=Ordinary, E=Electronic] followed by 8-digits, or E followed by any UPPERCASE letter (except I and O) followed by 7 digits + CY: /^[A-Z](\d{6}|\d{8})$/, + // CYPRUS + CZ: /^\d{8}$/, + // CZECH REPUBLIC + DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/, + // GERMANY + DK: /^\d{9}$/, + // DENMARK + DZ: /^\d{9}$/, + // ALGERIA + EE: /^([A-Z]\d{7}|[A-Z]{2}\d{7})$/, + // ESTONIA (K followed by 7-digits), e-passports have 2 UPPERCASE followed by 7 digits + ES: /^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/, + // SPAIN + FI: /^[A-Z]{2}\d{7}$/, + // FINLAND + FR: /^\d{2}[A-Z]{2}\d{5}$/, + // FRANCE + GB: /^\d{9}$/, + // UNITED KINGDOM + GR: /^[A-Z]{2}\d{7}$/, + // GREECE + HR: /^\d{9}$/, + // CROATIA + HU: /^[A-Z]{2}(\d{6}|\d{7})$/, + // HUNGARY + IE: /^[A-Z0-9]{2}\d{7}$/, + // IRELAND + IN: /^[A-Z]{1}-?\d{7}$/, + // INDIA + ID: /^[A-C]\d{7}$/, + // INDONESIA + IR: /^[A-Z]\d{8}$/, + // IRAN + IS: /^(A)\d{7}$/, + // ICELAND + IT: /^[A-Z0-9]{2}\d{7}$/, + // ITALY + JM: /^[Aa]\d{7}$/, + // JAMAICA + JP: /^[A-Z]{2}\d{7}$/, + // JAPAN + KR: /^[MS]\d{8}$/, + // SOUTH KOREA, REPUBLIC OF KOREA, [S=PS Passports, M=PM Passports] + KZ: /^[a-zA-Z]\d{7}$/, + // KAZAKHSTAN + LI: /^[a-zA-Z]\d{5}$/, + // LIECHTENSTEIN + LT: /^[A-Z0-9]{8}$/, + // LITHUANIA + LU: /^[A-Z0-9]{8}$/, + // LUXEMBURG + LV: /^[A-Z0-9]{2}\d{7}$/, + // LATVIA + LY: /^[A-Z0-9]{8}$/, + // LIBYA + MT: /^\d{7}$/, + // MALTA + MZ: /^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/, + // MOZAMBIQUE + MY: /^[AHK]\d{8}$/, + // MALAYSIA + MX: /^\d{10,11}$/, + // MEXICO + NL: /^[A-Z]{2}[A-Z0-9]{6}\d$/, + // NETHERLANDS + NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/, + // NEW ZEALAND + PH: /^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/, + // PHILIPPINES + PK: /^[A-Z]{2}\d{7}$/, + // PAKISTAN + PL: /^[A-Z]{2}\d{7}$/, + // POLAND + PT: /^[A-Z]\d{6}$/, + // PORTUGAL + RO: /^\d{8,9}$/, + // ROMANIA + RU: /^\d{9}$/, + // RUSSIAN FEDERATION + SE: /^\d{8}$/, + // SWEDEN + SL: /^(P)[A-Z]\d{7}$/, + // SLOVENIA + SK: /^[0-9A-Z]\d{7}$/, + // SLOVAKIA + TH: /^[A-Z]{1,2}\d{6,7}$/, + // THAILAND + TR: /^[A-Z]\d{8}$/, + // TURKEY + UA: /^[A-Z]{2}\d{6}$/, + // UKRAINE + US: /^\d{9}$|^[A-Z]\d{8}$/, + // UNITED STATES + ZA: /^[TAMD]\d{8}$/ // SOUTH AFRICA +}; +export var locales = Object.keys(passportRegexByCountryCode); + +/** + * Check if str is a valid passport number + * relative to provided ISO Country Code. + * + * @param {string} str + * @param {string} countryCode + * @return {boolean} + */ +export default function isPassportNumber(str, countryCode) { + assertString(str); + /** Remove All Whitespaces, Convert to UPPERCASE */ + var normalizedStr = str.replace(/\s/g, '').toUpperCase(); + return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isPort.js b/src/hello/server/node_modules/validator/es/lib/isPort.js new file mode 100644 index 00000000..c1cddaf7 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isPort.js @@ -0,0 +1,8 @@ +import isInt from './isInt'; +export default function isPort(str) { + return isInt(str, { + allow_leading_zeroes: false, + min: 0, + max: 65535 + }); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isPostalCode.js b/src/hello/server/node_modules/validator/es/lib/isPostalCode.js new file mode 100644 index 00000000..36199850 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isPostalCode.js @@ -0,0 +1,99 @@ +import assertString from './util/assertString'; + +// common patterns +var threeDigit = /^\d{3}$/; +var fourDigit = /^\d{4}$/; +var fiveDigit = /^\d{5}$/; +var sixDigit = /^\d{6}$/; +var patterns = { + AD: /^AD\d{3}$/, + AT: fourDigit, + AU: fourDigit, + AZ: /^AZ\d{4}$/, + BA: /^([7-8]\d{4}$)/, + BD: /^([1-8][0-9]{3}|9[0-4][0-9]{2})$/, + BE: fourDigit, + BG: fourDigit, + BR: /^\d{5}-?\d{3}$/, + BY: /^2[1-4]\d{4}$/, + CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, + CH: fourDigit, + CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/, + CO: /^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/, + CZ: /^\d{3}\s?\d{2}$/, + DE: fiveDigit, + DK: fourDigit, + DO: fiveDigit, + DZ: fiveDigit, + EE: fiveDigit, + ES: /^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/, + FI: fiveDigit, + FR: /^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/, + GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, + GR: /^\d{3}\s?\d{2}$/, + HR: /^([1-5]\d{4}$)/, + HT: /^HT\d{4}$/, + HU: fourDigit, + ID: fiveDigit, + IE: /^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i, + IL: /^(\d{5}|\d{7})$/, + IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/, + IR: /^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/, + IS: threeDigit, + IT: fiveDigit, + JP: /^\d{3}\-\d{4}$/, + KE: fiveDigit, + KR: /^(\d{5}|\d{6})$/, + LI: /^(948[5-9]|949[0-7])$/, + LT: /^LT\-\d{5}$/, + LU: fourDigit, + LV: /^LV\-\d{4}$/, + LK: fiveDigit, + MG: threeDigit, + MX: fiveDigit, + MT: /^[A-Za-z]{3}\s{0,1}\d{4}$/, + MY: fiveDigit, + NL: /^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i, + NO: fourDigit, + NP: /^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i, + NZ: fourDigit, + // https://www.pakpost.gov.pk/postcodes.php + PK: fiveDigit, + PL: /^\d{2}\-\d{3}$/, + PR: /^00[679]\d{2}([ -]\d{4})?$/, + PT: /^\d{4}\-\d{3}?$/, + RO: sixDigit, + RU: sixDigit, + SA: fiveDigit, + SE: /^[1-9]\d{2}\s?\d{2}$/, + SG: sixDigit, + SI: fourDigit, + SK: /^\d{3}\s?\d{2}$/, + TH: fiveDigit, + TN: fourDigit, + TW: /^\d{3}(\d{2,3})?$/, + UA: fiveDigit, + US: /^\d{5}(-\d{4})?$/, + ZA: fourDigit, + ZM: fiveDigit +}; +export var locales = Object.keys(patterns); +export default function isPostalCode(str, locale) { + assertString(str); + if (locale in patterns) { + return patterns[locale].test(str); + } else if (locale === 'any') { + for (var key in patterns) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (patterns.hasOwnProperty(key)) { + var pattern = patterns[key]; + if (pattern.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isRFC3339.js b/src/hello/server/node_modules/validator/es/lib/isRFC3339.js new file mode 100644 index 00000000..c6dedbd3 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isRFC3339.js @@ -0,0 +1,21 @@ +import assertString from './util/assertString'; + +/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */ + +var dateFullYear = /[0-9]{4}/; +var dateMonth = /(0[1-9]|1[0-2])/; +var dateMDay = /([12]\d|0[1-9]|3[01])/; +var timeHour = /([01][0-9]|2[0-3])/; +var timeMinute = /[0-5][0-9]/; +var timeSecond = /([0-5][0-9]|60)/; +var timeSecFrac = /(\.[0-9]+)?/; +var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source)); +var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")")); +var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source)); +var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source)); +var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source)); +var rfc3339 = new RegExp("^".concat(fullDate.source, "[ tT]").concat(fullTime.source, "$")); +export default function isRFC3339(str) { + assertString(str); + return rfc3339.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isRgbColor.js b/src/hello/server/node_modules/validator/es/lib/isRgbColor.js new file mode 100644 index 00000000..912f06c8 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isRgbColor.js @@ -0,0 +1,34 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +/* eslint-disable prefer-rest-params */ +import assertString from './util/assertString'; +var rgbColor = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/; +var rgbaColor = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; +var rgbColorPercent = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/; +var rgbaColorPercent = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; +var startsWithRgb = /^rgba?/; +export default function isRgbColor(str, options) { + assertString(str); + // default options to true for percent and false for spaces + var allowSpaces = false; + var includePercentValues = true; + if (_typeof(options) !== 'object') { + if (arguments.length >= 2) { + includePercentValues = arguments[1]; + } + } else { + allowSpaces = options.allowSpaces !== undefined ? options.allowSpaces : allowSpaces; + includePercentValues = options.includePercentValues !== undefined ? options.includePercentValues : includePercentValues; + } + if (allowSpaces) { + // make sure it starts with continous rgba? without spaces before stripping + if (!startsWithRgb.test(str)) { + return false; + } + // strip all whitespace + str = str.replace(/\s/g, ''); + } + if (!includePercentValues) { + return rgbColor.test(str) || rgbaColor.test(str); + } + return rgbColor.test(str) || rgbaColor.test(str) || rgbColorPercent.test(str) || rgbaColorPercent.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isSemVer.js b/src/hello/server/node_modules/validator/es/lib/isSemVer.js new file mode 100644 index 00000000..7581583e --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isSemVer.js @@ -0,0 +1,14 @@ +import assertString from './util/assertString'; +import multilineRegexp from './util/multilineRegex'; + +/** + * Regular Expression to match + * semantic versioning (SemVer) + * built from multi-line, multi-parts regexp + * Reference: https://semver.org/ + */ +var semanticVersioningRegex = multilineRegexp(['^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)', '(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))', '?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$'], 'i'); +export default function isSemVer(str) { + assertString(str); + return semanticVersioningRegex.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isSlug.js b/src/hello/server/node_modules/validator/es/lib/isSlug.js new file mode 100644 index 00000000..b9659ef3 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isSlug.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +var charsetRegex = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/; +export default function isSlug(str) { + assertString(str); + return charsetRegex.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isStrongPassword.js b/src/hello/server/node_modules/validator/es/lib/isStrongPassword.js new file mode 100644 index 00000000..2e248dfb --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isStrongPassword.js @@ -0,0 +1,90 @@ +import merge from './util/merge'; +import assertString from './util/assertString'; +var upperCaseRegex = /^[A-Z]$/; +var lowerCaseRegex = /^[a-z]$/; +var numberRegex = /^[0-9]$/; +var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/; +var defaultOptions = { + minLength: 8, + minLowercase: 1, + minUppercase: 1, + minNumbers: 1, + minSymbols: 1, + returnScore: false, + pointsPerUnique: 1, + pointsPerRepeat: 0.5, + pointsForContainingLower: 10, + pointsForContainingUpper: 10, + pointsForContainingNumber: 10, + pointsForContainingSymbol: 10 +}; + +/* Counts number of occurrences of each char in a string + * could be moved to util/ ? +*/ +function countChars(str) { + var result = {}; + Array.from(str).forEach(function (_char) { + var curVal = result[_char]; + if (curVal) { + result[_char] += 1; + } else { + result[_char] = 1; + } + }); + return result; +} + +/* Return information about a password */ +function analyzePassword(password) { + var charMap = countChars(password); + var analysis = { + length: password.length, + uniqueChars: Object.keys(charMap).length, + uppercaseCount: 0, + lowercaseCount: 0, + numberCount: 0, + symbolCount: 0 + }; + Object.keys(charMap).forEach(function (_char2) { + /* istanbul ignore else */ + if (upperCaseRegex.test(_char2)) { + analysis.uppercaseCount += charMap[_char2]; + } else if (lowerCaseRegex.test(_char2)) { + analysis.lowercaseCount += charMap[_char2]; + } else if (numberRegex.test(_char2)) { + analysis.numberCount += charMap[_char2]; + } else if (symbolRegex.test(_char2)) { + analysis.symbolCount += charMap[_char2]; + } + }); + return analysis; +} +function scorePassword(analysis, scoringOptions) { + var points = 0; + points += analysis.uniqueChars * scoringOptions.pointsPerUnique; + points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat; + if (analysis.lowercaseCount > 0) { + points += scoringOptions.pointsForContainingLower; + } + if (analysis.uppercaseCount > 0) { + points += scoringOptions.pointsForContainingUpper; + } + if (analysis.numberCount > 0) { + points += scoringOptions.pointsForContainingNumber; + } + if (analysis.symbolCount > 0) { + points += scoringOptions.pointsForContainingSymbol; + } + return points; +} +export default function isStrongPassword(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + assertString(str); + var analysis = analyzePassword(str); + options = merge(options || {}, defaultOptions); + if (options.returnScore) { + return scorePassword(analysis, options); + } + return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isSurrogatePair.js b/src/hello/server/node_modules/validator/es/lib/isSurrogatePair.js new file mode 100644 index 00000000..1e0efb2f --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isSurrogatePair.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; +export default function isSurrogatePair(str) { + assertString(str); + return surrogatePair.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isTaxID.js b/src/hello/server/node_modules/validator/es/lib/isTaxID.js new file mode 100644 index 00000000..e793ad89 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isTaxID.js @@ -0,0 +1,1388 @@ +function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } +function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +import assertString from './util/assertString'; +import * as algorithms from './util/algorithms'; +import isDate from './isDate'; + +/** + * TIN Validation + * Validates Tax Identification Numbers (TINs) from the US, EU member states and the United Kingdom. + * + * EU-UK: + * National TIN validity is calculated using public algorithms as made available by DG TAXUD. + * + * See `https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms-Public.docx` for more information. + * + * US: + * An Employer Identification Number (EIN), also known as a Federal Tax Identification Number, + * is used to identify a business entity. + * + * NOTES: + * - Prefix 47 is being reserved for future use + * - Prefixes 26, 27, 45, 46 and 47 were previously assigned by the Philadelphia campus. + * + * See `http://www.irs.gov/Businesses/Small-Businesses-&-Self-Employed/How-EINs-are-Assigned-and-Valid-EIN-Prefixes` + * for more information. + */ + +// Locale functions + +/* + * bg-BG validation function + * (Edinen graždanski nomer (EGN/ЕГН), persons only) + * Checks if birth date (first six digits) is valid and calculates check (last) digit + */ +function bgBgCheck(tin) { + // Extract full year, normalize month and check birth date validity + var century_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 40) { + month -= 40; + century_year = "20".concat(century_year); + } else if (month > 20) { + month -= 20; + century_year = "18".concat(century_year); + } else { + century_year = "19".concat(century_year); + } + if (month < 10) { + month = "0".concat(month); + } + var date = "".concat(century_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + + // Calculate checksum by multiplying digits with fixed values + var multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6]; + var checksum = 0; + for (var i = 0; i < multip_lookup.length; i++) { + checksum += digits[i] * multip_lookup[i]; + } + checksum = checksum % 11 === 10 ? 0 : checksum % 11; + return checksum === digits[9]; +} + +/** + * Check if an input is a valid Canadian SIN (Social Insurance Number) + * + * The Social Insurance Number (SIN) is a 9 digit number that + * you need to work in Canada or to have access to government programs and benefits. + * + * https://en.wikipedia.org/wiki/Social_Insurance_Number + * https://www.canada.ca/en/employment-social-development/services/sin.html + * https://www.codercrunch.com/challenge/819302488/sin-validator + * + * @param {string} input + * @return {boolean} + */ +function isCanadianSIN(input) { + var digitsArray = input.split(''); + var even = digitsArray.filter(function (_, idx) { + return idx % 2; + }).map(function (i) { + return Number(i) * 2; + }).join('').split(''); + var total = digitsArray.filter(function (_, idx) { + return !(idx % 2); + }).concat(even).map(function (i) { + return Number(i); + }).reduce(function (acc, cur) { + return acc + cur; + }); + return total % 10 === 0; +} + +/* + * cs-CZ validation function + * (Rodné číslo (RČ), persons only) + * Checks if birth date (first six digits) is valid and divisibility by 11 + * Material not in DG TAXUD document sourced from: + * -`https://lorenc.info/3MA381/overeni-spravnosti-rodneho-cisla.htm` + * -`https://www.mvcr.cz/clanek/rady-a-sluzby-dokumenty-rodne-cislo.aspx` + */ +function csCzCheck(tin) { + tin = tin.replace(/\W/, ''); + + // Extract full year from TIN length + var full_year = parseInt(tin.slice(0, 2), 10); + if (tin.length === 10) { + if (full_year < 54) { + full_year = "20".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + } else { + if (tin.slice(6) === '000') { + return false; + } // Three-zero serial not assigned before 1954 + if (full_year < 54) { + full_year = "19".concat(full_year); + } else { + return false; // No 18XX years seen in any of the resources + } + } + // Add missing zero if needed + if (full_year.length === 3) { + full_year = [full_year.slice(0, 2), '0', full_year.slice(2)].join(''); + } + + // Extract month from TIN and normalize + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month > 20) { + // Month-plus-twenty was only introduced in 2004 + if (parseInt(full_year, 10) < 2004) { + return false; + } + month -= 20; + } + if (month < 10) { + month = "0".concat(month); + } + + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Verify divisibility by 11 + if (tin.length === 10) { + if (parseInt(tin, 10) % 11 !== 0) { + // Some numbers up to and including 1985 are still valid if + // check (last) digit equals 0 and modulo of first 9 digits equals 10 + var checkdigit = parseInt(tin.slice(0, 9), 10) % 11; + if (parseInt(full_year, 10) < 1986 && checkdigit === 10) { + if (parseInt(tin.slice(9), 10) !== 0) { + return false; + } + } else { + return false; + } + } + } + return true; +} + +/* + * de-AT validation function + * (Abgabenkontonummer, persons/entities) + * Verify TIN validity by calling luhnCheck() + */ +function deAtCheck(tin) { + return algorithms.luhnCheck(tin); +} + +/* + * de-DE validation function + * (Steueridentifikationsnummer (Steuer-IdNr.), persons only) + * Tests for single duplicate/triplicate value, then calculates ISO 7064 check (last) digit + * Partial implementation of spec (same result with both algorithms always) + */ +function deDeCheck(tin) { + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + + // Fill array with strings of number positions + var occurrences = []; + for (var i = 0; i < digits.length - 1; i++) { + occurrences.push(''); + for (var j = 0; j < digits.length - 1; j++) { + if (digits[i] === digits[j]) { + occurrences[i] += j; + } + } + } + + // Remove digits with one occurrence and test for only one duplicate/triplicate + occurrences = occurrences.filter(function (a) { + return a.length > 1; + }); + if (occurrences.length !== 2 && occurrences.length !== 3) { + return false; + } + + // In case of triplicate value only two digits are allowed next to each other + if (occurrences[0].length === 3) { + var trip_locations = occurrences[0].split('').map(function (a) { + return parseInt(a, 10); + }); + var recurrent = 0; // Amount of neighbor occurrences + for (var _i = 0; _i < trip_locations.length - 1; _i++) { + if (trip_locations[_i] + 1 === trip_locations[_i + 1]) { + recurrent += 1; + } + } + if (recurrent === 2) { + return false; + } + } + return algorithms.iso7064Check(tin); +} + +/* + * dk-DK validation function + * (CPR-nummer (personnummer), persons only) + * Checks if birth date (first six digits) is valid and assigned to century (seventh) digit, + * and calculates check (last) digit + */ +function dkDkCheck(tin) { + tin = tin.replace(/\W/, ''); + + // Extract year, check if valid for given century digit and add century + var year = parseInt(tin.slice(4, 6), 10); + var century_digit = tin.slice(6, 7); + switch (century_digit) { + case '0': + case '1': + case '2': + case '3': + year = "19".concat(year); + break; + case '4': + case '9': + if (year < 37) { + year = "20".concat(year); + } else { + year = "19".concat(year); + } + break; + default: + if (year < 37) { + year = "20".concat(year); + } else if (year > 58) { + year = "18".concat(year); + } else { + return false; + } + break; + } + // Add missing zero if needed + if (year.length === 3) { + year = [year.slice(0, 2), '0', year.slice(2)].join(''); + } + // Check date validity + var date = "".concat(year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 4; + // Multiply by weight and add to checksum + for (var i = 0; i < 9; i++) { + checksum += digits[i] * weight; + weight -= 1; + if (weight === 1) { + weight = 7; + } + } + checksum %= 11; + if (checksum === 1) { + return false; + } + return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum; +} + +/* + * el-CY validation function + * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons only) + * Verify TIN validity by calculating ASCII value of check (last) character + */ +function elCyCheck(tin) { + // split digits into an array for further processing + var digits = tin.slice(0, 8).split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + // add digits in even places + for (var i = 1; i < digits.length; i += 2) { + checksum += digits[i]; + } + + // add digits in odd places + for (var _i2 = 0; _i2 < digits.length; _i2 += 2) { + if (digits[_i2] < 2) { + checksum += 1 - digits[_i2]; + } else { + checksum += 2 * (digits[_i2] - 2) + 5; + if (digits[_i2] > 4) { + checksum += 2; + } + } + } + return String.fromCharCode(checksum % 26 + 65) === tin.charAt(8); +} + +/* + * el-GR validation function + * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons/entities) + * Verify TIN validity by calculating check (last) digit + * Algorithm not in DG TAXUD document- sourced from: + * - `http://epixeirisi.gr/%CE%9A%CE%A1%CE%99%CE%A3%CE%99%CE%9C%CE%91-%CE%98%CE%95%CE%9C%CE%91%CE%A4%CE%91-%CE%A6%CE%9F%CE%A1%CE%9F%CE%9B%CE%9F%CE%93%CE%99%CE%91%CE%A3-%CE%9A%CE%91%CE%99-%CE%9B%CE%9F%CE%93%CE%99%CE%A3%CE%A4%CE%99%CE%9A%CE%97%CE%A3/23791/%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CF%8C%CF%82-%CE%A6%CE%BF%CF%81%CE%BF%CE%BB%CE%BF%CE%B3%CE%B9%CE%BA%CE%BF%CF%8D-%CE%9C%CE%B7%CF%84%CF%81%CF%8E%CE%BF%CF%85` + */ +function elGrCheck(tin) { + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + for (var i = 0; i < 8; i++) { + checksum += digits[i] * Math.pow(2, 8 - i); + } + return checksum % 11 % 10 === digits[8]; +} + +/* + * en-GB validation function (should go here if needed) + * (National Insurance Number (NINO) or Unique Taxpayer Reference (UTR), + * persons/entities respectively) + */ + +/* + * en-IE validation function + * (Personal Public Service Number (PPS No), persons only) + * Verify TIN validity by calculating check (second to last) character + */ +function enIeCheck(tin) { + var checksum = algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) { + return parseInt(a, 10); + }), 8); + if (tin.length === 9 && tin[8] !== 'W') { + checksum += (tin[8].charCodeAt(0) - 64) * 9; + } + checksum %= 23; + if (checksum === 0) { + return tin[7].toUpperCase() === 'W'; + } + return tin[7].toUpperCase() === String.fromCharCode(64 + checksum); +} + +// Valid US IRS campus prefixes +var enUsCampusPrefix = { + andover: ['10', '12'], + atlanta: ['60', '67'], + austin: ['50', '53'], + brookhaven: ['01', '02', '03', '04', '05', '06', '11', '13', '14', '16', '21', '22', '23', '25', '34', '51', '52', '54', '55', '56', '57', '58', '59', '65'], + cincinnati: ['30', '32', '35', '36', '37', '38', '61'], + fresno: ['15', '24'], + internet: ['20', '26', '27', '45', '46', '47'], + kansas: ['40', '44'], + memphis: ['94', '95'], + ogden: ['80', '90'], + philadelphia: ['33', '39', '41', '42', '43', '46', '48', '62', '63', '64', '66', '68', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '91', '92', '93', '98', '99'], + sba: ['31'] +}; + +// Return an array of all US IRS campus prefixes +function enUsGetPrefixes() { + var prefixes = []; + for (var location in enUsCampusPrefix) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (enUsCampusPrefix.hasOwnProperty(location)) { + prefixes.push.apply(prefixes, _toConsumableArray(enUsCampusPrefix[location])); + } + } + return prefixes; +} + +/* + * en-US validation function + * Verify that the TIN starts with a valid IRS campus prefix + */ +function enUsCheck(tin) { + return enUsGetPrefixes().indexOf(tin.slice(0, 2)) !== -1; +} + +/* + * es-AR validation function + * Clave Única de Identificación Tributaria (CUIT/CUIL) + * Sourced from: + * - https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id_nivel1=3036&id_nivel2=3040&p=Conceptos%20b%C3%A1sicos + * - https://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Identificaci%C3%B3n_Tributaria + */ + +function esArCheck(tin) { + var accum = 0; + var digits = tin.split(''); + var digit = parseInt(digits.pop(), 10); + for (var i = 0; i < digits.length; i++) { + accum += digits[9 - i] * (2 + i % 6); + } + var verif = 11 - accum % 11; + if (verif === 11) { + verif = 0; + } else if (verif === 10) { + verif = 9; + } + return digit === verif; +} + +/* + * es-ES validation function + * (Documento Nacional de Identidad (DNI) + * or Número de Identificación de Extranjero (NIE), persons only) + * Verify TIN validity by calculating check (last) character + */ +function esEsCheck(tin) { + // Split characters into an array for further processing + var chars = tin.toUpperCase().split(''); + + // Replace initial letter if needed + if (isNaN(parseInt(chars[0], 10)) && chars.length > 1) { + var lead_replace = 0; + switch (chars[0]) { + case 'Y': + lead_replace = 1; + break; + case 'Z': + lead_replace = 2; + break; + default: + } + chars.splice(0, 1, lead_replace); + // Fill with zeros if smaller than proper + } else { + while (chars.length < 9) { + chars.unshift(0); + } + } + + // Calculate checksum and check according to lookup + var lookup = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; + chars = chars.join(''); + var checksum = parseInt(chars.slice(0, 8), 10) % 23; + return chars[8] === lookup[checksum]; +} + +/* + * et-EE validation function + * (Isikukood (IK), persons only) + * Checks if birth date (century digit and six following) is valid and calculates check (last) digit + * Material not in DG TAXUD document sourced from: + * - `https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Estonia-TIN.pdf` + */ +function etEeCheck(tin) { + // Extract year and add century + var full_year = tin.slice(1, 3); + var century_digit = tin.slice(0, 1); + switch (century_digit) { + case '1': + case '2': + full_year = "18".concat(full_year); + break; + case '3': + case '4': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 1; + // Multiply by weight and add to checksum + for (var i = 0; i < 10; i++) { + checksum += digits[i] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + // Do again if modulo 11 of checksum is 10 + if (checksum % 11 === 10) { + checksum = 0; + weight = 3; + for (var _i3 = 0; _i3 < 10; _i3++) { + checksum += digits[_i3] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + if (checksum % 11 === 10) { + return digits[10] === 0; + } + } + return checksum % 11 === digits[10]; +} + +/* + * fi-FI validation function + * (Henkilötunnus (HETU), persons only) + * Checks if birth date (first six digits plus century symbol) is valid + * and calculates check (last) digit + */ +function fiFiCheck(tin) { + // Extract year and add century + var full_year = tin.slice(4, 6); + var century_symbol = tin.slice(6, 7); + switch (century_symbol) { + case '+': + full_year = "18".concat(full_year); + break; + case '-': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate check character + var checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31; + if (checksum < 10) { + return checksum === parseInt(tin.slice(10), 10); + } + checksum -= 10; + var letters_lookup = ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y']; + return letters_lookup[checksum] === tin.slice(10); +} + +/* + * fr/nl-BE validation function + * (Numéro national (N.N.), persons only) + * Checks if birth date (first six digits) is valid and calculates check (last two) digits + */ +function frBeCheck(tin) { + // Zero month/day value is acceptable + if (tin.slice(2, 4) !== '00' || tin.slice(4, 6) !== '00') { + // Extract date from first six digits of TIN + var date = "".concat(tin.slice(0, 2), "/").concat(tin.slice(2, 4), "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + } + var checksum = 97 - parseInt(tin.slice(0, 9), 10) % 97; + var checkdigits = parseInt(tin.slice(9, 11), 10); + if (checksum !== checkdigits) { + checksum = 97 - parseInt("2".concat(tin.slice(0, 9)), 10) % 97; + if (checksum !== checkdigits) { + return false; + } + } + return true; +} + +/* + * fr-FR validation function + * (Numéro fiscal de référence (numéro SPI), persons only) + * Verify TIN validity by calculating check (last three) digits + */ +function frFrCheck(tin) { + tin = tin.replace(/\s/g, ''); + var checksum = parseInt(tin.slice(0, 10), 10) % 511; + var checkdigits = parseInt(tin.slice(10, 13), 10); + return checksum === checkdigits; +} + +/* + * fr/lb-LU validation function + * (numéro d’identification personnelle, persons only) + * Verify birth date validity and run Luhn and Verhoeff checks + */ +function frLuCheck(tin) { + // Extract date and check validity + var date = "".concat(tin.slice(0, 4), "/").concat(tin.slice(4, 6), "/").concat(tin.slice(6, 8)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Run Luhn check + if (!algorithms.luhnCheck(tin.slice(0, 12))) { + return false; + } + // Remove Luhn check digit and run Verhoeff check + return algorithms.verhoeffCheck("".concat(tin.slice(0, 11)).concat(tin[12])); +} + +/* + * hr-HR validation function + * (Osobni identifikacijski broj (OIB), persons/entities) + * Verify TIN validity by calling iso7064Check(digits) + */ +function hrHrCheck(tin) { + return algorithms.iso7064Check(tin); +} + +/* + * hu-HU validation function + * (Adóazonosító jel, persons only) + * Verify TIN validity by calculating check (last) digit + */ +function huHuCheck(tin) { + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 8; + for (var i = 1; i < 9; i++) { + checksum += digits[i] * (i + 1); + } + return checksum % 11 === digits[9]; +} + +/* + * lt-LT validation function (should go here if needed) + * (Asmens kodas, persons/entities respectively) + * Current validation check is alias of etEeCheck- same format applies + */ + +/* + * it-IT first/last name validity check + * Accepts it-IT TIN-encoded names as a three-element character array and checks their validity + * Due to lack of clarity between resources ("Are only Italian consonants used? + * What happens if a person has X in their name?" etc.) only two test conditions + * have been implemented: + * Vowels may only be followed by other vowels or an X character + * and X characters after vowels may only be followed by other X characters. + */ +function itItNameCheck(name) { + // true at the first occurrence of a vowel + var vowelflag = false; + + // true at the first occurrence of an X AFTER vowel + // (to properly handle last names with X as consonant) + var xflag = false; + for (var i = 0; i < 3; i++) { + if (!vowelflag && /[AEIOU]/.test(name[i])) { + vowelflag = true; + } else if (!xflag && vowelflag && name[i] === 'X') { + xflag = true; + } else if (i > 0) { + if (vowelflag && !xflag) { + if (!/[AEIOU]/.test(name[i])) { + return false; + } + } + if (xflag) { + if (!/X/.test(name[i])) { + return false; + } + } + } + } + return true; +} + +/* + * it-IT validation function + * (Codice fiscale (TIN-IT), persons only) + * Verify name, birth date and codice catastale validity + * and calculate check character. + * Material not in DG-TAXUD document sourced from: + * `https://en.wikipedia.org/wiki/Italian_fiscal_code` + */ +function itItCheck(tin) { + // Capitalize and split characters into an array for further processing + var chars = tin.toUpperCase().split(''); + + // Check first and last name validity calling itItNameCheck() + if (!itItNameCheck(chars.slice(0, 3))) { + return false; + } + if (!itItNameCheck(chars.slice(3, 6))) { + return false; + } + + // Convert letters in number spaces back to numbers if any + var number_locations = [6, 7, 9, 10, 12, 13, 14]; + var number_replace = { + L: '0', + M: '1', + N: '2', + P: '3', + Q: '4', + R: '5', + S: '6', + T: '7', + U: '8', + V: '9' + }; + for (var _i4 = 0, _number_locations = number_locations; _i4 < _number_locations.length; _i4++) { + var i = _number_locations[_i4]; + if (chars[i] in number_replace) { + chars.splice(i, 1, number_replace[chars[i]]); + } + } + + // Extract month and day, and check date validity + var month_replace = { + A: '01', + B: '02', + C: '03', + D: '04', + E: '05', + H: '06', + L: '07', + M: '08', + P: '09', + R: '10', + S: '11', + T: '12' + }; + var month = month_replace[chars[8]]; + var day = parseInt(chars[9] + chars[10], 10); + if (day > 40) { + day -= 40; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(chars[6]).concat(chars[7], "/").concat(month, "/").concat(day); + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + + // Calculate check character by adding up even and odd characters as numbers + var checksum = 0; + for (var _i5 = 1; _i5 < chars.length - 1; _i5 += 2) { + var char_to_int = parseInt(chars[_i5], 10); + if (isNaN(char_to_int)) { + char_to_int = chars[_i5].charCodeAt(0) - 65; + } + checksum += char_to_int; + } + var odd_convert = { + // Maps of characters at odd places + A: 1, + B: 0, + C: 5, + D: 7, + E: 9, + F: 13, + G: 15, + H: 17, + I: 19, + J: 21, + K: 2, + L: 4, + M: 18, + N: 20, + O: 11, + P: 3, + Q: 6, + R: 8, + S: 12, + T: 14, + U: 16, + V: 10, + W: 22, + X: 25, + Y: 24, + Z: 23, + 0: 1, + 1: 0 + }; + for (var _i6 = 0; _i6 < chars.length - 1; _i6 += 2) { + var _char_to_int = 0; + if (chars[_i6] in odd_convert) { + _char_to_int = odd_convert[chars[_i6]]; + } else { + var multiplier = parseInt(chars[_i6], 10); + _char_to_int = 2 * multiplier + 1; + if (multiplier > 4) { + _char_to_int += 2; + } + } + checksum += _char_to_int; + } + if (String.fromCharCode(65 + checksum % 26) !== chars[15]) { + return false; + } + return true; +} + +/* + * lv-LV validation function + * (Personas kods (PK), persons only) + * Check validity of birth date and calculate check (last) digit + * Support only for old format numbers (not starting with '32', issued before 2017/07/01) + * Material not in DG TAXUD document sourced from: + * `https://boot.ritakafija.lv/forums/index.php?/topic/88314-personas-koda-algoritms-%C4%8Deksumma/` + */ +function lvLvCheck(tin) { + tin = tin.replace(/\W/, ''); + // Extract date from TIN + var day = tin.slice(0, 2); + if (day !== '32') { + // No date/checksum check if new format + var month = tin.slice(2, 4); + if (month !== '00') { + // No date check if unknown month + var full_year = tin.slice(4, 6); + switch (tin[6]) { + case '0': + full_year = "18".concat(full_year); + break; + case '1': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(day); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + } + + // Calculate check digit + var checksum = 1101; + var multip_lookup = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; + for (var i = 0; i < tin.length - 1; i++) { + checksum -= parseInt(tin[i], 10) * multip_lookup[i]; + } + return parseInt(tin[10], 10) === checksum % 11; + } + return true; +} + +/* + * mt-MT validation function + * (Identity Card Number or Unique Taxpayer Reference, persons/entities) + * Verify Identity Card Number structure (no other tests found) + */ +function mtMtCheck(tin) { + if (tin.length !== 9) { + // No tests for UTR + var chars = tin.toUpperCase().split(''); + // Fill with zeros if smaller than proper + while (chars.length < 8) { + chars.unshift(0); + } + // Validate format according to last character + switch (tin[7]) { + case 'A': + case 'P': + if (parseInt(chars[6], 10) === 0) { + return false; + } + break; + default: + { + var first_part = parseInt(chars.join('').slice(0, 5), 10); + if (first_part > 32000) { + return false; + } + var second_part = parseInt(chars.join('').slice(5, 7), 10); + if (first_part === second_part) { + return false; + } + } + } + } + return true; +} + +/* + * nl-NL validation function + * (Burgerservicenummer (BSN) or Rechtspersonen Samenwerkingsverbanden Informatie Nummer (RSIN), + * persons/entities respectively) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function nlNlCheck(tin) { + return algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11 === parseInt(tin[8], 10); +} + +/* + * pl-PL validation function + * (Powszechny Elektroniczny System Ewidencji Ludności (PESEL) + * or Numer identyfikacji podatkowej (NIP), persons/entities) + * Verify TIN validity by validating birth date (PESEL) and calculating check (last) digit + */ +function plPlCheck(tin) { + // NIP + if (tin.length === 10) { + // Calculate last digit by multiplying with lookup + var lookup = [6, 5, 7, 2, 3, 4, 5, 6, 7]; + var _checksum = 0; + for (var i = 0; i < lookup.length; i++) { + _checksum += parseInt(tin[i], 10) * lookup[i]; + } + _checksum %= 11; + if (_checksum === 10) { + return false; + } + return _checksum === parseInt(tin[9], 10); + } + + // PESEL + // Extract full year using month + var full_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 80) { + full_year = "18".concat(full_year); + month -= 80; + } else if (month > 60) { + full_year = "22".concat(full_year); + month -= 60; + } else if (month > 40) { + full_year = "21".concat(full_year); + month -= 40; + } else if (month > 20) { + full_year = "20".concat(full_year); + month -= 20; + } else { + full_year = "19".concat(full_year); + } + // Add leading zero to month if needed + if (month < 10) { + month = "0".concat(month); + } + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate last digit by multiplying with odd one-digit numbers except 5 + var checksum = 0; + var multiplier = 1; + for (var _i7 = 0; _i7 < tin.length - 1; _i7++) { + checksum += parseInt(tin[_i7], 10) * multiplier % 10; + multiplier += 2; + if (multiplier > 10) { + multiplier = 1; + } else if (multiplier === 5) { + multiplier += 2; + } + } + checksum = 10 - checksum % 10; + return checksum === parseInt(tin[10], 10); +} + +/* +* pt-BR validation function +* (Cadastro de Pessoas Físicas (CPF, persons) +* Cadastro Nacional de Pessoas Jurídicas (CNPJ, entities) +* Both inputs will be validated +*/ + +function ptBrCheck(tin) { + if (tin.length === 11) { + var _sum; + var remainder; + _sum = 0; + if ( + // Reject known invalid CPFs + tin === '11111111111' || tin === '22222222222' || tin === '33333333333' || tin === '44444444444' || tin === '55555555555' || tin === '66666666666' || tin === '77777777777' || tin === '88888888888' || tin === '99999999999' || tin === '00000000000') return false; + for (var i = 1; i <= 9; i++) _sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i); + remainder = _sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(9, 10), 10)) return false; + _sum = 0; + for (var _i8 = 1; _i8 <= 10; _i8++) _sum += parseInt(tin.substring(_i8 - 1, _i8), 10) * (12 - _i8); + remainder = _sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(10, 11), 10)) return false; + return true; + } + if ( + // Reject know invalid CNPJs + tin === '00000000000000' || tin === '11111111111111' || tin === '22222222222222' || tin === '33333333333333' || tin === '44444444444444' || tin === '55555555555555' || tin === '66666666666666' || tin === '77777777777777' || tin === '88888888888888' || tin === '99999999999999') { + return false; + } + var length = tin.length - 2; + var identifiers = tin.substring(0, length); + var verificators = tin.substring(length); + var sum = 0; + var pos = length - 7; + for (var _i9 = length; _i9 >= 1; _i9--) { + sum += identifiers.charAt(length - _i9) * pos; + pos -= 1; + if (pos < 2) { + pos = 9; + } + } + var result = sum % 11 < 2 ? 0 : 11 - sum % 11; + if (result !== parseInt(verificators.charAt(0), 10)) { + return false; + } + length += 1; + identifiers = tin.substring(0, length); + sum = 0; + pos = length - 7; + for (var _i0 = length; _i0 >= 1; _i0--) { + sum += identifiers.charAt(length - _i0) * pos; + pos -= 1; + if (pos < 2) { + pos = 9; + } + } + result = sum % 11 < 2 ? 0 : 11 - sum % 11; + if (result !== parseInt(verificators.charAt(1), 10)) { + return false; + } + return true; +} + +/* + * pt-PT validation function + * (Número de identificação fiscal (NIF), persons/entities) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function ptPtCheck(tin) { + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); +} + +/* + * ro-RO validation function + * (Cod Numeric Personal (CNP) or Cod de înregistrare fiscală (CIF), + * persons only) + * Verify CNP validity by calculating check (last) digit (test not found for CIF) + * Material not in DG TAXUD document sourced from: + * `https://en.wikipedia.org/wiki/National_identification_number#Romania` + */ +function roRoCheck(tin) { + if (tin.slice(0, 4) !== '9000') { + // No test found for this format + // Extract full year using century digit if possible + var full_year = tin.slice(1, 3); + switch (tin[0]) { + case '1': + case '2': + full_year = "19".concat(full_year); + break; + case '3': + case '4': + full_year = "18".concat(full_year); + break; + case '5': + case '6': + full_year = "20".concat(full_year); + break; + default: + } + + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (date.length === 8) { + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + } else if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate check digit + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + if (checksum % 11 === 10) { + return digits[12] === 1; + } + return digits[12] === checksum % 11; + } + return true; +} + +/* + * sk-SK validation function + * (Rodné číslo (RČ) or bezvýznamové identifikačné číslo (BIČ), persons only) + * Checks validity of pre-1954 birth numbers (rodné číslo) only + * Due to the introduction of the pseudo-random BIČ it is not possible to test + * post-1954 birth numbers without knowing whether they are BIČ or RČ beforehand + */ +function skSkCheck(tin) { + if (tin.length === 9) { + tin = tin.replace(/\W/, ''); + if (tin.slice(6) === '000') { + return false; + } // Three-zero serial not assigned before 1954 + + // Extract full year from TIN length + var full_year = parseInt(tin.slice(0, 2), 10); + if (full_year > 53) { + return false; + } + if (full_year < 10) { + full_year = "190".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + + // Extract month from TIN and normalize + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month < 10) { + month = "0".concat(month); + } + + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + } + return true; +} + +/* + * sl-SI validation function + * (Davčna številka, persons/entities) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function slSiCheck(tin) { + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) { + return parseInt(a, 10); + }), 8) % 11; + if (checksum === 10) { + return parseInt(tin[7], 10) === 0; + } + return checksum === parseInt(tin[7], 10); +} + +/* + * sv-SE validation function + * (Personnummer or samordningsnummer, persons only) + * Checks validity of birth date and calls luhnCheck() to validate check (last) digit + */ +function svSeCheck(tin) { + // Make copy of TIN and normalize to two-digit year form + var tin_copy = tin.slice(0); + if (tin.length > 11) { + tin_copy = tin_copy.slice(2); + } + + // Extract date of birth + var full_year = ''; + var month = tin_copy.slice(2, 4); + var day = parseInt(tin_copy.slice(4, 6), 10); + if (tin.length > 11) { + full_year = tin.slice(0, 4); + } else { + full_year = tin.slice(0, 2); + if (tin.length === 11 && day < 60) { + // Extract full year from centenarian symbol + // Should work just fine until year 10000 or so + var current_year = new Date().getFullYear().toString(); + var current_century = parseInt(current_year.slice(0, 2), 10); + current_year = parseInt(current_year, 10); + if (tin[6] === '-') { + if (parseInt("".concat(current_century).concat(full_year), 10) > current_year) { + full_year = "".concat(current_century - 1).concat(full_year); + } else { + full_year = "".concat(current_century).concat(full_year); + } + } else { + full_year = "".concat(current_century - 1).concat(full_year); + if (current_year - parseInt(full_year, 10) < 100) { + return false; + } + } + } + } + + // Normalize day and check date validity + if (day > 60) { + day -= 60; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(full_year, "/").concat(month, "/").concat(day); + if (date.length === 8) { + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + } else if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + return algorithms.luhnCheck(tin.replace(/\W/, '')); +} + +/** + * uk-UA validation function + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function ukUaCheck(tin) { + // Calculate check digit + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11; +} + +// Locale lookup objects + +/* + * Tax id regex formats for various locales + * + * Where not explicitly specified in DG-TAXUD document both + * uppercase and lowercase letters are acceptable. + */ +var taxIdFormat = { + 'bg-BG': /^\d{10}$/, + 'cs-CZ': /^\d{6}\/{0,1}\d{3,4}$/, + 'de-AT': /^\d{9}$/, + 'de-DE': /^[1-9]\d{10}$/, + 'dk-DK': /^\d{6}-{0,1}\d{4}$/, + 'el-CY': /^[09]\d{7}[A-Z]$/, + 'el-GR': /^([0-4]|[7-9])\d{8}$/, + 'en-CA': /^\d{9}$/, + 'en-GB': /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i, + 'en-IE': /^\d{7}[A-W][A-IW]{0,1}$/i, + 'en-US': /^\d{2}[- ]{0,1}\d{7}$/, + 'es-AR': /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/, + 'es-ES': /^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i, + 'et-EE': /^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/, + 'fi-FI': /^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i, + 'fr-BE': /^\d{11}$/, + 'fr-FR': /^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/, + // Conforms both to official spec and provided example + 'fr-LU': /^\d{13}$/, + 'hr-HR': /^\d{11}$/, + 'hu-HU': /^8\d{9}$/, + 'it-IT': /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i, + 'lv-LV': /^\d{6}-{0,1}\d{5}$/, + // Conforms both to DG TAXUD spec and original research + 'mt-MT': /^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i, + 'nl-NL': /^\d{9}$/, + 'pl-PL': /^\d{10,11}$/, + 'pt-BR': /(?:^\d{11}$)|(?:^\d{14}$)/, + 'pt-PT': /^\d{9}$/, + 'ro-RO': /^\d{13}$/, + 'sk-SK': /^\d{6}\/{0,1}\d{3,4}$/, + 'sl-SI': /^[1-9]\d{7}$/, + 'sv-SE': /^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/, + 'uk-UA': /^\d{10}$/ +}; +// taxIdFormat locale aliases +taxIdFormat['lb-LU'] = taxIdFormat['fr-LU']; +taxIdFormat['lt-LT'] = taxIdFormat['et-EE']; +taxIdFormat['nl-BE'] = taxIdFormat['fr-BE']; +taxIdFormat['fr-CA'] = taxIdFormat['en-CA']; + +// Algorithmic tax id check functions for various locales +var taxIdCheck = { + 'bg-BG': bgBgCheck, + 'cs-CZ': csCzCheck, + 'de-AT': deAtCheck, + 'de-DE': deDeCheck, + 'dk-DK': dkDkCheck, + 'el-CY': elCyCheck, + 'el-GR': elGrCheck, + 'en-CA': isCanadianSIN, + 'en-IE': enIeCheck, + 'en-US': enUsCheck, + 'es-AR': esArCheck, + 'es-ES': esEsCheck, + 'et-EE': etEeCheck, + 'fi-FI': fiFiCheck, + 'fr-BE': frBeCheck, + 'fr-FR': frFrCheck, + 'fr-LU': frLuCheck, + 'hr-HR': hrHrCheck, + 'hu-HU': huHuCheck, + 'it-IT': itItCheck, + 'lv-LV': lvLvCheck, + 'mt-MT': mtMtCheck, + 'nl-NL': nlNlCheck, + 'pl-PL': plPlCheck, + 'pt-BR': ptBrCheck, + 'pt-PT': ptPtCheck, + 'ro-RO': roRoCheck, + 'sk-SK': skSkCheck, + 'sl-SI': slSiCheck, + 'sv-SE': svSeCheck, + 'uk-UA': ukUaCheck +}; +// taxIdCheck locale aliases +taxIdCheck['lb-LU'] = taxIdCheck['fr-LU']; +taxIdCheck['lt-LT'] = taxIdCheck['et-EE']; +taxIdCheck['nl-BE'] = taxIdCheck['fr-BE']; +taxIdCheck['fr-CA'] = taxIdCheck['en-CA']; + +// Regexes for locales where characters should be omitted before checking format +var allsymbols = /[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g; +var sanitizeRegexes = { + 'de-AT': allsymbols, + 'de-DE': /[\/\\]/g, + 'fr-BE': allsymbols +}; +// sanitizeRegexes locale aliases +sanitizeRegexes['nl-BE'] = sanitizeRegexes['fr-BE']; + +/* + * Validator function + * Return true if the passed string is a valid tax identification number + * for the specified locale. + * Throw an error exception if the locale is not supported. + */ +export default function isTaxID(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + assertString(str); + // Copy TIN to avoid replacement if sanitized + var strcopy = str.slice(0); + if (locale in taxIdFormat) { + if (locale in sanitizeRegexes) { + strcopy = strcopy.replace(sanitizeRegexes[locale], ''); + } + if (!taxIdFormat[locale].test(strcopy)) { + return false; + } + if (locale in taxIdCheck) { + return taxIdCheck[locale](strcopy); + } + // Fallthrough; not all locales have algorithmic checks + return true; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isTime.js b/src/hello/server/node_modules/validator/es/lib/isTime.js new file mode 100644 index 00000000..52252d91 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isTime.js @@ -0,0 +1,22 @@ +import merge from './util/merge'; +var default_time_options = { + hourFormat: 'hour24', + mode: 'default' +}; +var formats = { + hour24: { + "default": /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/, + withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/, + withOptionalSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/ + }, + hour12: { + "default": /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/, + withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/, + withOptionalSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/ + } +}; +export default function isTime(input, options) { + options = merge(options, default_time_options); + if (typeof input !== 'string') return false; + return formats[options.hourFormat][options.mode].test(input); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isULID.js b/src/hello/server/node_modules/validator/es/lib/isULID.js new file mode 100644 index 00000000..a661d10a --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isULID.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function isULID(str) { + assertString(str); + return /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isURL.js b/src/hello/server/node_modules/validator/es/lib/isURL.js new file mode 100644 index 00000000..c9f447cc --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isURL.js @@ -0,0 +1,241 @@ +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +import assertString from './util/assertString'; +import checkHost from './util/checkHost'; +import includes from './util/includesString'; +import isFQDN from './isFQDN'; +import isIP from './isIP'; +import merge from './util/merge'; + +/* +options for isURL method + +protocols - valid protocols can be modified with this option. +require_tld - If set to false isURL will not check if the URL's host includes a top-level domain. +require_protocol - if set to true isURL will return false if protocol is not present in the URL. +require_host - if set to false isURL will not check if host is present in the URL. +require_port - if set to true isURL will check if port is present in the URL. +require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option. +allow_underscores - if set to true, the validator will allow underscores in the URL. +host_whitelist - if set to an array of strings or regexp, and the domain matches none of the strings + defined in it, the validation fails. +host_blacklist - if set to an array of strings or regexp, and the domain matches any of the strings + defined in it, the validation fails. +allow_trailing_dot - if set to true, the validator will allow the domain to end with + a `.` character. +allow_protocol_relative_urls - if set to true protocol relative URLs will be allowed. +allow_fragments - if set to false isURL will return false if fragments are present. +allow_query_components - if set to false isURL will return false if query components are present. +disallow_auth - if set to true, the validator will fail if the URL contains an authentication + component, e.g. `http://username:password@example.com` +validate_length - if set to false isURL will skip string length validation. `max_allowed_length` + will be ignored if this is set as `false`. +max_allowed_length - if set, isURL will not allow URLs longer than the specified value (default is + 2084 that IE maximum URL length). + +*/ + +var default_url_options = { + protocols: ['http', 'https', 'ftp'], + require_tld: true, + require_protocol: false, + require_host: true, + require_port: false, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false, + allow_fragments: true, + allow_query_components: true, + validate_length: true, + max_allowed_length: 2084 +}; +var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; +export default function isURL(url, options) { + assertString(url); + if (!url || /[\s<>]/.test(url)) { + return false; + } + if (url.indexOf('mailto:') === 0) { + return false; + } + options = merge(options, default_url_options); + if (options.validate_length && url.length > options.max_allowed_length) { + return false; + } + if (!options.allow_fragments && includes(url, '#')) { + return false; + } + if (!options.allow_query_components && (includes(url, '?') || includes(url, '&'))) { + return false; + } + var protocol, auth, host, hostname, port, port_str, split, ipv6; + split = url.split('#'); + url = split.shift(); + split = url.split('?'); + url = split.shift(); + + // Replaced the 'split("://")' logic with a regex to match the protocol. + // This correctly identifies schemes like `javascript:` which don't use `//`. + // However, we need to be careful not to confuse authentication credentials (user:password@host) + // with protocols. A colon before an @ symbol might be part of auth, not a protocol separator. + var protocol_match = url.match(/^([a-z][a-z0-9+\-.]*):/i); + var had_explicit_protocol = false; + var cleanUpProtocol = function cleanUpProtocol(potential_protocol) { + had_explicit_protocol = true; + protocol = potential_protocol.toLowerCase(); + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + // The identified protocol is not in the allowed list. + return false; + } + + // Remove the protocol from the URL string. + return url.substring(protocol_match[0].length); + }; + if (protocol_match) { + var potential_protocol = protocol_match[1]; + var after_colon = url.substring(protocol_match[0].length); + + // Check if what follows looks like authentication credentials (user:password@host) + // rather than a protocol. This happens when: + // 1. There's no `//` after the colon (protocols like `http://` have this) + // 2. There's an `@` symbol before any `/` + // 3. The part before `@` contains only valid auth characters (alphanumeric, -, _, ., %, :) + var starts_with_slashes = after_colon.slice(0, 2) === '//'; + if (!starts_with_slashes) { + var first_slash_position = after_colon.indexOf('/'); + var before_slash = first_slash_position === -1 ? after_colon : after_colon.substring(0, first_slash_position); + var at_position = before_slash.indexOf('@'); + if (at_position !== -1) { + var before_at = before_slash.substring(0, at_position); + var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/; + var is_valid_auth = valid_auth_regex.test(before_at); + + // Check if this contains URL-encoded content that could be malicious + // For example: javascript:%61%6c%65%72%74%28%31%29@example.com + // The encoded part decodes to: alert(1) + var has_encoded_content = /%[0-9a-fA-F]{2}/.test(before_at); + if (is_valid_auth && !has_encoded_content) { + // This looks like authentication (e.g., user:password@host), not a protocol + if (options.require_protocol) { + return false; + } + + // Don't consume the colon; let the auth parsing handle it later + } else { + // This looks like a malicious protocol (e.g., javascript:alert();@host) + // or URL-encoded protocol handler (e.g., javascript:%61%6c%65%72%74%28%31%29@host) + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else { + // No @ symbol found. Check if this could be a port number instead of a protocol. + // If what's after the colon is numeric (or starts with a digit and contains only + // valid port characters until a path separator), it's likely hostname:port, not a protocol. + var looks_like_port = /^[0-9]/.test(after_colon); + if (looks_like_port) { + // This looks like hostname:port, not a protocol + if (options.require_protocol) { + return false; + } + // Don't consume anything; let it be parsed as hostname:port + } else { + // This is definitely a protocol + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } + } else { + // Starts with '//', this is definitely a protocol like http:// + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else if (options.require_protocol) { + return false; + } + + // Handle leading '//' only as protocol-relative when there was NO explicit protocol. + // If there was an explicit protocol, '//' is the normal separator + // and should be stripped unconditionally. + if (url.slice(0, 2) === '//') { + if (!had_explicit_protocol && !options.allow_protocol_relative_urls) { + return false; + } + url = url.slice(2); + } + if (url === '') { + return false; + } + split = url.split('/'); + url = split.shift(); + if (url === '' && !options.require_host) { + return true; + } + split = url.split('@'); + if (split.length > 1) { + if (options.disallow_auth) { + return false; + } + if (split[0] === '') { + return false; + } + auth = split.shift(); + if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { + return false; + } + var _auth$split = auth.split(':'), + _auth$split2 = _slicedToArray(_auth$split, 2), + user = _auth$split2[0], + password = _auth$split2[1]; + if (user === '' && password === '') { + return false; + } + } + hostname = split.join('@'); + port_str = null; + ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + if (ipv6_match) { + host = ''; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(':'); + host = split.shift(); + if (split.length) { + port_str = split.join(':'); + } + } + if (port_str !== null && port_str.length > 0) { + port = parseInt(port_str, 10); + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } else if (options.require_port) { + return false; + } + if (options.host_whitelist) { + return checkHost(host, options.host_whitelist); + } + if (host === '' && !options.require_host) { + return true; + } + if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) { + return false; + } + host = host || ipv6; + if (options.host_blacklist && checkHost(host, options.host_blacklist)) { + return false; + } + return true; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isUUID.js b/src/hello/server/node_modules/validator/es/lib/isUUID.js new file mode 100644 index 00000000..3b56aae9 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isUUID.js @@ -0,0 +1,23 @@ +import assertString from './util/assertString'; +var uuid = { + 1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 6: /^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 8: /^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + nil: /^00000000-0000-0000-0000-000000000000$/i, + max: /^ffffffff-ffff-ffff-ffff-ffffffffffff$/i, + loose: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + // From https://github.com/uuidjs/uuid/blob/main/src/regex.js + all: /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i +}; +export default function isUUID(str, version) { + assertString(str); + if (version === undefined || version === null) { + version = 'all'; + } + return version in uuid ? uuid[version].test(str) : false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isUppercase.js b/src/hello/server/node_modules/validator/es/lib/isUppercase.js new file mode 100644 index 00000000..fca87907 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isUppercase.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function isUppercase(str) { + assertString(str); + return str === str.toUpperCase(); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isVAT.js b/src/hello/server/node_modules/validator/es/lib/isVAT.js new file mode 100644 index 00000000..82d8c3dc --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isVAT.js @@ -0,0 +1,264 @@ +import assertString from './util/assertString'; +import * as algorithms from './util/algorithms'; +var AU = function AU(str) { + var match = str.match(/^(AU)?(\d{11})$/); + if (!match) { + return false; + } + // @see {@link https://abr.business.gov.au/Help/AbnFormat} + var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]; + str = str.replace(/^AU/, ''); + var ABN = (parseInt(str.slice(0, 1), 10) - 1).toString() + str.slice(1); + var total = 0; + for (var i = 0; i < 11; i++) { + total += weights[i] * ABN.charAt(i); + } + return total !== 0 && total % 89 === 0; +}; +var CH = function CH(str) { + // @see {@link https://www.ech.ch/de/ech/ech-0097/5.2.0} + var hasValidCheckNumber = function hasValidCheckNumber(digits) { + var lastDigit = digits.pop(); // used as check number + var weights = [5, 4, 3, 2, 7, 6, 5, 4]; + var calculatedCheckNumber = (11 - digits.reduce(function (acc, el, idx) { + return acc + el * weights[idx]; + }, 0) % 11) % 11; + return lastDigit === calculatedCheckNumber; + }; + + // @see {@link https://www.estv.admin.ch/estv/de/home/mehrwertsteuer/uid/mwst-uid-nummer.html} + return /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber(str.match(/\d/g).map(function (el) { + return +el; + })); +}; +var PT = function PT(str) { + var match = str.match(/^(PT)?(\d{9})$/); + if (!match) { + return false; + } + var tin = match[2]; + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); +}; +export var vatMatchers = { + /** + * European Union VAT identification numbers + */ + AT: function AT(str) { + return /^(AT)?U\d{8}$/.test(str); + }, + BE: function BE(str) { + return /^(BE)?\d{10}$/.test(str); + }, + BG: function BG(str) { + return /^(BG)?\d{9,10}$/.test(str); + }, + HR: function HR(str) { + return /^(HR)?\d{11}$/.test(str); + }, + CY: function CY(str) { + return /^(CY)?\w{9}$/.test(str); + }, + CZ: function CZ(str) { + return /^(CZ)?\d{8,10}$/.test(str); + }, + DK: function DK(str) { + return /^(DK)?\d{8}$/.test(str); + }, + EE: function EE(str) { + return /^(EE)?\d{9}$/.test(str); + }, + FI: function FI(str) { + return /^(FI)?\d{8}$/.test(str); + }, + FR: function FR(str) { + return /^(FR)([A-Z0-9]{2}\d{9})$/.test(str); + }, + DE: function DE(str) { + return /^(DE)?\d{9}$/.test(str); + }, + EL: function EL(str) { + return /^(EL)?\d{9}$/.test(str); + }, + HU: function HU(str) { + return /^(HU)?\d{8}$/.test(str); + }, + IE: function IE(str) { + return /^(IE)?\d{7}\w{1}(W)?$/.test(str); + }, + IT: function IT(str) { + return /^(IT)?\d{11}$/.test(str); + }, + LV: function LV(str) { + return /^(LV)?\d{11}$/.test(str); + }, + LT: function LT(str) { + return /^(LT)?\d{9,12}$/.test(str); + }, + LU: function LU(str) { + return /^(LU)?\d{8}$/.test(str); + }, + MT: function MT(str) { + return /^(MT)?\d{8}$/.test(str); + }, + NL: function NL(str) { + return /^(NL)?\d{9}B\d{2}$/.test(str); + }, + PL: function PL(str) { + return /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(str); + }, + PT: PT, + RO: function RO(str) { + return /^(RO)?\d{2,10}$/.test(str); + }, + SK: function SK(str) { + return /^(SK)?\d{10}$/.test(str); + }, + SI: function SI(str) { + return /^(SI)?\d{8}$/.test(str); + }, + ES: function ES(str) { + return /^(ES)?\w\d{7}[A-Z]$/.test(str); + }, + SE: function SE(str) { + return /^(SE)?\d{12}$/.test(str); + }, + /** + * VAT numbers of non-EU countries + */ + AL: function AL(str) { + return /^(AL)?\w{9}[A-Z]$/.test(str); + }, + MK: function MK(str) { + return /^(MK)?\d{13}$/.test(str); + }, + AU: AU, + BY: function BY(str) { + return /^(УНП )?\d{9}$/.test(str); + }, + CA: function CA(str) { + return /^(CA)?\d{9}$/.test(str); + }, + IS: function IS(str) { + return /^(IS)?\d{5,6}$/.test(str); + }, + IN: function IN(str) { + return /^(IN)?\d{15}$/.test(str); + }, + ID: function ID(str) { + return /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str); + }, + IL: function IL(str) { + return /^(IL)?\d{9}$/.test(str); + }, + KZ: function KZ(str) { + return /^(KZ)?\d{12}$/.test(str); + }, + NZ: function NZ(str) { + return /^(NZ)?\d{9}$/.test(str); + }, + NG: function NG(str) { + return /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str); + }, + NO: function NO(str) { + return /^(NO)?\d{9}MVA$/.test(str); + }, + PH: function PH(str) { + return /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(str); + }, + RU: function RU(str) { + return /^(RU)?(\d{10}|\d{12})$/.test(str); + }, + SM: function SM(str) { + return /^(SM)?\d{5}$/.test(str); + }, + SA: function SA(str) { + return /^(SA)?\d{15}$/.test(str); + }, + RS: function RS(str) { + return /^(RS)?\d{9}$/.test(str); + }, + CH: CH, + TR: function TR(str) { + return /^(TR)?\d{10}$/.test(str); + }, + UA: function UA(str) { + return /^(UA)?\d{12}$/.test(str); + }, + GB: function GB(str) { + return /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str); + }, + UZ: function UZ(str) { + return /^(UZ)?\d{9}$/.test(str); + }, + /** + * VAT numbers of Latin American countries + */ + AR: function AR(str) { + return /^(AR)?\d{11}$/.test(str); + }, + BO: function BO(str) { + return /^(BO)?\d{7}$/.test(str); + }, + BR: function BR(str) { + return /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(str); + }, + CL: function CL(str) { + return /^(CL)?\d{8}-\d{1}$/.test(str); + }, + CO: function CO(str) { + return /^(CO)?\d{10}$/.test(str); + }, + CR: function CR(str) { + return /^(CR)?\d{9,12}$/.test(str); + }, + EC: function EC(str) { + return /^(EC)?\d{13}$/.test(str); + }, + SV: function SV(str) { + return /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(str); + }, + GT: function GT(str) { + return /^(GT)?\d{7}-\d{1}$/.test(str); + }, + HN: function HN(str) { + return /^(HN)?$/.test(str); + }, + MX: function MX(str) { + return /^(MX)?\w{3,4}\d{6}\w{3}$/.test(str); + }, + NI: function NI(str) { + return /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(str); + }, + PA: function PA(str) { + return /^(PA)?$/.test(str); + }, + PY: function PY(str) { + return /^(PY)?\d{6,8}-\d{1}$/.test(str); + }, + PE: function PE(str) { + return /^(PE)?\d{11}$/.test(str); + }, + DO: function DO(str) { + return /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(str); + }, + UY: function UY(str) { + return /^(UY)?\d{12}$/.test(str); + }, + VE: function VE(str) { + return /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(str); + } +}; +export default function isVAT(str, countryCode) { + assertString(str); + assertString(countryCode); + if (countryCode in vatMatchers) { + return vatMatchers[countryCode](str); + } + throw new Error("Invalid country code: '".concat(countryCode, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isVariableWidth.js b/src/hello/server/node_modules/validator/es/lib/isVariableWidth.js new file mode 100644 index 00000000..890119ea --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isVariableWidth.js @@ -0,0 +1,7 @@ +import assertString from './util/assertString'; +import { fullWidth } from './isFullWidth'; +import { halfWidth } from './isHalfWidth'; +export default function isVariableWidth(str) { + assertString(str); + return fullWidth.test(str) && halfWidth.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/isWhitelisted.js b/src/hello/server/node_modules/validator/es/lib/isWhitelisted.js new file mode 100644 index 00000000..55958051 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/isWhitelisted.js @@ -0,0 +1,10 @@ +import assertString from './util/assertString'; +export default function isWhitelisted(str, chars) { + assertString(str); + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + return true; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/ltrim.js b/src/hello/server/node_modules/validator/es/lib/ltrim.js new file mode 100644 index 00000000..6a650624 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/ltrim.js @@ -0,0 +1,7 @@ +import assertString from './util/assertString'; +export default function ltrim(str, chars) { + assertString(str); + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping + var pattern = chars ? new RegExp("^[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+"), 'g') : /^\s+/g; + return str.replace(pattern, ''); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/matches.js b/src/hello/server/node_modules/validator/es/lib/matches.js new file mode 100644 index 00000000..2a33f002 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/matches.js @@ -0,0 +1,8 @@ +import assertString from './util/assertString'; +export default function matches(str, pattern, modifiers) { + assertString(str); + if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { + pattern = new RegExp(pattern, modifiers); + } + return !!str.match(pattern); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/normalizeEmail.js b/src/hello/server/node_modules/validator/es/lib/normalizeEmail.js new file mode 100644 index 00000000..d6edccbc --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/normalizeEmail.js @@ -0,0 +1,131 @@ +import merge from './util/merge'; +var default_normalize_email_options = { + // The following options apply to all email addresses + // Lowercases the local part of the email address. + // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). + // The domain is always lowercased, as per RFC 1035 + all_lowercase: true, + // The following conversions are specific to GMail + // Lowercases the local part of the GMail address (known to be case-insensitive) + gmail_lowercase: true, + // Removes dots from the local part of the email address, as that's ignored by GMail + gmail_remove_dots: true, + // Removes the subaddress (e.g. "+foo") from the email address + gmail_remove_subaddress: true, + // Conversts the googlemail.com domain to gmail.com + gmail_convert_googlemaildotcom: true, + // The following conversions are specific to Outlook.com / Windows Live / Hotmail + // Lowercases the local part of the Outlook.com address (known to be case-insensitive) + outlookdotcom_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + outlookdotcom_remove_subaddress: true, + // The following conversions are specific to Yahoo + // Lowercases the local part of the Yahoo address (known to be case-insensitive) + yahoo_lowercase: true, + // Removes the subaddress (e.g. "-foo") from the email address + yahoo_remove_subaddress: true, + // The following conversions are specific to Yandex + // Lowercases the local part of the Yandex address (known to be case-insensitive) + yandex_lowercase: true, + // all yandex domains are equal, this explicitly sets the domain to 'yandex.ru' + yandex_convert_yandexru: true, + // The following conversions are specific to iCloud + // Lowercases the local part of the iCloud address (known to be case-insensitive) + icloud_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + icloud_remove_subaddress: true +}; + +// List of domains used by iCloud +var icloud_domains = ['icloud.com', 'me.com']; + +// List of domains used by Outlook.com and its predecessors +// This list is likely incomplete. +// Partial reference: +// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/ +var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com']; + +// List of domains used by Yahoo Mail +// This list is likely incomplete +var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com']; + +// List of domains used by yandex.ru +var yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru']; + +// replace single dots, but not multiple consecutive dots +function dotsReplacer(match) { + if (match.length > 1) { + return match; + } + return ''; +} +export default function normalizeEmail(email, options) { + options = merge(options, default_normalize_email_options); + var raw_parts = email.split('@'); + var domain = raw_parts.pop(); + var user = raw_parts.join('@'); + var parts = [user, domain]; + + // The domain is always lowercased, as it's case-insensitive per RFC 1035 + parts[1] = parts[1].toLowerCase(); + if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { + // Address is GMail + if (options.gmail_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (options.gmail_remove_dots) { + // this does not replace consecutive dots like example..email@gmail.com + parts[0] = parts[0].replace(/\.+/g, dotsReplacer); + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.gmail_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1]; + } else if (icloud_domains.indexOf(parts[1]) >= 0) { + // Address is iCloud + if (options.icloud_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.icloud_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) { + // Address is Outlook.com + if (options.outlookdotcom_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.outlookdotcom_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yahoo_domains.indexOf(parts[1]) >= 0) { + // Address is Yahoo + if (options.yahoo_remove_subaddress) { + var components = parts[0].split('-'); + parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.yahoo_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yandex_domains.indexOf(parts[1]) >= 0) { + if (options.all_lowercase || options.yandex_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.yandex_convert_yandexru ? 'yandex.ru' : parts[1]; + } else if (options.all_lowercase) { + // Any other address + parts[0] = parts[0].toLowerCase(); + } + return parts.join('@'); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/rtrim.js b/src/hello/server/node_modules/validator/es/lib/rtrim.js new file mode 100644 index 00000000..0ad784b2 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/rtrim.js @@ -0,0 +1,15 @@ +import assertString from './util/assertString'; +export default function rtrim(str, chars) { + assertString(str); + if (chars) { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping + var pattern = new RegExp("[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+$"), 'g'); + return str.replace(pattern, ''); + } + // Use a faster and more safe than regex trim method https://blog.stevenlevithan.com/archives/faster-trim-javascript + var strIndex = str.length - 1; + while (/\s/.test(str.charAt(strIndex))) { + strIndex -= 1; + } + return str.slice(0, strIndex + 1); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/stripLow.js b/src/hello/server/node_modules/validator/es/lib/stripLow.js new file mode 100644 index 00000000..c7984255 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/stripLow.js @@ -0,0 +1,7 @@ +import assertString from './util/assertString'; +import blacklist from './blacklist'; +export default function stripLow(str, keep_new_lines) { + assertString(str); + var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; + return blacklist(str, chars); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/toBoolean.js b/src/hello/server/node_modules/validator/es/lib/toBoolean.js new file mode 100644 index 00000000..f5db984c --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/toBoolean.js @@ -0,0 +1,8 @@ +import assertString from './util/assertString'; +export default function toBoolean(str, strict) { + assertString(str); + if (strict) { + return str === '1' || /^true$/i.test(str); + } + return str !== '0' && !/^false$/i.test(str) && str !== ''; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/toDate.js b/src/hello/server/node_modules/validator/es/lib/toDate.js new file mode 100644 index 00000000..62422a31 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/toDate.js @@ -0,0 +1,6 @@ +import assertString from './util/assertString'; +export default function toDate(date) { + assertString(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/toFloat.js b/src/hello/server/node_modules/validator/es/lib/toFloat.js new file mode 100644 index 00000000..f21163df --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/toFloat.js @@ -0,0 +1,5 @@ +import isFloat from './isFloat'; +export default function toFloat(str) { + if (!isFloat(str)) return NaN; + return parseFloat(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/toInt.js b/src/hello/server/node_modules/validator/es/lib/toInt.js new file mode 100644 index 00000000..22d566e7 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/toInt.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function toInt(str, radix) { + assertString(str); + return parseInt(str, radix || 10); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/trim.js b/src/hello/server/node_modules/validator/es/lib/trim.js new file mode 100644 index 00000000..b9b8fa0d --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/trim.js @@ -0,0 +1,5 @@ +import rtrim from './rtrim'; +import ltrim from './ltrim'; +export default function trim(str, chars) { + return rtrim(ltrim(str, chars), chars); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/unescape.js b/src/hello/server/node_modules/validator/es/lib/unescape.js new file mode 100644 index 00000000..4516acb4 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/unescape.js @@ -0,0 +1,8 @@ +import assertString from './util/assertString'; +export default function unescape(str) { + assertString(str); + return str.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\').replace(/`/g, '`').replace(/&/g, '&'); + // & replacement has to be the last one to prevent + // bugs with intermediate strings containing escape sequences + // See: https://github.com/validatorjs/validator.js/issues/1827 +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/algorithms.js b/src/hello/server/node_modules/validator/es/lib/util/algorithms.js new file mode 100644 index 00000000..0213865d --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/algorithms.js @@ -0,0 +1,79 @@ +/** + * Algorithmic validation functions + * May be used as is or implemented in the workflow of other validators. + */ + +/* + * ISO 7064 validation function + * Called with a string of numbers (incl. check digit) + * to validate according to ISO 7064 (MOD 11, 10). + */ +export function iso7064Check(str) { + var checkvalue = 10; + for (var i = 0; i < str.length - 1; i++) { + checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? 10 * 2 % 11 : (parseInt(str[i], 10) + checkvalue) % 10 * 2 % 11; + } + checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue; + return checkvalue === parseInt(str[10], 10); +} + +/* + * Luhn (mod 10) validation function + * Called with a string of numbers (incl. check digit) + * to validate according to the Luhn algorithm. + */ +export function luhnCheck(str) { + var checksum = 0; + var second = false; + for (var i = str.length - 1; i >= 0; i--) { + if (second) { + var product = parseInt(str[i], 10) * 2; + if (product > 9) { + // sum digits of product and add to checksum + checksum += product.toString().split('').map(function (a) { + return parseInt(a, 10); + }).reduce(function (a, b) { + return a + b; + }, 0); + } else { + checksum += product; + } + } else { + checksum += parseInt(str[i], 10); + } + second = !second; + } + return checksum % 10 === 0; +} + +/* + * Reverse TIN multiplication and summation helper function + * Called with an array of single-digit integers and a base multiplier + * to calculate the sum of the digits multiplied in reverse. + * Normally used in variations of MOD 11 algorithmic checks. + */ +export function reverseMultiplyAndSum(digits, base) { + var total = 0; + for (var i = 0; i < digits.length; i++) { + total += digits[i] * (base - i); + } + return total; +} + +/* + * Verhoeff validation helper function + * Called with a string of numbers + * to validate according to the Verhoeff algorithm. + */ +export function verhoeffCheck(str) { + var d_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + var p_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + + // Copy (to prevent replacement) and reverse + var str_copy = str.split('').reverse().join(''); + var checksum = 0; + for (var i = 0; i < str_copy.length; i++) { + checksum = d_table[checksum][p_table[i % 8][parseInt(str_copy[i], 10)]]; + } + return checksum === 0; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/assertString.js b/src/hello/server/node_modules/validator/es/lib/util/assertString.js new file mode 100644 index 00000000..4adaf643 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/assertString.js @@ -0,0 +1,4 @@ +export default function assertString(input) { + if (input === undefined || input === null) throw new TypeError("Expected a string but received a ".concat(input)); + if (input.constructor.name !== 'String') throw new TypeError("Expected a string but received a ".concat(input.constructor.name)); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/checkHost.js b/src/hello/server/node_modules/validator/es/lib/util/checkHost.js new file mode 100644 index 00000000..7f906a9b --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/checkHost.js @@ -0,0 +1,12 @@ +function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +} +export default function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + return false; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/includesArray.js b/src/hello/server/node_modules/validator/es/lib/util/includesArray.js new file mode 100644 index 00000000..d85d3ade --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/includesArray.js @@ -0,0 +1,6 @@ +var includes = function includes(arr, val) { + return arr.some(function (arrVal) { + return val === arrVal; + }); +}; +export default includes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/includesString.js b/src/hello/server/node_modules/validator/es/lib/util/includesString.js new file mode 100644 index 00000000..014d0b0a --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/includesString.js @@ -0,0 +1,4 @@ +var includes = function includes(str, val) { + return str.indexOf(val) !== -1; +}; +export default includes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/merge.js b/src/hello/server/node_modules/validator/es/lib/util/merge.js new file mode 100644 index 00000000..cc7520c1 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/merge.js @@ -0,0 +1,10 @@ +export default function merge() { + var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var defaults = arguments.length > 1 ? arguments[1] : undefined; + for (var key in defaults) { + if (typeof obj[key] === 'undefined') { + obj[key] = defaults[key]; + } + } + return obj; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/multilineRegex.js b/src/hello/server/node_modules/validator/es/lib/util/multilineRegex.js new file mode 100644 index 00000000..fed25a37 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/multilineRegex.js @@ -0,0 +1,12 @@ +/** + * Build RegExp object from an array + * of multiple/multi-line regexp parts + * + * @param {string[]} parts + * @param {string} flags + * @return {object} - RegExp object + */ +export default function multilineRegexp(parts, flags) { + var regexpAsStringLiteral = parts.join(''); + return new RegExp(regexpAsStringLiteral, flags); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/nullUndefinedCheck.js b/src/hello/server/node_modules/validator/es/lib/util/nullUndefinedCheck.js new file mode 100644 index 00000000..6f0605cb --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/nullUndefinedCheck.js @@ -0,0 +1,3 @@ +export default function isNullOrUndefined(value) { + return value === null || value === undefined; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/toString.js b/src/hello/server/node_modules/validator/es/lib/util/toString.js new file mode 100644 index 00000000..9a05aa85 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/toString.js @@ -0,0 +1,13 @@ +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +export default function toString(input) { + if (_typeof(input) === 'object' && input !== null) { + if (typeof input.toString === 'function') { + input = input.toString(); + } else { + input = '[object Object]'; + } + } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { + input = ''; + } + return String(input); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/util/typeOf.js b/src/hello/server/node_modules/validator/es/lib/util/typeOf.js new file mode 100644 index 00000000..b2ce41ab --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/util/typeOf.js @@ -0,0 +1,10 @@ +/** + * Better way to handle type checking + * null, {}, array and date are objects, which confuses + */ +export default function typeOf(input) { + var rawObject = Object.prototype.toString.call(input).toLowerCase(); + var typeOfRegex = /\[object (.*)]/g; + var type = typeOfRegex.exec(rawObject)[1]; + return type; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/es/lib/whitelist.js b/src/hello/server/node_modules/validator/es/lib/whitelist.js new file mode 100644 index 00000000..244881b4 --- /dev/null +++ b/src/hello/server/node_modules/validator/es/lib/whitelist.js @@ -0,0 +1,5 @@ +import assertString from './util/assertString'; +export default function whitelist(str, chars) { + assertString(str); + return str.replace(new RegExp("[^".concat(chars, "]+"), 'g'), ''); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/index.js b/src/hello/server/node_modules/validator/index.js new file mode 100644 index 00000000..55fcff3c --- /dev/null +++ b/src/hello/server/node_modules/validator/index.js @@ -0,0 +1,229 @@ +"use strict"; + +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _toDate = _interopRequireDefault(require("./lib/toDate")); +var _toFloat = _interopRequireDefault(require("./lib/toFloat")); +var _toInt = _interopRequireDefault(require("./lib/toInt")); +var _toBoolean = _interopRequireDefault(require("./lib/toBoolean")); +var _equals = _interopRequireDefault(require("./lib/equals")); +var _contains = _interopRequireDefault(require("./lib/contains")); +var _matches = _interopRequireDefault(require("./lib/matches")); +var _isEmail = _interopRequireDefault(require("./lib/isEmail")); +var _isURL = _interopRequireDefault(require("./lib/isURL")); +var _isMACAddress = _interopRequireDefault(require("./lib/isMACAddress")); +var _isIP = _interopRequireDefault(require("./lib/isIP")); +var _isIPRange = _interopRequireDefault(require("./lib/isIPRange")); +var _isFQDN = _interopRequireDefault(require("./lib/isFQDN")); +var _isDate = _interopRequireDefault(require("./lib/isDate")); +var _isTime = _interopRequireDefault(require("./lib/isTime")); +var _isBoolean = _interopRequireDefault(require("./lib/isBoolean")); +var _isLocale = _interopRequireDefault(require("./lib/isLocale")); +var _isAbaRouting = _interopRequireDefault(require("./lib/isAbaRouting")); +var _isAlpha = _interopRequireWildcard(require("./lib/isAlpha")); +var _isAlphanumeric = _interopRequireWildcard(require("./lib/isAlphanumeric")); +var _isNumeric = _interopRequireDefault(require("./lib/isNumeric")); +var _isPassportNumber = _interopRequireWildcard(require("./lib/isPassportNumber")); +var _isPort = _interopRequireDefault(require("./lib/isPort")); +var _isLowercase = _interopRequireDefault(require("./lib/isLowercase")); +var _isUppercase = _interopRequireDefault(require("./lib/isUppercase")); +var _isIMEI = _interopRequireDefault(require("./lib/isIMEI")); +var _isAscii = _interopRequireDefault(require("./lib/isAscii")); +var _isFullWidth = _interopRequireDefault(require("./lib/isFullWidth")); +var _isHalfWidth = _interopRequireDefault(require("./lib/isHalfWidth")); +var _isVariableWidth = _interopRequireDefault(require("./lib/isVariableWidth")); +var _isMultibyte = _interopRequireDefault(require("./lib/isMultibyte")); +var _isSemVer = _interopRequireDefault(require("./lib/isSemVer")); +var _isSurrogatePair = _interopRequireDefault(require("./lib/isSurrogatePair")); +var _isInt = _interopRequireDefault(require("./lib/isInt")); +var _isFloat = _interopRequireWildcard(require("./lib/isFloat")); +var _isDecimal = _interopRequireDefault(require("./lib/isDecimal")); +var _isHexadecimal = _interopRequireDefault(require("./lib/isHexadecimal")); +var _isOctal = _interopRequireDefault(require("./lib/isOctal")); +var _isDivisibleBy = _interopRequireDefault(require("./lib/isDivisibleBy")); +var _isHexColor = _interopRequireDefault(require("./lib/isHexColor")); +var _isRgbColor = _interopRequireDefault(require("./lib/isRgbColor")); +var _isHSL = _interopRequireDefault(require("./lib/isHSL")); +var _isISRC = _interopRequireDefault(require("./lib/isISRC")); +var _isIBAN = _interopRequireWildcard(require("./lib/isIBAN")); +var _isBIC = _interopRequireDefault(require("./lib/isBIC")); +var _isMD = _interopRequireDefault(require("./lib/isMD5")); +var _isHash = _interopRequireDefault(require("./lib/isHash")); +var _isJWT = _interopRequireDefault(require("./lib/isJWT")); +var _isJSON = _interopRequireDefault(require("./lib/isJSON")); +var _isEmpty = _interopRequireDefault(require("./lib/isEmpty")); +var _isLength = _interopRequireDefault(require("./lib/isLength")); +var _isByteLength = _interopRequireDefault(require("./lib/isByteLength")); +var _isULID = _interopRequireDefault(require("./lib/isULID")); +var _isUUID = _interopRequireDefault(require("./lib/isUUID")); +var _isMongoId = _interopRequireDefault(require("./lib/isMongoId")); +var _isAfter = _interopRequireDefault(require("./lib/isAfter")); +var _isBefore = _interopRequireDefault(require("./lib/isBefore")); +var _isIn = _interopRequireDefault(require("./lib/isIn")); +var _isLuhnNumber = _interopRequireDefault(require("./lib/isLuhnNumber")); +var _isCreditCard = _interopRequireDefault(require("./lib/isCreditCard")); +var _isIdentityCard = _interopRequireDefault(require("./lib/isIdentityCard")); +var _isEAN = _interopRequireDefault(require("./lib/isEAN")); +var _isISIN = _interopRequireDefault(require("./lib/isISIN")); +var _isISBN = _interopRequireDefault(require("./lib/isISBN")); +var _isISSN = _interopRequireDefault(require("./lib/isISSN")); +var _isTaxID = _interopRequireDefault(require("./lib/isTaxID")); +var _isMobilePhone = _interopRequireWildcard(require("./lib/isMobilePhone")); +var _isEthereumAddress = _interopRequireDefault(require("./lib/isEthereumAddress")); +var _isCurrency = _interopRequireDefault(require("./lib/isCurrency")); +var _isBtcAddress = _interopRequireDefault(require("./lib/isBtcAddress")); +var _isISO = require("./lib/isISO6346"); +var _isISO2 = _interopRequireDefault(require("./lib/isISO6391")); +var _isISO3 = _interopRequireDefault(require("./lib/isISO8601")); +var _isRFC = _interopRequireDefault(require("./lib/isRFC3339")); +var _isISO4 = _interopRequireDefault(require("./lib/isISO15924")); +var _isISO31661Alpha = _interopRequireDefault(require("./lib/isISO31661Alpha2")); +var _isISO31661Alpha2 = _interopRequireDefault(require("./lib/isISO31661Alpha3")); +var _isISO31661Numeric = _interopRequireDefault(require("./lib/isISO31661Numeric")); +var _isISO5 = _interopRequireDefault(require("./lib/isISO4217")); +var _isBase = _interopRequireDefault(require("./lib/isBase32")); +var _isBase2 = _interopRequireDefault(require("./lib/isBase58")); +var _isBase3 = _interopRequireDefault(require("./lib/isBase64")); +var _isDataURI = _interopRequireDefault(require("./lib/isDataURI")); +var _isMagnetURI = _interopRequireDefault(require("./lib/isMagnetURI")); +var _isMailtoURI = _interopRequireDefault(require("./lib/isMailtoURI")); +var _isMimeType = _interopRequireDefault(require("./lib/isMimeType")); +var _isLatLong = _interopRequireDefault(require("./lib/isLatLong")); +var _isPostalCode = _interopRequireWildcard(require("./lib/isPostalCode")); +var _ltrim = _interopRequireDefault(require("./lib/ltrim")); +var _rtrim = _interopRequireDefault(require("./lib/rtrim")); +var _trim = _interopRequireDefault(require("./lib/trim")); +var _escape = _interopRequireDefault(require("./lib/escape")); +var _unescape = _interopRequireDefault(require("./lib/unescape")); +var _stripLow = _interopRequireDefault(require("./lib/stripLow")); +var _whitelist = _interopRequireDefault(require("./lib/whitelist")); +var _blacklist = _interopRequireDefault(require("./lib/blacklist")); +var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted")); +var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail")); +var _isSlug = _interopRequireDefault(require("./lib/isSlug")); +var _isLicensePlate = _interopRequireDefault(require("./lib/isLicensePlate")); +var _isStrongPassword = _interopRequireDefault(require("./lib/isStrongPassword")); +var _isVAT = _interopRequireDefault(require("./lib/isVAT")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var version = '13.15.26'; +var validator = { + version: version, + toDate: _toDate.default, + toFloat: _toFloat.default, + toInt: _toInt.default, + toBoolean: _toBoolean.default, + equals: _equals.default, + contains: _contains.default, + matches: _matches.default, + isEmail: _isEmail.default, + isURL: _isURL.default, + isMACAddress: _isMACAddress.default, + isIP: _isIP.default, + isIPRange: _isIPRange.default, + isFQDN: _isFQDN.default, + isBoolean: _isBoolean.default, + isIBAN: _isIBAN.default, + isBIC: _isBIC.default, + isAbaRouting: _isAbaRouting.default, + isAlpha: _isAlpha.default, + isAlphaLocales: _isAlpha.locales, + isAlphanumeric: _isAlphanumeric.default, + isAlphanumericLocales: _isAlphanumeric.locales, + isNumeric: _isNumeric.default, + isPassportNumber: _isPassportNumber.default, + passportNumberLocales: _isPassportNumber.locales, + isPort: _isPort.default, + isLowercase: _isLowercase.default, + isUppercase: _isUppercase.default, + isAscii: _isAscii.default, + isFullWidth: _isFullWidth.default, + isHalfWidth: _isHalfWidth.default, + isVariableWidth: _isVariableWidth.default, + isMultibyte: _isMultibyte.default, + isSemVer: _isSemVer.default, + isSurrogatePair: _isSurrogatePair.default, + isInt: _isInt.default, + isIMEI: _isIMEI.default, + isFloat: _isFloat.default, + isFloatLocales: _isFloat.locales, + isDecimal: _isDecimal.default, + isHexadecimal: _isHexadecimal.default, + isOctal: _isOctal.default, + isDivisibleBy: _isDivisibleBy.default, + isHexColor: _isHexColor.default, + isRgbColor: _isRgbColor.default, + isHSL: _isHSL.default, + isISRC: _isISRC.default, + isMD5: _isMD.default, + isHash: _isHash.default, + isJWT: _isJWT.default, + isJSON: _isJSON.default, + isEmpty: _isEmpty.default, + isLength: _isLength.default, + isLocale: _isLocale.default, + isByteLength: _isByteLength.default, + isULID: _isULID.default, + isUUID: _isUUID.default, + isMongoId: _isMongoId.default, + isAfter: _isAfter.default, + isBefore: _isBefore.default, + isIn: _isIn.default, + isLuhnNumber: _isLuhnNumber.default, + isCreditCard: _isCreditCard.default, + isIdentityCard: _isIdentityCard.default, + isEAN: _isEAN.default, + isISIN: _isISIN.default, + isISBN: _isISBN.default, + isISSN: _isISSN.default, + isMobilePhone: _isMobilePhone.default, + isMobilePhoneLocales: _isMobilePhone.locales, + isPostalCode: _isPostalCode.default, + isPostalCodeLocales: _isPostalCode.locales, + isEthereumAddress: _isEthereumAddress.default, + isCurrency: _isCurrency.default, + isBtcAddress: _isBtcAddress.default, + isISO6346: _isISO.isISO6346, + isFreightContainerID: _isISO.isFreightContainerID, + isISO6391: _isISO2.default, + isISO8601: _isISO3.default, + isISO15924: _isISO4.default, + isRFC3339: _isRFC.default, + isISO31661Alpha2: _isISO31661Alpha.default, + isISO31661Alpha3: _isISO31661Alpha2.default, + isISO31661Numeric: _isISO31661Numeric.default, + isISO4217: _isISO5.default, + isBase32: _isBase.default, + isBase58: _isBase2.default, + isBase64: _isBase3.default, + isDataURI: _isDataURI.default, + isMagnetURI: _isMagnetURI.default, + isMailtoURI: _isMailtoURI.default, + isMimeType: _isMimeType.default, + isLatLong: _isLatLong.default, + ltrim: _ltrim.default, + rtrim: _rtrim.default, + trim: _trim.default, + escape: _escape.default, + unescape: _unescape.default, + stripLow: _stripLow.default, + whitelist: _whitelist.default, + blacklist: _blacklist.default, + isWhitelisted: _isWhitelisted.default, + normalizeEmail: _normalizeEmail.default, + toString: toString, + isSlug: _isSlug.default, + isStrongPassword: _isStrongPassword.default, + isTaxID: _isTaxID.default, + isDate: _isDate.default, + isTime: _isTime.default, + isLicensePlate: _isLicensePlate.default, + isVAT: _isVAT.default, + ibanLocales: _isIBAN.locales +}; +var _default = exports.default = validator; +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/alpha.js b/src/hello/server/node_modules/validator/lib/alpha.js new file mode 100644 index 00000000..91d308bd --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/alpha.js @@ -0,0 +1,157 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.farsiLocales = exports.englishLocales = exports.dotDecimal = exports.decimal = exports.commaDecimal = exports.bengaliLocales = exports.arabicLocales = exports.alphanumeric = exports.alpha = void 0; +var alpha = exports.alpha = { + 'en-US': /^[A-Z]+$/i, + 'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i, + 'bg-BG': /^[А-Я]+$/i, + 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[A-ZÆØÅ]+$/i, + 'de-DE': /^[A-ZÄÖÜß]+$/i, + 'el-GR': /^[Α-ώ]+$/i, + 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, + 'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i, + 'fi-FI': /^[A-ZÅÄÖ]+$/i, + 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + 'nb-NO': /^[A-ZÆØÅ]+$/i, + 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[A-ZÆØÅ]+$/i, + 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + 'ru-RU': /^[А-ЯЁ]+$/i, + 'kk-KZ': /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + 'sl-SI': /^[A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[A-ZÅÄÖ]+$/i, + 'th-TH': /^[ก-๐\s]+$/i, + 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i, + 'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + 'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[א-ת]+$/, + fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + 'hi-IN': /^[\u0900-\u0961]+[\u0972-\u097F]*$/i, + 'si-LK': /^[\u0D80-\u0DFF]+$/, + 'ta-IN': /^[\u0B80-\u0BFF]+$/i, + 'te-IN': /^[\u0C00-\u0C7F]+$/i, + 'kn-IN': /^[\u0C80-\u0CFF]+$/i, + 'ml-IN': /^[\u0D00-\u0D7F]+$/i, + 'gu-IN': /^[\u0A80-\u0AFF]+$/i, + 'pa-IN': /^[\u0A00-\u0A7F]+$/i, + 'or-IN': /^[\u0B00-\u0B7F]+$/i +}; +var alphanumeric = exports.alphanumeric = { + 'en-US': /^[0-9A-Z]+$/i, + 'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i, + 'bg-BG': /^[0-9А-Я]+$/i, + 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[0-9A-ZÆØÅ]+$/i, + 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, + 'el-GR': /^[0-9Α-ω]+$/i, + 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + 'fi-FI': /^[0-9A-ZÅÄÖ]+$/i, + 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'nb-NO': /^[0-9A-ZÆØÅ]+$/i, + 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[0-9A-ZÆØÅ]+$/i, + 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + 'ru-RU': /^[0-9А-ЯЁ]+$/i, + 'kk-KZ': /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + 'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i, + 'th-TH': /^[ก-๙\s]+$/i, + 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, + 'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + 'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[0-9א-ת]+$/, + fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + 'hi-IN': /^[\u0900-\u0963]+[\u0966-\u097F]*$/i, + 'si-LK': /^[0-9\u0D80-\u0DFF]+$/, + 'ta-IN': /^[0-9\u0B80-\u0BFF.]+$/i, + 'te-IN': /^[0-9\u0C00-\u0C7F.]+$/i, + 'kn-IN': /^[0-9\u0C80-\u0CFF.]+$/i, + 'ml-IN': /^[0-9\u0D00-\u0D7F.]+$/i, + 'gu-IN': /^[0-9\u0A80-\u0AFF.]+$/i, + 'pa-IN': /^[0-9\u0A00-\u0A7F.]+$/i, + 'or-IN': /^[0-9\u0B00-\u0B7F.]+$/i +}; +var decimal = exports.decimal = { + 'en-US': '.', + ar: '٫' +}; +var englishLocales = exports.englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; +for (var locale, i = 0; i < englishLocales.length; i++) { + locale = "en-".concat(englishLocales[i]); + alpha[locale] = alpha['en-US']; + alphanumeric[locale] = alphanumeric['en-US']; + decimal[locale] = decimal['en-US']; +} + +// Source: http://www.localeplanet.com/java/ +var arabicLocales = exports.arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; +for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { + _locale = "ar-".concat(arabicLocales[_i]); + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; + decimal[_locale] = decimal.ar; +} +var farsiLocales = exports.farsiLocales = ['IR', 'AF']; +for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) { + _locale2 = "fa-".concat(farsiLocales[_i2]); + alphanumeric[_locale2] = alphanumeric.fa; + decimal[_locale2] = decimal.ar; +} +var bengaliLocales = exports.bengaliLocales = ['BD', 'IN']; +for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) { + _locale3 = "bn-".concat(bengaliLocales[_i3]); + alpha[_locale3] = alpha.bn; + alphanumeric[_locale3] = alphanumeric.bn; + decimal[_locale3] = decimal['en-US']; +} + +// Source: https://en.wikipedia.org/wiki/Decimal_mark +var dotDecimal = exports.dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY']; +var commaDecimal = exports.commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'eo', 'es-ES', 'fr-CA', 'fr-FR', 'gu-IN', 'hi-IN', 'hu-HU', 'id-ID', 'it-IT', 'kk-KZ', 'kn-IN', 'ku-IQ', 'ml-IN', 'nb-NO', 'nl-NL', 'nn-NO', 'or-IN', 'pa-IN', 'pl-PL', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'ta-IN', 'te-IN', 'tr-TR', 'uk-UA', 'vi-VN']; +for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) { + decimal[dotDecimal[_i4]] = decimal['en-US']; +} +for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) { + decimal[commaDecimal[_i5]] = ','; +} +alpha['fr-CA'] = alpha['fr-FR']; +alphanumeric['fr-CA'] = alphanumeric['fr-FR']; +alpha['pt-BR'] = alpha['pt-PT']; +alphanumeric['pt-BR'] = alphanumeric['pt-PT']; +decimal['pt-BR'] = decimal['pt-PT']; + +// see #862 +alpha['pl-Pl'] = alpha['pl-PL']; +alphanumeric['pl-Pl'] = alphanumeric['pl-PL']; +decimal['pl-Pl'] = decimal['pl-PL']; + +// see #1455 +alpha['fa-AF'] = alpha.fa; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/blacklist.js b/src/hello/server/node_modules/validator/lib/blacklist.js new file mode 100644 index 00000000..7f227e85 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/blacklist.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = blacklist; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function blacklist(str, chars) { + (0, _assertString.default)(str); + return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), ''); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/contains.js b/src/hello/server/node_modules/validator/lib/contains.js new file mode 100644 index 00000000..b9c9abb2 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/contains.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = contains; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _toString = _interopRequireDefault(require("./util/toString")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var defaultContainsOptions = { + ignoreCase: false, + minOccurrences: 1 +}; +function contains(str, elem, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, defaultContainsOptions); + if (options.ignoreCase) { + return str.toLowerCase().split((0, _toString.default)(elem).toLowerCase()).length > options.minOccurrences; + } + return str.split((0, _toString.default)(elem)).length > options.minOccurrences; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/equals.js b/src/hello/server/node_modules/validator/lib/equals.js new file mode 100644 index 00000000..8a1a0557 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/equals.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = equals; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function equals(str, comparison) { + (0, _assertString.default)(str); + return str === comparison; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/escape.js b/src/hello/server/node_modules/validator/lib/escape.js new file mode 100644 index 00000000..1415a97f --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/escape.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = escape; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function escape(str) { + (0, _assertString.default)(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/\\/g, '\').replace(/`/g, '`'); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isAbaRouting.js b/src/hello/server/node_modules/validator/lib/isAbaRouting.js new file mode 100644 index 00000000..6aeaa120 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isAbaRouting.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAbaRouting; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// http://www.brainjar.com/js/validation/ +// https://www.aba.com/news-research/research-analysis/routing-number-policy-procedures +// series reserved for future use are excluded +var isRoutingReg = /^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/; +function isAbaRouting(str) { + (0, _assertString.default)(str); + if (!isRoutingReg.test(str)) return false; + var checkSumVal = 0; + for (var i = 0; i < str.length; i++) { + if (i % 3 === 0) checkSumVal += str[i] * 3;else if (i % 3 === 1) checkSumVal += str[i] * 7;else checkSumVal += str[i] * 1; + } + return checkSumVal % 10 === 0; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isAfter.js b/src/hello/server/node_modules/validator/lib/isAfter.js new file mode 100644 index 00000000..13d91afc --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isAfter.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAfter; +var _toDate = _interopRequireDefault(require("./toDate")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function isAfter(date, options) { + // For backwards compatibility: + // isAfter(str [, date]), i.e. `options` could be used as argument for the legacy `date` + var comparisonDate = (_typeof(options) === 'object' ? options.comparisonDate : options) || Date().toString(); + var comparison = (0, _toDate.default)(comparisonDate); + var original = (0, _toDate.default)(date); + return !!(original && comparison && original > comparison); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isAlpha.js b/src/hello/server/node_modules/validator/lib/isAlpha.js new file mode 100644 index 00000000..0d00df93 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isAlpha.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAlpha; +exports.locales = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _alpha = require("./alpha"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isAlpha(_str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + (0, _assertString.default)(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ''); + } else if (typeof ignore === 'string') { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&'), "]"), 'g'), ''); // escape regex for ignore + } else { + throw new Error('ignore should be instance of a String or RegExp'); + } + } + if (locale in _alpha.alpha) { + return _alpha.alpha[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales = exports.locales = Object.keys(_alpha.alpha); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isAlphanumeric.js b/src/hello/server/node_modules/validator/lib/isAlphanumeric.js new file mode 100644 index 00000000..2babcdbb --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isAlphanumeric.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAlphanumeric; +exports.locales = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _alpha = require("./alpha"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isAlphanumeric(_str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + (0, _assertString.default)(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ''); + } else if (typeof ignore === 'string') { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&'), "]"), 'g'), ''); // escape regex for ignore + } else { + throw new Error('ignore should be instance of a String or RegExp'); + } + } + if (locale in _alpha.alphanumeric) { + return _alpha.alphanumeric[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales = exports.locales = Object.keys(_alpha.alphanumeric); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isAscii.js b/src/hello/server/node_modules/validator/lib/isAscii.js new file mode 100644 index 00000000..bf32abd6 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isAscii.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isAscii; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/* eslint-disable no-control-regex */ +var ascii = /^[\x00-\x7F]+$/; +/* eslint-enable no-control-regex */ + +function isAscii(str) { + (0, _assertString.default)(str); + return ascii.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isBIC.js b/src/hello/server/node_modules/validator/lib/isBIC.js new file mode 100644 index 00000000..608a37ea --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isBIC.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBIC; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _isISO31661Alpha = require("./isISO31661Alpha2"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// https://en.wikipedia.org/wiki/ISO_9362 +var isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/; +function isBIC(str) { + (0, _assertString.default)(str); + + // toUpperCase() should be removed when a new major version goes out that changes + // the regex to [A-Z] (per the spec). + var countryCode = str.slice(4, 6).toUpperCase(); + if (!_isISO31661Alpha.CountryCodes.has(countryCode) && countryCode !== 'XK') { + return false; + } + return isBICReg.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isBase32.js b/src/hello/server/node_modules/validator/lib/isBase32.js new file mode 100644 index 00000000..59e90562 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isBase32.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBase32; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var base32 = /^[A-Z2-7]+=*$/; +var crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/; +var defaultBase32Options = { + crockford: false +}; +function isBase32(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, defaultBase32Options); + if (options.crockford) { + return crockfordBase32.test(str); + } + var len = str.length; + if (len % 8 === 0 && base32.test(str)) { + return true; + } + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isBase58.js b/src/hello/server/node_modules/validator/lib/isBase58.js new file mode 100644 index 00000000..3466e290 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isBase58.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBase58; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// Accepted chars - 123456789ABCDEFGH JKLMN PQRSTUVWXYZabcdefghijk mnopqrstuvwxyz +var base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/; +function isBase58(str) { + (0, _assertString.default)(str); + if (base58Reg.test(str)) { + return true; + } + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isBase64.js b/src/hello/server/node_modules/validator/lib/isBase64.js new file mode 100644 index 00000000..99ce9f34 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isBase64.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBase64; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var base64WithPadding = /^[A-Za-z0-9+/]+={0,2}$/; +var base64WithoutPadding = /^[A-Za-z0-9+/]+$/; +var base64UrlWithPadding = /^[A-Za-z0-9_-]+={0,2}$/; +var base64UrlWithoutPadding = /^[A-Za-z0-9_-]+$/; +function isBase64(str, options) { + var _options; + (0, _assertString.default)(str); + options = (0, _merge.default)(options, { + urlSafe: false, + padding: !((_options = options) !== null && _options !== void 0 && _options.urlSafe) + }); + if (str === '') return true; + if (options.padding && str.length % 4 !== 0) return false; + var regex; + if (options.urlSafe) { + regex = options.padding ? base64UrlWithPadding : base64UrlWithoutPadding; + } else { + regex = options.padding ? base64WithPadding : base64WithoutPadding; + } + return (!options.padding || str.length % 4 === 0) && regex.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isBefore.js b/src/hello/server/node_modules/validator/lib/isBefore.js new file mode 100644 index 00000000..570c6f74 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isBefore.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBefore; +var _toDate = _interopRequireDefault(require("./toDate")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function isBefore(date, options) { + // For backwards compatibility: + // isBefore(str [, date]), i.e. `options` could be used as argument for the legacy `date` + var comparisonDate = (_typeof(options) === 'object' ? options.comparisonDate : options) || Date().toString(); + var comparison = (0, _toDate.default)(comparisonDate); + var original = (0, _toDate.default)(date); + return !!(original && comparison && original < comparison); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isBoolean.js b/src/hello/server/node_modules/validator/lib/isBoolean.js new file mode 100644 index 00000000..11275ad8 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isBoolean.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBoolean; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _includesArray = _interopRequireDefault(require("./util/includesArray")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var defaultOptions = { + loose: false +}; +var strictBooleans = ['true', 'false', '1', '0']; +var looseBooleans = [].concat(strictBooleans, ['yes', 'no']); +function isBoolean(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions; + (0, _assertString.default)(str); + if (options.loose) { + return (0, _includesArray.default)(looseBooleans, str.toLowerCase()); + } + return (0, _includesArray.default)(strictBooleans, str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isBtcAddress.js b/src/hello/server/node_modules/validator/lib/isBtcAddress.js new file mode 100644 index 00000000..74f21251 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isBtcAddress.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isBtcAddress; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var bech32 = /^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/; +var base58 = /^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/; +function isBtcAddress(str) { + (0, _assertString.default)(str); + return bech32.test(str) || base58.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isByteLength.js b/src/hello/server/node_modules/validator/lib/isByteLength.js new file mode 100644 index 00000000..f2d867a8 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isByteLength.js @@ -0,0 +1,27 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isByteLength; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +/* eslint-disable prefer-rest-params */ +function isByteLength(str, options) { + (0, _assertString.default)(str); + var min; + var max; + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isByteLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === 'undefined' || len <= max); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isCreditCard.js b/src/hello/server/node_modules/validator/lib/isCreditCard.js new file mode 100644 index 00000000..569c8190 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isCreditCard.js @@ -0,0 +1,52 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCreditCard; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _isLuhnNumber = _interopRequireDefault(require("./isLuhnNumber")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var cards = { + amex: /^3[47][0-9]{13}$/, + dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/, + discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/, + jcb: /^(?:2131|1800|35\d{3})\d{11}$/, + mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/, + // /^[25][1-7][0-9]{14}$/; + unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/, + visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/ +}; +var allCards = function () { + var tmpCardsArray = []; + for (var cardProvider in cards) { + // istanbul ignore else + if (cards.hasOwnProperty(cardProvider)) { + tmpCardsArray.push(cards[cardProvider]); + } + } + return tmpCardsArray; +}(); +function isCreditCard(card) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _assertString.default)(card); + var provider = options.provider; + var sanitized = card.replace(/[- ]+/g, ''); + if (provider && provider.toLowerCase() in cards) { + // specific provider in the list + if (!cards[provider.toLowerCase()].test(sanitized)) { + return false; + } + } else if (provider && !(provider.toLowerCase() in cards)) { + /* specific provider not in the list */ + throw new Error("".concat(provider, " is not a valid credit card provider.")); + } else if (!allCards.some(function (cardProvider) { + return cardProvider.test(sanitized); + })) { + // no specific provider + return false; + } + return (0, _isLuhnNumber.default)(card); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isCurrency.js b/src/hello/server/node_modules/validator/lib/isCurrency.js new file mode 100644 index 00000000..0f4e1aa8 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isCurrency.js @@ -0,0 +1,83 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isCurrency; +var _merge = _interopRequireDefault(require("./util/merge")); +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function currencyRegex(options) { + var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}"); + options.digits_after_decimal.forEach(function (digit, index) { + if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}"); + }); + var symbol = "(".concat(options.symbol.replace(/\W/, function (m) { + return "\\".concat(m); + }), ")").concat(options.require_symbol ? '' : '?'), + negative = '-?', + whole_dollar_amount_without_sep = '[1-9]\\d*', + whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"), + valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], + whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join('|'), ")?"), + decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? '' : '?'); + var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ''); + + // default is negative sign before symbol, but there are two other options (besides parens) + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } + + // South African Rand, for example, uses R 123 (space) and R-123 (no space) + if (options.allow_negative_sign_placeholder) { + pattern = "( (?!\\-))?".concat(pattern); + } else if (options.allow_space_after_symbol) { + pattern = " ?".concat(pattern); + } else if (options.allow_space_after_digits) { + pattern += '( (?!$))?'; + } + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")"); + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } + + // ensure there's a dollar and/or decimal amount, and that + // it doesn't start with a space or a negative sign followed by a space + return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$")); +} +var default_currency_options = { + symbol: '$', + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ',', + decimal_separator: '.', + allow_decimal: true, + require_decimal: false, + digits_after_decimal: [2], + allow_space_after_digits: false +}; +function isCurrency(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_currency_options); + return currencyRegex(options).test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isDataURI.js b/src/hello/server/node_modules/validator/lib/isDataURI.js new file mode 100644 index 00000000..e279205e --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isDataURI.js @@ -0,0 +1,40 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDataURI; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var validMediaType = /^[a-z]+\/[a-z0-9\-\+\._]+$/i; +var validAttribute = /^[a-z\-]+=[a-z0-9\-]+$/i; +var validData = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i; +function isDataURI(str) { + (0, _assertString.default)(str); + var data = str.split(','); + if (data.length < 2) { + return false; + } + var attributes = data.shift().trim().split(';'); + var schemeAndMediaType = attributes.shift(); + if (schemeAndMediaType.slice(0, 5) !== 'data:') { + return false; + } + var mediaType = schemeAndMediaType.slice(5); + if (mediaType !== '' && !validMediaType.test(mediaType)) { + return false; + } + for (var i = 0; i < attributes.length; i++) { + if (!(i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') && !validAttribute.test(attributes[i])) { + return false; + } + } + for (var _i = 0; _i < data.length; _i++) { + if (!validData.test(data[_i])) { + return false; + } + } + return true; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isDate.js b/src/hello/server/node_modules/validator/lib/isDate.js new file mode 100644 index 00000000..48235517 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isDate.js @@ -0,0 +1,102 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDate; +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +var default_date_options = { + format: 'YYYY/MM/DD', + delimiters: ['/', '-'], + strictMode: false +}; +function isValidFormat(format) { + return /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(format); +} +function zip(date, format) { + var zippedArr = [], + len = Math.max(date.length, format.length); + for (var i = 0; i < len; i++) { + zippedArr.push([date[i], format[i]]); + } + return zippedArr; +} +function isDate(input, options) { + if (typeof options === 'string') { + // Allow backward compatibility for old format isDate(input [, format]) + options = (0, _merge.default)({ + format: options + }, default_date_options); + } else { + options = (0, _merge.default)(options, default_date_options); + } + if (typeof input === 'string' && isValidFormat(options.format)) { + if (options.strictMode && input.length !== options.format.length) return false; + var formatDelimiter = options.delimiters.find(function (delimiter) { + return options.format.indexOf(delimiter) !== -1; + }); + var dateDelimiter = options.strictMode ? formatDelimiter : options.delimiters.find(function (delimiter) { + return input.indexOf(delimiter) !== -1; + }); + var dateAndFormat = zip(input.split(dateDelimiter), options.format.toLowerCase().split(formatDelimiter)); + var dateObj = {}; + var _iterator = _createForOfIteratorHelper(dateAndFormat), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _slicedToArray(_step.value, 2), + dateWord = _step$value[0], + formatWord = _step$value[1]; + if (!dateWord || !formatWord || dateWord.length !== formatWord.length) { + return false; + } + dateObj[formatWord.charAt(0)] = dateWord; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + var fullYear = dateObj.y; + + // Check if the year starts with a hyphen + if (fullYear.startsWith('-')) { + return false; // Hyphen before year is not allowed + } + if (dateObj.y.length === 2) { + var parsedYear = parseInt(dateObj.y, 10); + if (isNaN(parsedYear)) { + return false; + } + var currentYearLastTwoDigits = new Date().getFullYear() % 100; + if (parsedYear < currentYearLastTwoDigits) { + fullYear = "20".concat(dateObj.y); + } else { + fullYear = "19".concat(dateObj.y); + } + } + var month = dateObj.m; + if (dateObj.m.length === 1) { + month = "0".concat(dateObj.m); + } + var day = dateObj.d; + if (dateObj.d.length === 1) { + day = "0".concat(dateObj.d); + } + return new Date("".concat(fullYear, "-").concat(month, "-").concat(day, "T00:00:00.000Z")).getUTCDate() === +dateObj.d; + } + if (!options.strictMode) { + return Object.prototype.toString.call(input) === '[object Date]' && isFinite(input); + } + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isDecimal.js b/src/hello/server/node_modules/validator/lib/isDecimal.js new file mode 100644 index 00000000..0f9adcdf --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isDecimal.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDecimal; +var _merge = _interopRequireDefault(require("./util/merge")); +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _includesArray = _interopRequireDefault(require("./util/includesArray")); +var _alpha = require("./alpha"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function decimalRegExp(options) { + var regExp = new RegExp("^[-+]?([0-9]+)?(\\".concat(_alpha.decimal[options.locale], "[0-9]{").concat(options.decimal_digits, "})").concat(options.force_decimal ? '' : '?', "$")); + return regExp; +} +var default_decimal_options = { + force_decimal: false, + decimal_digits: '1,', + locale: 'en-US' +}; +var blacklist = ['', '-', '+']; +function isDecimal(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_decimal_options); + if (options.locale in _alpha.decimal) { + return !(0, _includesArray.default)(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str); + } + throw new Error("Invalid locale '".concat(options.locale, "'")); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isDivisibleBy.js b/src/hello/server/node_modules/validator/lib/isDivisibleBy.js new file mode 100644 index 00000000..27316513 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isDivisibleBy.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isDivisibleBy; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _toFloat = _interopRequireDefault(require("./toFloat")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isDivisibleBy(str, num) { + (0, _assertString.default)(str); + return (0, _toFloat.default)(str) % parseInt(num, 10) === 0; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isEAN.js b/src/hello/server/node_modules/validator/lib/isEAN.js new file mode 100644 index 00000000..0ead9d1d --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isEAN.js @@ -0,0 +1,78 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEAN; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/** + * The most commonly used EAN standard is + * the thirteen-digit EAN-13, while the + * less commonly used 8-digit EAN-8 barcode was + * introduced for use on small packages. + * Also EAN/UCC-14 is used for Grouping of individual + * trade items above unit level(Intermediate, Carton or Pallet). + * For more info about EAN-14 checkout: https://www.gtin.info/itf-14-barcodes/ + * EAN consists of: + * GS1 prefix, manufacturer code, product code and check digit + * Reference: https://en.wikipedia.org/wiki/International_Article_Number + * Reference: https://www.gtin.info/ + */ + +/** + * Define EAN Lengths; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14 + * and Regular Expression for valid EANs (EAN-8, EAN-13, EAN-14), + * with exact numeric matching of 8 or 13 or 14 digits [0-9] + */ +var LENGTH_EAN_8 = 8; +var LENGTH_EAN_14 = 14; +var validEanRegex = /^(\d{8}|\d{13}|\d{14})$/; + +/** + * Get position weight given: + * EAN length and digit index/position + * + * @param {number} length + * @param {number} index + * @return {number} + */ +function getPositionWeightThroughLengthAndIndex(length, index) { + if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) { + return index % 2 === 0 ? 3 : 1; + } + return index % 2 === 0 ? 1 : 3; +} + +/** + * Calculate EAN Check Digit + * Reference: https://en.wikipedia.org/wiki/International_Article_Number#Calculation_of_checksum_digit + * + * @param {string} ean + * @return {number} + */ +function calculateCheckDigit(ean) { + var checksum = ean.slice(0, -1).split('').map(function (char, index) { + return Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index); + }).reduce(function (acc, partialSum) { + return acc + partialSum; + }, 0); + var remainder = 10 - checksum % 10; + return remainder < 10 ? remainder : 0; +} + +/** + * Check if string is valid EAN: + * Matches EAN-8/EAN-13/EAN-14 regex + * Has valid check digit. + * + * @param {string} str + * @return {boolean} + */ +function isEAN(str) { + (0, _assertString.default)(str); + var actualCheckDigit = Number(str.slice(-1)); + return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isEmail.js b/src/hello/server/node_modules/validator/lib/isEmail.js new file mode 100644 index 00000000..3a13e12f --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isEmail.js @@ -0,0 +1,174 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEmail; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _checkHost = _interopRequireDefault(require("./util/checkHost")); +var _isByteLength = _interopRequireDefault(require("./isByteLength")); +var _isFQDN = _interopRequireDefault(require("./isFQDN")); +var _isIP = _interopRequireDefault(require("./isIP")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var default_email_options = { + allow_display_name: false, + allow_underscores: false, + require_display_name: false, + allow_utf8_local_part: true, + require_tld: true, + blacklisted_chars: '', + ignore_max_length: false, + host_blacklist: [], + host_whitelist: [] +}; + +/* eslint-disable max-len */ +/* eslint-disable no-control-regex */ +var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)]/.test(display_name_without_quotes); + if (contains_illegal) { + // if contains illegal characters, + // must to be enclosed in double-quotes, otherwise it's not a valid display name + if (display_name_without_quotes === display_name) { + return false; + } + + // the quotes in display name must start with character symbol \ + var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length; + if (!all_start_with_back_slash) { + return false; + } + } + return true; +} +function isEmail(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_email_options); + if (options.require_display_name || options.allow_display_name) { + var display_email = str.match(splitNameAddress); + if (display_email) { + var display_name = display_email[1]; + + // Remove display name and angle brackets to get email address + // Can be done in the regex but will introduce a ReDOS (See #1597 for more info) + str = str.replace(display_name, '').replace(/(^<|>$)/g, ''); + + // sometimes need to trim the last space to get the display name + // because there may be a space between display name and email address + // eg. myname + // the display name is `myname` instead of `myname `, so need to trim the last space + if (display_name.endsWith(' ')) { + display_name = display_name.slice(0, -1); + } + if (!validateDisplayName(display_name)) { + return false; + } + } else if (options.require_display_name) { + return false; + } + } + if (!options.ignore_max_length && str.length > defaultMaxEmailLength) { + return false; + } + var parts = str.split('@'); + var domain = parts.pop(); + var lower_domain = domain.toLowerCase(); + if (options.host_blacklist.length > 0 && (0, _checkHost.default)(lower_domain, options.host_blacklist)) { + return false; + } + if (options.host_whitelist.length > 0 && !(0, _checkHost.default)(lower_domain, options.host_whitelist)) { + return false; + } + var user = parts.join('@'); + if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) { + /* + Previously we removed dots for gmail addresses before validating. + This was removed because it allows `multiple..dots@gmail.com` + to be reported as valid, but it is not. + Gmail only normalizes single dots, removing them from here is pointless, + should be done in normalizeEmail + */ + user = user.toLowerCase(); + + // Removing sub-address from username before gmail validation + var username = user.split('+')[0]; + + // Dots are not included in gmail length restriction + if (!(0, _isByteLength.default)(username.replace(/\./g, ''), { + min: 6, + max: 30 + })) { + return false; + } + var _user_parts = username.split('.'); + for (var i = 0; i < _user_parts.length; i++) { + if (!gmailUserPart.test(_user_parts[i])) { + return false; + } + } + } + if (options.ignore_max_length === false && (!(0, _isByteLength.default)(user, { + max: 64 + }) || !(0, _isByteLength.default)(domain, { + max: 254 + }))) { + return false; + } + if (!(0, _isFQDN.default)(domain, { + require_tld: options.require_tld, + ignore_max_length: options.ignore_max_length, + allow_underscores: options.allow_underscores + })) { + if (!options.allow_ip_domain) { + return false; + } + if (!(0, _isIP.default)(domain)) { + if (!domain.startsWith('[') || !domain.endsWith(']')) { + return false; + } + var noBracketdomain = domain.slice(1, -1); + if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) { + return false; + } + } + } + if (options.blacklisted_chars) { + if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), 'g')) !== -1) return false; + } + if (user[0] === '"' && user[user.length - 1] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + var user_parts = user.split('.'); + for (var _i = 0; _i < user_parts.length; _i++) { + if (!pattern.test(user_parts[_i])) { + return false; + } + } + return true; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isEmpty.js b/src/hello/server/node_modules/validator/lib/isEmpty.js new file mode 100644 index 00000000..f26909f6 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isEmpty.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEmpty; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var default_is_empty_options = { + ignore_whitespace: false +}; +function isEmpty(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_is_empty_options); + return (options.ignore_whitespace ? str.trim().length : str.length) === 0; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isEthereumAddress.js b/src/hello/server/node_modules/validator/lib/isEthereumAddress.js new file mode 100644 index 00000000..a606a46e --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isEthereumAddress.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isEthereumAddress; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var eth = /^(0x)[0-9a-f]{40}$/i; +function isEthereumAddress(str) { + (0, _assertString.default)(str); + return eth.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isFQDN.js b/src/hello/server/node_modules/validator/lib/isFQDN.js new file mode 100644 index 00000000..d6bfea58 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isFQDN.js @@ -0,0 +1,76 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFQDN; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_numeric_tld: false, + allow_wildcard: false, + ignore_max_length: false +}; +function isFQDN(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_fqdn_options); + + /* Remove the optional trailing dot before checking validity */ + if (options.allow_trailing_dot && str[str.length - 1] === '.') { + str = str.substring(0, str.length - 1); + } + + /* Remove the optional wildcard before checking validity */ + if (options.allow_wildcard === true && str.indexOf('*.') === 0) { + str = str.substring(2); + } + var parts = str.split('.'); + var tld = parts[parts.length - 1]; + if (options.require_tld) { + // disallow fqdns without tld + if (parts.length < 2) { + return false; + } + if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } + + // disallow spaces + if (/\s/.test(tld)) { + return false; + } + } + + // reject numeric TLDs + if (!options.allow_numeric_tld && /^\d+$/.test(tld)) { + return false; + } + return parts.every(function (part) { + if (part.length > 63 && !options.ignore_max_length) { + return false; + } + if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } + + // disallow full-width chars + if (/[\uff01-\uff5e]/.test(part)) { + return false; + } + + // disallow parts starting or ending with hyphen + if (/^-|-$/.test(part)) { + return false; + } + if (!options.allow_underscores && /_/.test(part)) { + return false; + } + return true; + }); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isFloat.js b/src/hello/server/node_modules/validator/lib/isFloat.js new file mode 100644 index 00000000..51f740e5 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isFloat.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFloat; +exports.locales = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _nullUndefinedCheck = _interopRequireDefault(require("./util/nullUndefinedCheck")); +var _alpha = require("./alpha"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isFloat(str, options) { + (0, _assertString.default)(str); + options = options || {}; + var float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? _alpha.decimal[options.locale] : '.', "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$")); + if (str === '' || str === '.' || str === ',' || str === '-' || str === '+') { + return false; + } + var value = parseFloat(str.replace(',', '.')); + return float.test(str) && (!options.hasOwnProperty('min') || (0, _nullUndefinedCheck.default)(options.min) || value >= options.min) && (!options.hasOwnProperty('max') || (0, _nullUndefinedCheck.default)(options.max) || value <= options.max) && (!options.hasOwnProperty('lt') || (0, _nullUndefinedCheck.default)(options.lt) || value < options.lt) && (!options.hasOwnProperty('gt') || (0, _nullUndefinedCheck.default)(options.gt) || value > options.gt); +} +var locales = exports.locales = Object.keys(_alpha.decimal); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isFullWidth.js b/src/hello/server/node_modules/validator/lib/isFullWidth.js new file mode 100644 index 00000000..4cd61025 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isFullWidth.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isFullWidth; +exports.fullWidth = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var fullWidth = exports.fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +function isFullWidth(str) { + (0, _assertString.default)(str); + return fullWidth.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isHSL.js b/src/hello/server/node_modules/validator/lib/isHSL.js new file mode 100644 index 00000000..0404f11c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isHSL.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHSL; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var hslComma = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i; +var hslSpace = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i; +function isHSL(str) { + (0, _assertString.default)(str); + + // Strip duplicate spaces before calling the validation regex (See #1598 for more info) + var strippedStr = str.replace(/\s+/g, ' ').replace(/\s?(hsla?\(|\)|,)\s?/ig, '$1'); + if (strippedStr.indexOf(',') !== -1) { + return hslComma.test(strippedStr); + } + return hslSpace.test(strippedStr); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isHalfWidth.js b/src/hello/server/node_modules/validator/lib/isHalfWidth.js new file mode 100644 index 00000000..71e47136 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isHalfWidth.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHalfWidth; +exports.halfWidth = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var halfWidth = exports.halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +function isHalfWidth(str) { + (0, _assertString.default)(str); + return halfWidth.test(str); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isHash.js b/src/hello/server/node_modules/validator/lib/isHash.js new file mode 100644 index 00000000..f22fc139 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isHash.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHash; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var lengths = { + md5: 32, + md4: 32, + sha1: 40, + sha256: 64, + sha384: 96, + sha512: 128, + ripemd128: 32, + ripemd160: 40, + tiger128: 32, + tiger160: 40, + tiger192: 48, + crc32: 8, + crc32b: 8 +}; +function isHash(str, algorithm) { + (0, _assertString.default)(str); + var hash = new RegExp("^[a-fA-F0-9]{".concat(lengths[algorithm], "}$")); + return hash.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isHexColor.js b/src/hello/server/node_modules/validator/lib/isHexColor.js new file mode 100644 index 00000000..1ac2ca9f --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isHexColor.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHexColor; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; +var hexcolor_with_prefix = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; +var default_is_hexcolor_options = { + require_hashtag: false +}; +function isHexColor(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, default_is_hexcolor_options); + var hexcolor_regex = options.require_hashtag ? hexcolor_with_prefix : hexcolor; + return hexcolor_regex.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isHexadecimal.js b/src/hello/server/node_modules/validator/lib/isHexadecimal.js new file mode 100644 index 00000000..f3dfa7cf --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isHexadecimal.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isHexadecimal; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i; +function isHexadecimal(str) { + (0, _assertString.default)(str); + return hexadecimal.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isIBAN.js b/src/hello/server/node_modules/validator/lib/isIBAN.js new file mode 100644 index 00000000..25192683 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isIBAN.js @@ -0,0 +1,181 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIBAN; +exports.locales = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _includesArray = _interopRequireDefault(require("./util/includesArray")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/** + * List of country codes with + * corresponding IBAN regular expression + * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number + */ +var ibanRegexThroughCountryCode = { + AD: /^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/, + AE: /^(AE[0-9]{2})\d{3}\d{16}$/, + AL: /^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/, + AT: /^(AT[0-9]{2})\d{16}$/, + AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/, + BA: /^(BA[0-9]{2})\d{16}$/, + BE: /^(BE[0-9]{2})\d{12}$/, + BG: /^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/, + BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/, + BR: /^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/, + BY: /^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/, + CH: /^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/, + CR: /^(CR[0-9]{2})\d{18}$/, + CY: /^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/, + CZ: /^(CZ[0-9]{2})\d{20}$/, + DE: /^(DE[0-9]{2})\d{18}$/, + DK: /^(DK[0-9]{2})\d{14}$/, + DO: /^(DO[0-9]{2})[A-Z]{4}\d{20}$/, + DZ: /^(DZ\d{24})$/, + EE: /^(EE[0-9]{2})\d{16}$/, + EG: /^(EG[0-9]{2})\d{25}$/, + ES: /^(ES[0-9]{2})\d{20}$/, + FI: /^(FI[0-9]{2})\d{14}$/, + FO: /^(FO[0-9]{2})\d{14}$/, + FR: /^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + GB: /^(GB[0-9]{2})[A-Z]{4}\d{14}$/, + GE: /^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/, + GI: /^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/, + GL: /^(GL[0-9]{2})\d{14}$/, + GR: /^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/, + GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/, + HR: /^(HR[0-9]{2})\d{17}$/, + HU: /^(HU[0-9]{2})\d{24}$/, + IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/, + IL: /^(IL[0-9]{2})\d{19}$/, + IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/, + IR: /^(IR[0-9]{2})\d{22}$/, + IS: /^(IS[0-9]{2})\d{22}$/, + IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/, + KW: /^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/, + KZ: /^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LB: /^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/, + LC: /^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/, + LI: /^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/, + LT: /^(LT[0-9]{2})\d{16}$/, + LU: /^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/, + MA: /^(MA[0-9]{26})$/, + MC: /^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/, + ME: /^(ME[0-9]{2})\d{18}$/, + MK: /^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/, + MR: /^(MR[0-9]{2})\d{23}$/, + MT: /^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/, + MU: /^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/, + MZ: /^(MZ[0-9]{2})\d{21}$/, + NL: /^(NL[0-9]{2})[A-Z]{4}\d{10}$/, + NO: /^(NO[0-9]{2})\d{11}$/, + PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/, + PL: /^(PL[0-9]{2})\d{24}$/, + PS: /^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + PT: /^(PT[0-9]{2})\d{21}$/, + QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/, + RS: /^(RS[0-9]{2})\d{18}$/, + SA: /^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/, + SC: /^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/, + SE: /^(SE[0-9]{2})\d{20}$/, + SI: /^(SI[0-9]{2})\d{15}$/, + SK: /^(SK[0-9]{2})\d{20}$/, + SM: /^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + SV: /^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/, + TL: /^(TL[0-9]{2})\d{19}$/, + TN: /^(TN[0-9]{2})\d{20}$/, + TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/, + UA: /^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/, + VA: /^(VA[0-9]{2})\d{18}$/, + VG: /^(VG[0-9]{2})[A-Z]{4}\d{16}$/, + XK: /^(XK[0-9]{2})\d{16}$/ +}; + +/** + * Check if the country codes passed are valid using the + * ibanRegexThroughCountryCode as a reference + * + * @param {array} countryCodeArray + * @return {boolean} + */ + +function hasOnlyValidCountryCodes(countryCodeArray) { + var countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(function (countryCode) { + return !(countryCode in ibanRegexThroughCountryCode); + }); + if (countryCodeArrayFilteredWithObjectIbanCode.length > 0) { + return false; + } + return true; +} + +/** + * Check whether string has correct universal IBAN format + * The IBAN consists of up to 34 alphanumeric characters, as follows: + * Country Code using ISO 3166-1 alpha-2, two letters + * check digits, two digits and + * Basic Bank Account Number (BBAN), up to 30 alphanumeric characters. + * NOTE: Permitted IBAN characters are: digits [0-9] and the 26 latin alphabetic [A-Z] + * + * @param {string} str - string under validation + * @param {object} options - object to pass the countries to be either whitelisted or blacklisted + * @return {boolean} + */ +function hasValidIbanFormat(str, options) { + // Strip white spaces and hyphens + var strippedStr = str.replace(/[\s\-]+/gi, '').toUpperCase(); + var isoCountryCode = strippedStr.slice(0, 2).toUpperCase(); + var isoCountryCodeInIbanRegexCodeObject = isoCountryCode in ibanRegexThroughCountryCode; + if (options.whitelist) { + if (!hasOnlyValidCountryCodes(options.whitelist)) { + return false; + } + var isoCountryCodeInWhiteList = (0, _includesArray.default)(options.whitelist, isoCountryCode); + if (!isoCountryCodeInWhiteList) { + return false; + } + } + if (options.blacklist) { + var isoCountryCodeInBlackList = (0, _includesArray.default)(options.blacklist, isoCountryCode); + if (isoCountryCodeInBlackList) { + return false; + } + } + return isoCountryCodeInIbanRegexCodeObject && ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr); +} + +/** + * Check whether string has valid IBAN Checksum + * by performing basic mod-97 operation and + * the remainder should equal 1 + * -- Start by rearranging the IBAN by moving the four initial characters to the end of the string + * -- Replace each letter in the string with two digits, A -> 10, B = 11, Z = 35 + * -- Interpret the string as a decimal integer and + * -- compute the remainder on division by 97 (mod 97) + * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number + * + * @param {string} str + * @return {boolean} + */ +function hasValidIbanChecksum(str) { + var strippedStr = str.replace(/[^A-Z0-9]+/gi, '').toUpperCase(); // Keep only digits and A-Z latin alphabetic + var rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4); + var alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, function (char) { + return char.charCodeAt(0) - 55; + }); + var remainder = alphaCapsReplacedWithDigits.match(/\d{1,7}/g).reduce(function (acc, value) { + return Number(acc + value) % 97; + }, ''); + return remainder === 1; +} +function isIBAN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _assertString.default)(str); + return hasValidIbanFormat(str, options) && hasValidIbanChecksum(str); +} +var locales = exports.locales = Object.keys(ibanRegexThroughCountryCode); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isIMEI.js b/src/hello/server/node_modules/validator/lib/isIMEI.js new file mode 100644 index 00000000..5291ba31 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isIMEI.js @@ -0,0 +1,49 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIMEI; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var imeiRegexWithoutHyphens = /^[0-9]{15}$/; +var imeiRegexWithHyphens = /^\d{2}-\d{6}-\d{6}-\d{1}$/; +function isIMEI(str, options) { + (0, _assertString.default)(str); + options = options || {}; + + // default regex for checking imei is the one without hyphens + + var imeiRegex = imeiRegexWithoutHyphens; + if (options.allow_hyphens) { + imeiRegex = imeiRegexWithHyphens; + } + if (!imeiRegex.test(str)) { + return false; + } + str = str.replace(/-/g, ''); + var sum = 0, + mul = 2, + l = 14; + for (var i = 0; i < l; i++) { + var digit = str.substring(l - i - 1, l - i); + var tp = parseInt(digit, 10) * mul; + if (tp >= 10) { + sum += tp % 10 + 1; + } else { + sum += tp; + } + if (mul === 1) { + mul += 1; + } else { + mul -= 1; + } + } + var chk = (10 - sum % 10) % 10; + if (chk !== parseInt(str.substring(14, 15), 10)) { + return false; + } + return true; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isIP.js b/src/hello/server/node_modules/validator/lib/isIP.js new file mode 100644 index 00000000..da2a5958 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isIP.js @@ -0,0 +1,67 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIP; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +/** +11.3. Examples + + The following addresses + + fe80::1234 (on the 1st link of the node) + ff02::5678 (on the 5th link of the node) + ff08::9abc (on the 10th organization of the node) + + would be represented as follows: + + fe80::1234%1 + ff02::5678%5 + ff08::9abc%10 + + (Here we assume a natural translation from a zone index to the + part, where the Nth zone of any scope is translated into + "N".) + + If we use interface names as , those addresses could also be + represented as follows: + + fe80::1234%ne0 + ff02::5678%pvc1.3 + ff08::9abc%interface10 + + where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs + to the 5th link, and "interface10" belongs to the 10th organization. + * * */ +var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; +var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat); +var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$")); +var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})'; +var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z.]{1,})?$'); +function isIP(ipAddress) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _assertString.default)(ipAddress); + + // accessing 'arguments' for backwards compatibility: isIP(ipAddress [, version]) + // eslint-disable-next-line prefer-rest-params + var version = (_typeof(options) === 'object' ? options.version : arguments[1]) || ''; + if (!version) { + return isIP(ipAddress, { + version: 4 + }) || isIP(ipAddress, { + version: 6 + }); + } + if (version.toString() === '4') { + return IPv4AddressRegExp.test(ipAddress); + } + if (version.toString() === '6') { + return IPv6AddressRegExp.test(ipAddress); + } + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isIPRange.js b/src/hello/server/node_modules/validator/lib/isIPRange.js new file mode 100644 index 00000000..a696ccdd --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isIPRange.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIPRange; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _isIP = _interopRequireDefault(require("./isIP")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var subnetMaybe = /^\d{1,3}$/; +var v4Subnet = 32; +var v6Subnet = 128; +function isIPRange(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + (0, _assertString.default)(str); + var parts = str.split('/'); + + // parts[0] -> ip, parts[1] -> subnet + if (parts.length !== 2) { + return false; + } + if (!subnetMaybe.test(parts[1])) { + return false; + } + + // Disallow preceding 0 i.e. 01, 02, ... + if (parts[1].length > 1 && parts[1].startsWith('0')) { + return false; + } + var isValidIP = (0, _isIP.default)(parts[0], version); + if (!isValidIP) { + return false; + } + + // Define valid subnet according to IP's version + var expectedSubnet = null; + switch (String(version)) { + case '4': + expectedSubnet = v4Subnet; + break; + case '6': + expectedSubnet = v6Subnet; + break; + default: + expectedSubnet = (0, _isIP.default)(parts[0], '6') ? v6Subnet : v4Subnet; + } + return parts[1] <= expectedSubnet && parts[1] >= 0; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISBN.js b/src/hello/server/node_modules/validator/lib/isISBN.js new file mode 100644 index 00000000..1e0dfea1 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISBN.js @@ -0,0 +1,56 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISBN; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/; +var possibleIsbn13 = /^(?:[0-9]{13})$/; +var factor = [1, 3]; +function isISBN(isbn, options) { + (0, _assertString.default)(isbn); + + // For backwards compatibility: + // isISBN(str [, version]), i.e. `options` could be used as argument for the legacy `version` + var version = String((options === null || options === void 0 ? void 0 : options.version) || options); + if (!(options !== null && options !== void 0 && options.version || options)) { + return isISBN(isbn, { + version: 10 + }) || isISBN(isbn, { + version: 13 + }); + } + var sanitizedIsbn = isbn.replace(/[\s-]+/g, ''); + var checksum = 0; + if (version === '10') { + if (!possibleIsbn10.test(sanitizedIsbn)) { + return false; + } + for (var i = 0; i < version - 1; i++) { + checksum += (i + 1) * sanitizedIsbn.charAt(i); + } + if (sanitizedIsbn.charAt(9) === 'X') { + checksum += 10 * 10; + } else { + checksum += 10 * sanitizedIsbn.charAt(9); + } + if (checksum % 11 === 0) { + return true; + } + } else if (version === '13') { + if (!possibleIsbn13.test(sanitizedIsbn)) { + return false; + } + for (var _i = 0; _i < 12; _i++) { + checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i); + } + if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return true; + } + } + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISIN.js b/src/hello/server/node_modules/validator/lib/isISIN.js new file mode 100644 index 00000000..074e330f --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISIN.js @@ -0,0 +1,64 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISIN; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + +// this link details how the check digit is calculated: +// https://www.isin.org/isin-format/. it is a little bit +// odd in that it works with digits, not numbers. in order +// to make only one pass through the ISIN characters, the +// each alpha character is handled as 2 characters within +// the loop. + +function isISIN(str) { + (0, _assertString.default)(str); + if (!isin.test(str)) { + return false; + } + var double = true; + var sum = 0; + // convert values + for (var i = str.length - 2; i >= 0; i--) { + if (str[i] >= 'A' && str[i] <= 'Z') { + var value = str[i].charCodeAt(0) - 55; + var lo = value % 10; + var hi = Math.trunc(value / 10); + // letters have two digits, so handle the low order + // and high order digits separately. + for (var _i = 0, _arr = [lo, hi]; _i < _arr.length; _i++) { + var digit = _arr[_i]; + if (double) { + if (digit >= 5) { + sum += 1 + (digit - 5) * 2; + } else { + sum += digit * 2; + } + } else { + sum += digit; + } + double = !double; + } + } else { + var _digit = str[i].charCodeAt(0) - '0'.charCodeAt(0); + if (double) { + if (_digit >= 5) { + sum += 1 + (_digit - 5) * 2; + } else { + sum += _digit * 2; + } + } else { + sum += _digit; + } + double = !double; + } + } + var check = Math.trunc((sum + 9) / 10) * 10 - sum; + return +str[str.length - 1] === check; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO15924.js b/src/hello/server/node_modules/validator/lib/isISO15924.js new file mode 100644 index 00000000..0c68f2b9 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO15924.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ScriptCodes = void 0; +exports.default = isISO15924; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// from https://www.unicode.org/iso15924/iso15924-codes.html +var validISO15924Codes = new Set(['Adlm', 'Afak', 'Aghb', 'Ahom', 'Arab', 'Aran', 'Armi', 'Armn', 'Avst', 'Bali', 'Bamu', 'Bass', 'Batk', 'Beng', 'Bhks', 'Blis', 'Bopo', 'Brah', 'Brai', 'Bugi', 'Buhd', 'Cakm', 'Cans', 'Cari', 'Cham', 'Cher', 'Chis', 'Chrs', 'Cirt', 'Copt', 'Cpmn', 'Cprt', 'Cyrl', 'Cyrs', 'Deva', 'Diak', 'Dogr', 'Dsrt', 'Dupl', 'Egyd', 'Egyh', 'Egyp', 'Elba', 'Elym', 'Ethi', 'Gara', 'Geok', 'Geor', 'Glag', 'Gong', 'Gonm', 'Goth', 'Gran', 'Grek', 'Gujr', 'Gukh', 'Guru', 'Hanb', 'Hang', 'Hani', 'Hano', 'Hans', 'Hant', 'Hatr', 'Hebr', 'Hira', 'Hluw', 'Hmng', 'Hmnp', 'Hrkt', 'Hung', 'Inds', 'Ital', 'Jamo', 'Java', 'Jpan', 'Jurc', 'Kali', 'Kana', 'Kawi', 'Khar', 'Khmr', 'Khoj', 'Kitl', 'Kits', 'Knda', 'Kore', 'Kpel', 'Krai', 'Kthi', 'Lana', 'Laoo', 'Latf', 'Latg', 'Latn', 'Leke', 'Lepc', 'Limb', 'Lina', 'Linb', 'Lisu', 'Loma', 'Lyci', 'Lydi', 'Mahj', 'Maka', 'Mand', 'Mani', 'Marc', 'Maya', 'Medf', 'Mend', 'Merc', 'Mero', 'Mlym', 'Modi', 'Mong', 'Moon', 'Mroo', 'Mtei', 'Mult', 'Mymr', 'Nagm', 'Nand', 'Narb', 'Nbat', 'Newa', 'Nkdb', 'Nkgb', 'Nkoo', 'Nshu', 'Ogam', 'Olck', 'Onao', 'Orkh', 'Orya', 'Osge', 'Osma', 'Ougr', 'Palm', 'Pauc', 'Pcun', 'Pelm', 'Perm', 'Phag', 'Phli', 'Phlp', 'Phlv', 'Phnx', 'Plrd', 'Piqd', 'Prti', 'Psin', 'Qaaa', 'Qaab', 'Qaac', 'Qaad', 'Qaae', 'Qaaf', 'Qaag', 'Qaah', 'Qaai', 'Qaaj', 'Qaak', 'Qaal', 'Qaam', 'Qaan', 'Qaao', 'Qaap', 'Qaaq', 'Qaar', 'Qaas', 'Qaat', 'Qaau', 'Qaav', 'Qaaw', 'Qaax', 'Qaay', 'Qaaz', 'Qaba', 'Qabb', 'Qabc', 'Qabd', 'Qabe', 'Qabf', 'Qabg', 'Qabh', 'Qabi', 'Qabj', 'Qabk', 'Qabl', 'Qabm', 'Qabn', 'Qabo', 'Qabp', 'Qabq', 'Qabr', 'Qabs', 'Qabt', 'Qabu', 'Qabv', 'Qabw', 'Qabx', 'Ranj', 'Rjng', 'Rohg', 'Roro', 'Runr', 'Samr', 'Sara', 'Sarb', 'Saur', 'Sgnw', 'Shaw', 'Shrd', 'Shui', 'Sidd', 'Sidt', 'Sind', 'Sinh', 'Sogd', 'Sogo', 'Sora', 'Soyo', 'Sund', 'Sunu', 'Sylo', 'Syrc', 'Syre', 'Syrj', 'Syrn', 'Tagb', 'Takr', 'Tale', 'Talu', 'Taml', 'Tang', 'Tavt', 'Tayo', 'Telu', 'Teng', 'Tfng', 'Tglg', 'Thaa', 'Thai', 'Tibt', 'Tirh', 'Tnsa', 'Todr', 'Tols', 'Toto', 'Tutg', 'Ugar', 'Vaii', 'Visp', 'Vith', 'Wara', 'Wcho', 'Wole', 'Xpeo', 'Xsux', 'Yezi', 'Yiii', 'Zanb', 'Zinh', 'Zmth', 'Zsye', 'Zsym', 'Zxxx', 'Zyyy', 'Zzzz']); +function isISO15924(str) { + (0, _assertString.default)(str); + return validISO15924Codes.has(str); +} +var ScriptCodes = exports.ScriptCodes = validISO15924Codes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO31661Alpha2.js b/src/hello/server/node_modules/validator/lib/isISO31661Alpha2.js new file mode 100644 index 00000000..90650bff --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO31661Alpha2.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CountryCodes = void 0; +exports.default = isISO31661Alpha2; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +var validISO31661Alpha2CountriesCodes = new Set(['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW']); +function isISO31661Alpha2(str) { + (0, _assertString.default)(str); + return validISO31661Alpha2CountriesCodes.has(str.toUpperCase()); +} +var CountryCodes = exports.CountryCodes = validISO31661Alpha2CountriesCodes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO31661Alpha3.js b/src/hello/server/node_modules/validator/lib/isISO31661Alpha3.js new file mode 100644 index 00000000..3b2b0064 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO31661Alpha3.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISO31661Alpha3; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 +var validISO31661Alpha3CountriesCodes = new Set(['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']); +function isISO31661Alpha3(str) { + (0, _assertString.default)(str); + return validISO31661Alpha3CountriesCodes.has(str.toUpperCase()); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO31661Numeric.js b/src/hello/server/node_modules/validator/lib/isISO31661Numeric.js new file mode 100644 index 00000000..5dd96461 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO31661Numeric.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISO31661Numeric; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// from https://en.wikipedia.org/wiki/ISO_3166-1_numeric +var validISO31661NumericCountriesCodes = new Set(['004', '008', '010', '012', '016', '020', '024', '028', '031', '032', '036', '040', '044', '048', '050', '051', '052', '056', '060', '064', '068', '070', '072', '074', '076', '084', '086', '090', '092', '096', '100', '104', '108', '112', '116', '120', '124', '132', '136', '140', '144', '148', '152', '156', '158', '162', '166', '170', '174', '175', '178', '180', '184', '188', '191', '192', '196', '203', '204', '208', '212', '214', '218', '222', '226', '231', '232', '233', '234', '238', '239', '242', '246', '248', '250', '254', '258', '260', '262', '266', '268', '270', '275', '276', '288', '292', '296', '300', '304', '308', '312', '316', '320', '324', '328', '332', '334', '336', '340', '344', '348', '352', '356', '360', '364', '368', '372', '376', '380', '384', '388', '392', '398', '400', '404', '408', '410', '414', '417', '418', '422', '426', '428', '430', '434', '438', '440', '442', '446', '450', '454', '458', '462', '466', '470', '474', '478', '480', '484', '492', '496', '498', '499', '500', '504', '508', '512', '516', '520', '524', '528', '531', '533', '534', '535', '540', '548', '554', '558', '562', '566', '570', '574', '578', '580', '581', '583', '584', '585', '586', '591', '598', '600', '604', '608', '612', '616', '620', '624', '626', '630', '634', '638', '642', '643', '646', '652', '654', '659', '660', '662', '663', '666', '670', '674', '678', '682', '686', '688', '690', '694', '702', '703', '704', '705', '706', '710', '716', '724', '728', '729', '732', '740', '744', '748', '752', '756', '760', '762', '764', '768', '772', '776', '780', '784', '788', '792', '795', '796', '798', '800', '804', '807', '818', '826', '831', '832', '833', '834', '840', '850', '854', '858', '860', '862', '876', '882', '887', '894']); +function isISO31661Numeric(str) { + (0, _assertString.default)(str); + return validISO31661NumericCountriesCodes.has(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO4217.js b/src/hello/server/node_modules/validator/lib/isISO4217.js new file mode 100644 index 00000000..bf6f76c6 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO4217.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CurrencyCodes = void 0; +exports.default = isISO4217; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// from https://en.wikipedia.org/wiki/ISO_4217 +var validISO4217CurrencyCodes = new Set(['AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLE', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'USN', 'UYI', 'UYU', 'UYW', 'UZS', 'VED', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XCD', 'XDR', 'XOF', 'XPD', 'XPF', 'XPT', 'XSU', 'XTS', 'XUA', 'XXX', 'YER', 'ZAR', 'ZMW', 'ZWL']); +function isISO4217(str) { + (0, _assertString.default)(str); + return validISO4217CurrencyCodes.has(str.toUpperCase()); +} +var CurrencyCodes = exports.CurrencyCodes = validISO4217CurrencyCodes; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO6346.js b/src/hello/server/node_modules/validator/lib/isISO6346.js new file mode 100644 index 00000000..87cbd71c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO6346.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isFreightContainerID = void 0; +exports.isISO6346 = isISO6346; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// https://en.wikipedia.org/wiki/ISO_6346 +// according to ISO6346 standard, checksum digit is mandatory for freight container but recommended +// for other container types (J and Z) +var isISO6346Str = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/; +var isDigit = /^[0-9]$/; +function isISO6346(str) { + (0, _assertString.default)(str); + str = str.toUpperCase(); + if (!isISO6346Str.test(str)) return false; + if (str.length === 11) { + var sum = 0; + for (var i = 0; i < str.length - 1; i++) { + if (!isDigit.test(str[i])) { + var convertedCode = void 0; + var letterCode = str.charCodeAt(i) - 55; + if (letterCode < 11) convertedCode = letterCode;else if (letterCode >= 11 && letterCode <= 20) convertedCode = 12 + letterCode % 11;else if (letterCode >= 21 && letterCode <= 30) convertedCode = 23 + letterCode % 21;else convertedCode = 34 + letterCode % 31; + sum += convertedCode * Math.pow(2, i); + } else sum += str[i] * Math.pow(2, i); + } + var checkSumDigit = sum % 11; + if (checkSumDigit === 10) checkSumDigit = 0; + return Number(str[str.length - 1]) === checkSumDigit; + } + return true; +} +var isFreightContainerID = exports.isFreightContainerID = isISO6346; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO6391.js b/src/hello/server/node_modules/validator/lib/isISO6391.js new file mode 100644 index 00000000..8384d2b7 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO6391.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISO6391; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var isISO6391Set = new Set(['aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'io', 'is', 'it', 'iu', 'ja', 'jv', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc', 'sd', 'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've', 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu']); +function isISO6391(str) { + (0, _assertString.default)(str); + return isISO6391Set.has(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISO8601.js b/src/hello/server/node_modules/validator/lib/isISO8601.js new file mode 100644 index 00000000..fde3ce83 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISO8601.js @@ -0,0 +1,50 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISO8601; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/* eslint-disable max-len */ +// from http://goo.gl/0ejHHW +var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +// same as above, except with a strict 'T' separator between date and time +var iso8601StrictSeparator = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +/* eslint-enable max-len */ +var isValidDate = function isValidDate(str) { + // str must have passed the ISO8601 check + // this check is meant to catch invalid dates + // like 2009-02-31 + // first check for ordinal dates + var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/); + if (ordinalMatch) { + var oYear = Number(ordinalMatch[1]); + var oDay = Number(ordinalMatch[2]); + // if is leap year + if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366; + return oDay <= 365; + } + var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number); + var year = match[1]; + var month = match[2]; + var day = match[3]; + var monthString = month ? "0".concat(month).slice(-2) : month; + var dayString = day ? "0".concat(day).slice(-2) : day; + + // create a date object and compare + var d = new Date("".concat(year, "-").concat(monthString || '01', "-").concat(dayString || '01')); + if (month && day) { + return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day; + } + return true; +}; +function isISO8601(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _assertString.default)(str); + var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str); + if (check && options.strict) return isValidDate(str); + return check; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISRC.js b/src/hello/server/node_modules/validator/lib/isISRC.js new file mode 100644 index 00000000..1234076a --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISRC.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISRC; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// see http://isrc.ifpi.org/en/isrc-standard/code-syntax +var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; +function isISRC(str) { + (0, _assertString.default)(str); + return isrc.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isISSN.js b/src/hello/server/node_modules/validator/lib/isISSN.js new file mode 100644 index 00000000..61c91bbd --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isISSN.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isISSN; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var issn = '^\\d{4}-?\\d{3}[\\dX]$'; +function isISSN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _assertString.default)(str); + var testIssn = issn; + testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn; + testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i'); + if (!testIssn.test(str)) { + return false; + } + var digits = str.replace('-', '').toUpperCase(); + var checksum = 0; + for (var i = 0; i < digits.length; i++) { + var digit = digits[i]; + checksum += (digit === 'X' ? 10 : +digit) * (8 - i); + } + return checksum % 11 === 0; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isIdentityCard.js b/src/hello/server/node_modules/validator/lib/isIdentityCard.js new file mode 100644 index 00000000..1c3fd31c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isIdentityCard.js @@ -0,0 +1,426 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIdentityCard; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _includesArray = _interopRequireDefault(require("./util/includesArray")); +var _isInt = _interopRequireDefault(require("./isInt")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var validators = { + PL: function PL(str) { + (0, _assertString.default)(str); + var weightOfDigits = { + 1: 1, + 2: 3, + 3: 7, + 4: 9, + 5: 1, + 6: 3, + 7: 7, + 8: 9, + 9: 1, + 10: 3, + 11: 0 + }; + if (str != null && str.length === 11 && (0, _isInt.default)(str, { + allow_leading_zeroes: true + })) { + var digits = str.split('').slice(0, -1); + var sum = digits.reduce(function (acc, digit, index) { + return acc + Number(digit) * weightOfDigits[index + 1]; + }, 0); + var modulo = sum % 10; + var lastDigit = Number(str.charAt(str.length - 1)); + if (modulo === 0 && lastDigit === 0 || lastDigit === 10 - modulo) { + return true; + } + } + return false; + }, + ES: function ES(str) { + (0, _assertString.default)(str); + var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/; + var charsValue = { + X: 0, + Y: 1, + Z: 2 + }; + var controlDigits = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; + + // sanitize user input + var sanitized = str.trim().toUpperCase(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + + // validate the control digit + var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function (char) { + return charsValue[char]; + }); + return sanitized.endsWith(controlDigits[number % 23]); + }, + FI: function FI(str) { + // https://dvv.fi/en/personal-identity-code#:~:text=control%20character%20for%20a-,personal,-identity%20code%20calculated + (0, _assertString.default)(str); + if (str.length !== 11) { + return false; + } + if (!str.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)) { + return false; + } + var checkDigits = '0123456789ABCDEFHJKLMNPRSTUVWXY'; + var idAsNumber = parseInt(str.slice(0, 6), 10) * 1000 + parseInt(str.slice(7, 10), 10); + var remainder = idAsNumber % 31; + var checkDigit = checkDigits[remainder]; + return checkDigit === str.slice(10, 11); + }, + IN: function IN(str) { + var DNI = /^[1-9]\d{3}\s?\d{4}\s?\d{4}$/; + + // multiplication table + var d = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + + // permutation table + var p = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + var c = 0; + var invertedArray = sanitized.replace(/\s/g, '').split('').map(Number).reverse(); + invertedArray.forEach(function (val, i) { + c = d[c][p[i % 8][val]]; + }); + return c === 0; + }, + IR: function IR(str) { + if (!str.match(/^\d{10}$/)) return false; + str = "0000".concat(str).slice(str.length - 6); + if (parseInt(str.slice(3, 9), 10) === 0) return false; + var lastNumber = parseInt(str.slice(9, 10), 10); + var sum = 0; + for (var i = 0; i < 9; i++) { + sum += parseInt(str.slice(i, i + 1), 10) * (10 - i); + } + sum %= 11; + return sum < 2 && lastNumber === sum || sum >= 2 && lastNumber === 11 - sum; + }, + IT: function IT(str) { + if (str.length !== 9) return false; + if (str === 'CA00000AA') return false; // https://it.wikipedia.org/wiki/Carta_d%27identit%C3%A0_elettronica_italiana + return str.search(/C[A-Z]\d{5}[A-Z]{2}/i) > -1; + }, + NO: function NO(str) { + var sanitized = str.trim(); + if (isNaN(Number(sanitized))) return false; + if (sanitized.length !== 11) return false; + if (sanitized === '00000000000') return false; + + // https://no.wikipedia.org/wiki/F%C3%B8dselsnummer + var f = sanitized.split('').map(Number); + var k1 = (11 - (3 * f[0] + 7 * f[1] + 6 * f[2] + 1 * f[3] + 8 * f[4] + 9 * f[5] + 4 * f[6] + 5 * f[7] + 2 * f[8]) % 11) % 11; + var k2 = (11 - (5 * f[0] + 4 * f[1] + 3 * f[2] + 2 * f[3] + 7 * f[4] + 6 * f[5] + 5 * f[6] + 4 * f[7] + 3 * f[8] + 2 * k1) % 11) % 11; + if (k1 !== f[9] || k2 !== f[10]) return false; + return true; + }, + TH: function TH(str) { + if (!str.match(/^[1-8]\d{12}$/)) return false; + + // validate check digit + var sum = 0; + for (var i = 0; i < 12; i++) { + sum += parseInt(str[i], 10) * (13 - i); + } + return str[12] === ((11 - sum % 11) % 10).toString(); + }, + LK: function LK(str) { + var old_nic = /^[1-9]\d{8}[vx]$/i; + var new_nic = /^[1-9]\d{11}$/i; + if (str.length === 10 && old_nic.test(str)) return true;else if (str.length === 12 && new_nic.test(str)) return true; + return false; + }, + 'he-IL': function heIL(str) { + var DNI = /^\d{9}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + var id = sanitized; + var sum = 0, + incNum; + for (var i = 0; i < id.length; i++) { + incNum = Number(id[i]) * (i % 2 + 1); // Multiply number by 1 or 2 + sum += incNum > 9 ? incNum - 9 : incNum; // Sum the digits up and add to total + } + return sum % 10 === 0; + }, + 'ar-LY': function arLY(str) { + // Libya National Identity Number NIN is 12 digits, the first digit is either 1 or 2 + var NIN = /^(1|2)\d{11}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!NIN.test(sanitized)) { + return false; + } + return true; + }, + 'ar-TN': function arTN(str) { + var DNI = /^\d{8}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + return true; + }, + 'zh-CN': function zhCN(str) { + var provincesAndCities = ['11', + // 北京 + '12', + // 天津 + '13', + // 河北 + '14', + // 山西 + '15', + // 内蒙古 + '21', + // 辽宁 + '22', + // 吉林 + '23', + // 黑龙江 + '31', + // 上海 + '32', + // 江苏 + '33', + // 浙江 + '34', + // 安徽 + '35', + // 福建 + '36', + // 江西 + '37', + // 山东 + '41', + // 河南 + '42', + // 湖北 + '43', + // 湖南 + '44', + // 广东 + '45', + // 广西 + '46', + // 海南 + '50', + // 重庆 + '51', + // 四川 + '52', + // 贵州 + '53', + // 云南 + '54', + // 西藏 + '61', + // 陕西 + '62', + // 甘肃 + '63', + // 青海 + '64', + // 宁夏 + '65', + // 新疆 + '71', + // 台湾 + '81', + // 香港 + '82', + // 澳门 + '91' // 国外 + ]; + var powers = ['7', '9', '10', '5', '8', '4', '2', '1', '6', '3', '7', '9', '10', '5', '8', '4', '2']; + var parityBit = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2']; + var checkAddressCode = function checkAddressCode(addressCode) { + return (0, _includesArray.default)(provincesAndCities, addressCode); + }; + var checkBirthDayCode = function checkBirthDayCode(birDayCode) { + var yyyy = parseInt(birDayCode.substring(0, 4), 10); + var mm = parseInt(birDayCode.substring(4, 6), 10); + var dd = parseInt(birDayCode.substring(6), 10); + var xdata = new Date(yyyy, mm - 1, dd); + if (xdata > new Date()) { + return false; + // eslint-disable-next-line max-len + } else if (xdata.getFullYear() === yyyy && xdata.getMonth() === mm - 1 && xdata.getDate() === dd) { + return true; + } + return false; + }; + var getParityBit = function getParityBit(idCardNo) { + var id17 = idCardNo.substring(0, 17); + var power = 0; + for (var i = 0; i < 17; i++) { + power += parseInt(id17.charAt(i), 10) * parseInt(powers[i], 10); + } + var mod = power % 11; + return parityBit[mod]; + }; + var checkParityBit = function checkParityBit(idCardNo) { + return getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase(); + }; + var check15IdCardNo = function check15IdCardNo(idCardNo) { + var check = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = "19".concat(idCardNo.substring(6, 12)); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return true; + }; + var check18IdCardNo = function check18IdCardNo(idCardNo) { + var check = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = idCardNo.substring(6, 14); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return checkParityBit(idCardNo); + }; + var checkIdCardNo = function checkIdCardNo(idCardNo) { + var check = /^\d{15}|(\d{17}(\d|x|X))$/.test(idCardNo); + if (!check) return false; + if (idCardNo.length === 15) { + return check15IdCardNo(idCardNo); + } + return check18IdCardNo(idCardNo); + }; + return checkIdCardNo(str); + }, + 'zh-HK': function zhHK(str) { + // sanitize user input + str = str.trim(); + + // HKID number starts with 1 or 2 letters, followed by 6 digits, + // then a checksum contained in square / round brackets or nothing + var regexHKID = /^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/; + var regexIsDigit = /^[0-9]$/; + + // convert the user input to all uppercase and apply regex + str = str.toUpperCase(); + if (!regexHKID.test(str)) return false; + str = str.replace(/\[|\]|\(|\)/g, ''); + if (str.length === 8) str = "3".concat(str); + var checkSumVal = 0; + for (var i = 0; i <= 7; i++) { + var convertedChar = void 0; + if (!regexIsDigit.test(str[i])) convertedChar = (str[i].charCodeAt(0) - 55) % 11;else convertedChar = str[i]; + checkSumVal += convertedChar * (9 - i); + } + checkSumVal %= 11; + var checkSumConverted; + if (checkSumVal === 0) checkSumConverted = '0';else if (checkSumVal === 1) checkSumConverted = 'A';else checkSumConverted = String(11 - checkSumVal); + if (checkSumConverted === str[str.length - 1]) return true; + return false; + }, + 'zh-TW': function zhTW(str) { + var ALPHABET_CODES = { + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + G: 16, + H: 17, + I: 34, + J: 18, + K: 19, + L: 20, + M: 21, + N: 22, + O: 35, + P: 23, + Q: 24, + R: 25, + S: 26, + T: 27, + U: 28, + V: 29, + W: 32, + X: 30, + Y: 31, + Z: 33 + }; + var sanitized = str.trim().toUpperCase(); + if (!/^[A-Z][0-9]{9}$/.test(sanitized)) return false; + return Array.from(sanitized).reduce(function (sum, number, index) { + if (index === 0) { + var code = ALPHABET_CODES[number]; + return code % 10 * 9 + Math.floor(code / 10); + } + if (index === 9) { + return (10 - sum % 10 - Number(number)) % 10 === 0; + } + return sum + Number(number) * (9 - index); + }, 0); + }, + PK: function PK(str) { + // Pakistani National Identity Number CNIC is 13 digits + var CNIC = /^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + return CNIC.test(sanitized); + } +}; +function isIdentityCard(str, locale) { + (0, _assertString.default)(str); + if (locale in validators) { + return validators[locale](str); + } else if (locale === 'any') { + for (var key in validators) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (validators.hasOwnProperty(key)) { + var validator = validators[key]; + if (validator(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isIn.js b/src/hello/server/node_modules/validator/lib/isIn.js new file mode 100644 index 00000000..f617317d --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isIn.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isIn; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _toString = _interopRequireDefault(require("./util/toString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function isIn(str, options) { + (0, _assertString.default)(str); + var i; + if (Object.prototype.toString.call(options) === '[object Array]') { + var array = []; + for (i in options) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if ({}.hasOwnProperty.call(options, i)) { + array[i] = (0, _toString.default)(options[i]); + } + } + return array.indexOf(str) >= 0; + } else if (_typeof(options) === 'object') { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === 'function') { + return options.indexOf(str) >= 0; + } + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isInt.js b/src/hello/server/node_modules/validator/lib/isInt.js new file mode 100644 index 00000000..b85dbba2 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isInt.js @@ -0,0 +1,28 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isInt; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _nullUndefinedCheck = _interopRequireDefault(require("./util/nullUndefinedCheck")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; +var intLeadingZeroes = /^[-+]?[0-9]+$/; +function isInt(str, options) { + (0, _assertString.default)(str); + options = options || {}; + + // Get the regex to use for testing, based on whether + // leading zeroes are allowed or not. + var regex = options.allow_leading_zeroes === false ? int : intLeadingZeroes; + + // Check min/max/lt/gt + var minCheckPassed = !options.hasOwnProperty('min') || (0, _nullUndefinedCheck.default)(options.min) || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty('max') || (0, _nullUndefinedCheck.default)(options.max) || str <= options.max; + var ltCheckPassed = !options.hasOwnProperty('lt') || (0, _nullUndefinedCheck.default)(options.lt) || str < options.lt; + var gtCheckPassed = !options.hasOwnProperty('gt') || (0, _nullUndefinedCheck.default)(options.gt) || str > options.gt; + return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isJSON.js b/src/hello/server/node_modules/validator/lib/isJSON.js new file mode 100644 index 00000000..e664c082 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isJSON.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isJSON; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _includesArray = _interopRequireDefault(require("./util/includesArray")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +var default_json_options = { + allow_primitives: false +}; +function isJSON(str, options) { + (0, _assertString.default)(str); + try { + options = (0, _merge.default)(options, default_json_options); + var primitives = []; + if (options.allow_primitives) { + primitives = [null, false, true]; + } + var obj = JSON.parse(str); + return (0, _includesArray.default)(primitives, obj) || !!obj && _typeof(obj) === 'object'; + } catch (e) {/* ignore */} + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isJWT.js b/src/hello/server/node_modules/validator/lib/isJWT.js new file mode 100644 index 00000000..819ba5cb --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isJWT.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isJWT; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _isBase = _interopRequireDefault(require("./isBase64")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isJWT(str) { + (0, _assertString.default)(str); + var dotSplit = str.split('.'); + var len = dotSplit.length; + if (len !== 3) { + return false; + } + return dotSplit.reduce(function (acc, currElem) { + return acc && (0, _isBase.default)(currElem, { + urlSafe: true + }); + }, true); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isLatLong.js b/src/hello/server/node_modules/validator/lib/isLatLong.js new file mode 100644 index 00000000..ae49b568 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isLatLong.js @@ -0,0 +1,30 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLatLong; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _merge = _interopRequireDefault(require("./util/merge")); +var _includesString = _interopRequireDefault(require("./util/includesString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/; +var long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/; +var latDMS = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i; +var longDMS = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i; +var defaultLatLongOptions = { + checkDMS: false +}; +function isLatLong(str, options) { + (0, _assertString.default)(str); + options = (0, _merge.default)(options, defaultLatLongOptions); + if (!(0, _includesString.default)(str, ',')) return false; + var pair = str.split(','); + if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false; + if (options.checkDMS) { + return latDMS.test(pair[0]) && longDMS.test(pair[1]); + } + return lat.test(pair[0]) && long.test(pair[1]); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isLength.js b/src/hello/server/node_modules/validator/lib/isLength.js new file mode 100644 index 00000000..32d8aff1 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isLength.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLength; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +/* eslint-disable prefer-rest-params */ +function isLength(str, options) { + (0, _assertString.default)(str); + var min; + var max; + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isLength(str, min [, max]) + min = arguments[1] || 0; + max = arguments[2]; + } + var presentationSequences = str.match(/[^\uFE0F\uFE0E][\uFE0F\uFE0E]/g) || []; + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - presentationSequences.length - surrogatePairs.length; + var isInsideRange = len >= min && (typeof max === 'undefined' || len <= max); + if (isInsideRange && Array.isArray(options === null || options === void 0 ? void 0 : options.discreteLengths)) { + return options.discreteLengths.some(function (discreteLen) { + return discreteLen === len; + }); + } + return isInsideRange; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isLicensePlate.js b/src/hello/server/node_modules/validator/lib/isLicensePlate.js new file mode 100644 index 00000000..c230bfb2 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isLicensePlate.js @@ -0,0 +1,67 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLicensePlate; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var validators = { + 'cs-CZ': function csCZ(str) { + return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str); + }, + 'de-DE': function deDE(str) { + return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|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-9]{4}$/.test(str); + }, + 'en-SG': function enSG(str) { + return /^[A-Z]{3}[ -]?[\d]{4}[ -]?[A-Z]{1}$/.test(str); + }, + 'es-AR': function esAR(str) { + return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str); + }, + 'fi-FI': function fiFI(str) { + return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str); + }, + 'hu-HU': function huHU(str) { + return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(str); + }, + 'pt-BR': function ptBR(str) { + return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str); + }, + 'pt-PT': function ptPT(str) { + return /^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(str); + }, + 'sq-AL': function sqAL(str) { + return /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(str); + }, + 'sv-SE': function svSE(str) { + return /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim()); + }, + 'en-PK': function enPK(str) { + return /(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(str.trim()); + } +}; +function isLicensePlate(str, locale) { + (0, _assertString.default)(str); + if (locale in validators) { + return validators[locale](str); + } else if (locale === 'any') { + for (var key in validators) { + /* eslint guard-for-in: 0 */ + var validator = validators[key]; + if (validator(str)) { + return true; + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isLocale.js b/src/hello/server/node_modules/validator/lib/isLocale.js new file mode 100644 index 00000000..31604688 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isLocale.js @@ -0,0 +1,115 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLocale; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/* + = 3ALPHA ; selected ISO 639 codes + *2("-" 3ALPHA) ; permanently reserved + */ +var extlang = '([A-Za-z]{3}(-[A-Za-z]{3}){0,2})'; + +/* + = 2*3ALPHA ; shortest ISO 639 code + ["-" extlang] ; sometimes followed by + ; extended language subtags + / 4ALPHA ; or reserved for future use + / 5*8ALPHA ; or registered language subtag + */ +var language = "(([a-zA-Z]{2,3}(-".concat(extlang, ")?)|([a-zA-Z]{5,8}))"); + +/* + = 4ALPHA ; ISO 15924 code + */ +var script = '([A-Za-z]{4})'; + +/* + = 2ALPHA ; ISO 3166-1 code + / 3DIGIT ; UN M.49 code + */ +var region = '([A-Za-z]{2}|\\d{3})'; + +/* + = 5*8alphanum ; registered variants + / (DIGIT 3alphanum) + */ +var variant = '([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))'; + +/* + = DIGIT ; 0 - 9 + / %x41-57 ; A - W + / %x59-5A ; Y - Z + / %x61-77 ; a - w + / %x79-7A ; y - z + */ +var singleton = '(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])'; + +/* + = singleton 1*("-" (2*8alphanum)) + ; Single alphanumerics + ; "x" reserved for private use + */ +var extension = "(".concat(singleton, "(-[A-Za-z0-9]{2,8})+)"); + +/* + = "x" 1*("-" (1*8alphanum)) + */ +var privateuse = '(x(-[A-Za-z0-9]{1,8})+)'; + +// irregular tags do not match the 'langtag' production and would not +// otherwise be considered 'well-formed'. These tags are all valid, but +// most are deprecated in favor of more modern subtags or subtag combination + +var irregular = '((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|' + '(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|' + '(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))'; + +// regular tags match the 'langtag' production, but their subtags are not +// extended language or variant subtags: their meaning is defined by +// their registration and all of these are deprecated in favor of a more +// modern subtag or sequence of subtags + +var regular = '((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|' + '(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))'; + +/* + = irregular ; non-redundant tags registered + / regular ; during the RFC 3066 era + + */ +var grandfathered = "(".concat(irregular, "|").concat(regular, ")"); + +/* + RFC 5646 defines delimitation of subtags via a hyphen: + + "Subtag" refers to a specific section of a tag, delimited by a + hyphen, such as the subtags 'zh', 'Hant', and 'CN' in the tag "zh- + Hant-CN". Examples of subtags in this document are enclosed in + single quotes ('Hant') + + However, we need to add "_" to maintain the existing behaviour. + */ +var delimiter = '(-|_)'; + +/* + = language + ["-" script] + ["-" region] + *("-" variant) + *("-" extension) + ["-" privateuse] + */ +var langtag = "".concat(language, "(").concat(delimiter).concat(script, ")?(").concat(delimiter).concat(region, ")?(").concat(delimiter).concat(variant, ")*(").concat(delimiter).concat(extension, ")*(").concat(delimiter).concat(privateuse, ")?"); + +/* + Regex implementation based on BCP RFC 5646 + Tags for Identifying Languages + https://www.rfc-editor.org/rfc/rfc5646.html + */ +var languageTagRegex = new RegExp("(^".concat(privateuse, "$)|(^").concat(grandfathered, "$)|(^").concat(langtag, "$)")); +function isLocale(str) { + (0, _assertString.default)(str); + return languageTagRegex.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isLowercase.js b/src/hello/server/node_modules/validator/lib/isLowercase.js new file mode 100644 index 00000000..8c15fbb5 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isLowercase.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLowercase; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isLowercase(str) { + (0, _assertString.default)(str); + return str === str.toLowerCase(); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isLuhnNumber.js b/src/hello/server/node_modules/validator/lib/isLuhnNumber.js new file mode 100644 index 00000000..19fb4ec3 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isLuhnNumber.js @@ -0,0 +1,34 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isLuhnNumber; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isLuhnNumber(str) { + (0, _assertString.default)(str); + var sanitized = str.replace(/[- ]+/g, ''); + var sum = 0; + var digit; + var tmpNum; + var shouldDouble; + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + return !!(sum % 10 === 0 ? sanitized : false); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMACAddress.js b/src/hello/server/node_modules/validator/lib/isMACAddress.js new file mode 100644 index 00000000..1ec6b81c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMACAddress.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMACAddress; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/; +var macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/; +var macAddress48WithDots = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/; +var macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/; +var macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/; +var macAddress64WithDots = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/; +function isMACAddress(str, options) { + (0, _assertString.default)(str); + if (options !== null && options !== void 0 && options.eui) { + options.eui = String(options.eui); + } + /** + * @deprecated `no_colons` TODO: remove it in the next major + */ + if (options !== null && options !== void 0 && options.no_colons || options !== null && options !== void 0 && options.no_separators) { + if (options.eui === '48') { + return macAddress48NoSeparators.test(str); + } + if (options.eui === '64') { + return macAddress64NoSeparators.test(str); + } + return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === '48') { + return macAddress48.test(str) || macAddress48WithDots.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === '64') { + return macAddress64.test(str) || macAddress64WithDots.test(str); + } + return isMACAddress(str, { + eui: '48' + }) || isMACAddress(str, { + eui: '64' + }); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMD5.js b/src/hello/server/node_modules/validator/lib/isMD5.js new file mode 100644 index 00000000..c29e78b5 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMD5.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMD5; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var md5 = /^[a-f0-9]{32}$/; +function isMD5(str) { + (0, _assertString.default)(str); + return md5.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMagnetURI.js b/src/hello/server/node_modules/validator/lib/isMagnetURI.js new file mode 100644 index 00000000..c7d021af --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMagnetURI.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMagnetURI; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i; +function isMagnetURI(url) { + (0, _assertString.default)(url); + if (url.indexOf('magnet:?') !== 0) { + return false; + } + return magnetURIComponent.test(url); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMailtoURI.js b/src/hello/server/node_modules/validator/lib/isMailtoURI.js new file mode 100644 index 00000000..fa5f0ee7 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMailtoURI.js @@ -0,0 +1,84 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMailtoURI; +var _trim = _interopRequireDefault(require("./trim")); +var _isEmail = _interopRequireDefault(require("./isEmail")); +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function parseMailtoQueryString(queryString) { + var allowedParams = new Set(['subject', 'body', 'cc', 'bcc']), + query = { + cc: '', + bcc: '' + }; + var isParseFailed = false; + var queryParams = queryString.split('&'); + if (queryParams.length > 4) { + return false; + } + var _iterator = _createForOfIteratorHelper(queryParams), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var q = _step.value; + var _q$split = q.split('='), + _q$split2 = _slicedToArray(_q$split, 2), + key = _q$split2[0], + value = _q$split2[1]; + + // checked for invalid and duplicated query params + if (key && !allowedParams.has(key)) { + isParseFailed = true; + break; + } + if (value && (key === 'cc' || key === 'bcc')) { + query[key] = value; + } + if (key) { + allowedParams.delete(key); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + return isParseFailed ? false : query; +} +function isMailtoURI(url, options) { + (0, _assertString.default)(url); + if (url.indexOf('mailto:') !== 0) { + return false; + } + var _url$replace$split = url.replace('mailto:', '').split('?'), + _url$replace$split2 = _slicedToArray(_url$replace$split, 2), + to = _url$replace$split2[0], + _url$replace$split2$ = _url$replace$split2[1], + queryString = _url$replace$split2$ === void 0 ? '' : _url$replace$split2$; + if (!to && !queryString) { + return true; + } + var query = parseMailtoQueryString(queryString); + if (!query) { + return false; + } + return "".concat(to, ",").concat(query.cc, ",").concat(query.bcc).split(',').every(function (email) { + email = (0, _trim.default)(email, ' '); + if (email) { + return (0, _isEmail.default)(email, options); + } + return true; + }); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMimeType.js b/src/hello/server/node_modules/validator/lib/isMimeType.js new file mode 100644 index 00000000..e8c9dca7 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMimeType.js @@ -0,0 +1,48 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMimeType; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/* + Checks if the provided string matches to a correct Media type format (MIME type) + + This function only checks is the string format follows the + established rules by the according RFC specifications. + This function supports 'charset' in textual media types + (https://tools.ietf.org/html/rfc6657). + + This function does not check against all the media types listed + by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml) + because of lightness purposes : it would require to include + all these MIME types in this library, which would weigh it + significantly. This kind of effort maybe is not worth for the use that + this function has in this entire library. + + More information in the RFC specifications : + - https://tools.ietf.org/html/rfc2045 + - https://tools.ietf.org/html/rfc2046 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.1 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.5 +*/ + +// Match simple MIME types +// NB : +// Subtype length must not exceed 100 characters. +// This rule does not comply to the RFC specs (what is the max length ?). +var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i; // eslint-disable-line max-len + +// Handle "charset" in "text/*" +var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len + +// Handle "boundary" in "multipart/*" +var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len + +function isMimeType(str) { + (0, _assertString.default)(str); + return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMobilePhone.js b/src/hello/server/node_modules/validator/lib/isMobilePhone.js new file mode 100644 index 00000000..f37577d9 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMobilePhone.js @@ -0,0 +1,218 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMobilePhone; +exports.locales = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/* eslint-disable max-len */ +var phones = { + 'am-AM': /^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/, + 'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/, + 'ar-BH': /^(\+?973)?(3|6)\d{7}$/, + 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, + 'ar-LB': /^(\+?961)?((3|81)\d{6}|7\d{7})$/, + 'ar-EG': /^((\+?20)|0)?1[0125]\d{8}$/, + 'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/, + 'ar-JO': /^(\+?962|0)?7[789]\d{7}$/, + 'ar-KW': /^(\+?965)([569]\d{7}|41\d{6})$/, + 'ar-LY': /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/, + 'ar-MA': /^(?:(?:\+|00)212|0)[5-7]\d{8}$/, + 'ar-OM': /^((\+|00)968)?([79][1-9])\d{6}$/, + 'ar-PS': /^(\+?970|0)5[6|9](\d{7})$/, + 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, + 'ar-SD': /^((\+?249)|0)?(9[012369]|1[012])\d{7}$/, + 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, + 'ar-TN': /^(\+?216)?[2459]\d{7}$/, + 'az-AZ': /^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/, + 'ar-QA': /^(\+?974|0)?([3567]\d{7})$/, + 'bs-BA': /^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/, + 'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/, + 'bg-BG': /^(\+?359|0)?8[789]\d{7}$/, + 'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/, + 'ca-AD': /^(\+376)?[346]\d{5}$/, + 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'de-DE': /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/, + 'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/, + 'de-CH': /^(\+41|0)([1-9])\d{1,9}$/, + 'de-LU': /^(\+352)?((6\d1)\d{6})$/, + 'dv-MV': /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/, + 'el-GR': /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/, + 'el-CY': /^(\+?357?)?(9(9|7|6|5|4)\d{6})$/, + 'en-AI': /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/, + 'en-AU': /^(\+?61|0)4\d{8}$/, + 'en-AG': /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/, + 'en-BM': /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/, + 'en-BS': /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/, + 'en-GB': /^(\+?44|0)7[1-9]\d{8}$/, + 'en-GG': /^(\+?44|0)1481\d{6}$/, + 'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/, + 'en-GY': /^(\+592|0)6\d{6}$/, + 'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/, + 'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/, + 'en-IE': /^(\+?353|0)8[356789]\d{7}$/, + 'en-IN': /^(\+?91|0)?[6789]\d{9}$/, + 'en-JM': /^(\+?876)?\d{7}$/, + 'en-KE': /^(\+?254|0)(7|1)\d{8}$/, + 'fr-CF': /^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/, + 'en-SS': /^(\+?211|0)(9[1257])\d{7}$/, + 'en-KI': /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/, + 'en-KN': /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/, + 'en-LS': /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/, + 'en-MT': /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/, + 'en-MU': /^(\+?230|0)?\d{8}$/, + 'en-MW': /^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/, + 'en-NA': /^(\+?264|0)(6|8)\d{7}$/, + 'en-NG': /^(\+?234|0)?[789]\d{9}$/, + 'en-NZ': /^(\+?64|0)[28]\d{7,9}$/, + 'en-PG': /^(\+?675|0)?(7\d|8[18])\d{6}$/, + 'en-PK': /^((00|\+)?92|0)3[0-6]\d{8}$/, + 'en-PH': /^(09|\+639)\d{9}$/, + 'en-RW': /^(\+?250|0)?[7]\d{8}$/, + 'en-SG': /^(\+65)?[3689]\d{7}$/, + 'en-SL': /^(\+?232|0)\d{8}$/, + 'en-TZ': /^(\+?255|0)?[67]\d{8}$/, + 'en-UG': /^(\+?256|0)?[7]\d{8}$/, + 'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/, + 'en-ZA': /^(\+?27|0)\d{9}$/, + 'en-ZM': /^(\+?26)?0[79][567]\d{7}$/, + 'en-ZW': /^(\+263)[0-9]{9}$/, + 'en-BW': /^(\+?267)?(7[1-8]{1})\d{6}$/, + 'es-AR': /^\+?549(11|[2368]\d)\d{8}$/, + 'es-BO': /^(\+?591)?(6|7)\d{7}$/, + 'es-CO': /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/, + 'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/, + 'es-CR': /^(\+506)?[2-8]\d{7}$/, + 'es-CU': /^(\+53|0053)?5\d{7}$/, + 'es-DO': /^(\+?1)?8[024]9\d{7}$/, + 'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/, + 'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, + 'es-ES': /^(\+?34)?[6|7]\d{8}$/, + 'es-GT': /^(\+?502)?[2|6|7]\d{7}$/, + 'es-PE': /^(\+?51)?9\d{8}$/, + 'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/, + 'es-NI': /^(\+?505)\d{7,8}$/, + 'es-PA': /^(\+?507)\d{7,8}$/, + 'es-PY': /^(\+?595|0)9[9876]\d{7}$/, + 'es-SV': /^(\+?503)?[67]\d{7}$/, + 'es-UY': /^(\+598|0)9[1-9][\d]{6}$/, + 'es-VE': /^(\+?58)?(2|4)\d{9}$/, + 'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, + 'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, + 'fi-FI': /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/, + 'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/, + 'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'fr-BF': /^(\+226|0)[67]\d{7}$/, + 'fr-BJ': /^(\+229)\d{8}$/, + 'fr-CD': /^(\+?243|0)?(8|9)\d{8}$/, + 'fr-CM': /^(\+?237)6[0-9]{8}$/, + 'fr-FR': /^(\+?33|0)[67]\d{8}$/, + 'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/, + 'fr-GP': /^(\+?590|0|00590)[67]\d{8}$/, + 'fr-MQ': /^(\+?596|0|00596)[67]\d{8}$/, + 'fr-PF': /^(\+?689)?8[789]\d{6}$/, + 'fr-RE': /^(\+?262|0|00262)[67]\d{8}$/, + 'fr-WF': /^(\+681)?\d{6}$/, + 'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, + 'hu-HU': /^(\+?36|06)(20|30|31|50|70)\d{7}$/, + 'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, + 'ir-IR': /^(\+98|0)?9\d{9}$/, + 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + 'it-SM': /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/, + 'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/, + 'ka-GE': /^(\+?995)?(79\d{7}|5\d{8})$/, + 'kk-KZ': /^(\+?7|8)?7\d{9}$/, + 'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, + 'ky-KG': /^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/, + 'lt-LT': /^(\+370|8)\d{8}$/, + 'lv-LV': /^(\+?371)2\d{7}$/, + 'mg-MG': /^((\+?261|0)(2|3)\d)?\d{7}$/, + 'mn-MN': /^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/, + 'my-MM': /^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/, + 'ms-MY': /^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/, + 'mz-MZ': /^(\+?258)?8[234567]\d{7}$/, + 'nb-NO': /^(\+?47)?[49]\d{7}$/, + 'ne-NP': /^(\+?977)?9[78]\d{8}$/, + 'nl-BE': /^(\+?32|0)4\d{8}$/, + 'nl-NL': /^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/, + 'nl-AW': /^(\+)?297(56|59|64|73|74|99)\d{5}$/, + 'nn-NO': /^(\+?47)?[49]\d{7}$/, + 'pl-PL': /^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/, + 'pt-BR': /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/, + 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, + 'pt-AO': /^(\+?244)?9\d{8}$/, + 'ro-MD': /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/, + 'ro-RO': /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/, + 'ru-RU': /^(\+?7|8)?9\d{9}$/, + 'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/, + 'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/, + 'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'so-SO': /^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/, + 'sq-AL': /^(\+355|0)6[2-9]\d{7}$/, + 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, + 'sv-SE': /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/, + 'tg-TJ': /^(\+?992)?[5][5]\d{7}$/, + 'th-TH': /^(\+66|66|0)\d{9}$/, + 'tr-TR': /^(\+?90|0)?5\d{9}$/, + 'tk-TM': /^(\+993|993|8)\d{8}$/, + 'uk-UA': /^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/, + 'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/, + 'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/, + 'zh-CN': /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/, + 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/, + 'dz-BT': /^(\+?975|0)?(17|16|77|02)\d{6}$/, + 'ar-YE': /^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/, + 'ar-EH': /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/, + 'fa-AF': /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/, + 'mk-MK': /^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/ +}; +/* eslint-enable max-len */ + +// aliases +phones['en-CA'] = phones['en-US']; +phones['fr-CA'] = phones['en-CA']; +phones['fr-BE'] = phones['nl-BE']; +phones['zh-HK'] = phones['en-HK']; +phones['zh-MO'] = phones['en-MO']; +phones['ga-IE'] = phones['en-IE']; +phones['fr-CH'] = phones['de-CH']; +phones['it-CH'] = phones['fr-CH']; +function isMobilePhone(str, locale, options) { + (0, _assertString.default)(str); + if (options && options.strictMode && !str.startsWith('+')) { + return false; + } + if (Array.isArray(locale)) { + return locale.some(function (key) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + if (phone.test(str)) { + return true; + } + } + return false; + }); + } else if (locale in phones) { + return phones[locale].test(str); + // alias falsey locale as 'any' + } else if (!locale || locale === 'any') { + for (var key in phones) { + // istanbul ignore else + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + if (phone.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales = exports.locales = Object.keys(phones); \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMongoId.js b/src/hello/server/node_modules/validator/lib/isMongoId.js new file mode 100644 index 00000000..07188f29 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMongoId.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMongoId; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _isHexadecimal = _interopRequireDefault(require("./isHexadecimal")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isMongoId(str) { + (0, _assertString.default)(str); + return (0, _isHexadecimal.default)(str) && str.length === 24; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isMultibyte.js b/src/hello/server/node_modules/validator/lib/isMultibyte.js new file mode 100644 index 00000000..3dcbba90 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isMultibyte.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isMultibyte; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/* eslint-disable no-control-regex */ +var multibyte = /[^\x00-\x7F]/; +/* eslint-enable no-control-regex */ + +function isMultibyte(str) { + (0, _assertString.default)(str); + return multibyte.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isNumeric.js b/src/hello/server/node_modules/validator/lib/isNumeric.js new file mode 100644 index 00000000..4f876451 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isNumeric.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNumeric; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _alpha = require("./alpha"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var numericNoSymbols = /^[0-9]+$/; +function isNumeric(str, options) { + (0, _assertString.default)(str); + if (options && options.no_symbols) { + return numericNoSymbols.test(str); + } + return new RegExp("^[+-]?([0-9]*[".concat((options || {}).locale ? _alpha.decimal[options.locale] : '.', "])?[0-9]+$")).test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isOctal.js b/src/hello/server/node_modules/validator/lib/isOctal.js new file mode 100644 index 00000000..3a0a4a6a --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isOctal.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isOctal; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var octal = /^(0o)?[0-7]+$/i; +function isOctal(str) { + (0, _assertString.default)(str); + return octal.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isPassportNumber.js b/src/hello/server/node_modules/validator/lib/isPassportNumber.js new file mode 100644 index 00000000..72b4fb3d --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isPassportNumber.js @@ -0,0 +1,152 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPassportNumber; +exports.locales = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/** + * Reference: + * https://en.wikipedia.org/ -- Wikipedia + * https://docs.microsoft.com/en-us/microsoft-365/compliance/eu-passport-number -- EU Passport Number + * https://countrycode.org/ -- Country Codes + */ +var passportRegexByCountryCode = { + AM: /^[A-Z]{2}\d{7}$/, + // ARMENIA + AR: /^[A-Z]{3}\d{6}$/, + // ARGENTINA + AT: /^[A-Z]\d{7}$/, + // AUSTRIA + AU: /^[A-Z]\d{7}$/, + // AUSTRALIA + AZ: /^[A-Z]{1}\d{8}$/, + // AZERBAIJAN + BE: /^[A-Z]{2}\d{6}$/, + // BELGIUM + BG: /^\d{9}$/, + // BULGARIA + BR: /^[A-Z]{2}\d{6}$/, + // BRAZIL + BY: /^[A-Z]{2}\d{7}$/, + // BELARUS + CA: /^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/, + // CANADA + CH: /^[A-Z]\d{7}$/, + // SWITZERLAND + CN: /^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/, + // CHINA [G=Ordinary, E=Electronic] followed by 8-digits, or E followed by any UPPERCASE letter (except I and O) followed by 7 digits + CY: /^[A-Z](\d{6}|\d{8})$/, + // CYPRUS + CZ: /^\d{8}$/, + // CZECH REPUBLIC + DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/, + // GERMANY + DK: /^\d{9}$/, + // DENMARK + DZ: /^\d{9}$/, + // ALGERIA + EE: /^([A-Z]\d{7}|[A-Z]{2}\d{7})$/, + // ESTONIA (K followed by 7-digits), e-passports have 2 UPPERCASE followed by 7 digits + ES: /^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/, + // SPAIN + FI: /^[A-Z]{2}\d{7}$/, + // FINLAND + FR: /^\d{2}[A-Z]{2}\d{5}$/, + // FRANCE + GB: /^\d{9}$/, + // UNITED KINGDOM + GR: /^[A-Z]{2}\d{7}$/, + // GREECE + HR: /^\d{9}$/, + // CROATIA + HU: /^[A-Z]{2}(\d{6}|\d{7})$/, + // HUNGARY + IE: /^[A-Z0-9]{2}\d{7}$/, + // IRELAND + IN: /^[A-Z]{1}-?\d{7}$/, + // INDIA + ID: /^[A-C]\d{7}$/, + // INDONESIA + IR: /^[A-Z]\d{8}$/, + // IRAN + IS: /^(A)\d{7}$/, + // ICELAND + IT: /^[A-Z0-9]{2}\d{7}$/, + // ITALY + JM: /^[Aa]\d{7}$/, + // JAMAICA + JP: /^[A-Z]{2}\d{7}$/, + // JAPAN + KR: /^[MS]\d{8}$/, + // SOUTH KOREA, REPUBLIC OF KOREA, [S=PS Passports, M=PM Passports] + KZ: /^[a-zA-Z]\d{7}$/, + // KAZAKHSTAN + LI: /^[a-zA-Z]\d{5}$/, + // LIECHTENSTEIN + LT: /^[A-Z0-9]{8}$/, + // LITHUANIA + LU: /^[A-Z0-9]{8}$/, + // LUXEMBURG + LV: /^[A-Z0-9]{2}\d{7}$/, + // LATVIA + LY: /^[A-Z0-9]{8}$/, + // LIBYA + MT: /^\d{7}$/, + // MALTA + MZ: /^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/, + // MOZAMBIQUE + MY: /^[AHK]\d{8}$/, + // MALAYSIA + MX: /^\d{10,11}$/, + // MEXICO + NL: /^[A-Z]{2}[A-Z0-9]{6}\d$/, + // NETHERLANDS + NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/, + // NEW ZEALAND + PH: /^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/, + // PHILIPPINES + PK: /^[A-Z]{2}\d{7}$/, + // PAKISTAN + PL: /^[A-Z]{2}\d{7}$/, + // POLAND + PT: /^[A-Z]\d{6}$/, + // PORTUGAL + RO: /^\d{8,9}$/, + // ROMANIA + RU: /^\d{9}$/, + // RUSSIAN FEDERATION + SE: /^\d{8}$/, + // SWEDEN + SL: /^(P)[A-Z]\d{7}$/, + // SLOVENIA + SK: /^[0-9A-Z]\d{7}$/, + // SLOVAKIA + TH: /^[A-Z]{1,2}\d{6,7}$/, + // THAILAND + TR: /^[A-Z]\d{8}$/, + // TURKEY + UA: /^[A-Z]{2}\d{6}$/, + // UKRAINE + US: /^\d{9}$|^[A-Z]\d{8}$/, + // UNITED STATES + ZA: /^[TAMD]\d{8}$/ // SOUTH AFRICA +}; +var locales = exports.locales = Object.keys(passportRegexByCountryCode); + +/** + * Check if str is a valid passport number + * relative to provided ISO Country Code. + * + * @param {string} str + * @param {string} countryCode + * @return {boolean} + */ +function isPassportNumber(str, countryCode) { + (0, _assertString.default)(str); + /** Remove All Whitespaces, Convert to UPPERCASE */ + var normalizedStr = str.replace(/\s/g, '').toUpperCase(); + return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isPort.js b/src/hello/server/node_modules/validator/lib/isPort.js new file mode 100644 index 00000000..4fb60f05 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isPort.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPort; +var _isInt = _interopRequireDefault(require("./isInt")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isPort(str) { + return (0, _isInt.default)(str, { + allow_leading_zeroes: false, + min: 0, + max: 65535 + }); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isPostalCode.js b/src/hello/server/node_modules/validator/lib/isPostalCode.js new file mode 100644 index 00000000..aedd2b03 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isPostalCode.js @@ -0,0 +1,106 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isPostalCode; +exports.locales = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +// common patterns +var threeDigit = /^\d{3}$/; +var fourDigit = /^\d{4}$/; +var fiveDigit = /^\d{5}$/; +var sixDigit = /^\d{6}$/; +var patterns = { + AD: /^AD\d{3}$/, + AT: fourDigit, + AU: fourDigit, + AZ: /^AZ\d{4}$/, + BA: /^([7-8]\d{4}$)/, + BD: /^([1-8][0-9]{3}|9[0-4][0-9]{2})$/, + BE: fourDigit, + BG: fourDigit, + BR: /^\d{5}-?\d{3}$/, + BY: /^2[1-4]\d{4}$/, + CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, + CH: fourDigit, + CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/, + CO: /^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/, + CZ: /^\d{3}\s?\d{2}$/, + DE: fiveDigit, + DK: fourDigit, + DO: fiveDigit, + DZ: fiveDigit, + EE: fiveDigit, + ES: /^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/, + FI: fiveDigit, + FR: /^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/, + GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, + GR: /^\d{3}\s?\d{2}$/, + HR: /^([1-5]\d{4}$)/, + HT: /^HT\d{4}$/, + HU: fourDigit, + ID: fiveDigit, + IE: /^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i, + IL: /^(\d{5}|\d{7})$/, + IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/, + IR: /^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/, + IS: threeDigit, + IT: fiveDigit, + JP: /^\d{3}\-\d{4}$/, + KE: fiveDigit, + KR: /^(\d{5}|\d{6})$/, + LI: /^(948[5-9]|949[0-7])$/, + LT: /^LT\-\d{5}$/, + LU: fourDigit, + LV: /^LV\-\d{4}$/, + LK: fiveDigit, + MG: threeDigit, + MX: fiveDigit, + MT: /^[A-Za-z]{3}\s{0,1}\d{4}$/, + MY: fiveDigit, + NL: /^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i, + NO: fourDigit, + NP: /^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i, + NZ: fourDigit, + // https://www.pakpost.gov.pk/postcodes.php + PK: fiveDigit, + PL: /^\d{2}\-\d{3}$/, + PR: /^00[679]\d{2}([ -]\d{4})?$/, + PT: /^\d{4}\-\d{3}?$/, + RO: sixDigit, + RU: sixDigit, + SA: fiveDigit, + SE: /^[1-9]\d{2}\s?\d{2}$/, + SG: sixDigit, + SI: fourDigit, + SK: /^\d{3}\s?\d{2}$/, + TH: fiveDigit, + TN: fourDigit, + TW: /^\d{3}(\d{2,3})?$/, + UA: fiveDigit, + US: /^\d{5}(-\d{4})?$/, + ZA: fourDigit, + ZM: fiveDigit +}; +var locales = exports.locales = Object.keys(patterns); +function isPostalCode(str, locale) { + (0, _assertString.default)(str); + if (locale in patterns) { + return patterns[locale].test(str); + } else if (locale === 'any') { + for (var key in patterns) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (patterns.hasOwnProperty(key)) { + var pattern = patterns[key]; + if (pattern.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isRFC3339.js b/src/hello/server/node_modules/validator/lib/isRFC3339.js new file mode 100644 index 00000000..6441582c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isRFC3339.js @@ -0,0 +1,29 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isRFC3339; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */ + +var dateFullYear = /[0-9]{4}/; +var dateMonth = /(0[1-9]|1[0-2])/; +var dateMDay = /([12]\d|0[1-9]|3[01])/; +var timeHour = /([01][0-9]|2[0-3])/; +var timeMinute = /[0-5][0-9]/; +var timeSecond = /([0-5][0-9]|60)/; +var timeSecFrac = /(\.[0-9]+)?/; +var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source)); +var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")")); +var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source)); +var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source)); +var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source)); +var rfc3339 = new RegExp("^".concat(fullDate.source, "[ tT]").concat(fullTime.source, "$")); +function isRFC3339(str) { + (0, _assertString.default)(str); + return rfc3339.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isRgbColor.js b/src/hello/server/node_modules/validator/lib/isRgbColor.js new file mode 100644 index 00000000..93c73e3d --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isRgbColor.js @@ -0,0 +1,42 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isRgbColor; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } /* eslint-disable prefer-rest-params */ +var rgbColor = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/; +var rgbaColor = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; +var rgbColorPercent = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/; +var rgbaColorPercent = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; +var startsWithRgb = /^rgba?/; +function isRgbColor(str, options) { + (0, _assertString.default)(str); + // default options to true for percent and false for spaces + var allowSpaces = false; + var includePercentValues = true; + if (_typeof(options) !== 'object') { + if (arguments.length >= 2) { + includePercentValues = arguments[1]; + } + } else { + allowSpaces = options.allowSpaces !== undefined ? options.allowSpaces : allowSpaces; + includePercentValues = options.includePercentValues !== undefined ? options.includePercentValues : includePercentValues; + } + if (allowSpaces) { + // make sure it starts with continous rgba? without spaces before stripping + if (!startsWithRgb.test(str)) { + return false; + } + // strip all whitespace + str = str.replace(/\s/g, ''); + } + if (!includePercentValues) { + return rgbColor.test(str) || rgbaColor.test(str); + } + return rgbColor.test(str) || rgbaColor.test(str) || rgbColorPercent.test(str) || rgbaColorPercent.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isSemVer.js b/src/hello/server/node_modules/validator/lib/isSemVer.js new file mode 100644 index 00000000..f43098f9 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isSemVer.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSemVer; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _multilineRegex = _interopRequireDefault(require("./util/multilineRegex")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +/** + * Regular Expression to match + * semantic versioning (SemVer) + * built from multi-line, multi-parts regexp + * Reference: https://semver.org/ + */ +var semanticVersioningRegex = (0, _multilineRegex.default)(['^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)', '(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))', '?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$'], 'i'); +function isSemVer(str) { + (0, _assertString.default)(str); + return semanticVersioningRegex.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isSlug.js b/src/hello/server/node_modules/validator/lib/isSlug.js new file mode 100644 index 00000000..46da0bf1 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isSlug.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSlug; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var charsetRegex = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/; +function isSlug(str) { + (0, _assertString.default)(str); + return charsetRegex.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isStrongPassword.js b/src/hello/server/node_modules/validator/lib/isStrongPassword.js new file mode 100644 index 00000000..92d3a632 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isStrongPassword.js @@ -0,0 +1,99 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isStrongPassword; +var _merge = _interopRequireDefault(require("./util/merge")); +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var upperCaseRegex = /^[A-Z]$/; +var lowerCaseRegex = /^[a-z]$/; +var numberRegex = /^[0-9]$/; +var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/; +var defaultOptions = { + minLength: 8, + minLowercase: 1, + minUppercase: 1, + minNumbers: 1, + minSymbols: 1, + returnScore: false, + pointsPerUnique: 1, + pointsPerRepeat: 0.5, + pointsForContainingLower: 10, + pointsForContainingUpper: 10, + pointsForContainingNumber: 10, + pointsForContainingSymbol: 10 +}; + +/* Counts number of occurrences of each char in a string + * could be moved to util/ ? +*/ +function countChars(str) { + var result = {}; + Array.from(str).forEach(function (char) { + var curVal = result[char]; + if (curVal) { + result[char] += 1; + } else { + result[char] = 1; + } + }); + return result; +} + +/* Return information about a password */ +function analyzePassword(password) { + var charMap = countChars(password); + var analysis = { + length: password.length, + uniqueChars: Object.keys(charMap).length, + uppercaseCount: 0, + lowercaseCount: 0, + numberCount: 0, + symbolCount: 0 + }; + Object.keys(charMap).forEach(function (char) { + /* istanbul ignore else */ + if (upperCaseRegex.test(char)) { + analysis.uppercaseCount += charMap[char]; + } else if (lowerCaseRegex.test(char)) { + analysis.lowercaseCount += charMap[char]; + } else if (numberRegex.test(char)) { + analysis.numberCount += charMap[char]; + } else if (symbolRegex.test(char)) { + analysis.symbolCount += charMap[char]; + } + }); + return analysis; +} +function scorePassword(analysis, scoringOptions) { + var points = 0; + points += analysis.uniqueChars * scoringOptions.pointsPerUnique; + points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat; + if (analysis.lowercaseCount > 0) { + points += scoringOptions.pointsForContainingLower; + } + if (analysis.uppercaseCount > 0) { + points += scoringOptions.pointsForContainingUpper; + } + if (analysis.numberCount > 0) { + points += scoringOptions.pointsForContainingNumber; + } + if (analysis.symbolCount > 0) { + points += scoringOptions.pointsForContainingSymbol; + } + return points; +} +function isStrongPassword(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + (0, _assertString.default)(str); + var analysis = analyzePassword(str); + options = (0, _merge.default)(options || {}, defaultOptions); + if (options.returnScore) { + return scorePassword(analysis, options); + } + return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isSurrogatePair.js b/src/hello/server/node_modules/validator/lib/isSurrogatePair.js new file mode 100644 index 00000000..6f98d1a0 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isSurrogatePair.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isSurrogatePair; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; +function isSurrogatePair(str) { + (0, _assertString.default)(str); + return surrogatePair.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isTaxID.js b/src/hello/server/node_modules/validator/lib/isTaxID.js new file mode 100644 index 00000000..e3a06cde --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isTaxID.js @@ -0,0 +1,1398 @@ +"use strict"; + +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isTaxID; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var algorithms = _interopRequireWildcard(require("./util/algorithms")); +var _isDate = _interopRequireDefault(require("./isDate")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } +function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +/** + * TIN Validation + * Validates Tax Identification Numbers (TINs) from the US, EU member states and the United Kingdom. + * + * EU-UK: + * National TIN validity is calculated using public algorithms as made available by DG TAXUD. + * + * See `https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms-Public.docx` for more information. + * + * US: + * An Employer Identification Number (EIN), also known as a Federal Tax Identification Number, + * is used to identify a business entity. + * + * NOTES: + * - Prefix 47 is being reserved for future use + * - Prefixes 26, 27, 45, 46 and 47 were previously assigned by the Philadelphia campus. + * + * See `http://www.irs.gov/Businesses/Small-Businesses-&-Self-Employed/How-EINs-are-Assigned-and-Valid-EIN-Prefixes` + * for more information. + */ + +// Locale functions + +/* + * bg-BG validation function + * (Edinen graždanski nomer (EGN/ЕГН), persons only) + * Checks if birth date (first six digits) is valid and calculates check (last) digit + */ +function bgBgCheck(tin) { + // Extract full year, normalize month and check birth date validity + var century_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 40) { + month -= 40; + century_year = "20".concat(century_year); + } else if (month > 20) { + month -= 20; + century_year = "18".concat(century_year); + } else { + century_year = "19".concat(century_year); + } + if (month < 10) { + month = "0".concat(month); + } + var date = "".concat(century_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + + // Calculate checksum by multiplying digits with fixed values + var multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6]; + var checksum = 0; + for (var i = 0; i < multip_lookup.length; i++) { + checksum += digits[i] * multip_lookup[i]; + } + checksum = checksum % 11 === 10 ? 0 : checksum % 11; + return checksum === digits[9]; +} + +/** + * Check if an input is a valid Canadian SIN (Social Insurance Number) + * + * The Social Insurance Number (SIN) is a 9 digit number that + * you need to work in Canada or to have access to government programs and benefits. + * + * https://en.wikipedia.org/wiki/Social_Insurance_Number + * https://www.canada.ca/en/employment-social-development/services/sin.html + * https://www.codercrunch.com/challenge/819302488/sin-validator + * + * @param {string} input + * @return {boolean} + */ +function isCanadianSIN(input) { + var digitsArray = input.split(''); + var even = digitsArray.filter(function (_, idx) { + return idx % 2; + }).map(function (i) { + return Number(i) * 2; + }).join('').split(''); + var total = digitsArray.filter(function (_, idx) { + return !(idx % 2); + }).concat(even).map(function (i) { + return Number(i); + }).reduce(function (acc, cur) { + return acc + cur; + }); + return total % 10 === 0; +} + +/* + * cs-CZ validation function + * (Rodné číslo (RČ), persons only) + * Checks if birth date (first six digits) is valid and divisibility by 11 + * Material not in DG TAXUD document sourced from: + * -`https://lorenc.info/3MA381/overeni-spravnosti-rodneho-cisla.htm` + * -`https://www.mvcr.cz/clanek/rady-a-sluzby-dokumenty-rodne-cislo.aspx` + */ +function csCzCheck(tin) { + tin = tin.replace(/\W/, ''); + + // Extract full year from TIN length + var full_year = parseInt(tin.slice(0, 2), 10); + if (tin.length === 10) { + if (full_year < 54) { + full_year = "20".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + } else { + if (tin.slice(6) === '000') { + return false; + } // Three-zero serial not assigned before 1954 + if (full_year < 54) { + full_year = "19".concat(full_year); + } else { + return false; // No 18XX years seen in any of the resources + } + } + // Add missing zero if needed + if (full_year.length === 3) { + full_year = [full_year.slice(0, 2), '0', full_year.slice(2)].join(''); + } + + // Extract month from TIN and normalize + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month > 20) { + // Month-plus-twenty was only introduced in 2004 + if (parseInt(full_year, 10) < 2004) { + return false; + } + month -= 20; + } + if (month < 10) { + month = "0".concat(month); + } + + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // Verify divisibility by 11 + if (tin.length === 10) { + if (parseInt(tin, 10) % 11 !== 0) { + // Some numbers up to and including 1985 are still valid if + // check (last) digit equals 0 and modulo of first 9 digits equals 10 + var checkdigit = parseInt(tin.slice(0, 9), 10) % 11; + if (parseInt(full_year, 10) < 1986 && checkdigit === 10) { + if (parseInt(tin.slice(9), 10) !== 0) { + return false; + } + } else { + return false; + } + } + } + return true; +} + +/* + * de-AT validation function + * (Abgabenkontonummer, persons/entities) + * Verify TIN validity by calling luhnCheck() + */ +function deAtCheck(tin) { + return algorithms.luhnCheck(tin); +} + +/* + * de-DE validation function + * (Steueridentifikationsnummer (Steuer-IdNr.), persons only) + * Tests for single duplicate/triplicate value, then calculates ISO 7064 check (last) digit + * Partial implementation of spec (same result with both algorithms always) + */ +function deDeCheck(tin) { + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + + // Fill array with strings of number positions + var occurrences = []; + for (var i = 0; i < digits.length - 1; i++) { + occurrences.push(''); + for (var j = 0; j < digits.length - 1; j++) { + if (digits[i] === digits[j]) { + occurrences[i] += j; + } + } + } + + // Remove digits with one occurrence and test for only one duplicate/triplicate + occurrences = occurrences.filter(function (a) { + return a.length > 1; + }); + if (occurrences.length !== 2 && occurrences.length !== 3) { + return false; + } + + // In case of triplicate value only two digits are allowed next to each other + if (occurrences[0].length === 3) { + var trip_locations = occurrences[0].split('').map(function (a) { + return parseInt(a, 10); + }); + var recurrent = 0; // Amount of neighbor occurrences + for (var _i = 0; _i < trip_locations.length - 1; _i++) { + if (trip_locations[_i] + 1 === trip_locations[_i + 1]) { + recurrent += 1; + } + } + if (recurrent === 2) { + return false; + } + } + return algorithms.iso7064Check(tin); +} + +/* + * dk-DK validation function + * (CPR-nummer (personnummer), persons only) + * Checks if birth date (first six digits) is valid and assigned to century (seventh) digit, + * and calculates check (last) digit + */ +function dkDkCheck(tin) { + tin = tin.replace(/\W/, ''); + + // Extract year, check if valid for given century digit and add century + var year = parseInt(tin.slice(4, 6), 10); + var century_digit = tin.slice(6, 7); + switch (century_digit) { + case '0': + case '1': + case '2': + case '3': + year = "19".concat(year); + break; + case '4': + case '9': + if (year < 37) { + year = "20".concat(year); + } else { + year = "19".concat(year); + } + break; + default: + if (year < 37) { + year = "20".concat(year); + } else if (year > 58) { + year = "18".concat(year); + } else { + return false; + } + break; + } + // Add missing zero if needed + if (year.length === 3) { + year = [year.slice(0, 2), '0', year.slice(2)].join(''); + } + // Check date validity + var date = "".concat(year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 4; + // Multiply by weight and add to checksum + for (var i = 0; i < 9; i++) { + checksum += digits[i] * weight; + weight -= 1; + if (weight === 1) { + weight = 7; + } + } + checksum %= 11; + if (checksum === 1) { + return false; + } + return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum; +} + +/* + * el-CY validation function + * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons only) + * Verify TIN validity by calculating ASCII value of check (last) character + */ +function elCyCheck(tin) { + // split digits into an array for further processing + var digits = tin.slice(0, 8).split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + // add digits in even places + for (var i = 1; i < digits.length; i += 2) { + checksum += digits[i]; + } + + // add digits in odd places + for (var _i2 = 0; _i2 < digits.length; _i2 += 2) { + if (digits[_i2] < 2) { + checksum += 1 - digits[_i2]; + } else { + checksum += 2 * (digits[_i2] - 2) + 5; + if (digits[_i2] > 4) { + checksum += 2; + } + } + } + return String.fromCharCode(checksum % 26 + 65) === tin.charAt(8); +} + +/* + * el-GR validation function + * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons/entities) + * Verify TIN validity by calculating check (last) digit + * Algorithm not in DG TAXUD document- sourced from: + * - `http://epixeirisi.gr/%CE%9A%CE%A1%CE%99%CE%A3%CE%99%CE%9C%CE%91-%CE%98%CE%95%CE%9C%CE%91%CE%A4%CE%91-%CE%A6%CE%9F%CE%A1%CE%9F%CE%9B%CE%9F%CE%93%CE%99%CE%91%CE%A3-%CE%9A%CE%91%CE%99-%CE%9B%CE%9F%CE%93%CE%99%CE%A3%CE%A4%CE%99%CE%9A%CE%97%CE%A3/23791/%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CF%8C%CF%82-%CE%A6%CE%BF%CF%81%CE%BF%CE%BB%CE%BF%CE%B3%CE%B9%CE%BA%CE%BF%CF%8D-%CE%9C%CE%B7%CF%84%CF%81%CF%8E%CE%BF%CF%85` + */ +function elGrCheck(tin) { + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + for (var i = 0; i < 8; i++) { + checksum += digits[i] * Math.pow(2, 8 - i); + } + return checksum % 11 % 10 === digits[8]; +} + +/* + * en-GB validation function (should go here if needed) + * (National Insurance Number (NINO) or Unique Taxpayer Reference (UTR), + * persons/entities respectively) + */ + +/* + * en-IE validation function + * (Personal Public Service Number (PPS No), persons only) + * Verify TIN validity by calculating check (second to last) character + */ +function enIeCheck(tin) { + var checksum = algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) { + return parseInt(a, 10); + }), 8); + if (tin.length === 9 && tin[8] !== 'W') { + checksum += (tin[8].charCodeAt(0) - 64) * 9; + } + checksum %= 23; + if (checksum === 0) { + return tin[7].toUpperCase() === 'W'; + } + return tin[7].toUpperCase() === String.fromCharCode(64 + checksum); +} + +// Valid US IRS campus prefixes +var enUsCampusPrefix = { + andover: ['10', '12'], + atlanta: ['60', '67'], + austin: ['50', '53'], + brookhaven: ['01', '02', '03', '04', '05', '06', '11', '13', '14', '16', '21', '22', '23', '25', '34', '51', '52', '54', '55', '56', '57', '58', '59', '65'], + cincinnati: ['30', '32', '35', '36', '37', '38', '61'], + fresno: ['15', '24'], + internet: ['20', '26', '27', '45', '46', '47'], + kansas: ['40', '44'], + memphis: ['94', '95'], + ogden: ['80', '90'], + philadelphia: ['33', '39', '41', '42', '43', '46', '48', '62', '63', '64', '66', '68', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '91', '92', '93', '98', '99'], + sba: ['31'] +}; + +// Return an array of all US IRS campus prefixes +function enUsGetPrefixes() { + var prefixes = []; + for (var location in enUsCampusPrefix) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (enUsCampusPrefix.hasOwnProperty(location)) { + prefixes.push.apply(prefixes, _toConsumableArray(enUsCampusPrefix[location])); + } + } + return prefixes; +} + +/* + * en-US validation function + * Verify that the TIN starts with a valid IRS campus prefix + */ +function enUsCheck(tin) { + return enUsGetPrefixes().indexOf(tin.slice(0, 2)) !== -1; +} + +/* + * es-AR validation function + * Clave Única de Identificación Tributaria (CUIT/CUIL) + * Sourced from: + * - https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id_nivel1=3036&id_nivel2=3040&p=Conceptos%20b%C3%A1sicos + * - https://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Identificaci%C3%B3n_Tributaria + */ + +function esArCheck(tin) { + var accum = 0; + var digits = tin.split(''); + var digit = parseInt(digits.pop(), 10); + for (var i = 0; i < digits.length; i++) { + accum += digits[9 - i] * (2 + i % 6); + } + var verif = 11 - accum % 11; + if (verif === 11) { + verif = 0; + } else if (verif === 10) { + verif = 9; + } + return digit === verif; +} + +/* + * es-ES validation function + * (Documento Nacional de Identidad (DNI) + * or Número de Identificación de Extranjero (NIE), persons only) + * Verify TIN validity by calculating check (last) character + */ +function esEsCheck(tin) { + // Split characters into an array for further processing + var chars = tin.toUpperCase().split(''); + + // Replace initial letter if needed + if (isNaN(parseInt(chars[0], 10)) && chars.length > 1) { + var lead_replace = 0; + switch (chars[0]) { + case 'Y': + lead_replace = 1; + break; + case 'Z': + lead_replace = 2; + break; + default: + } + chars.splice(0, 1, lead_replace); + // Fill with zeros if smaller than proper + } else { + while (chars.length < 9) { + chars.unshift(0); + } + } + + // Calculate checksum and check according to lookup + var lookup = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; + chars = chars.join(''); + var checksum = parseInt(chars.slice(0, 8), 10) % 23; + return chars[8] === lookup[checksum]; +} + +/* + * et-EE validation function + * (Isikukood (IK), persons only) + * Checks if birth date (century digit and six following) is valid and calculates check (last) digit + * Material not in DG TAXUD document sourced from: + * - `https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Estonia-TIN.pdf` + */ +function etEeCheck(tin) { + // Extract year and add century + var full_year = tin.slice(1, 3); + var century_digit = tin.slice(0, 1); + switch (century_digit) { + case '1': + case '2': + full_year = "18".concat(full_year); + break; + case '3': + case '4': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 1; + // Multiply by weight and add to checksum + for (var i = 0; i < 10; i++) { + checksum += digits[i] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + // Do again if modulo 11 of checksum is 10 + if (checksum % 11 === 10) { + checksum = 0; + weight = 3; + for (var _i3 = 0; _i3 < 10; _i3++) { + checksum += digits[_i3] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + if (checksum % 11 === 10) { + return digits[10] === 0; + } + } + return checksum % 11 === digits[10]; +} + +/* + * fi-FI validation function + * (Henkilötunnus (HETU), persons only) + * Checks if birth date (first six digits plus century symbol) is valid + * and calculates check (last) digit + */ +function fiFiCheck(tin) { + // Extract year and add century + var full_year = tin.slice(4, 6); + var century_symbol = tin.slice(6, 7); + switch (century_symbol) { + case '+': + full_year = "18".concat(full_year); + break; + case '-': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate check character + var checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31; + if (checksum < 10) { + return checksum === parseInt(tin.slice(10), 10); + } + checksum -= 10; + var letters_lookup = ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y']; + return letters_lookup[checksum] === tin.slice(10); +} + +/* + * fr/nl-BE validation function + * (Numéro national (N.N.), persons only) + * Checks if birth date (first six digits) is valid and calculates check (last two) digits + */ +function frBeCheck(tin) { + // Zero month/day value is acceptable + if (tin.slice(2, 4) !== '00' || tin.slice(4, 6) !== '00') { + // Extract date from first six digits of TIN + var date = "".concat(tin.slice(0, 2), "/").concat(tin.slice(2, 4), "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, 'YY/MM/DD')) { + return false; + } + } + var checksum = 97 - parseInt(tin.slice(0, 9), 10) % 97; + var checkdigits = parseInt(tin.slice(9, 11), 10); + if (checksum !== checkdigits) { + checksum = 97 - parseInt("2".concat(tin.slice(0, 9)), 10) % 97; + if (checksum !== checkdigits) { + return false; + } + } + return true; +} + +/* + * fr-FR validation function + * (Numéro fiscal de référence (numéro SPI), persons only) + * Verify TIN validity by calculating check (last three) digits + */ +function frFrCheck(tin) { + tin = tin.replace(/\s/g, ''); + var checksum = parseInt(tin.slice(0, 10), 10) % 511; + var checkdigits = parseInt(tin.slice(10, 13), 10); + return checksum === checkdigits; +} + +/* + * fr/lb-LU validation function + * (numéro d’identification personnelle, persons only) + * Verify birth date validity and run Luhn and Verhoeff checks + */ +function frLuCheck(tin) { + // Extract date and check validity + var date = "".concat(tin.slice(0, 4), "/").concat(tin.slice(4, 6), "/").concat(tin.slice(6, 8)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // Run Luhn check + if (!algorithms.luhnCheck(tin.slice(0, 12))) { + return false; + } + // Remove Luhn check digit and run Verhoeff check + return algorithms.verhoeffCheck("".concat(tin.slice(0, 11)).concat(tin[12])); +} + +/* + * hr-HR validation function + * (Osobni identifikacijski broj (OIB), persons/entities) + * Verify TIN validity by calling iso7064Check(digits) + */ +function hrHrCheck(tin) { + return algorithms.iso7064Check(tin); +} + +/* + * hu-HU validation function + * (Adóazonosító jel, persons only) + * Verify TIN validity by calculating check (last) digit + */ +function huHuCheck(tin) { + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 8; + for (var i = 1; i < 9; i++) { + checksum += digits[i] * (i + 1); + } + return checksum % 11 === digits[9]; +} + +/* + * lt-LT validation function (should go here if needed) + * (Asmens kodas, persons/entities respectively) + * Current validation check is alias of etEeCheck- same format applies + */ + +/* + * it-IT first/last name validity check + * Accepts it-IT TIN-encoded names as a three-element character array and checks their validity + * Due to lack of clarity between resources ("Are only Italian consonants used? + * What happens if a person has X in their name?" etc.) only two test conditions + * have been implemented: + * Vowels may only be followed by other vowels or an X character + * and X characters after vowels may only be followed by other X characters. + */ +function itItNameCheck(name) { + // true at the first occurrence of a vowel + var vowelflag = false; + + // true at the first occurrence of an X AFTER vowel + // (to properly handle last names with X as consonant) + var xflag = false; + for (var i = 0; i < 3; i++) { + if (!vowelflag && /[AEIOU]/.test(name[i])) { + vowelflag = true; + } else if (!xflag && vowelflag && name[i] === 'X') { + xflag = true; + } else if (i > 0) { + if (vowelflag && !xflag) { + if (!/[AEIOU]/.test(name[i])) { + return false; + } + } + if (xflag) { + if (!/X/.test(name[i])) { + return false; + } + } + } + } + return true; +} + +/* + * it-IT validation function + * (Codice fiscale (TIN-IT), persons only) + * Verify name, birth date and codice catastale validity + * and calculate check character. + * Material not in DG-TAXUD document sourced from: + * `https://en.wikipedia.org/wiki/Italian_fiscal_code` + */ +function itItCheck(tin) { + // Capitalize and split characters into an array for further processing + var chars = tin.toUpperCase().split(''); + + // Check first and last name validity calling itItNameCheck() + if (!itItNameCheck(chars.slice(0, 3))) { + return false; + } + if (!itItNameCheck(chars.slice(3, 6))) { + return false; + } + + // Convert letters in number spaces back to numbers if any + var number_locations = [6, 7, 9, 10, 12, 13, 14]; + var number_replace = { + L: '0', + M: '1', + N: '2', + P: '3', + Q: '4', + R: '5', + S: '6', + T: '7', + U: '8', + V: '9' + }; + for (var _i4 = 0, _number_locations = number_locations; _i4 < _number_locations.length; _i4++) { + var i = _number_locations[_i4]; + if (chars[i] in number_replace) { + chars.splice(i, 1, number_replace[chars[i]]); + } + } + + // Extract month and day, and check date validity + var month_replace = { + A: '01', + B: '02', + C: '03', + D: '04', + E: '05', + H: '06', + L: '07', + M: '08', + P: '09', + R: '10', + S: '11', + T: '12' + }; + var month = month_replace[chars[8]]; + var day = parseInt(chars[9] + chars[10], 10); + if (day > 40) { + day -= 40; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(chars[6]).concat(chars[7], "/").concat(month, "/").concat(day); + if (!(0, _isDate.default)(date, 'YY/MM/DD')) { + return false; + } + + // Calculate check character by adding up even and odd characters as numbers + var checksum = 0; + for (var _i5 = 1; _i5 < chars.length - 1; _i5 += 2) { + var char_to_int = parseInt(chars[_i5], 10); + if (isNaN(char_to_int)) { + char_to_int = chars[_i5].charCodeAt(0) - 65; + } + checksum += char_to_int; + } + var odd_convert = { + // Maps of characters at odd places + A: 1, + B: 0, + C: 5, + D: 7, + E: 9, + F: 13, + G: 15, + H: 17, + I: 19, + J: 21, + K: 2, + L: 4, + M: 18, + N: 20, + O: 11, + P: 3, + Q: 6, + R: 8, + S: 12, + T: 14, + U: 16, + V: 10, + W: 22, + X: 25, + Y: 24, + Z: 23, + 0: 1, + 1: 0 + }; + for (var _i6 = 0; _i6 < chars.length - 1; _i6 += 2) { + var _char_to_int = 0; + if (chars[_i6] in odd_convert) { + _char_to_int = odd_convert[chars[_i6]]; + } else { + var multiplier = parseInt(chars[_i6], 10); + _char_to_int = 2 * multiplier + 1; + if (multiplier > 4) { + _char_to_int += 2; + } + } + checksum += _char_to_int; + } + if (String.fromCharCode(65 + checksum % 26) !== chars[15]) { + return false; + } + return true; +} + +/* + * lv-LV validation function + * (Personas kods (PK), persons only) + * Check validity of birth date and calculate check (last) digit + * Support only for old format numbers (not starting with '32', issued before 2017/07/01) + * Material not in DG TAXUD document sourced from: + * `https://boot.ritakafija.lv/forums/index.php?/topic/88314-personas-koda-algoritms-%C4%8Deksumma/` + */ +function lvLvCheck(tin) { + tin = tin.replace(/\W/, ''); + // Extract date from TIN + var day = tin.slice(0, 2); + if (day !== '32') { + // No date/checksum check if new format + var month = tin.slice(2, 4); + if (month !== '00') { + // No date check if unknown month + var full_year = tin.slice(4, 6); + switch (tin[6]) { + case '0': + full_year = "18".concat(full_year); + break; + case '1': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(day); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + } + + // Calculate check digit + var checksum = 1101; + var multip_lookup = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; + for (var i = 0; i < tin.length - 1; i++) { + checksum -= parseInt(tin[i], 10) * multip_lookup[i]; + } + return parseInt(tin[10], 10) === checksum % 11; + } + return true; +} + +/* + * mt-MT validation function + * (Identity Card Number or Unique Taxpayer Reference, persons/entities) + * Verify Identity Card Number structure (no other tests found) + */ +function mtMtCheck(tin) { + if (tin.length !== 9) { + // No tests for UTR + var chars = tin.toUpperCase().split(''); + // Fill with zeros if smaller than proper + while (chars.length < 8) { + chars.unshift(0); + } + // Validate format according to last character + switch (tin[7]) { + case 'A': + case 'P': + if (parseInt(chars[6], 10) === 0) { + return false; + } + break; + default: + { + var first_part = parseInt(chars.join('').slice(0, 5), 10); + if (first_part > 32000) { + return false; + } + var second_part = parseInt(chars.join('').slice(5, 7), 10); + if (first_part === second_part) { + return false; + } + } + } + } + return true; +} + +/* + * nl-NL validation function + * (Burgerservicenummer (BSN) or Rechtspersonen Samenwerkingsverbanden Informatie Nummer (RSIN), + * persons/entities respectively) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function nlNlCheck(tin) { + return algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11 === parseInt(tin[8], 10); +} + +/* + * pl-PL validation function + * (Powszechny Elektroniczny System Ewidencji Ludności (PESEL) + * or Numer identyfikacji podatkowej (NIP), persons/entities) + * Verify TIN validity by validating birth date (PESEL) and calculating check (last) digit + */ +function plPlCheck(tin) { + // NIP + if (tin.length === 10) { + // Calculate last digit by multiplying with lookup + var lookup = [6, 5, 7, 2, 3, 4, 5, 6, 7]; + var _checksum = 0; + for (var i = 0; i < lookup.length; i++) { + _checksum += parseInt(tin[i], 10) * lookup[i]; + } + _checksum %= 11; + if (_checksum === 10) { + return false; + } + return _checksum === parseInt(tin[9], 10); + } + + // PESEL + // Extract full year using month + var full_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 80) { + full_year = "18".concat(full_year); + month -= 80; + } else if (month > 60) { + full_year = "22".concat(full_year); + month -= 60; + } else if (month > 40) { + full_year = "21".concat(full_year); + month -= 40; + } else if (month > 20) { + full_year = "20".concat(full_year); + month -= 20; + } else { + full_year = "19".concat(full_year); + } + // Add leading zero to month if needed + if (month < 10) { + month = "0".concat(month); + } + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate last digit by multiplying with odd one-digit numbers except 5 + var checksum = 0; + var multiplier = 1; + for (var _i7 = 0; _i7 < tin.length - 1; _i7++) { + checksum += parseInt(tin[_i7], 10) * multiplier % 10; + multiplier += 2; + if (multiplier > 10) { + multiplier = 1; + } else if (multiplier === 5) { + multiplier += 2; + } + } + checksum = 10 - checksum % 10; + return checksum === parseInt(tin[10], 10); +} + +/* +* pt-BR validation function +* (Cadastro de Pessoas Físicas (CPF, persons) +* Cadastro Nacional de Pessoas Jurídicas (CNPJ, entities) +* Both inputs will be validated +*/ + +function ptBrCheck(tin) { + if (tin.length === 11) { + var _sum; + var remainder; + _sum = 0; + if ( + // Reject known invalid CPFs + tin === '11111111111' || tin === '22222222222' || tin === '33333333333' || tin === '44444444444' || tin === '55555555555' || tin === '66666666666' || tin === '77777777777' || tin === '88888888888' || tin === '99999999999' || tin === '00000000000') return false; + for (var i = 1; i <= 9; i++) _sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i); + remainder = _sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(9, 10), 10)) return false; + _sum = 0; + for (var _i8 = 1; _i8 <= 10; _i8++) _sum += parseInt(tin.substring(_i8 - 1, _i8), 10) * (12 - _i8); + remainder = _sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(10, 11), 10)) return false; + return true; + } + if ( + // Reject know invalid CNPJs + tin === '00000000000000' || tin === '11111111111111' || tin === '22222222222222' || tin === '33333333333333' || tin === '44444444444444' || tin === '55555555555555' || tin === '66666666666666' || tin === '77777777777777' || tin === '88888888888888' || tin === '99999999999999') { + return false; + } + var length = tin.length - 2; + var identifiers = tin.substring(0, length); + var verificators = tin.substring(length); + var sum = 0; + var pos = length - 7; + for (var _i9 = length; _i9 >= 1; _i9--) { + sum += identifiers.charAt(length - _i9) * pos; + pos -= 1; + if (pos < 2) { + pos = 9; + } + } + var result = sum % 11 < 2 ? 0 : 11 - sum % 11; + if (result !== parseInt(verificators.charAt(0), 10)) { + return false; + } + length += 1; + identifiers = tin.substring(0, length); + sum = 0; + pos = length - 7; + for (var _i0 = length; _i0 >= 1; _i0--) { + sum += identifiers.charAt(length - _i0) * pos; + pos -= 1; + if (pos < 2) { + pos = 9; + } + } + result = sum % 11 < 2 ? 0 : 11 - sum % 11; + if (result !== parseInt(verificators.charAt(1), 10)) { + return false; + } + return true; +} + +/* + * pt-PT validation function + * (Número de identificação fiscal (NIF), persons/entities) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function ptPtCheck(tin) { + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); +} + +/* + * ro-RO validation function + * (Cod Numeric Personal (CNP) or Cod de înregistrare fiscală (CIF), + * persons only) + * Verify CNP validity by calculating check (last) digit (test not found for CIF) + * Material not in DG TAXUD document sourced from: + * `https://en.wikipedia.org/wiki/National_identification_number#Romania` + */ +function roRoCheck(tin) { + if (tin.slice(0, 4) !== '9000') { + // No test found for this format + // Extract full year using century digit if possible + var full_year = tin.slice(1, 3); + switch (tin[0]) { + case '1': + case '2': + full_year = "19".concat(full_year); + break; + case '3': + case '4': + full_year = "18".concat(full_year); + break; + case '5': + case '6': + full_year = "20".concat(full_year); + break; + default: + } + + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (date.length === 8) { + if (!(0, _isDate.default)(date, 'YY/MM/DD')) { + return false; + } + } else if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate check digit + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + if (checksum % 11 === 10) { + return digits[12] === 1; + } + return digits[12] === checksum % 11; + } + return true; +} + +/* + * sk-SK validation function + * (Rodné číslo (RČ) or bezvýznamové identifikačné číslo (BIČ), persons only) + * Checks validity of pre-1954 birth numbers (rodné číslo) only + * Due to the introduction of the pseudo-random BIČ it is not possible to test + * post-1954 birth numbers without knowing whether they are BIČ or RČ beforehand + */ +function skSkCheck(tin) { + if (tin.length === 9) { + tin = tin.replace(/\W/, ''); + if (tin.slice(6) === '000') { + return false; + } // Three-zero serial not assigned before 1954 + + // Extract full year from TIN length + var full_year = parseInt(tin.slice(0, 2), 10); + if (full_year > 53) { + return false; + } + if (full_year < 10) { + full_year = "190".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + + // Extract month from TIN and normalize + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month < 10) { + month = "0".concat(month); + } + + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + } + return true; +} + +/* + * sl-SI validation function + * (Davčna številka, persons/entities) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function slSiCheck(tin) { + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) { + return parseInt(a, 10); + }), 8) % 11; + if (checksum === 10) { + return parseInt(tin[7], 10) === 0; + } + return checksum === parseInt(tin[7], 10); +} + +/* + * sv-SE validation function + * (Personnummer or samordningsnummer, persons only) + * Checks validity of birth date and calls luhnCheck() to validate check (last) digit + */ +function svSeCheck(tin) { + // Make copy of TIN and normalize to two-digit year form + var tin_copy = tin.slice(0); + if (tin.length > 11) { + tin_copy = tin_copy.slice(2); + } + + // Extract date of birth + var full_year = ''; + var month = tin_copy.slice(2, 4); + var day = parseInt(tin_copy.slice(4, 6), 10); + if (tin.length > 11) { + full_year = tin.slice(0, 4); + } else { + full_year = tin.slice(0, 2); + if (tin.length === 11 && day < 60) { + // Extract full year from centenarian symbol + // Should work just fine until year 10000 or so + var current_year = new Date().getFullYear().toString(); + var current_century = parseInt(current_year.slice(0, 2), 10); + current_year = parseInt(current_year, 10); + if (tin[6] === '-') { + if (parseInt("".concat(current_century).concat(full_year), 10) > current_year) { + full_year = "".concat(current_century - 1).concat(full_year); + } else { + full_year = "".concat(current_century).concat(full_year); + } + } else { + full_year = "".concat(current_century - 1).concat(full_year); + if (current_year - parseInt(full_year, 10) < 100) { + return false; + } + } + } + } + + // Normalize day and check date validity + if (day > 60) { + day -= 60; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(full_year, "/").concat(month, "/").concat(day); + if (date.length === 8) { + if (!(0, _isDate.default)(date, 'YY/MM/DD')) { + return false; + } + } else if (!(0, _isDate.default)(date, 'YYYY/MM/DD')) { + return false; + } + return algorithms.luhnCheck(tin.replace(/\W/, '')); +} + +/** + * uk-UA validation function + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function ukUaCheck(tin) { + // Calculate check digit + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11; +} + +// Locale lookup objects + +/* + * Tax id regex formats for various locales + * + * Where not explicitly specified in DG-TAXUD document both + * uppercase and lowercase letters are acceptable. + */ +var taxIdFormat = { + 'bg-BG': /^\d{10}$/, + 'cs-CZ': /^\d{6}\/{0,1}\d{3,4}$/, + 'de-AT': /^\d{9}$/, + 'de-DE': /^[1-9]\d{10}$/, + 'dk-DK': /^\d{6}-{0,1}\d{4}$/, + 'el-CY': /^[09]\d{7}[A-Z]$/, + 'el-GR': /^([0-4]|[7-9])\d{8}$/, + 'en-CA': /^\d{9}$/, + 'en-GB': /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i, + 'en-IE': /^\d{7}[A-W][A-IW]{0,1}$/i, + 'en-US': /^\d{2}[- ]{0,1}\d{7}$/, + 'es-AR': /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/, + 'es-ES': /^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i, + 'et-EE': /^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/, + 'fi-FI': /^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i, + 'fr-BE': /^\d{11}$/, + 'fr-FR': /^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/, + // Conforms both to official spec and provided example + 'fr-LU': /^\d{13}$/, + 'hr-HR': /^\d{11}$/, + 'hu-HU': /^8\d{9}$/, + 'it-IT': /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i, + 'lv-LV': /^\d{6}-{0,1}\d{5}$/, + // Conforms both to DG TAXUD spec and original research + 'mt-MT': /^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i, + 'nl-NL': /^\d{9}$/, + 'pl-PL': /^\d{10,11}$/, + 'pt-BR': /(?:^\d{11}$)|(?:^\d{14}$)/, + 'pt-PT': /^\d{9}$/, + 'ro-RO': /^\d{13}$/, + 'sk-SK': /^\d{6}\/{0,1}\d{3,4}$/, + 'sl-SI': /^[1-9]\d{7}$/, + 'sv-SE': /^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/, + 'uk-UA': /^\d{10}$/ +}; +// taxIdFormat locale aliases +taxIdFormat['lb-LU'] = taxIdFormat['fr-LU']; +taxIdFormat['lt-LT'] = taxIdFormat['et-EE']; +taxIdFormat['nl-BE'] = taxIdFormat['fr-BE']; +taxIdFormat['fr-CA'] = taxIdFormat['en-CA']; + +// Algorithmic tax id check functions for various locales +var taxIdCheck = { + 'bg-BG': bgBgCheck, + 'cs-CZ': csCzCheck, + 'de-AT': deAtCheck, + 'de-DE': deDeCheck, + 'dk-DK': dkDkCheck, + 'el-CY': elCyCheck, + 'el-GR': elGrCheck, + 'en-CA': isCanadianSIN, + 'en-IE': enIeCheck, + 'en-US': enUsCheck, + 'es-AR': esArCheck, + 'es-ES': esEsCheck, + 'et-EE': etEeCheck, + 'fi-FI': fiFiCheck, + 'fr-BE': frBeCheck, + 'fr-FR': frFrCheck, + 'fr-LU': frLuCheck, + 'hr-HR': hrHrCheck, + 'hu-HU': huHuCheck, + 'it-IT': itItCheck, + 'lv-LV': lvLvCheck, + 'mt-MT': mtMtCheck, + 'nl-NL': nlNlCheck, + 'pl-PL': plPlCheck, + 'pt-BR': ptBrCheck, + 'pt-PT': ptPtCheck, + 'ro-RO': roRoCheck, + 'sk-SK': skSkCheck, + 'sl-SI': slSiCheck, + 'sv-SE': svSeCheck, + 'uk-UA': ukUaCheck +}; +// taxIdCheck locale aliases +taxIdCheck['lb-LU'] = taxIdCheck['fr-LU']; +taxIdCheck['lt-LT'] = taxIdCheck['et-EE']; +taxIdCheck['nl-BE'] = taxIdCheck['fr-BE']; +taxIdCheck['fr-CA'] = taxIdCheck['en-CA']; + +// Regexes for locales where characters should be omitted before checking format +var allsymbols = /[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g; +var sanitizeRegexes = { + 'de-AT': allsymbols, + 'de-DE': /[\/\\]/g, + 'fr-BE': allsymbols +}; +// sanitizeRegexes locale aliases +sanitizeRegexes['nl-BE'] = sanitizeRegexes['fr-BE']; + +/* + * Validator function + * Return true if the passed string is a valid tax identification number + * for the specified locale. + * Throw an error exception if the locale is not supported. + */ +function isTaxID(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + (0, _assertString.default)(str); + // Copy TIN to avoid replacement if sanitized + var strcopy = str.slice(0); + if (locale in taxIdFormat) { + if (locale in sanitizeRegexes) { + strcopy = strcopy.replace(sanitizeRegexes[locale], ''); + } + if (!taxIdFormat[locale].test(strcopy)) { + return false; + } + if (locale in taxIdCheck) { + return taxIdCheck[locale](strcopy); + } + // Fallthrough; not all locales have algorithmic checks + return true; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isTime.js b/src/hello/server/node_modules/validator/lib/isTime.js new file mode 100644 index 00000000..829ea988 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isTime.js @@ -0,0 +1,31 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isTime; +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var default_time_options = { + hourFormat: 'hour24', + mode: 'default' +}; +var formats = { + hour24: { + default: /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/, + withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/, + withOptionalSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/ + }, + hour12: { + default: /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/, + withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/, + withOptionalSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/ + } +}; +function isTime(input, options) { + options = (0, _merge.default)(options, default_time_options); + if (typeof input !== 'string') return false; + return formats[options.hourFormat][options.mode].test(input); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isULID.js b/src/hello/server/node_modules/validator/lib/isULID.js new file mode 100644 index 00000000..05801c32 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isULID.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isULID; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isULID(str) { + (0, _assertString.default)(str); + return /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isURL.js b/src/hello/server/node_modules/validator/lib/isURL.js new file mode 100644 index 00000000..56dc28fc --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isURL.js @@ -0,0 +1,249 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isURL; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _checkHost = _interopRequireDefault(require("./util/checkHost")); +var _includesString = _interopRequireDefault(require("./util/includesString")); +var _isFQDN = _interopRequireDefault(require("./isFQDN")); +var _isIP = _interopRequireDefault(require("./isIP")); +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +/* +options for isURL method + +protocols - valid protocols can be modified with this option. +require_tld - If set to false isURL will not check if the URL's host includes a top-level domain. +require_protocol - if set to true isURL will return false if protocol is not present in the URL. +require_host - if set to false isURL will not check if host is present in the URL. +require_port - if set to true isURL will check if port is present in the URL. +require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option. +allow_underscores - if set to true, the validator will allow underscores in the URL. +host_whitelist - if set to an array of strings or regexp, and the domain matches none of the strings + defined in it, the validation fails. +host_blacklist - if set to an array of strings or regexp, and the domain matches any of the strings + defined in it, the validation fails. +allow_trailing_dot - if set to true, the validator will allow the domain to end with + a `.` character. +allow_protocol_relative_urls - if set to true protocol relative URLs will be allowed. +allow_fragments - if set to false isURL will return false if fragments are present. +allow_query_components - if set to false isURL will return false if query components are present. +disallow_auth - if set to true, the validator will fail if the URL contains an authentication + component, e.g. `http://username:password@example.com` +validate_length - if set to false isURL will skip string length validation. `max_allowed_length` + will be ignored if this is set as `false`. +max_allowed_length - if set, isURL will not allow URLs longer than the specified value (default is + 2084 that IE maximum URL length). + +*/ + +var default_url_options = { + protocols: ['http', 'https', 'ftp'], + require_tld: true, + require_protocol: false, + require_host: true, + require_port: false, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false, + allow_fragments: true, + allow_query_components: true, + validate_length: true, + max_allowed_length: 2084 +}; +var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; +function isURL(url, options) { + (0, _assertString.default)(url); + if (!url || /[\s<>]/.test(url)) { + return false; + } + if (url.indexOf('mailto:') === 0) { + return false; + } + options = (0, _merge.default)(options, default_url_options); + if (options.validate_length && url.length > options.max_allowed_length) { + return false; + } + if (!options.allow_fragments && (0, _includesString.default)(url, '#')) { + return false; + } + if (!options.allow_query_components && ((0, _includesString.default)(url, '?') || (0, _includesString.default)(url, '&'))) { + return false; + } + var protocol, auth, host, hostname, port, port_str, split, ipv6; + split = url.split('#'); + url = split.shift(); + split = url.split('?'); + url = split.shift(); + + // Replaced the 'split("://")' logic with a regex to match the protocol. + // This correctly identifies schemes like `javascript:` which don't use `//`. + // However, we need to be careful not to confuse authentication credentials (user:password@host) + // with protocols. A colon before an @ symbol might be part of auth, not a protocol separator. + var protocol_match = url.match(/^([a-z][a-z0-9+\-.]*):/i); + var had_explicit_protocol = false; + var cleanUpProtocol = function cleanUpProtocol(potential_protocol) { + had_explicit_protocol = true; + protocol = potential_protocol.toLowerCase(); + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + // The identified protocol is not in the allowed list. + return false; + } + + // Remove the protocol from the URL string. + return url.substring(protocol_match[0].length); + }; + if (protocol_match) { + var potential_protocol = protocol_match[1]; + var after_colon = url.substring(protocol_match[0].length); + + // Check if what follows looks like authentication credentials (user:password@host) + // rather than a protocol. This happens when: + // 1. There's no `//` after the colon (protocols like `http://` have this) + // 2. There's an `@` symbol before any `/` + // 3. The part before `@` contains only valid auth characters (alphanumeric, -, _, ., %, :) + var starts_with_slashes = after_colon.slice(0, 2) === '//'; + if (!starts_with_slashes) { + var first_slash_position = after_colon.indexOf('/'); + var before_slash = first_slash_position === -1 ? after_colon : after_colon.substring(0, first_slash_position); + var at_position = before_slash.indexOf('@'); + if (at_position !== -1) { + var before_at = before_slash.substring(0, at_position); + var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/; + var is_valid_auth = valid_auth_regex.test(before_at); + + // Check if this contains URL-encoded content that could be malicious + // For example: javascript:%61%6c%65%72%74%28%31%29@example.com + // The encoded part decodes to: alert(1) + var has_encoded_content = /%[0-9a-fA-F]{2}/.test(before_at); + if (is_valid_auth && !has_encoded_content) { + // This looks like authentication (e.g., user:password@host), not a protocol + if (options.require_protocol) { + return false; + } + + // Don't consume the colon; let the auth parsing handle it later + } else { + // This looks like a malicious protocol (e.g., javascript:alert();@host) + // or URL-encoded protocol handler (e.g., javascript:%61%6c%65%72%74%28%31%29@host) + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else { + // No @ symbol found. Check if this could be a port number instead of a protocol. + // If what's after the colon is numeric (or starts with a digit and contains only + // valid port characters until a path separator), it's likely hostname:port, not a protocol. + var looks_like_port = /^[0-9]/.test(after_colon); + if (looks_like_port) { + // This looks like hostname:port, not a protocol + if (options.require_protocol) { + return false; + } + // Don't consume anything; let it be parsed as hostname:port + } else { + // This is definitely a protocol + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } + } else { + // Starts with '//', this is definitely a protocol like http:// + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else if (options.require_protocol) { + return false; + } + + // Handle leading '//' only as protocol-relative when there was NO explicit protocol. + // If there was an explicit protocol, '//' is the normal separator + // and should be stripped unconditionally. + if (url.slice(0, 2) === '//') { + if (!had_explicit_protocol && !options.allow_protocol_relative_urls) { + return false; + } + url = url.slice(2); + } + if (url === '') { + return false; + } + split = url.split('/'); + url = split.shift(); + if (url === '' && !options.require_host) { + return true; + } + split = url.split('@'); + if (split.length > 1) { + if (options.disallow_auth) { + return false; + } + if (split[0] === '') { + return false; + } + auth = split.shift(); + if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { + return false; + } + var _auth$split = auth.split(':'), + _auth$split2 = _slicedToArray(_auth$split, 2), + user = _auth$split2[0], + password = _auth$split2[1]; + if (user === '' && password === '') { + return false; + } + } + hostname = split.join('@'); + port_str = null; + ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + if (ipv6_match) { + host = ''; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(':'); + host = split.shift(); + if (split.length) { + port_str = split.join(':'); + } + } + if (port_str !== null && port_str.length > 0) { + port = parseInt(port_str, 10); + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } else if (options.require_port) { + return false; + } + if (options.host_whitelist) { + return (0, _checkHost.default)(host, options.host_whitelist); + } + if (host === '' && !options.require_host) { + return true; + } + if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) { + return false; + } + host = host || ipv6; + if (options.host_blacklist && (0, _checkHost.default)(host, options.host_blacklist)) { + return false; + } + return true; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isUUID.js b/src/hello/server/node_modules/validator/lib/isUUID.js new file mode 100644 index 00000000..3266b9c7 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isUUID.js @@ -0,0 +1,32 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isUUID; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var uuid = { + 1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 6: /^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 8: /^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + nil: /^00000000-0000-0000-0000-000000000000$/i, + max: /^ffffffff-ffff-ffff-ffff-ffffffffffff$/i, + loose: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + // From https://github.com/uuidjs/uuid/blob/main/src/regex.js + all: /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i +}; +function isUUID(str, version) { + (0, _assertString.default)(str); + if (version === undefined || version === null) { + version = 'all'; + } + return version in uuid ? uuid[version].test(str) : false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isUppercase.js b/src/hello/server/node_modules/validator/lib/isUppercase.js new file mode 100644 index 00000000..0606bbeb --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isUppercase.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isUppercase; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isUppercase(str) { + (0, _assertString.default)(str); + return str === str.toUpperCase(); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isVAT.js b/src/hello/server/node_modules/validator/lib/isVAT.js new file mode 100644 index 00000000..328d7cf4 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isVAT.js @@ -0,0 +1,274 @@ +"use strict"; + +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isVAT; +exports.vatMatchers = void 0; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var algorithms = _interopRequireWildcard(require("./util/algorithms")); +function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var AU = function AU(str) { + var match = str.match(/^(AU)?(\d{11})$/); + if (!match) { + return false; + } + // @see {@link https://abr.business.gov.au/Help/AbnFormat} + var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]; + str = str.replace(/^AU/, ''); + var ABN = (parseInt(str.slice(0, 1), 10) - 1).toString() + str.slice(1); + var total = 0; + for (var i = 0; i < 11; i++) { + total += weights[i] * ABN.charAt(i); + } + return total !== 0 && total % 89 === 0; +}; +var CH = function CH(str) { + // @see {@link https://www.ech.ch/de/ech/ech-0097/5.2.0} + var hasValidCheckNumber = function hasValidCheckNumber(digits) { + var lastDigit = digits.pop(); // used as check number + var weights = [5, 4, 3, 2, 7, 6, 5, 4]; + var calculatedCheckNumber = (11 - digits.reduce(function (acc, el, idx) { + return acc + el * weights[idx]; + }, 0) % 11) % 11; + return lastDigit === calculatedCheckNumber; + }; + + // @see {@link https://www.estv.admin.ch/estv/de/home/mehrwertsteuer/uid/mwst-uid-nummer.html} + return /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber(str.match(/\d/g).map(function (el) { + return +el; + })); +}; +var PT = function PT(str) { + var match = str.match(/^(PT)?(\d{9})$/); + if (!match) { + return false; + } + var tin = match[2]; + var checksum = 11 - algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); +}; +var vatMatchers = exports.vatMatchers = { + /** + * European Union VAT identification numbers + */ + AT: function AT(str) { + return /^(AT)?U\d{8}$/.test(str); + }, + BE: function BE(str) { + return /^(BE)?\d{10}$/.test(str); + }, + BG: function BG(str) { + return /^(BG)?\d{9,10}$/.test(str); + }, + HR: function HR(str) { + return /^(HR)?\d{11}$/.test(str); + }, + CY: function CY(str) { + return /^(CY)?\w{9}$/.test(str); + }, + CZ: function CZ(str) { + return /^(CZ)?\d{8,10}$/.test(str); + }, + DK: function DK(str) { + return /^(DK)?\d{8}$/.test(str); + }, + EE: function EE(str) { + return /^(EE)?\d{9}$/.test(str); + }, + FI: function FI(str) { + return /^(FI)?\d{8}$/.test(str); + }, + FR: function FR(str) { + return /^(FR)([A-Z0-9]{2}\d{9})$/.test(str); + }, + DE: function DE(str) { + return /^(DE)?\d{9}$/.test(str); + }, + EL: function EL(str) { + return /^(EL)?\d{9}$/.test(str); + }, + HU: function HU(str) { + return /^(HU)?\d{8}$/.test(str); + }, + IE: function IE(str) { + return /^(IE)?\d{7}\w{1}(W)?$/.test(str); + }, + IT: function IT(str) { + return /^(IT)?\d{11}$/.test(str); + }, + LV: function LV(str) { + return /^(LV)?\d{11}$/.test(str); + }, + LT: function LT(str) { + return /^(LT)?\d{9,12}$/.test(str); + }, + LU: function LU(str) { + return /^(LU)?\d{8}$/.test(str); + }, + MT: function MT(str) { + return /^(MT)?\d{8}$/.test(str); + }, + NL: function NL(str) { + return /^(NL)?\d{9}B\d{2}$/.test(str); + }, + PL: function PL(str) { + return /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(str); + }, + PT: PT, + RO: function RO(str) { + return /^(RO)?\d{2,10}$/.test(str); + }, + SK: function SK(str) { + return /^(SK)?\d{10}$/.test(str); + }, + SI: function SI(str) { + return /^(SI)?\d{8}$/.test(str); + }, + ES: function ES(str) { + return /^(ES)?\w\d{7}[A-Z]$/.test(str); + }, + SE: function SE(str) { + return /^(SE)?\d{12}$/.test(str); + }, + /** + * VAT numbers of non-EU countries + */ + AL: function AL(str) { + return /^(AL)?\w{9}[A-Z]$/.test(str); + }, + MK: function MK(str) { + return /^(MK)?\d{13}$/.test(str); + }, + AU: AU, + BY: function BY(str) { + return /^(УНП )?\d{9}$/.test(str); + }, + CA: function CA(str) { + return /^(CA)?\d{9}$/.test(str); + }, + IS: function IS(str) { + return /^(IS)?\d{5,6}$/.test(str); + }, + IN: function IN(str) { + return /^(IN)?\d{15}$/.test(str); + }, + ID: function ID(str) { + return /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str); + }, + IL: function IL(str) { + return /^(IL)?\d{9}$/.test(str); + }, + KZ: function KZ(str) { + return /^(KZ)?\d{12}$/.test(str); + }, + NZ: function NZ(str) { + return /^(NZ)?\d{9}$/.test(str); + }, + NG: function NG(str) { + return /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str); + }, + NO: function NO(str) { + return /^(NO)?\d{9}MVA$/.test(str); + }, + PH: function PH(str) { + return /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(str); + }, + RU: function RU(str) { + return /^(RU)?(\d{10}|\d{12})$/.test(str); + }, + SM: function SM(str) { + return /^(SM)?\d{5}$/.test(str); + }, + SA: function SA(str) { + return /^(SA)?\d{15}$/.test(str); + }, + RS: function RS(str) { + return /^(RS)?\d{9}$/.test(str); + }, + CH: CH, + TR: function TR(str) { + return /^(TR)?\d{10}$/.test(str); + }, + UA: function UA(str) { + return /^(UA)?\d{12}$/.test(str); + }, + GB: function GB(str) { + return /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str); + }, + UZ: function UZ(str) { + return /^(UZ)?\d{9}$/.test(str); + }, + /** + * VAT numbers of Latin American countries + */ + AR: function AR(str) { + return /^(AR)?\d{11}$/.test(str); + }, + BO: function BO(str) { + return /^(BO)?\d{7}$/.test(str); + }, + BR: function BR(str) { + return /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(str); + }, + CL: function CL(str) { + return /^(CL)?\d{8}-\d{1}$/.test(str); + }, + CO: function CO(str) { + return /^(CO)?\d{10}$/.test(str); + }, + CR: function CR(str) { + return /^(CR)?\d{9,12}$/.test(str); + }, + EC: function EC(str) { + return /^(EC)?\d{13}$/.test(str); + }, + SV: function SV(str) { + return /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(str); + }, + GT: function GT(str) { + return /^(GT)?\d{7}-\d{1}$/.test(str); + }, + HN: function HN(str) { + return /^(HN)?$/.test(str); + }, + MX: function MX(str) { + return /^(MX)?\w{3,4}\d{6}\w{3}$/.test(str); + }, + NI: function NI(str) { + return /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(str); + }, + PA: function PA(str) { + return /^(PA)?$/.test(str); + }, + PY: function PY(str) { + return /^(PY)?\d{6,8}-\d{1}$/.test(str); + }, + PE: function PE(str) { + return /^(PE)?\d{11}$/.test(str); + }, + DO: function DO(str) { + return /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(str); + }, + UY: function UY(str) { + return /^(UY)?\d{12}$/.test(str); + }, + VE: function VE(str) { + return /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(str); + } +}; +function isVAT(str, countryCode) { + (0, _assertString.default)(str); + (0, _assertString.default)(countryCode); + if (countryCode in vatMatchers) { + return vatMatchers[countryCode](str); + } + throw new Error("Invalid country code: '".concat(countryCode, "'")); +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isVariableWidth.js b/src/hello/server/node_modules/validator/lib/isVariableWidth.js new file mode 100644 index 00000000..efa60687 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isVariableWidth.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isVariableWidth; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _isFullWidth = require("./isFullWidth"); +var _isHalfWidth = require("./isHalfWidth"); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isVariableWidth(str) { + (0, _assertString.default)(str); + return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/isWhitelisted.js b/src/hello/server/node_modules/validator/lib/isWhitelisted.js new file mode 100644 index 00000000..fbebb998 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/isWhitelisted.js @@ -0,0 +1,19 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isWhitelisted; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function isWhitelisted(str, chars) { + (0, _assertString.default)(str); + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + return true; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/ltrim.js b/src/hello/server/node_modules/validator/lib/ltrim.js new file mode 100644 index 00000000..a047c0df --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/ltrim.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = ltrim; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function ltrim(str, chars) { + (0, _assertString.default)(str); + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping + var pattern = chars ? new RegExp("^[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+"), 'g') : /^\s+/g; + return str.replace(pattern, ''); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/matches.js b/src/hello/server/node_modules/validator/lib/matches.js new file mode 100644 index 00000000..a31f4448 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/matches.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = matches; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function matches(str, pattern, modifiers) { + (0, _assertString.default)(str); + if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { + pattern = new RegExp(pattern, modifiers); + } + return !!str.match(pattern); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/normalizeEmail.js b/src/hello/server/node_modules/validator/lib/normalizeEmail.js new file mode 100644 index 00000000..780acf49 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/normalizeEmail.js @@ -0,0 +1,140 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = normalizeEmail; +var _merge = _interopRequireDefault(require("./util/merge")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +var default_normalize_email_options = { + // The following options apply to all email addresses + // Lowercases the local part of the email address. + // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). + // The domain is always lowercased, as per RFC 1035 + all_lowercase: true, + // The following conversions are specific to GMail + // Lowercases the local part of the GMail address (known to be case-insensitive) + gmail_lowercase: true, + // Removes dots from the local part of the email address, as that's ignored by GMail + gmail_remove_dots: true, + // Removes the subaddress (e.g. "+foo") from the email address + gmail_remove_subaddress: true, + // Conversts the googlemail.com domain to gmail.com + gmail_convert_googlemaildotcom: true, + // The following conversions are specific to Outlook.com / Windows Live / Hotmail + // Lowercases the local part of the Outlook.com address (known to be case-insensitive) + outlookdotcom_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + outlookdotcom_remove_subaddress: true, + // The following conversions are specific to Yahoo + // Lowercases the local part of the Yahoo address (known to be case-insensitive) + yahoo_lowercase: true, + // Removes the subaddress (e.g. "-foo") from the email address + yahoo_remove_subaddress: true, + // The following conversions are specific to Yandex + // Lowercases the local part of the Yandex address (known to be case-insensitive) + yandex_lowercase: true, + // all yandex domains are equal, this explicitly sets the domain to 'yandex.ru' + yandex_convert_yandexru: true, + // The following conversions are specific to iCloud + // Lowercases the local part of the iCloud address (known to be case-insensitive) + icloud_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + icloud_remove_subaddress: true +}; + +// List of domains used by iCloud +var icloud_domains = ['icloud.com', 'me.com']; + +// List of domains used by Outlook.com and its predecessors +// This list is likely incomplete. +// Partial reference: +// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/ +var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com']; + +// List of domains used by Yahoo Mail +// This list is likely incomplete +var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com']; + +// List of domains used by yandex.ru +var yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru']; + +// replace single dots, but not multiple consecutive dots +function dotsReplacer(match) { + if (match.length > 1) { + return match; + } + return ''; +} +function normalizeEmail(email, options) { + options = (0, _merge.default)(options, default_normalize_email_options); + var raw_parts = email.split('@'); + var domain = raw_parts.pop(); + var user = raw_parts.join('@'); + var parts = [user, domain]; + + // The domain is always lowercased, as it's case-insensitive per RFC 1035 + parts[1] = parts[1].toLowerCase(); + if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { + // Address is GMail + if (options.gmail_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (options.gmail_remove_dots) { + // this does not replace consecutive dots like example..email@gmail.com + parts[0] = parts[0].replace(/\.+/g, dotsReplacer); + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.gmail_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1]; + } else if (icloud_domains.indexOf(parts[1]) >= 0) { + // Address is iCloud + if (options.icloud_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.icloud_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) { + // Address is Outlook.com + if (options.outlookdotcom_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.outlookdotcom_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yahoo_domains.indexOf(parts[1]) >= 0) { + // Address is Yahoo + if (options.yahoo_remove_subaddress) { + var components = parts[0].split('-'); + parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.yahoo_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yandex_domains.indexOf(parts[1]) >= 0) { + if (options.all_lowercase || options.yandex_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.yandex_convert_yandexru ? 'yandex.ru' : parts[1]; + } else if (options.all_lowercase) { + // Any other address + parts[0] = parts[0].toLowerCase(); + } + return parts.join('@'); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/rtrim.js b/src/hello/server/node_modules/validator/lib/rtrim.js new file mode 100644 index 00000000..54b6d42c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/rtrim.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rtrim; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function rtrim(str, chars) { + (0, _assertString.default)(str); + if (chars) { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping + var pattern = new RegExp("[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+$"), 'g'); + return str.replace(pattern, ''); + } + // Use a faster and more safe than regex trim method https://blog.stevenlevithan.com/archives/faster-trim-javascript + var strIndex = str.length - 1; + while (/\s/.test(str.charAt(strIndex))) { + strIndex -= 1; + } + return str.slice(0, strIndex + 1); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/stripLow.js b/src/hello/server/node_modules/validator/lib/stripLow.js new file mode 100644 index 00000000..5f3d20e9 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/stripLow.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = stripLow; +var _assertString = _interopRequireDefault(require("./util/assertString")); +var _blacklist = _interopRequireDefault(require("./blacklist")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function stripLow(str, keep_new_lines) { + (0, _assertString.default)(str); + var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; + return (0, _blacklist.default)(str, chars); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/toBoolean.js b/src/hello/server/node_modules/validator/lib/toBoolean.js new file mode 100644 index 00000000..c7819e2c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/toBoolean.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toBoolean; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function toBoolean(str, strict) { + (0, _assertString.default)(str); + if (strict) { + return str === '1' || /^true$/i.test(str); + } + return str !== '0' && !/^false$/i.test(str) && str !== ''; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/toDate.js b/src/hello/server/node_modules/validator/lib/toDate.js new file mode 100644 index 00000000..ace71210 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/toDate.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toDate; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function toDate(date) { + (0, _assertString.default)(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/toFloat.js b/src/hello/server/node_modules/validator/lib/toFloat.js new file mode 100644 index 00000000..4eac5e13 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/toFloat.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toFloat; +var _isFloat = _interopRequireDefault(require("./isFloat")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function toFloat(str) { + if (!(0, _isFloat.default)(str)) return NaN; + return parseFloat(str); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/toInt.js b/src/hello/server/node_modules/validator/lib/toInt.js new file mode 100644 index 00000000..68921517 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/toInt.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toInt; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function toInt(str, radix) { + (0, _assertString.default)(str); + return parseInt(str, radix || 10); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/trim.js b/src/hello/server/node_modules/validator/lib/trim.js new file mode 100644 index 00000000..c8f6aaca --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/trim.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = trim; +var _rtrim = _interopRequireDefault(require("./rtrim")); +var _ltrim = _interopRequireDefault(require("./ltrim")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function trim(str, chars) { + return (0, _rtrim.default)((0, _ltrim.default)(str, chars), chars); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/unescape.js b/src/hello/server/node_modules/validator/lib/unescape.js new file mode 100644 index 00000000..a95ad27b --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/unescape.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = unescape; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function unescape(str) { + (0, _assertString.default)(str); + return str.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\').replace(/`/g, '`').replace(/&/g, '&'); + // & replacement has to be the last one to prevent + // bugs with intermediate strings containing escape sequences + // See: https://github.com/validatorjs/validator.js/issues/1827 +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/algorithms.js b/src/hello/server/node_modules/validator/lib/util/algorithms.js new file mode 100644 index 00000000..6082c230 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/algorithms.js @@ -0,0 +1,88 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.iso7064Check = iso7064Check; +exports.luhnCheck = luhnCheck; +exports.reverseMultiplyAndSum = reverseMultiplyAndSum; +exports.verhoeffCheck = verhoeffCheck; +/** + * Algorithmic validation functions + * May be used as is or implemented in the workflow of other validators. + */ + +/* + * ISO 7064 validation function + * Called with a string of numbers (incl. check digit) + * to validate according to ISO 7064 (MOD 11, 10). + */ +function iso7064Check(str) { + var checkvalue = 10; + for (var i = 0; i < str.length - 1; i++) { + checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? 10 * 2 % 11 : (parseInt(str[i], 10) + checkvalue) % 10 * 2 % 11; + } + checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue; + return checkvalue === parseInt(str[10], 10); +} + +/* + * Luhn (mod 10) validation function + * Called with a string of numbers (incl. check digit) + * to validate according to the Luhn algorithm. + */ +function luhnCheck(str) { + var checksum = 0; + var second = false; + for (var i = str.length - 1; i >= 0; i--) { + if (second) { + var product = parseInt(str[i], 10) * 2; + if (product > 9) { + // sum digits of product and add to checksum + checksum += product.toString().split('').map(function (a) { + return parseInt(a, 10); + }).reduce(function (a, b) { + return a + b; + }, 0); + } else { + checksum += product; + } + } else { + checksum += parseInt(str[i], 10); + } + second = !second; + } + return checksum % 10 === 0; +} + +/* + * Reverse TIN multiplication and summation helper function + * Called with an array of single-digit integers and a base multiplier + * to calculate the sum of the digits multiplied in reverse. + * Normally used in variations of MOD 11 algorithmic checks. + */ +function reverseMultiplyAndSum(digits, base) { + var total = 0; + for (var i = 0; i < digits.length; i++) { + total += digits[i] * (base - i); + } + return total; +} + +/* + * Verhoeff validation helper function + * Called with a string of numbers + * to validate according to the Verhoeff algorithm. + */ +function verhoeffCheck(str) { + var d_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + var p_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + + // Copy (to prevent replacement) and reverse + var str_copy = str.split('').reverse().join(''); + var checksum = 0; + for (var i = 0; i < str_copy.length; i++) { + checksum = d_table[checksum][p_table[i % 8][parseInt(str_copy[i], 10)]]; + } + return checksum === 0; +} \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/assertString.js b/src/hello/server/node_modules/validator/lib/util/assertString.js new file mode 100644 index 00000000..dde05122 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/assertString.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = assertString; +function assertString(input) { + if (input === undefined || input === null) throw new TypeError("Expected a string but received a ".concat(input)); + if (input.constructor.name !== 'String') throw new TypeError("Expected a string but received a ".concat(input.constructor.name)); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/checkHost.js b/src/hello/server/node_modules/validator/lib/util/checkHost.js new file mode 100644 index 00000000..5419f3e4 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/checkHost.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = checkHost; +function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +} +function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + return false; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/includesArray.js b/src/hello/server/node_modules/validator/lib/util/includesArray.js new file mode 100644 index 00000000..453594d7 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/includesArray.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var includes = function includes(arr, val) { + return arr.some(function (arrVal) { + return val === arrVal; + }); +}; +var _default = exports.default = includes; +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/includesString.js b/src/hello/server/node_modules/validator/lib/util/includesString.js new file mode 100644 index 00000000..d286a655 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/includesString.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var includes = function includes(str, val) { + return str.indexOf(val) !== -1; +}; +var _default = exports.default = includes; +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/merge.js b/src/hello/server/node_modules/validator/lib/util/merge.js new file mode 100644 index 00000000..1c6bb025 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/merge.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = merge; +function merge() { + var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var defaults = arguments.length > 1 ? arguments[1] : undefined; + for (var key in defaults) { + if (typeof obj[key] === 'undefined') { + obj[key] = defaults[key]; + } + } + return obj; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/multilineRegex.js b/src/hello/server/node_modules/validator/lib/util/multilineRegex.js new file mode 100644 index 00000000..b5970e3c --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/multilineRegex.js @@ -0,0 +1,20 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = multilineRegexp; +/** + * Build RegExp object from an array + * of multiple/multi-line regexp parts + * + * @param {string[]} parts + * @param {string} flags + * @return {object} - RegExp object + */ +function multilineRegexp(parts, flags) { + var regexpAsStringLiteral = parts.join(''); + return new RegExp(regexpAsStringLiteral, flags); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/nullUndefinedCheck.js b/src/hello/server/node_modules/validator/lib/util/nullUndefinedCheck.js new file mode 100644 index 00000000..efbdaf01 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/nullUndefinedCheck.js @@ -0,0 +1,11 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = isNullOrUndefined; +function isNullOrUndefined(value) { + return value === null || value === undefined; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/toString.js b/src/hello/server/node_modules/validator/lib/util/toString.js new file mode 100644 index 00000000..d2c7c344 --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/toString.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = toString; +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function toString(input) { + if (_typeof(input) === 'object' && input !== null) { + if (typeof input.toString === 'function') { + input = input.toString(); + } else { + input = '[object Object]'; + } + } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { + input = ''; + } + return String(input); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/util/typeOf.js b/src/hello/server/node_modules/validator/lib/util/typeOf.js new file mode 100644 index 00000000..9240fb4a --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/util/typeOf.js @@ -0,0 +1,18 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = typeOf; +/** + * Better way to handle type checking + * null, {}, array and date are objects, which confuses + */ +function typeOf(input) { + var rawObject = Object.prototype.toString.call(input).toLowerCase(); + var typeOfRegex = /\[object (.*)]/g; + var type = typeOfRegex.exec(rawObject)[1]; + return type; +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/lib/whitelist.js b/src/hello/server/node_modules/validator/lib/whitelist.js new file mode 100644 index 00000000..0a7614ab --- /dev/null +++ b/src/hello/server/node_modules/validator/lib/whitelist.js @@ -0,0 +1,14 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = whitelist; +var _assertString = _interopRequireDefault(require("./util/assertString")); +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } +function whitelist(str, chars) { + (0, _assertString.default)(str); + return str.replace(new RegExp("[^".concat(chars, "]+"), 'g'), ''); +} +module.exports = exports.default; +module.exports.default = exports.default; \ No newline at end of file diff --git a/src/hello/server/node_modules/validator/package.json b/src/hello/server/node_modules/validator/package.json new file mode 100644 index 00000000..70adbbca --- /dev/null +++ b/src/hello/server/node_modules/validator/package.json @@ -0,0 +1,76 @@ +{ + "name": "validator", + "description": "String validation and sanitization", + "version": "13.15.26", + "sideEffects": false, + "homepage": "https://github.com/validatorjs/validator.js", + "files": [ + "index.js", + "es", + "lib", + "README.md", + "LICENSE", + "validator.js", + "validator.min.js" + ], + "keywords": [ + "validator", + "validation", + "validate", + "sanitization", + "sanitize", + "sanitisation", + "sanitise", + "assert" + ], + "author": "Chris O'Hara ", + "contributors": [ + "Anthony Nandaa (https://github.com/profnandaa)" + ], + "main": "index.js", + "bugs": { + "url": "https://github.com/validatorjs/validator.js/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/validatorjs/validator.js.git" + }, + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", + "babel-eslint": "^10.0.1", + "babel-plugin-add-module-exports": "^1.0.0", + "eslint": "^4.19.1", + "eslint-config-airbnb-base": "^12.1.0", + "eslint-plugin-import": "^2.11.0", + "mocha": "^6.2.3", + "npm-run-all": "^4.1.5", + "nyc": "^14.1.0", + "rimraf": "^3.0.0", + "rollup": "^0.47.0", + "rollup-plugin-babel": "^4.0.1", + "timezone-mock": "^1.3.6", + "uglify-js": "^3.0.19" + }, + "scripts": { + "lint": "eslint src test", + "lint:fix": "eslint --fix src test", + "clean:node": "rimraf index.js lib", + "clean:es": "rimraf es", + "clean:browser": "rimraf validator*.js", + "clean": "run-p clean:*", + "minify": "uglifyjs validator.js -o validator.min.js --compress --mangle --comments /Copyright/", + "build:browser": "node --require @babel/register build-browser && npm run minify", + "build:es": "babel src -d es --env-name=es", + "build:node": "babel src -d .", + "build": "run-p build:*", + "pretest": "npm run build && npm run lint", + "test": "nyc --reporter=cobertura --reporter=text-summary mocha --require @babel/register --reporter dot --recursive" + }, + "engines": { + "node": ">= 0.10" + }, + "license": "MIT" +} diff --git a/src/hello/server/node_modules/validator/validator.js b/src/hello/server/node_modules/validator/validator.js new file mode 100644 index 00000000..fb319911 --- /dev/null +++ b/src/hello/server/node_modules/validator/validator.js @@ -0,0 +1,5774 @@ +/*! + * Copyright (c) 2018 Chris O'Hara + * + * 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. + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.validator = factory()); +}(this, (function () { 'use strict'; + +function assertString(input) { + if (input === undefined || input === null) throw new TypeError("Expected a string but received a ".concat(input)); + if (input.constructor.name !== 'String') throw new TypeError("Expected a string but received a ".concat(input.constructor.name)); +} + +function toDate(date) { + assertString(date); + date = Date.parse(date); + return !isNaN(date) ? new Date(date) : null; +} + +function isNullOrUndefined(value) { + return value === null || value === undefined; +} + +var alpha = { + 'en-US': /^[A-Z]+$/i, + 'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i, + 'bg-BG': /^[А-Я]+$/i, + 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[A-ZÆØÅ]+$/i, + 'de-DE': /^[A-ZÄÖÜß]+$/i, + 'el-GR': /^[Α-ώ]+$/i, + 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, + 'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i, + 'fi-FI': /^[A-ZÅÄÖ]+$/i, + 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + 'nb-NO': /^[A-ZÆØÅ]+$/i, + 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[A-ZÆØÅ]+$/i, + 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + 'ru-RU': /^[А-ЯЁ]+$/i, + 'kk-KZ': /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + 'sl-SI': /^[A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[A-ZÅÄÖ]+$/i, + 'th-TH': /^[ก-๐\s]+$/i, + 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i, + 'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + 'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[א-ת]+$/, + fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + 'hi-IN': /^[\u0900-\u0961]+[\u0972-\u097F]*$/i, + 'si-LK': /^[\u0D80-\u0DFF]+$/, + 'ta-IN': /^[\u0B80-\u0BFF]+$/i, + 'te-IN': /^[\u0C00-\u0C7F]+$/i, + 'kn-IN': /^[\u0C80-\u0CFF]+$/i, + 'ml-IN': /^[\u0D00-\u0D7F]+$/i, + 'gu-IN': /^[\u0A80-\u0AFF]+$/i, + 'pa-IN': /^[\u0A00-\u0A7F]+$/i, + 'or-IN': /^[\u0B00-\u0B7F]+$/i +}; +var alphanumeric = { + 'en-US': /^[0-9A-Z]+$/i, + 'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i, + 'bg-BG': /^[0-9А-Я]+$/i, + 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + 'da-DK': /^[0-9A-ZÆØÅ]+$/i, + 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, + 'el-GR': /^[0-9Α-ω]+$/i, + 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + 'fi-FI': /^[0-9A-ZÅÄÖ]+$/i, + 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, + 'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + 'nb-NO': /^[0-9A-ZÆØÅ]+$/i, + 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, + 'nn-NO': /^[0-9A-ZÆØÅ]+$/i, + 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + 'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + 'ru-RU': /^[0-9А-ЯЁ]+$/i, + 'kk-KZ': /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + 'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i, + 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, + 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i, + 'th-TH': /^[ก-๙\s]+$/i, + 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, + 'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + 'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[0-9א-ת]+$/, + fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i, + 'hi-IN': /^[\u0900-\u0963]+[\u0966-\u097F]*$/i, + 'si-LK': /^[0-9\u0D80-\u0DFF]+$/, + 'ta-IN': /^[0-9\u0B80-\u0BFF.]+$/i, + 'te-IN': /^[0-9\u0C00-\u0C7F.]+$/i, + 'kn-IN': /^[0-9\u0C80-\u0CFF.]+$/i, + 'ml-IN': /^[0-9\u0D00-\u0D7F.]+$/i, + 'gu-IN': /^[0-9\u0A80-\u0AFF.]+$/i, + 'pa-IN': /^[0-9\u0A00-\u0A7F.]+$/i, + 'or-IN': /^[0-9\u0B00-\u0B7F.]+$/i +}; +var decimal = { + 'en-US': '.', + ar: '٫' +}; +var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; +for (var locale, i = 0; i < englishLocales.length; i++) { + locale = "en-".concat(englishLocales[i]); + alpha[locale] = alpha['en-US']; + alphanumeric[locale] = alphanumeric['en-US']; + decimal[locale] = decimal['en-US']; +} + +// Source: http://www.localeplanet.com/java/ +var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; +for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { + _locale = "ar-".concat(arabicLocales[_i]); + alpha[_locale] = alpha.ar; + alphanumeric[_locale] = alphanumeric.ar; + decimal[_locale] = decimal.ar; +} +var farsiLocales = ['IR', 'AF']; +for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) { + _locale2 = "fa-".concat(farsiLocales[_i2]); + alphanumeric[_locale2] = alphanumeric.fa; + decimal[_locale2] = decimal.ar; +} +var bengaliLocales = ['BD', 'IN']; +for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) { + _locale3 = "bn-".concat(bengaliLocales[_i3]); + alpha[_locale3] = alpha.bn; + alphanumeric[_locale3] = alphanumeric.bn; + decimal[_locale3] = decimal['en-US']; +} + +// Source: https://en.wikipedia.org/wiki/Decimal_mark +var dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY']; +var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'eo', 'es-ES', 'fr-CA', 'fr-FR', 'gu-IN', 'hi-IN', 'hu-HU', 'id-ID', 'it-IT', 'kk-KZ', 'kn-IN', 'ku-IQ', 'ml-IN', 'nb-NO', 'nl-NL', 'nn-NO', 'or-IN', 'pa-IN', 'pl-PL', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'ta-IN', 'te-IN', 'tr-TR', 'uk-UA', 'vi-VN']; +for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) { + decimal[dotDecimal[_i4]] = decimal['en-US']; +} +for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) { + decimal[commaDecimal[_i5]] = ','; +} +alpha['fr-CA'] = alpha['fr-FR']; +alphanumeric['fr-CA'] = alphanumeric['fr-FR']; +alpha['pt-BR'] = alpha['pt-PT']; +alphanumeric['pt-BR'] = alphanumeric['pt-PT']; +decimal['pt-BR'] = decimal['pt-PT']; + +// see #862 +alpha['pl-Pl'] = alpha['pl-PL']; +alphanumeric['pl-Pl'] = alphanumeric['pl-PL']; +decimal['pl-Pl'] = decimal['pl-PL']; + +// see #1455 +alpha['fa-AF'] = alpha.fa; + +function isFloat(str, options) { + assertString(str); + options = options || {}; + var _float = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(options.locale ? decimal[options.locale] : '.', "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$")); + if (str === '' || str === '.' || str === ',' || str === '-' || str === '+') { + return false; + } + var value = parseFloat(str.replace(',', '.')); + return _float.test(str) && (!options.hasOwnProperty('min') || isNullOrUndefined(options.min) || value >= options.min) && (!options.hasOwnProperty('max') || isNullOrUndefined(options.max) || value <= options.max) && (!options.hasOwnProperty('lt') || isNullOrUndefined(options.lt) || value < options.lt) && (!options.hasOwnProperty('gt') || isNullOrUndefined(options.gt) || value > options.gt); +} +var locales = Object.keys(decimal); + +function toFloat(str) { + if (!isFloat(str)) return NaN; + return parseFloat(str); +} + +function toInt(str, radix) { + assertString(str); + return parseInt(str, radix || 10); +} + +function toBoolean(str, strict) { + assertString(str); + if (strict) { + return str === '1' || /^true$/i.test(str); + } + return str !== '0' && !/^false$/i.test(str) && str !== ''; +} + +function equals(str, comparison) { + assertString(str); + return str === comparison; +} + +function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; +} +function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; +} +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); +} +function _createForOfIteratorHelper(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t) { + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { + t && (r = t); + var n = 0, + F = function () {}; + return { + s: F, + n: function () { + return n >= r.length ? { + done: !0 + } : { + done: !1, + value: r[n++] + }; + }, + e: function (r) { + throw r; + }, + f: F + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, + a = !0, + u = !1; + return { + s: function () { + t = t.call(r); + }, + n: function () { + var r = t.next(); + return a = r.done, r; + }, + e: function (r) { + u = !0, o = r; + }, + f: function () { + try { + a || null == t.return || t.return(); + } finally { + if (u) throw o; + } + } + }; +} +function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _setFunctionName(e, t, n) { + "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); + try { + Object.defineProperty(e, "name", { + configurable: !0, + value: n ? n + " " + t : t + }); + } catch (e) {} + return e; +} +function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); +} +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} +function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } +} +function old_createMetadataMethodsForProperty(e, t, a, r) { + return { + getMetadata: function (o) { + old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o); + var i = e[o]; + if (void 0 !== i) if (1 === t) { + var n = i.public; + if (void 0 !== n) return n[a]; + } else if (2 === t) { + var l = i.private; + if (void 0 !== l) return l.get(a); + } else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor; + }, + setMetadata: function (o, i) { + old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o); + var n = e[o]; + if (void 0 === n && (n = e[o] = {}), 1 === t) { + var l = n.public; + void 0 === l && (l = n.public = {}), l[a] = i; + } else if (2 === t) { + var s = n.priv; + void 0 === s && (s = n.private = new Map()), s.set(a, i); + } else n.constructor = i; + } + }; +} +function old_createAddInitializerMethod(e, t) { + return function (a) { + old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a); + }; +} +function old_memberDec(e, t, a, r, o, i, n, l, s) { + var c; + switch (i) { + case 1: + c = "accessor"; + break; + case 2: + c = "method"; + break; + case 3: + c = "getter"; + break; + case 4: + c = "setter"; + break; + default: + c = "field"; + } + var d, + u, + f = { + kind: c, + name: l ? "#" + t : _toPropertyKey(t), + isStatic: n, + isPrivate: l + }, + p = { + v: !1 + }; + if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) { + d = 2, u = Symbol(t); + var v = {}; + 0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () { + return a.value; + } : (1 !== i && 3 !== i || (v.get = function () { + return a.get.call(this); + }), 1 !== i && 4 !== i || (v.set = function (e) { + a.set.call(this, e); + })), f.access = v; + } else d = 1, u = t; + try { + return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p))); + } finally { + p.v = !0; + } +} +function old_assertNotFinished(e, t) { + if (e.v) throw Error("attempted to call " + t + " after decoration was finished"); +} +function old_assertMetadataKey(e) { + if ("symbol" != typeof e) throw new TypeError("Metadata keys must be symbols, received: " + e); +} +function old_assertCallable(e, t) { + if ("function" != typeof e) throw new TypeError(t + " must be a function"); +} +function old_assertValidReturnValue(e, t) { + var a = typeof t; + if (1 === e) { + if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); + void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); + } else if ("function" !== a) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0"); +} +function old_getInit(e) { + var t; + return null == (t = e.init) && (t = e.initializer) && void 0 !== console && console.warn(".initializer has been renamed to .init as of March 2022"), t; +} + +function toString$1(input) { + if (_typeof(input) === 'object' && input !== null) { + if (typeof input.toString === 'function') { + input = input.toString(); + } else { + input = '[object Object]'; + } + } else if (input === null || typeof input === 'undefined' || isNaN(input) && !input.length) { + input = ''; + } + return String(input); +} + +function merge() { + var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var defaults = arguments.length > 1 ? arguments[1] : undefined; + for (var key in defaults) { + if (typeof obj[key] === 'undefined') { + obj[key] = defaults[key]; + } + } + return obj; +} + +var defaultContainsOptions = { + ignoreCase: false, + minOccurrences: 1 +}; +function contains(str, elem, options) { + assertString(str); + options = merge(options, defaultContainsOptions); + if (options.ignoreCase) { + return str.toLowerCase().split(toString$1(elem).toLowerCase()).length > options.minOccurrences; + } + return str.split(toString$1(elem)).length > options.minOccurrences; +} + +function matches(str, pattern, modifiers) { + assertString(str); + if (Object.prototype.toString.call(pattern) !== '[object RegExp]') { + pattern = new RegExp(pattern, modifiers); + } + return !!str.match(pattern); +} + +function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +} +function checkHost(host, matches) { + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (host === match || isRegExp(match) && match.test(host)) { + return true; + } + } + return false; +} + +/* eslint-disable prefer-rest-params */ +function isByteLength(str, options) { + assertString(str); + var min; + var max; + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isByteLength(str, min [, max]) + min = arguments[1]; + max = arguments[2]; + } + var len = encodeURI(str).split(/%..|./).length - 1; + return len >= min && (typeof max === 'undefined' || len <= max); +} + +var default_fqdn_options = { + require_tld: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_numeric_tld: false, + allow_wildcard: false, + ignore_max_length: false +}; +function isFQDN(str, options) { + assertString(str); + options = merge(options, default_fqdn_options); + + /* Remove the optional trailing dot before checking validity */ + if (options.allow_trailing_dot && str[str.length - 1] === '.') { + str = str.substring(0, str.length - 1); + } + + /* Remove the optional wildcard before checking validity */ + if (options.allow_wildcard === true && str.indexOf('*.') === 0) { + str = str.substring(2); + } + var parts = str.split('.'); + var tld = parts[parts.length - 1]; + if (options.require_tld) { + // disallow fqdns without tld + if (parts.length < 2) { + return false; + } + if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) { + return false; + } + + // disallow spaces + if (/\s/.test(tld)) { + return false; + } + } + + // reject numeric TLDs + if (!options.allow_numeric_tld && /^\d+$/.test(tld)) { + return false; + } + return parts.every(function (part) { + if (part.length > 63 && !options.ignore_max_length) { + return false; + } + if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) { + return false; + } + + // disallow full-width chars + if (/[\uff01-\uff5e]/.test(part)) { + return false; + } + + // disallow parts starting or ending with hyphen + if (/^-|-$/.test(part)) { + return false; + } + if (!options.allow_underscores && /_/.test(part)) { + return false; + } + return true; + }); +} + +/** +11.3. Examples + + The following addresses + + fe80::1234 (on the 1st link of the node) + ff02::5678 (on the 5th link of the node) + ff08::9abc (on the 10th organization of the node) + + would be represented as follows: + + fe80::1234%1 + ff02::5678%5 + ff08::9abc%10 + + (Here we assume a natural translation from a zone index to the + part, where the Nth zone of any scope is translated into + "N".) + + If we use interface names as , those addresses could also be + represented as follows: + + fe80::1234%ne0 + ff02::5678%pvc1.3 + ff08::9abc%interface10 + + where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs + to the 5th link, and "interface10" belongs to the 10th organization. + * * */ +var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; +var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat); +var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$")); +var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})'; +var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z.]{1,})?$'); +function isIP(ipAddress) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(ipAddress); + + // accessing 'arguments' for backwards compatibility: isIP(ipAddress [, version]) + // eslint-disable-next-line prefer-rest-params + var version = (_typeof(options) === 'object' ? options.version : arguments[1]) || ''; + if (!version) { + return isIP(ipAddress, { + version: 4 + }) || isIP(ipAddress, { + version: 6 + }); + } + if (version.toString() === '4') { + return IPv4AddressRegExp.test(ipAddress); + } + if (version.toString() === '6') { + return IPv6AddressRegExp.test(ipAddress); + } + return false; +} + +var default_email_options = { + allow_display_name: false, + allow_underscores: false, + require_display_name: false, + allow_utf8_local_part: true, + require_tld: true, + blacklisted_chars: '', + ignore_max_length: false, + host_blacklist: [], + host_whitelist: [] +}; + +/* eslint-disable max-len */ +/* eslint-disable no-control-regex */ +var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)]/.test(display_name_without_quotes); + if (contains_illegal) { + // if contains illegal characters, + // must to be enclosed in double-quotes, otherwise it's not a valid display name + if (display_name_without_quotes === display_name) { + return false; + } + + // the quotes in display name must start with character symbol \ + var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length; + if (!all_start_with_back_slash) { + return false; + } + } + return true; +} +function isEmail(str, options) { + assertString(str); + options = merge(options, default_email_options); + if (options.require_display_name || options.allow_display_name) { + var display_email = str.match(splitNameAddress); + if (display_email) { + var display_name = display_email[1]; + + // Remove display name and angle brackets to get email address + // Can be done in the regex but will introduce a ReDOS (See #1597 for more info) + str = str.replace(display_name, '').replace(/(^<|>$)/g, ''); + + // sometimes need to trim the last space to get the display name + // because there may be a space between display name and email address + // eg. myname + // the display name is `myname` instead of `myname `, so need to trim the last space + if (display_name.endsWith(' ')) { + display_name = display_name.slice(0, -1); + } + if (!validateDisplayName(display_name)) { + return false; + } + } else if (options.require_display_name) { + return false; + } + } + if (!options.ignore_max_length && str.length > defaultMaxEmailLength) { + return false; + } + var parts = str.split('@'); + var domain = parts.pop(); + var lower_domain = domain.toLowerCase(); + if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) { + return false; + } + if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) { + return false; + } + var user = parts.join('@'); + if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) { + /* + Previously we removed dots for gmail addresses before validating. + This was removed because it allows `multiple..dots@gmail.com` + to be reported as valid, but it is not. + Gmail only normalizes single dots, removing them from here is pointless, + should be done in normalizeEmail + */ + user = user.toLowerCase(); + + // Removing sub-address from username before gmail validation + var username = user.split('+')[0]; + + // Dots are not included in gmail length restriction + if (!isByteLength(username.replace(/\./g, ''), { + min: 6, + max: 30 + })) { + return false; + } + var _user_parts = username.split('.'); + for (var i = 0; i < _user_parts.length; i++) { + if (!gmailUserPart.test(_user_parts[i])) { + return false; + } + } + } + if (options.ignore_max_length === false && (!isByteLength(user, { + max: 64 + }) || !isByteLength(domain, { + max: 254 + }))) { + return false; + } + if (!isFQDN(domain, { + require_tld: options.require_tld, + ignore_max_length: options.ignore_max_length, + allow_underscores: options.allow_underscores + })) { + if (!options.allow_ip_domain) { + return false; + } + if (!isIP(domain)) { + if (!domain.startsWith('[') || !domain.endsWith(']')) { + return false; + } + var noBracketdomain = domain.slice(1, -1); + if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) { + return false; + } + } + } + if (options.blacklisted_chars) { + if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), 'g')) !== -1) return false; + } + if (user[0] === '"' && user[user.length - 1] === '"') { + user = user.slice(1, user.length - 1); + return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user); + } + var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart; + var user_parts = user.split('.'); + for (var _i = 0; _i < user_parts.length; _i++) { + if (!pattern.test(user_parts[_i])) { + return false; + } + } + return true; +} + +var includes = function includes(str, val) { + return str.indexOf(val) !== -1; +}; + +/* +options for isURL method + +protocols - valid protocols can be modified with this option. +require_tld - If set to false isURL will not check if the URL's host includes a top-level domain. +require_protocol - if set to true isURL will return false if protocol is not present in the URL. +require_host - if set to false isURL will not check if host is present in the URL. +require_port - if set to true isURL will check if port is present in the URL. +require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option. +allow_underscores - if set to true, the validator will allow underscores in the URL. +host_whitelist - if set to an array of strings or regexp, and the domain matches none of the strings + defined in it, the validation fails. +host_blacklist - if set to an array of strings or regexp, and the domain matches any of the strings + defined in it, the validation fails. +allow_trailing_dot - if set to true, the validator will allow the domain to end with + a `.` character. +allow_protocol_relative_urls - if set to true protocol relative URLs will be allowed. +allow_fragments - if set to false isURL will return false if fragments are present. +allow_query_components - if set to false isURL will return false if query components are present. +disallow_auth - if set to true, the validator will fail if the URL contains an authentication + component, e.g. `http://username:password@example.com` +validate_length - if set to false isURL will skip string length validation. `max_allowed_length` + will be ignored if this is set as `false`. +max_allowed_length - if set, isURL will not allow URLs longer than the specified value (default is + 2084 that IE maximum URL length). + +*/ + +var default_url_options = { + protocols: ['http', 'https', 'ftp'], + require_tld: true, + require_protocol: false, + require_host: true, + require_port: false, + require_valid_protocol: true, + allow_underscores: false, + allow_trailing_dot: false, + allow_protocol_relative_urls: false, + allow_fragments: true, + allow_query_components: true, + validate_length: true, + max_allowed_length: 2084 +}; +var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/; +function isURL(url, options) { + assertString(url); + if (!url || /[\s<>]/.test(url)) { + return false; + } + if (url.indexOf('mailto:') === 0) { + return false; + } + options = merge(options, default_url_options); + if (options.validate_length && url.length > options.max_allowed_length) { + return false; + } + if (!options.allow_fragments && includes(url, '#')) { + return false; + } + if (!options.allow_query_components && (includes(url, '?') || includes(url, '&'))) { + return false; + } + var protocol, auth, host, hostname, port, port_str, split, ipv6; + split = url.split('#'); + url = split.shift(); + split = url.split('?'); + url = split.shift(); + + // Replaced the 'split("://")' logic with a regex to match the protocol. + // This correctly identifies schemes like `javascript:` which don't use `//`. + // However, we need to be careful not to confuse authentication credentials (user:password@host) + // with protocols. A colon before an @ symbol might be part of auth, not a protocol separator. + var protocol_match = url.match(/^([a-z][a-z0-9+\-.]*):/i); + var had_explicit_protocol = false; + var cleanUpProtocol = function cleanUpProtocol(potential_protocol) { + had_explicit_protocol = true; + protocol = potential_protocol.toLowerCase(); + if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) { + // The identified protocol is not in the allowed list. + return false; + } + + // Remove the protocol from the URL string. + return url.substring(protocol_match[0].length); + }; + if (protocol_match) { + var potential_protocol = protocol_match[1]; + var after_colon = url.substring(protocol_match[0].length); + + // Check if what follows looks like authentication credentials (user:password@host) + // rather than a protocol. This happens when: + // 1. There's no `//` after the colon (protocols like `http://` have this) + // 2. There's an `@` symbol before any `/` + // 3. The part before `@` contains only valid auth characters (alphanumeric, -, _, ., %, :) + var starts_with_slashes = after_colon.slice(0, 2) === '//'; + if (!starts_with_slashes) { + var first_slash_position = after_colon.indexOf('/'); + var before_slash = first_slash_position === -1 ? after_colon : after_colon.substring(0, first_slash_position); + var at_position = before_slash.indexOf('@'); + if (at_position !== -1) { + var before_at = before_slash.substring(0, at_position); + var valid_auth_regex = /^[a-zA-Z0-9\-_.%:]*$/; + var is_valid_auth = valid_auth_regex.test(before_at); + + // Check if this contains URL-encoded content that could be malicious + // For example: javascript:%61%6c%65%72%74%28%31%29@example.com + // The encoded part decodes to: alert(1) + var has_encoded_content = /%[0-9a-fA-F]{2}/.test(before_at); + if (is_valid_auth && !has_encoded_content) { + // This looks like authentication (e.g., user:password@host), not a protocol + if (options.require_protocol) { + return false; + } + + // Don't consume the colon; let the auth parsing handle it later + } else { + // This looks like a malicious protocol (e.g., javascript:alert();@host) + // or URL-encoded protocol handler (e.g., javascript:%61%6c%65%72%74%28%31%29@host) + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else { + // No @ symbol found. Check if this could be a port number instead of a protocol. + // If what's after the colon is numeric (or starts with a digit and contains only + // valid port characters until a path separator), it's likely hostname:port, not a protocol. + var looks_like_port = /^[0-9]/.test(after_colon); + if (looks_like_port) { + // This looks like hostname:port, not a protocol + if (options.require_protocol) { + return false; + } + // Don't consume anything; let it be parsed as hostname:port + } else { + // This is definitely a protocol + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } + } else { + // Starts with '//', this is definitely a protocol like http:// + url = cleanUpProtocol(potential_protocol); + if (url === false) { + return false; + } + } + } else if (options.require_protocol) { + return false; + } + + // Handle leading '//' only as protocol-relative when there was NO explicit protocol. + // If there was an explicit protocol, '//' is the normal separator + // and should be stripped unconditionally. + if (url.slice(0, 2) === '//') { + if (!had_explicit_protocol && !options.allow_protocol_relative_urls) { + return false; + } + url = url.slice(2); + } + if (url === '') { + return false; + } + split = url.split('/'); + url = split.shift(); + if (url === '' && !options.require_host) { + return true; + } + split = url.split('@'); + if (split.length > 1) { + if (options.disallow_auth) { + return false; + } + if (split[0] === '') { + return false; + } + auth = split.shift(); + if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) { + return false; + } + var _auth$split = auth.split(':'), + _auth$split2 = _slicedToArray(_auth$split, 2), + user = _auth$split2[0], + password = _auth$split2[1]; + if (user === '' && password === '') { + return false; + } + } + hostname = split.join('@'); + port_str = null; + ipv6 = null; + var ipv6_match = hostname.match(wrapped_ipv6); + if (ipv6_match) { + host = ''; + ipv6 = ipv6_match[1]; + port_str = ipv6_match[2] || null; + } else { + split = hostname.split(':'); + host = split.shift(); + if (split.length) { + port_str = split.join(':'); + } + } + if (port_str !== null && port_str.length > 0) { + port = parseInt(port_str, 10); + if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) { + return false; + } + } else if (options.require_port) { + return false; + } + if (options.host_whitelist) { + return checkHost(host, options.host_whitelist); + } + if (host === '' && !options.require_host) { + return true; + } + if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) { + return false; + } + host = host || ipv6; + if (options.host_blacklist && checkHost(host, options.host_blacklist)) { + return false; + } + return true; +} + +var macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/; +var macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/; +var macAddress48WithDots = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/; +var macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/; +var macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/; +var macAddress64WithDots = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/; +function isMACAddress(str, options) { + assertString(str); + if (options !== null && options !== void 0 && options.eui) { + options.eui = String(options.eui); + } + /** + * @deprecated `no_colons` TODO: remove it in the next major + */ + if (options !== null && options !== void 0 && options.no_colons || options !== null && options !== void 0 && options.no_separators) { + if (options.eui === '48') { + return macAddress48NoSeparators.test(str); + } + if (options.eui === '64') { + return macAddress64NoSeparators.test(str); + } + return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === '48') { + return macAddress48.test(str) || macAddress48WithDots.test(str); + } + if ((options === null || options === void 0 ? void 0 : options.eui) === '64') { + return macAddress64.test(str) || macAddress64WithDots.test(str); + } + return isMACAddress(str, { + eui: '48' + }) || isMACAddress(str, { + eui: '64' + }); +} + +var subnetMaybe = /^\d{1,3}$/; +var v4Subnet = 32; +var v6Subnet = 128; +function isIPRange(str) { + var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + assertString(str); + var parts = str.split('/'); + + // parts[0] -> ip, parts[1] -> subnet + if (parts.length !== 2) { + return false; + } + if (!subnetMaybe.test(parts[1])) { + return false; + } + + // Disallow preceding 0 i.e. 01, 02, ... + if (parts[1].length > 1 && parts[1].startsWith('0')) { + return false; + } + var isValidIP = isIP(parts[0], version); + if (!isValidIP) { + return false; + } + + // Define valid subnet according to IP's version + var expectedSubnet = null; + switch (String(version)) { + case '4': + expectedSubnet = v4Subnet; + break; + case '6': + expectedSubnet = v6Subnet; + break; + default: + expectedSubnet = isIP(parts[0], '6') ? v6Subnet : v4Subnet; + } + return parts[1] <= expectedSubnet && parts[1] >= 0; +} + +var default_date_options = { + format: 'YYYY/MM/DD', + delimiters: ['/', '-'], + strictMode: false +}; +function isValidFormat(format) { + return /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(format); +} +function zip(date, format) { + var zippedArr = [], + len = Math.max(date.length, format.length); + for (var i = 0; i < len; i++) { + zippedArr.push([date[i], format[i]]); + } + return zippedArr; +} +function isDate(input, options) { + if (typeof options === 'string') { + // Allow backward compatibility for old format isDate(input [, format]) + options = merge({ + format: options + }, default_date_options); + } else { + options = merge(options, default_date_options); + } + if (typeof input === 'string' && isValidFormat(options.format)) { + if (options.strictMode && input.length !== options.format.length) return false; + var formatDelimiter = options.delimiters.find(function (delimiter) { + return options.format.indexOf(delimiter) !== -1; + }); + var dateDelimiter = options.strictMode ? formatDelimiter : options.delimiters.find(function (delimiter) { + return input.indexOf(delimiter) !== -1; + }); + var dateAndFormat = zip(input.split(dateDelimiter), options.format.toLowerCase().split(formatDelimiter)); + var dateObj = {}; + var _iterator = _createForOfIteratorHelper(dateAndFormat), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _slicedToArray(_step.value, 2), + dateWord = _step$value[0], + formatWord = _step$value[1]; + if (!dateWord || !formatWord || dateWord.length !== formatWord.length) { + return false; + } + dateObj[formatWord.charAt(0)] = dateWord; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + var fullYear = dateObj.y; + + // Check if the year starts with a hyphen + if (fullYear.startsWith('-')) { + return false; // Hyphen before year is not allowed + } + if (dateObj.y.length === 2) { + var parsedYear = parseInt(dateObj.y, 10); + if (isNaN(parsedYear)) { + return false; + } + var currentYearLastTwoDigits = new Date().getFullYear() % 100; + if (parsedYear < currentYearLastTwoDigits) { + fullYear = "20".concat(dateObj.y); + } else { + fullYear = "19".concat(dateObj.y); + } + } + var month = dateObj.m; + if (dateObj.m.length === 1) { + month = "0".concat(dateObj.m); + } + var day = dateObj.d; + if (dateObj.d.length === 1) { + day = "0".concat(dateObj.d); + } + return new Date("".concat(fullYear, "-").concat(month, "-").concat(day, "T00:00:00.000Z")).getUTCDate() === +dateObj.d; + } + if (!options.strictMode) { + return Object.prototype.toString.call(input) === '[object Date]' && isFinite(input); + } + return false; +} + +var default_time_options = { + hourFormat: 'hour24', + mode: 'default' +}; +var formats = { + hour24: { + "default": /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/, + withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/, + withOptionalSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/ + }, + hour12: { + "default": /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/, + withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/, + withOptionalSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/ + } +}; +function isTime(input, options) { + options = merge(options, default_time_options); + if (typeof input !== 'string') return false; + return formats[options.hourFormat][options.mode].test(input); +} + +var includes$2 = function includes(arr, val) { + return arr.some(function (arrVal) { + return val === arrVal; + }); +}; + +var defaultOptions = { + loose: false +}; +var strictBooleans = ['true', 'false', '1', '0']; +var looseBooleans = [].concat(strictBooleans, ['yes', 'no']); +function isBoolean(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions; + assertString(str); + if (options.loose) { + return includes$2(looseBooleans, str.toLowerCase()); + } + return includes$2(strictBooleans, str); +} + +/* + = 3ALPHA ; selected ISO 639 codes + *2("-" 3ALPHA) ; permanently reserved + */ +var extlang = '([A-Za-z]{3}(-[A-Za-z]{3}){0,2})'; + +/* + = 2*3ALPHA ; shortest ISO 639 code + ["-" extlang] ; sometimes followed by + ; extended language subtags + / 4ALPHA ; or reserved for future use + / 5*8ALPHA ; or registered language subtag + */ +var language = "(([a-zA-Z]{2,3}(-".concat(extlang, ")?)|([a-zA-Z]{5,8}))"); + +/* + = 4ALPHA ; ISO 15924 code + */ +var script = '([A-Za-z]{4})'; + +/* + = 2ALPHA ; ISO 3166-1 code + / 3DIGIT ; UN M.49 code + */ +var region = '([A-Za-z]{2}|\\d{3})'; + +/* + = 5*8alphanum ; registered variants + / (DIGIT 3alphanum) + */ +var variant = '([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))'; + +/* + = DIGIT ; 0 - 9 + / %x41-57 ; A - W + / %x59-5A ; Y - Z + / %x61-77 ; a - w + / %x79-7A ; y - z + */ +var singleton = '(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])'; + +/* + = singleton 1*("-" (2*8alphanum)) + ; Single alphanumerics + ; "x" reserved for private use + */ +var extension = "(".concat(singleton, "(-[A-Za-z0-9]{2,8})+)"); + +/* + = "x" 1*("-" (1*8alphanum)) + */ +var privateuse = '(x(-[A-Za-z0-9]{1,8})+)'; + +// irregular tags do not match the 'langtag' production and would not +// otherwise be considered 'well-formed'. These tags are all valid, but +// most are deprecated in favor of more modern subtags or subtag combination + +var irregular = '((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|' + '(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|' + '(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))'; + +// regular tags match the 'langtag' production, but their subtags are not +// extended language or variant subtags: their meaning is defined by +// their registration and all of these are deprecated in favor of a more +// modern subtag or sequence of subtags + +var regular = '((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|' + '(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))'; + +/* + = irregular ; non-redundant tags registered + / regular ; during the RFC 3066 era + + */ +var grandfathered = "(".concat(irregular, "|").concat(regular, ")"); + +/* + RFC 5646 defines delimitation of subtags via a hyphen: + + "Subtag" refers to a specific section of a tag, delimited by a + hyphen, such as the subtags 'zh', 'Hant', and 'CN' in the tag "zh- + Hant-CN". Examples of subtags in this document are enclosed in + single quotes ('Hant') + + However, we need to add "_" to maintain the existing behaviour. + */ +var delimiter = '(-|_)'; + +/* + = language + ["-" script] + ["-" region] + *("-" variant) + *("-" extension) + ["-" privateuse] + */ +var langtag = "".concat(language, "(").concat(delimiter).concat(script, ")?(").concat(delimiter).concat(region, ")?(").concat(delimiter).concat(variant, ")*(").concat(delimiter).concat(extension, ")*(").concat(delimiter).concat(privateuse, ")?"); + +/* + Regex implementation based on BCP RFC 5646 + Tags for Identifying Languages + https://www.rfc-editor.org/rfc/rfc5646.html + */ +var languageTagRegex = new RegExp("(^".concat(privateuse, "$)|(^").concat(grandfathered, "$)|(^").concat(langtag, "$)")); +function isLocale(str) { + assertString(str); + return languageTagRegex.test(str); +} + +// http://www.brainjar.com/js/validation/ +// https://www.aba.com/news-research/research-analysis/routing-number-policy-procedures +// series reserved for future use are excluded +var isRoutingReg = /^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/; +function isAbaRouting(str) { + assertString(str); + if (!isRoutingReg.test(str)) return false; + var checkSumVal = 0; + for (var i = 0; i < str.length; i++) { + if (i % 3 === 0) checkSumVal += str[i] * 3;else if (i % 3 === 1) checkSumVal += str[i] * 7;else checkSumVal += str[i] * 1; + } + return checkSumVal % 10 === 0; +} + +function isAlpha(_str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + assertString(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ''); + } else if (typeof ignore === 'string') { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&'), "]"), 'g'), ''); // escape regex for ignore + } else { + throw new Error('ignore should be instance of a String or RegExp'); + } + } + if (locale in alpha) { + return alpha[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales$1 = Object.keys(alpha); + +function isAlphanumeric(_str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + assertString(_str); + var str = _str; + var ignore = options.ignore; + if (ignore) { + if (ignore instanceof RegExp) { + str = str.replace(ignore, ''); + } else if (typeof ignore === 'string') { + str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&'), "]"), 'g'), ''); // escape regex for ignore + } else { + throw new Error('ignore should be instance of a String or RegExp'); + } + } + if (locale in alphanumeric) { + return alphanumeric[locale].test(str); + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales$2 = Object.keys(alphanumeric); + +var numericNoSymbols = /^[0-9]+$/; +function isNumeric(str, options) { + assertString(str); + if (options && options.no_symbols) { + return numericNoSymbols.test(str); + } + return new RegExp("^[+-]?([0-9]*[".concat((options || {}).locale ? decimal[options.locale] : '.', "])?[0-9]+$")).test(str); +} + +/** + * Reference: + * https://en.wikipedia.org/ -- Wikipedia + * https://docs.microsoft.com/en-us/microsoft-365/compliance/eu-passport-number -- EU Passport Number + * https://countrycode.org/ -- Country Codes + */ +var passportRegexByCountryCode = { + AM: /^[A-Z]{2}\d{7}$/, + // ARMENIA + AR: /^[A-Z]{3}\d{6}$/, + // ARGENTINA + AT: /^[A-Z]\d{7}$/, + // AUSTRIA + AU: /^[A-Z]\d{7}$/, + // AUSTRALIA + AZ: /^[A-Z]{1}\d{8}$/, + // AZERBAIJAN + BE: /^[A-Z]{2}\d{6}$/, + // BELGIUM + BG: /^\d{9}$/, + // BULGARIA + BR: /^[A-Z]{2}\d{6}$/, + // BRAZIL + BY: /^[A-Z]{2}\d{7}$/, + // BELARUS + CA: /^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/, + // CANADA + CH: /^[A-Z]\d{7}$/, + // SWITZERLAND + CN: /^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/, + // CHINA [G=Ordinary, E=Electronic] followed by 8-digits, or E followed by any UPPERCASE letter (except I and O) followed by 7 digits + CY: /^[A-Z](\d{6}|\d{8})$/, + // CYPRUS + CZ: /^\d{8}$/, + // CZECH REPUBLIC + DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/, + // GERMANY + DK: /^\d{9}$/, + // DENMARK + DZ: /^\d{9}$/, + // ALGERIA + EE: /^([A-Z]\d{7}|[A-Z]{2}\d{7})$/, + // ESTONIA (K followed by 7-digits), e-passports have 2 UPPERCASE followed by 7 digits + ES: /^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/, + // SPAIN + FI: /^[A-Z]{2}\d{7}$/, + // FINLAND + FR: /^\d{2}[A-Z]{2}\d{5}$/, + // FRANCE + GB: /^\d{9}$/, + // UNITED KINGDOM + GR: /^[A-Z]{2}\d{7}$/, + // GREECE + HR: /^\d{9}$/, + // CROATIA + HU: /^[A-Z]{2}(\d{6}|\d{7})$/, + // HUNGARY + IE: /^[A-Z0-9]{2}\d{7}$/, + // IRELAND + IN: /^[A-Z]{1}-?\d{7}$/, + // INDIA + ID: /^[A-C]\d{7}$/, + // INDONESIA + IR: /^[A-Z]\d{8}$/, + // IRAN + IS: /^(A)\d{7}$/, + // ICELAND + IT: /^[A-Z0-9]{2}\d{7}$/, + // ITALY + JM: /^[Aa]\d{7}$/, + // JAMAICA + JP: /^[A-Z]{2}\d{7}$/, + // JAPAN + KR: /^[MS]\d{8}$/, + // SOUTH KOREA, REPUBLIC OF KOREA, [S=PS Passports, M=PM Passports] + KZ: /^[a-zA-Z]\d{7}$/, + // KAZAKHSTAN + LI: /^[a-zA-Z]\d{5}$/, + // LIECHTENSTEIN + LT: /^[A-Z0-9]{8}$/, + // LITHUANIA + LU: /^[A-Z0-9]{8}$/, + // LUXEMBURG + LV: /^[A-Z0-9]{2}\d{7}$/, + // LATVIA + LY: /^[A-Z0-9]{8}$/, + // LIBYA + MT: /^\d{7}$/, + // MALTA + MZ: /^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/, + // MOZAMBIQUE + MY: /^[AHK]\d{8}$/, + // MALAYSIA + MX: /^\d{10,11}$/, + // MEXICO + NL: /^[A-Z]{2}[A-Z0-9]{6}\d$/, + // NETHERLANDS + NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/, + // NEW ZEALAND + PH: /^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/, + // PHILIPPINES + PK: /^[A-Z]{2}\d{7}$/, + // PAKISTAN + PL: /^[A-Z]{2}\d{7}$/, + // POLAND + PT: /^[A-Z]\d{6}$/, + // PORTUGAL + RO: /^\d{8,9}$/, + // ROMANIA + RU: /^\d{9}$/, + // RUSSIAN FEDERATION + SE: /^\d{8}$/, + // SWEDEN + SL: /^(P)[A-Z]\d{7}$/, + // SLOVENIA + SK: /^[0-9A-Z]\d{7}$/, + // SLOVAKIA + TH: /^[A-Z]{1,2}\d{6,7}$/, + // THAILAND + TR: /^[A-Z]\d{8}$/, + // TURKEY + UA: /^[A-Z]{2}\d{6}$/, + // UKRAINE + US: /^\d{9}$|^[A-Z]\d{8}$/, + // UNITED STATES + ZA: /^[TAMD]\d{8}$/ // SOUTH AFRICA +}; +var locales$3 = Object.keys(passportRegexByCountryCode); + +/** + * Check if str is a valid passport number + * relative to provided ISO Country Code. + * + * @param {string} str + * @param {string} countryCode + * @return {boolean} + */ +function isPassportNumber(str, countryCode) { + assertString(str); + /** Remove All Whitespaces, Convert to UPPERCASE */ + var normalizedStr = str.replace(/\s/g, '').toUpperCase(); + return countryCode.toUpperCase() in passportRegexByCountryCode && passportRegexByCountryCode[countryCode].test(normalizedStr); +} + +var _int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/; +var intLeadingZeroes = /^[-+]?[0-9]+$/; +function isInt(str, options) { + assertString(str); + options = options || {}; + + // Get the regex to use for testing, based on whether + // leading zeroes are allowed or not. + var regex = options.allow_leading_zeroes === false ? _int : intLeadingZeroes; + + // Check min/max/lt/gt + var minCheckPassed = !options.hasOwnProperty('min') || isNullOrUndefined(options.min) || str >= options.min; + var maxCheckPassed = !options.hasOwnProperty('max') || isNullOrUndefined(options.max) || str <= options.max; + var ltCheckPassed = !options.hasOwnProperty('lt') || isNullOrUndefined(options.lt) || str < options.lt; + var gtCheckPassed = !options.hasOwnProperty('gt') || isNullOrUndefined(options.gt) || str > options.gt; + return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed; +} + +function isPort(str) { + return isInt(str, { + allow_leading_zeroes: false, + min: 0, + max: 65535 + }); +} + +function isLowercase(str) { + assertString(str); + return str === str.toLowerCase(); +} + +function isUppercase(str) { + assertString(str); + return str === str.toUpperCase(); +} + +var imeiRegexWithoutHyphens = /^[0-9]{15}$/; +var imeiRegexWithHyphens = /^\d{2}-\d{6}-\d{6}-\d{1}$/; +function isIMEI(str, options) { + assertString(str); + options = options || {}; + + // default regex for checking imei is the one without hyphens + + var imeiRegex = imeiRegexWithoutHyphens; + if (options.allow_hyphens) { + imeiRegex = imeiRegexWithHyphens; + } + if (!imeiRegex.test(str)) { + return false; + } + str = str.replace(/-/g, ''); + var sum = 0, + mul = 2, + l = 14; + for (var i = 0; i < l; i++) { + var digit = str.substring(l - i - 1, l - i); + var tp = parseInt(digit, 10) * mul; + if (tp >= 10) { + sum += tp % 10 + 1; + } else { + sum += tp; + } + if (mul === 1) { + mul += 1; + } else { + mul -= 1; + } + } + var chk = (10 - sum % 10) % 10; + if (chk !== parseInt(str.substring(14, 15), 10)) { + return false; + } + return true; +} + +/* eslint-disable no-control-regex */ +var ascii = /^[\x00-\x7F]+$/; +/* eslint-enable no-control-regex */ + +function isAscii(str) { + assertString(str); + return ascii.test(str); +} + +var fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +function isFullWidth(str) { + assertString(str); + return fullWidth.test(str); +} + +var halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; +function isHalfWidth(str) { + assertString(str); + return halfWidth.test(str); +} + +function isVariableWidth(str) { + assertString(str); + return fullWidth.test(str) && halfWidth.test(str); +} + +/* eslint-disable no-control-regex */ +var multibyte = /[^\x00-\x7F]/; +/* eslint-enable no-control-regex */ + +function isMultibyte(str) { + assertString(str); + return multibyte.test(str); +} + +/** + * Build RegExp object from an array + * of multiple/multi-line regexp parts + * + * @param {string[]} parts + * @param {string} flags + * @return {object} - RegExp object + */ +function multilineRegexp(parts, flags) { + var regexpAsStringLiteral = parts.join(''); + return new RegExp(regexpAsStringLiteral, flags); +} + +/** + * Regular Expression to match + * semantic versioning (SemVer) + * built from multi-line, multi-parts regexp + * Reference: https://semver.org/ + */ +var semanticVersioningRegex = multilineRegexp(['^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)', '(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))', '?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$'], 'i'); +function isSemVer(str) { + assertString(str); + return semanticVersioningRegex.test(str); +} + +var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; +function isSurrogatePair(str) { + assertString(str); + return surrogatePair.test(str); +} + +function decimalRegExp(options) { + var regExp = new RegExp("^[-+]?([0-9]+)?(\\".concat(decimal[options.locale], "[0-9]{").concat(options.decimal_digits, "})").concat(options.force_decimal ? '' : '?', "$")); + return regExp; +} +var default_decimal_options = { + force_decimal: false, + decimal_digits: '1,', + locale: 'en-US' +}; +var blacklist = ['', '-', '+']; +function isDecimal(str, options) { + assertString(str); + options = merge(options, default_decimal_options); + if (options.locale in decimal) { + return !includes$2(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str); + } + throw new Error("Invalid locale '".concat(options.locale, "'")); +} + +var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i; +function isHexadecimal(str) { + assertString(str); + return hexadecimal.test(str); +} + +var octal = /^(0o)?[0-7]+$/i; +function isOctal(str) { + assertString(str); + return octal.test(str); +} + +function isDivisibleBy(str, num) { + assertString(str); + return toFloat(str) % parseInt(num, 10) === 0; +} + +var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; +var hexcolor_with_prefix = /^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; +var default_is_hexcolor_options = { + require_hashtag: false +}; +function isHexColor(str, options) { + assertString(str); + options = merge(options, default_is_hexcolor_options); + var hexcolor_regex = options.require_hashtag ? hexcolor_with_prefix : hexcolor; + return hexcolor_regex.test(str); +} + +/* eslint-disable prefer-rest-params */ +var rgbColor = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/; +var rgbaColor = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; +var rgbColorPercent = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/; +var rgbaColorPercent = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/; +var startsWithRgb = /^rgba?/; +function isRgbColor(str, options) { + assertString(str); + // default options to true for percent and false for spaces + var allowSpaces = false; + var includePercentValues = true; + if (_typeof(options) !== 'object') { + if (arguments.length >= 2) { + includePercentValues = arguments[1]; + } + } else { + allowSpaces = options.allowSpaces !== undefined ? options.allowSpaces : allowSpaces; + includePercentValues = options.includePercentValues !== undefined ? options.includePercentValues : includePercentValues; + } + if (allowSpaces) { + // make sure it starts with continous rgba? without spaces before stripping + if (!startsWithRgb.test(str)) { + return false; + } + // strip all whitespace + str = str.replace(/\s/g, ''); + } + if (!includePercentValues) { + return rgbColor.test(str) || rgbaColor.test(str); + } + return rgbColor.test(str) || rgbaColor.test(str) || rgbColorPercent.test(str) || rgbaColorPercent.test(str); +} + +var hslComma = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i; +var hslSpace = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i; +function isHSL(str) { + assertString(str); + + // Strip duplicate spaces before calling the validation regex (See #1598 for more info) + var strippedStr = str.replace(/\s+/g, ' ').replace(/\s?(hsla?\(|\)|,)\s?/ig, '$1'); + if (strippedStr.indexOf(',') !== -1) { + return hslComma.test(strippedStr); + } + return hslSpace.test(strippedStr); +} + +// see http://isrc.ifpi.org/en/isrc-standard/code-syntax +var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; +function isISRC(str) { + assertString(str); + return isrc.test(str); +} + +/** + * List of country codes with + * corresponding IBAN regular expression + * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number + */ +var ibanRegexThroughCountryCode = { + AD: /^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/, + AE: /^(AE[0-9]{2})\d{3}\d{16}$/, + AL: /^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/, + AT: /^(AT[0-9]{2})\d{16}$/, + AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/, + BA: /^(BA[0-9]{2})\d{16}$/, + BE: /^(BE[0-9]{2})\d{12}$/, + BG: /^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/, + BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/, + BR: /^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/, + BY: /^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/, + CH: /^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/, + CR: /^(CR[0-9]{2})\d{18}$/, + CY: /^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/, + CZ: /^(CZ[0-9]{2})\d{20}$/, + DE: /^(DE[0-9]{2})\d{18}$/, + DK: /^(DK[0-9]{2})\d{14}$/, + DO: /^(DO[0-9]{2})[A-Z]{4}\d{20}$/, + DZ: /^(DZ\d{24})$/, + EE: /^(EE[0-9]{2})\d{16}$/, + EG: /^(EG[0-9]{2})\d{25}$/, + ES: /^(ES[0-9]{2})\d{20}$/, + FI: /^(FI[0-9]{2})\d{14}$/, + FO: /^(FO[0-9]{2})\d{14}$/, + FR: /^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + GB: /^(GB[0-9]{2})[A-Z]{4}\d{14}$/, + GE: /^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/, + GI: /^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/, + GL: /^(GL[0-9]{2})\d{14}$/, + GR: /^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/, + GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/, + HR: /^(HR[0-9]{2})\d{17}$/, + HU: /^(HU[0-9]{2})\d{24}$/, + IE: /^(IE[0-9]{2})[A-Z]{4}\d{14}$/, + IL: /^(IL[0-9]{2})\d{19}$/, + IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/, + IR: /^(IR[0-9]{2})\d{22}$/, + IS: /^(IS[0-9]{2})\d{22}$/, + IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/, + KW: /^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/, + KZ: /^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LB: /^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/, + LC: /^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/, + LI: /^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/, + LT: /^(LT[0-9]{2})\d{16}$/, + LU: /^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/, + MA: /^(MA[0-9]{26})$/, + MC: /^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/, + ME: /^(ME[0-9]{2})\d{18}$/, + MK: /^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/, + MR: /^(MR[0-9]{2})\d{23}$/, + MT: /^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/, + MU: /^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/, + MZ: /^(MZ[0-9]{2})\d{21}$/, + NL: /^(NL[0-9]{2})[A-Z]{4}\d{10}$/, + NO: /^(NO[0-9]{2})\d{11}$/, + PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/, + PL: /^(PL[0-9]{2})\d{24}$/, + PS: /^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + PT: /^(PT[0-9]{2})\d{21}$/, + QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/, + RS: /^(RS[0-9]{2})\d{18}$/, + SA: /^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/, + SC: /^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/, + SE: /^(SE[0-9]{2})\d{20}$/, + SI: /^(SI[0-9]{2})\d{15}$/, + SK: /^(SK[0-9]{2})\d{20}$/, + SM: /^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + SV: /^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/, + TL: /^(TL[0-9]{2})\d{19}$/, + TN: /^(TN[0-9]{2})\d{20}$/, + TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/, + UA: /^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/, + VA: /^(VA[0-9]{2})\d{18}$/, + VG: /^(VG[0-9]{2})[A-Z]{4}\d{16}$/, + XK: /^(XK[0-9]{2})\d{16}$/ +}; + +/** + * Check if the country codes passed are valid using the + * ibanRegexThroughCountryCode as a reference + * + * @param {array} countryCodeArray + * @return {boolean} + */ + +function hasOnlyValidCountryCodes(countryCodeArray) { + var countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(function (countryCode) { + return !(countryCode in ibanRegexThroughCountryCode); + }); + if (countryCodeArrayFilteredWithObjectIbanCode.length > 0) { + return false; + } + return true; +} + +/** + * Check whether string has correct universal IBAN format + * The IBAN consists of up to 34 alphanumeric characters, as follows: + * Country Code using ISO 3166-1 alpha-2, two letters + * check digits, two digits and + * Basic Bank Account Number (BBAN), up to 30 alphanumeric characters. + * NOTE: Permitted IBAN characters are: digits [0-9] and the 26 latin alphabetic [A-Z] + * + * @param {string} str - string under validation + * @param {object} options - object to pass the countries to be either whitelisted or blacklisted + * @return {boolean} + */ +function hasValidIbanFormat(str, options) { + // Strip white spaces and hyphens + var strippedStr = str.replace(/[\s\-]+/gi, '').toUpperCase(); + var isoCountryCode = strippedStr.slice(0, 2).toUpperCase(); + var isoCountryCodeInIbanRegexCodeObject = isoCountryCode in ibanRegexThroughCountryCode; + if (options.whitelist) { + if (!hasOnlyValidCountryCodes(options.whitelist)) { + return false; + } + var isoCountryCodeInWhiteList = includes$2(options.whitelist, isoCountryCode); + if (!isoCountryCodeInWhiteList) { + return false; + } + } + if (options.blacklist) { + var isoCountryCodeInBlackList = includes$2(options.blacklist, isoCountryCode); + if (isoCountryCodeInBlackList) { + return false; + } + } + return isoCountryCodeInIbanRegexCodeObject && ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr); +} + +/** + * Check whether string has valid IBAN Checksum + * by performing basic mod-97 operation and + * the remainder should equal 1 + * -- Start by rearranging the IBAN by moving the four initial characters to the end of the string + * -- Replace each letter in the string with two digits, A -> 10, B = 11, Z = 35 + * -- Interpret the string as a decimal integer and + * -- compute the remainder on division by 97 (mod 97) + * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number + * + * @param {string} str + * @return {boolean} + */ +function hasValidIbanChecksum(str) { + var strippedStr = str.replace(/[^A-Z0-9]+/gi, '').toUpperCase(); // Keep only digits and A-Z latin alphabetic + var rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4); + var alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, function (_char) { + return _char.charCodeAt(0) - 55; + }); + var remainder = alphaCapsReplacedWithDigits.match(/\d{1,7}/g).reduce(function (acc, value) { + return Number(acc + value) % 97; + }, ''); + return remainder === 1; +} +function isIBAN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(str); + return hasValidIbanFormat(str, options) && hasValidIbanChecksum(str); +} +var locales$4 = Object.keys(ibanRegexThroughCountryCode); + +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 +var validISO31661Alpha2CountriesCodes = new Set(['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'ZA', 'ZM', 'ZW']); +function isISO31661Alpha2(str) { + assertString(str); + return validISO31661Alpha2CountriesCodes.has(str.toUpperCase()); +} +var CountryCodes = validISO31661Alpha2CountriesCodes; + +// https://en.wikipedia.org/wiki/ISO_9362 +var isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/; +function isBIC(str) { + assertString(str); + + // toUpperCase() should be removed when a new major version goes out that changes + // the regex to [A-Z] (per the spec). + var countryCode = str.slice(4, 6).toUpperCase(); + if (!CountryCodes.has(countryCode) && countryCode !== 'XK') { + return false; + } + return isBICReg.test(str); +} + +var md5 = /^[a-f0-9]{32}$/; +function isMD5(str) { + assertString(str); + return md5.test(str); +} + +var lengths = { + md5: 32, + md4: 32, + sha1: 40, + sha256: 64, + sha384: 96, + sha512: 128, + ripemd128: 32, + ripemd160: 40, + tiger128: 32, + tiger160: 40, + tiger192: 48, + crc32: 8, + crc32b: 8 +}; +function isHash(str, algorithm) { + assertString(str); + var hash = new RegExp("^[a-fA-F0-9]{".concat(lengths[algorithm], "}$")); + return hash.test(str); +} + +var base64WithPadding = /^[A-Za-z0-9+/]+={0,2}$/; +var base64WithoutPadding = /^[A-Za-z0-9+/]+$/; +var base64UrlWithPadding = /^[A-Za-z0-9_-]+={0,2}$/; +var base64UrlWithoutPadding = /^[A-Za-z0-9_-]+$/; +function isBase64(str, options) { + var _options; + assertString(str); + options = merge(options, { + urlSafe: false, + padding: !((_options = options) !== null && _options !== void 0 && _options.urlSafe) + }); + if (str === '') return true; + if (options.padding && str.length % 4 !== 0) return false; + var regex; + if (options.urlSafe) { + regex = options.padding ? base64UrlWithPadding : base64UrlWithoutPadding; + } else { + regex = options.padding ? base64WithPadding : base64WithoutPadding; + } + return (!options.padding || str.length % 4 === 0) && regex.test(str); +} + +function isJWT(str) { + assertString(str); + var dotSplit = str.split('.'); + var len = dotSplit.length; + if (len !== 3) { + return false; + } + return dotSplit.reduce(function (acc, currElem) { + return acc && isBase64(currElem, { + urlSafe: true + }); + }, true); +} + +var default_json_options = { + allow_primitives: false +}; +function isJSON(str, options) { + assertString(str); + try { + options = merge(options, default_json_options); + var primitives = []; + if (options.allow_primitives) { + primitives = [null, false, true]; + } + var obj = JSON.parse(str); + return includes$2(primitives, obj) || !!obj && _typeof(obj) === 'object'; + } catch (e) {/* ignore */} + return false; +} + +var default_is_empty_options = { + ignore_whitespace: false +}; +function isEmpty(str, options) { + assertString(str); + options = merge(options, default_is_empty_options); + return (options.ignore_whitespace ? str.trim().length : str.length) === 0; +} + +/* eslint-disable prefer-rest-params */ +function isLength(str, options) { + assertString(str); + var min; + var max; + if (_typeof(options) === 'object') { + min = options.min || 0; + max = options.max; + } else { + // backwards compatibility: isLength(str, min [, max]) + min = arguments[1] || 0; + max = arguments[2]; + } + var presentationSequences = str.match(/[^\uFE0F\uFE0E][\uFE0F\uFE0E]/g) || []; + var surrogatePairs = str.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || []; + var len = str.length - presentationSequences.length - surrogatePairs.length; + var isInsideRange = len >= min && (typeof max === 'undefined' || len <= max); + if (isInsideRange && Array.isArray(options === null || options === void 0 ? void 0 : options.discreteLengths)) { + return options.discreteLengths.some(function (discreteLen) { + return discreteLen === len; + }); + } + return isInsideRange; +} + +function isULID(str) { + assertString(str); + return /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(str); +} + +var uuid = { + 1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 6: /^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 8: /^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + nil: /^00000000-0000-0000-0000-000000000000$/i, + max: /^ffffffff-ffff-ffff-ffff-ffffffffffff$/i, + loose: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + // From https://github.com/uuidjs/uuid/blob/main/src/regex.js + all: /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i +}; +function isUUID(str, version) { + assertString(str); + if (version === undefined || version === null) { + version = 'all'; + } + return version in uuid ? uuid[version].test(str) : false; +} + +function isMongoId(str) { + assertString(str); + return isHexadecimal(str) && str.length === 24; +} + +function isAfter(date, options) { + // For backwards compatibility: + // isAfter(str [, date]), i.e. `options` could be used as argument for the legacy `date` + var comparisonDate = (_typeof(options) === 'object' ? options.comparisonDate : options) || Date().toString(); + var comparison = toDate(comparisonDate); + var original = toDate(date); + return !!(original && comparison && original > comparison); +} + +function isBefore(date, options) { + // For backwards compatibility: + // isBefore(str [, date]), i.e. `options` could be used as argument for the legacy `date` + var comparisonDate = (_typeof(options) === 'object' ? options.comparisonDate : options) || Date().toString(); + var comparison = toDate(comparisonDate); + var original = toDate(date); + return !!(original && comparison && original < comparison); +} + +function isIn(str, options) { + assertString(str); + var i; + if (Object.prototype.toString.call(options) === '[object Array]') { + var array = []; + for (i in options) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if ({}.hasOwnProperty.call(options, i)) { + array[i] = toString$1(options[i]); + } + } + return array.indexOf(str) >= 0; + } else if (_typeof(options) === 'object') { + return options.hasOwnProperty(str); + } else if (options && typeof options.indexOf === 'function') { + return options.indexOf(str) >= 0; + } + return false; +} + +function isLuhnNumber(str) { + assertString(str); + var sanitized = str.replace(/[- ]+/g, ''); + var sum = 0; + var digit; + var tmpNum; + var shouldDouble; + for (var i = sanitized.length - 1; i >= 0; i--) { + digit = sanitized.substring(i, i + 1); + tmpNum = parseInt(digit, 10); + if (shouldDouble) { + tmpNum *= 2; + if (tmpNum >= 10) { + sum += tmpNum % 10 + 1; + } else { + sum += tmpNum; + } + } else { + sum += tmpNum; + } + shouldDouble = !shouldDouble; + } + return !!(sum % 10 === 0 ? sanitized : false); +} + +var cards = { + amex: /^3[47][0-9]{13}$/, + dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/, + discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/, + jcb: /^(?:2131|1800|35\d{3})\d{11}$/, + mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/, + // /^[25][1-7][0-9]{14}$/; + unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/, + visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/ +}; +var allCards = function () { + var tmpCardsArray = []; + for (var cardProvider in cards) { + // istanbul ignore else + if (cards.hasOwnProperty(cardProvider)) { + tmpCardsArray.push(cards[cardProvider]); + } + } + return tmpCardsArray; +}(); +function isCreditCard(card) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(card); + var provider = options.provider; + var sanitized = card.replace(/[- ]+/g, ''); + if (provider && provider.toLowerCase() in cards) { + // specific provider in the list + if (!cards[provider.toLowerCase()].test(sanitized)) { + return false; + } + } else if (provider && !(provider.toLowerCase() in cards)) { + /* specific provider not in the list */ + throw new Error("".concat(provider, " is not a valid credit card provider.")); + } else if (!allCards.some(function (cardProvider) { + return cardProvider.test(sanitized); + })) { + // no specific provider + return false; + } + return isLuhnNumber(card); +} + +var validators = { + PL: function PL(str) { + assertString(str); + var weightOfDigits = { + 1: 1, + 2: 3, + 3: 7, + 4: 9, + 5: 1, + 6: 3, + 7: 7, + 8: 9, + 9: 1, + 10: 3, + 11: 0 + }; + if (str != null && str.length === 11 && isInt(str, { + allow_leading_zeroes: true + })) { + var digits = str.split('').slice(0, -1); + var sum = digits.reduce(function (acc, digit, index) { + return acc + Number(digit) * weightOfDigits[index + 1]; + }, 0); + var modulo = sum % 10; + var lastDigit = Number(str.charAt(str.length - 1)); + if (modulo === 0 && lastDigit === 0 || lastDigit === 10 - modulo) { + return true; + } + } + return false; + }, + ES: function ES(str) { + assertString(str); + var DNI = /^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/; + var charsValue = { + X: 0, + Y: 1, + Z: 2 + }; + var controlDigits = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; + + // sanitize user input + var sanitized = str.trim().toUpperCase(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + + // validate the control digit + var number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, function (_char) { + return charsValue[_char]; + }); + return sanitized.endsWith(controlDigits[number % 23]); + }, + FI: function FI(str) { + // https://dvv.fi/en/personal-identity-code#:~:text=control%20character%20for%20a-,personal,-identity%20code%20calculated + assertString(str); + if (str.length !== 11) { + return false; + } + if (!str.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)) { + return false; + } + var checkDigits = '0123456789ABCDEFHJKLMNPRSTUVWXY'; + var idAsNumber = parseInt(str.slice(0, 6), 10) * 1000 + parseInt(str.slice(7, 10), 10); + var remainder = idAsNumber % 31; + var checkDigit = checkDigits[remainder]; + return checkDigit === str.slice(10, 11); + }, + IN: function IN(str) { + var DNI = /^[1-9]\d{3}\s?\d{4}\s?\d{4}$/; + + // multiplication table + var d = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + + // permutation table + var p = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + var c = 0; + var invertedArray = sanitized.replace(/\s/g, '').split('').map(Number).reverse(); + invertedArray.forEach(function (val, i) { + c = d[c][p[i % 8][val]]; + }); + return c === 0; + }, + IR: function IR(str) { + if (!str.match(/^\d{10}$/)) return false; + str = "0000".concat(str).slice(str.length - 6); + if (parseInt(str.slice(3, 9), 10) === 0) return false; + var lastNumber = parseInt(str.slice(9, 10), 10); + var sum = 0; + for (var i = 0; i < 9; i++) { + sum += parseInt(str.slice(i, i + 1), 10) * (10 - i); + } + sum %= 11; + return sum < 2 && lastNumber === sum || sum >= 2 && lastNumber === 11 - sum; + }, + IT: function IT(str) { + if (str.length !== 9) return false; + if (str === 'CA00000AA') return false; // https://it.wikipedia.org/wiki/Carta_d%27identit%C3%A0_elettronica_italiana + return str.search(/C[A-Z]\d{5}[A-Z]{2}/i) > -1; + }, + NO: function NO(str) { + var sanitized = str.trim(); + if (isNaN(Number(sanitized))) return false; + if (sanitized.length !== 11) return false; + if (sanitized === '00000000000') return false; + + // https://no.wikipedia.org/wiki/F%C3%B8dselsnummer + var f = sanitized.split('').map(Number); + var k1 = (11 - (3 * f[0] + 7 * f[1] + 6 * f[2] + 1 * f[3] + 8 * f[4] + 9 * f[5] + 4 * f[6] + 5 * f[7] + 2 * f[8]) % 11) % 11; + var k2 = (11 - (5 * f[0] + 4 * f[1] + 3 * f[2] + 2 * f[3] + 7 * f[4] + 6 * f[5] + 5 * f[6] + 4 * f[7] + 3 * f[8] + 2 * k1) % 11) % 11; + if (k1 !== f[9] || k2 !== f[10]) return false; + return true; + }, + TH: function TH(str) { + if (!str.match(/^[1-8]\d{12}$/)) return false; + + // validate check digit + var sum = 0; + for (var i = 0; i < 12; i++) { + sum += parseInt(str[i], 10) * (13 - i); + } + return str[12] === ((11 - sum % 11) % 10).toString(); + }, + LK: function LK(str) { + var old_nic = /^[1-9]\d{8}[vx]$/i; + var new_nic = /^[1-9]\d{11}$/i; + if (str.length === 10 && old_nic.test(str)) return true;else if (str.length === 12 && new_nic.test(str)) return true; + return false; + }, + 'he-IL': function heIL(str) { + var DNI = /^\d{9}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + var id = sanitized; + var sum = 0, + incNum; + for (var i = 0; i < id.length; i++) { + incNum = Number(id[i]) * (i % 2 + 1); // Multiply number by 1 or 2 + sum += incNum > 9 ? incNum - 9 : incNum; // Sum the digits up and add to total + } + return sum % 10 === 0; + }, + 'ar-LY': function arLY(str) { + // Libya National Identity Number NIN is 12 digits, the first digit is either 1 or 2 + var NIN = /^(1|2)\d{11}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!NIN.test(sanitized)) { + return false; + } + return true; + }, + 'ar-TN': function arTN(str) { + var DNI = /^\d{8}$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + if (!DNI.test(sanitized)) { + return false; + } + return true; + }, + 'zh-CN': function zhCN(str) { + var provincesAndCities = ['11', + // 北京 + '12', + // 天津 + '13', + // 河北 + '14', + // 山西 + '15', + // 内蒙古 + '21', + // 辽宁 + '22', + // 吉林 + '23', + // 黑龙江 + '31', + // 上海 + '32', + // 江苏 + '33', + // 浙江 + '34', + // 安徽 + '35', + // 福建 + '36', + // 江西 + '37', + // 山东 + '41', + // 河南 + '42', + // 湖北 + '43', + // 湖南 + '44', + // 广东 + '45', + // 广西 + '46', + // 海南 + '50', + // 重庆 + '51', + // 四川 + '52', + // 贵州 + '53', + // 云南 + '54', + // 西藏 + '61', + // 陕西 + '62', + // 甘肃 + '63', + // 青海 + '64', + // 宁夏 + '65', + // 新疆 + '71', + // 台湾 + '81', + // 香港 + '82', + // 澳门 + '91' // 国外 + ]; + var powers = ['7', '9', '10', '5', '8', '4', '2', '1', '6', '3', '7', '9', '10', '5', '8', '4', '2']; + var parityBit = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2']; + var checkAddressCode = function checkAddressCode(addressCode) { + return includes$2(provincesAndCities, addressCode); + }; + var checkBirthDayCode = function checkBirthDayCode(birDayCode) { + var yyyy = parseInt(birDayCode.substring(0, 4), 10); + var mm = parseInt(birDayCode.substring(4, 6), 10); + var dd = parseInt(birDayCode.substring(6), 10); + var xdata = new Date(yyyy, mm - 1, dd); + if (xdata > new Date()) { + return false; + // eslint-disable-next-line max-len + } else if (xdata.getFullYear() === yyyy && xdata.getMonth() === mm - 1 && xdata.getDate() === dd) { + return true; + } + return false; + }; + var getParityBit = function getParityBit(idCardNo) { + var id17 = idCardNo.substring(0, 17); + var power = 0; + for (var i = 0; i < 17; i++) { + power += parseInt(id17.charAt(i), 10) * parseInt(powers[i], 10); + } + var mod = power % 11; + return parityBit[mod]; + }; + var checkParityBit = function checkParityBit(idCardNo) { + return getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase(); + }; + var check15IdCardNo = function check15IdCardNo(idCardNo) { + var check = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = "19".concat(idCardNo.substring(6, 12)); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return true; + }; + var check18IdCardNo = function check18IdCardNo(idCardNo) { + var check = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(idCardNo); + if (!check) return false; + var addressCode = idCardNo.substring(0, 2); + check = checkAddressCode(addressCode); + if (!check) return false; + var birDayCode = idCardNo.substring(6, 14); + check = checkBirthDayCode(birDayCode); + if (!check) return false; + return checkParityBit(idCardNo); + }; + var checkIdCardNo = function checkIdCardNo(idCardNo) { + var check = /^\d{15}|(\d{17}(\d|x|X))$/.test(idCardNo); + if (!check) return false; + if (idCardNo.length === 15) { + return check15IdCardNo(idCardNo); + } + return check18IdCardNo(idCardNo); + }; + return checkIdCardNo(str); + }, + 'zh-HK': function zhHK(str) { + // sanitize user input + str = str.trim(); + + // HKID number starts with 1 or 2 letters, followed by 6 digits, + // then a checksum contained in square / round brackets or nothing + var regexHKID = /^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/; + var regexIsDigit = /^[0-9]$/; + + // convert the user input to all uppercase and apply regex + str = str.toUpperCase(); + if (!regexHKID.test(str)) return false; + str = str.replace(/\[|\]|\(|\)/g, ''); + if (str.length === 8) str = "3".concat(str); + var checkSumVal = 0; + for (var i = 0; i <= 7; i++) { + var convertedChar = void 0; + if (!regexIsDigit.test(str[i])) convertedChar = (str[i].charCodeAt(0) - 55) % 11;else convertedChar = str[i]; + checkSumVal += convertedChar * (9 - i); + } + checkSumVal %= 11; + var checkSumConverted; + if (checkSumVal === 0) checkSumConverted = '0';else if (checkSumVal === 1) checkSumConverted = 'A';else checkSumConverted = String(11 - checkSumVal); + if (checkSumConverted === str[str.length - 1]) return true; + return false; + }, + 'zh-TW': function zhTW(str) { + var ALPHABET_CODES = { + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + G: 16, + H: 17, + I: 34, + J: 18, + K: 19, + L: 20, + M: 21, + N: 22, + O: 35, + P: 23, + Q: 24, + R: 25, + S: 26, + T: 27, + U: 28, + V: 29, + W: 32, + X: 30, + Y: 31, + Z: 33 + }; + var sanitized = str.trim().toUpperCase(); + if (!/^[A-Z][0-9]{9}$/.test(sanitized)) return false; + return Array.from(sanitized).reduce(function (sum, number, index) { + if (index === 0) { + var code = ALPHABET_CODES[number]; + return code % 10 * 9 + Math.floor(code / 10); + } + if (index === 9) { + return (10 - sum % 10 - Number(number)) % 10 === 0; + } + return sum + Number(number) * (9 - index); + }, 0); + }, + PK: function PK(str) { + // Pakistani National Identity Number CNIC is 13 digits + var CNIC = /^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/; + + // sanitize user input + var sanitized = str.trim(); + + // validate the data structure + return CNIC.test(sanitized); + } +}; +function isIdentityCard(str, locale) { + assertString(str); + if (locale in validators) { + return validators[locale](str); + } else if (locale === 'any') { + for (var key in validators) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (validators.hasOwnProperty(key)) { + var validator = validators[key]; + if (validator(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} + +/** + * The most commonly used EAN standard is + * the thirteen-digit EAN-13, while the + * less commonly used 8-digit EAN-8 barcode was + * introduced for use on small packages. + * Also EAN/UCC-14 is used for Grouping of individual + * trade items above unit level(Intermediate, Carton or Pallet). + * For more info about EAN-14 checkout: https://www.gtin.info/itf-14-barcodes/ + * EAN consists of: + * GS1 prefix, manufacturer code, product code and check digit + * Reference: https://en.wikipedia.org/wiki/International_Article_Number + * Reference: https://www.gtin.info/ + */ + +/** + * Define EAN Lengths; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14 + * and Regular Expression for valid EANs (EAN-8, EAN-13, EAN-14), + * with exact numeric matching of 8 or 13 or 14 digits [0-9] + */ +var LENGTH_EAN_8 = 8; +var LENGTH_EAN_14 = 14; +var validEanRegex = /^(\d{8}|\d{13}|\d{14})$/; + +/** + * Get position weight given: + * EAN length and digit index/position + * + * @param {number} length + * @param {number} index + * @return {number} + */ +function getPositionWeightThroughLengthAndIndex(length, index) { + if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) { + return index % 2 === 0 ? 3 : 1; + } + return index % 2 === 0 ? 1 : 3; +} + +/** + * Calculate EAN Check Digit + * Reference: https://en.wikipedia.org/wiki/International_Article_Number#Calculation_of_checksum_digit + * + * @param {string} ean + * @return {number} + */ +function calculateCheckDigit(ean) { + var checksum = ean.slice(0, -1).split('').map(function (_char, index) { + return Number(_char) * getPositionWeightThroughLengthAndIndex(ean.length, index); + }).reduce(function (acc, partialSum) { + return acc + partialSum; + }, 0); + var remainder = 10 - checksum % 10; + return remainder < 10 ? remainder : 0; +} + +/** + * Check if string is valid EAN: + * Matches EAN-8/EAN-13/EAN-14 regex + * Has valid check digit. + * + * @param {string} str + * @return {boolean} + */ +function isEAN(str) { + assertString(str); + var actualCheckDigit = Number(str.slice(-1)); + return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str); +} + +var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + +// this link details how the check digit is calculated: +// https://www.isin.org/isin-format/. it is a little bit +// odd in that it works with digits, not numbers. in order +// to make only one pass through the ISIN characters, the +// each alpha character is handled as 2 characters within +// the loop. + +function isISIN(str) { + assertString(str); + if (!isin.test(str)) { + return false; + } + var _double = true; + var sum = 0; + // convert values + for (var i = str.length - 2; i >= 0; i--) { + if (str[i] >= 'A' && str[i] <= 'Z') { + var value = str[i].charCodeAt(0) - 55; + var lo = value % 10; + var hi = Math.trunc(value / 10); + // letters have two digits, so handle the low order + // and high order digits separately. + for (var _i = 0, _arr = [lo, hi]; _i < _arr.length; _i++) { + var digit = _arr[_i]; + if (_double) { + if (digit >= 5) { + sum += 1 + (digit - 5) * 2; + } else { + sum += digit * 2; + } + } else { + sum += digit; + } + _double = !_double; + } + } else { + var _digit = str[i].charCodeAt(0) - '0'.charCodeAt(0); + if (_double) { + if (_digit >= 5) { + sum += 1 + (_digit - 5) * 2; + } else { + sum += _digit * 2; + } + } else { + sum += _digit; + } + _double = !_double; + } + } + var check = Math.trunc((sum + 9) / 10) * 10 - sum; + return +str[str.length - 1] === check; +} + +var possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/; +var possibleIsbn13 = /^(?:[0-9]{13})$/; +var factor = [1, 3]; +function isISBN(isbn, options) { + assertString(isbn); + + // For backwards compatibility: + // isISBN(str [, version]), i.e. `options` could be used as argument for the legacy `version` + var version = String((options === null || options === void 0 ? void 0 : options.version) || options); + if (!(options !== null && options !== void 0 && options.version || options)) { + return isISBN(isbn, { + version: 10 + }) || isISBN(isbn, { + version: 13 + }); + } + var sanitizedIsbn = isbn.replace(/[\s-]+/g, ''); + var checksum = 0; + if (version === '10') { + if (!possibleIsbn10.test(sanitizedIsbn)) { + return false; + } + for (var i = 0; i < version - 1; i++) { + checksum += (i + 1) * sanitizedIsbn.charAt(i); + } + if (sanitizedIsbn.charAt(9) === 'X') { + checksum += 10 * 10; + } else { + checksum += 10 * sanitizedIsbn.charAt(9); + } + if (checksum % 11 === 0) { + return true; + } + } else if (version === '13') { + if (!possibleIsbn13.test(sanitizedIsbn)) { + return false; + } + for (var _i = 0; _i < 12; _i++) { + checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i); + } + if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) { + return true; + } + } + return false; +} + +var issn = '^\\d{4}-?\\d{3}[\\dX]$'; +function isISSN(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(str); + var testIssn = issn; + testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn; + testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i'); + if (!testIssn.test(str)) { + return false; + } + var digits = str.replace('-', '').toUpperCase(); + var checksum = 0; + for (var i = 0; i < digits.length; i++) { + var digit = digits[i]; + checksum += (digit === 'X' ? 10 : +digit) * (8 - i); + } + return checksum % 11 === 0; +} + +/** + * Algorithmic validation functions + * May be used as is or implemented in the workflow of other validators. + */ + +/* + * ISO 7064 validation function + * Called with a string of numbers (incl. check digit) + * to validate according to ISO 7064 (MOD 11, 10). + */ +function iso7064Check(str) { + var checkvalue = 10; + for (var i = 0; i < str.length - 1; i++) { + checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? 10 * 2 % 11 : (parseInt(str[i], 10) + checkvalue) % 10 * 2 % 11; + } + checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue; + return checkvalue === parseInt(str[10], 10); +} + +/* + * Luhn (mod 10) validation function + * Called with a string of numbers (incl. check digit) + * to validate according to the Luhn algorithm. + */ +function luhnCheck(str) { + var checksum = 0; + var second = false; + for (var i = str.length - 1; i >= 0; i--) { + if (second) { + var product = parseInt(str[i], 10) * 2; + if (product > 9) { + // sum digits of product and add to checksum + checksum += product.toString().split('').map(function (a) { + return parseInt(a, 10); + }).reduce(function (a, b) { + return a + b; + }, 0); + } else { + checksum += product; + } + } else { + checksum += parseInt(str[i], 10); + } + second = !second; + } + return checksum % 10 === 0; +} + +/* + * Reverse TIN multiplication and summation helper function + * Called with an array of single-digit integers and a base multiplier + * to calculate the sum of the digits multiplied in reverse. + * Normally used in variations of MOD 11 algorithmic checks. + */ +function reverseMultiplyAndSum(digits, base) { + var total = 0; + for (var i = 0; i < digits.length; i++) { + total += digits[i] * (base - i); + } + return total; +} + +/* + * Verhoeff validation helper function + * Called with a string of numbers + * to validate according to the Verhoeff algorithm. + */ +function verhoeffCheck(str) { + var d_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]]; + var p_table = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]]; + + // Copy (to prevent replacement) and reverse + var str_copy = str.split('').reverse().join(''); + var checksum = 0; + for (var i = 0; i < str_copy.length; i++) { + checksum = d_table[checksum][p_table[i % 8][parseInt(str_copy[i], 10)]]; + } + return checksum === 0; +} + +/** + * TIN Validation + * Validates Tax Identification Numbers (TINs) from the US, EU member states and the United Kingdom. + * + * EU-UK: + * National TIN validity is calculated using public algorithms as made available by DG TAXUD. + * + * See `https://ec.europa.eu/taxation_customs/tin/specs/FS-TIN%20Algorithms-Public.docx` for more information. + * + * US: + * An Employer Identification Number (EIN), also known as a Federal Tax Identification Number, + * is used to identify a business entity. + * + * NOTES: + * - Prefix 47 is being reserved for future use + * - Prefixes 26, 27, 45, 46 and 47 were previously assigned by the Philadelphia campus. + * + * See `http://www.irs.gov/Businesses/Small-Businesses-&-Self-Employed/How-EINs-are-Assigned-and-Valid-EIN-Prefixes` + * for more information. + */ + +// Locale functions + +/* + * bg-BG validation function + * (Edinen graždanski nomer (EGN/ЕГН), persons only) + * Checks if birth date (first six digits) is valid and calculates check (last) digit + */ +function bgBgCheck(tin) { + // Extract full year, normalize month and check birth date validity + var century_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 40) { + month -= 40; + century_year = "20".concat(century_year); + } else if (month > 20) { + month -= 20; + century_year = "18".concat(century_year); + } else { + century_year = "19".concat(century_year); + } + if (month < 10) { + month = "0".concat(month); + } + var date = "".concat(century_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + + // Calculate checksum by multiplying digits with fixed values + var multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6]; + var checksum = 0; + for (var i = 0; i < multip_lookup.length; i++) { + checksum += digits[i] * multip_lookup[i]; + } + checksum = checksum % 11 === 10 ? 0 : checksum % 11; + return checksum === digits[9]; +} + +/** + * Check if an input is a valid Canadian SIN (Social Insurance Number) + * + * The Social Insurance Number (SIN) is a 9 digit number that + * you need to work in Canada or to have access to government programs and benefits. + * + * https://en.wikipedia.org/wiki/Social_Insurance_Number + * https://www.canada.ca/en/employment-social-development/services/sin.html + * https://www.codercrunch.com/challenge/819302488/sin-validator + * + * @param {string} input + * @return {boolean} + */ +function isCanadianSIN(input) { + var digitsArray = input.split(''); + var even = digitsArray.filter(function (_, idx) { + return idx % 2; + }).map(function (i) { + return Number(i) * 2; + }).join('').split(''); + var total = digitsArray.filter(function (_, idx) { + return !(idx % 2); + }).concat(even).map(function (i) { + return Number(i); + }).reduce(function (acc, cur) { + return acc + cur; + }); + return total % 10 === 0; +} + +/* + * cs-CZ validation function + * (Rodné číslo (RČ), persons only) + * Checks if birth date (first six digits) is valid and divisibility by 11 + * Material not in DG TAXUD document sourced from: + * -`https://lorenc.info/3MA381/overeni-spravnosti-rodneho-cisla.htm` + * -`https://www.mvcr.cz/clanek/rady-a-sluzby-dokumenty-rodne-cislo.aspx` + */ +function csCzCheck(tin) { + tin = tin.replace(/\W/, ''); + + // Extract full year from TIN length + var full_year = parseInt(tin.slice(0, 2), 10); + if (tin.length === 10) { + if (full_year < 54) { + full_year = "20".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + } else { + if (tin.slice(6) === '000') { + return false; + } // Three-zero serial not assigned before 1954 + if (full_year < 54) { + full_year = "19".concat(full_year); + } else { + return false; // No 18XX years seen in any of the resources + } + } + // Add missing zero if needed + if (full_year.length === 3) { + full_year = [full_year.slice(0, 2), '0', full_year.slice(2)].join(''); + } + + // Extract month from TIN and normalize + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month > 20) { + // Month-plus-twenty was only introduced in 2004 + if (parseInt(full_year, 10) < 2004) { + return false; + } + month -= 20; + } + if (month < 10) { + month = "0".concat(month); + } + + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Verify divisibility by 11 + if (tin.length === 10) { + if (parseInt(tin, 10) % 11 !== 0) { + // Some numbers up to and including 1985 are still valid if + // check (last) digit equals 0 and modulo of first 9 digits equals 10 + var checkdigit = parseInt(tin.slice(0, 9), 10) % 11; + if (parseInt(full_year, 10) < 1986 && checkdigit === 10) { + if (parseInt(tin.slice(9), 10) !== 0) { + return false; + } + } else { + return false; + } + } + } + return true; +} + +/* + * de-AT validation function + * (Abgabenkontonummer, persons/entities) + * Verify TIN validity by calling luhnCheck() + */ +function deAtCheck(tin) { + return luhnCheck(tin); +} + +/* + * de-DE validation function + * (Steueridentifikationsnummer (Steuer-IdNr.), persons only) + * Tests for single duplicate/triplicate value, then calculates ISO 7064 check (last) digit + * Partial implementation of spec (same result with both algorithms always) + */ +function deDeCheck(tin) { + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + + // Fill array with strings of number positions + var occurrences = []; + for (var i = 0; i < digits.length - 1; i++) { + occurrences.push(''); + for (var j = 0; j < digits.length - 1; j++) { + if (digits[i] === digits[j]) { + occurrences[i] += j; + } + } + } + + // Remove digits with one occurrence and test for only one duplicate/triplicate + occurrences = occurrences.filter(function (a) { + return a.length > 1; + }); + if (occurrences.length !== 2 && occurrences.length !== 3) { + return false; + } + + // In case of triplicate value only two digits are allowed next to each other + if (occurrences[0].length === 3) { + var trip_locations = occurrences[0].split('').map(function (a) { + return parseInt(a, 10); + }); + var recurrent = 0; // Amount of neighbor occurrences + for (var _i = 0; _i < trip_locations.length - 1; _i++) { + if (trip_locations[_i] + 1 === trip_locations[_i + 1]) { + recurrent += 1; + } + } + if (recurrent === 2) { + return false; + } + } + return iso7064Check(tin); +} + +/* + * dk-DK validation function + * (CPR-nummer (personnummer), persons only) + * Checks if birth date (first six digits) is valid and assigned to century (seventh) digit, + * and calculates check (last) digit + */ +function dkDkCheck(tin) { + tin = tin.replace(/\W/, ''); + + // Extract year, check if valid for given century digit and add century + var year = parseInt(tin.slice(4, 6), 10); + var century_digit = tin.slice(6, 7); + switch (century_digit) { + case '0': + case '1': + case '2': + case '3': + year = "19".concat(year); + break; + case '4': + case '9': + if (year < 37) { + year = "20".concat(year); + } else { + year = "19".concat(year); + } + break; + default: + if (year < 37) { + year = "20".concat(year); + } else if (year > 58) { + year = "18".concat(year); + } else { + return false; + } + break; + } + // Add missing zero if needed + if (year.length === 3) { + year = [year.slice(0, 2), '0', year.slice(2)].join(''); + } + // Check date validity + var date = "".concat(year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 4; + // Multiply by weight and add to checksum + for (var i = 0; i < 9; i++) { + checksum += digits[i] * weight; + weight -= 1; + if (weight === 1) { + weight = 7; + } + } + checksum %= 11; + if (checksum === 1) { + return false; + } + return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum; +} + +/* + * el-CY validation function + * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons only) + * Verify TIN validity by calculating ASCII value of check (last) character + */ +function elCyCheck(tin) { + // split digits into an array for further processing + var digits = tin.slice(0, 8).split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + // add digits in even places + for (var i = 1; i < digits.length; i += 2) { + checksum += digits[i]; + } + + // add digits in odd places + for (var _i2 = 0; _i2 < digits.length; _i2 += 2) { + if (digits[_i2] < 2) { + checksum += 1 - digits[_i2]; + } else { + checksum += 2 * (digits[_i2] - 2) + 5; + if (digits[_i2] > 4) { + checksum += 2; + } + } + } + return String.fromCharCode(checksum % 26 + 65) === tin.charAt(8); +} + +/* + * el-GR validation function + * (Arithmos Forologikou Mitroou (AFM/ΑΦΜ), persons/entities) + * Verify TIN validity by calculating check (last) digit + * Algorithm not in DG TAXUD document- sourced from: + * - `http://epixeirisi.gr/%CE%9A%CE%A1%CE%99%CE%A3%CE%99%CE%9C%CE%91-%CE%98%CE%95%CE%9C%CE%91%CE%A4%CE%91-%CE%A6%CE%9F%CE%A1%CE%9F%CE%9B%CE%9F%CE%93%CE%99%CE%91%CE%A3-%CE%9A%CE%91%CE%99-%CE%9B%CE%9F%CE%93%CE%99%CE%A3%CE%A4%CE%99%CE%9A%CE%97%CE%A3/23791/%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CF%8C%CF%82-%CE%A6%CE%BF%CF%81%CE%BF%CE%BB%CE%BF%CE%B3%CE%B9%CE%BA%CE%BF%CF%8D-%CE%9C%CE%B7%CF%84%CF%81%CF%8E%CE%BF%CF%85` + */ +function elGrCheck(tin) { + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + for (var i = 0; i < 8; i++) { + checksum += digits[i] * Math.pow(2, 8 - i); + } + return checksum % 11 % 10 === digits[8]; +} + +/* + * en-GB validation function (should go here if needed) + * (National Insurance Number (NINO) or Unique Taxpayer Reference (UTR), + * persons/entities respectively) + */ + +/* + * en-IE validation function + * (Personal Public Service Number (PPS No), persons only) + * Verify TIN validity by calculating check (second to last) character + */ +function enIeCheck(tin) { + var checksum = reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) { + return parseInt(a, 10); + }), 8); + if (tin.length === 9 && tin[8] !== 'W') { + checksum += (tin[8].charCodeAt(0) - 64) * 9; + } + checksum %= 23; + if (checksum === 0) { + return tin[7].toUpperCase() === 'W'; + } + return tin[7].toUpperCase() === String.fromCharCode(64 + checksum); +} + +// Valid US IRS campus prefixes +var enUsCampusPrefix = { + andover: ['10', '12'], + atlanta: ['60', '67'], + austin: ['50', '53'], + brookhaven: ['01', '02', '03', '04', '05', '06', '11', '13', '14', '16', '21', '22', '23', '25', '34', '51', '52', '54', '55', '56', '57', '58', '59', '65'], + cincinnati: ['30', '32', '35', '36', '37', '38', '61'], + fresno: ['15', '24'], + internet: ['20', '26', '27', '45', '46', '47'], + kansas: ['40', '44'], + memphis: ['94', '95'], + ogden: ['80', '90'], + philadelphia: ['33', '39', '41', '42', '43', '46', '48', '62', '63', '64', '66', '68', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '91', '92', '93', '98', '99'], + sba: ['31'] +}; + +// Return an array of all US IRS campus prefixes +function enUsGetPrefixes() { + var prefixes = []; + for (var location in enUsCampusPrefix) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (enUsCampusPrefix.hasOwnProperty(location)) { + prefixes.push.apply(prefixes, _toConsumableArray(enUsCampusPrefix[location])); + } + } + return prefixes; +} + +/* + * en-US validation function + * Verify that the TIN starts with a valid IRS campus prefix + */ +function enUsCheck(tin) { + return enUsGetPrefixes().indexOf(tin.slice(0, 2)) !== -1; +} + +/* + * es-AR validation function + * Clave Única de Identificación Tributaria (CUIT/CUIL) + * Sourced from: + * - https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id_nivel1=3036&id_nivel2=3040&p=Conceptos%20b%C3%A1sicos + * - https://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Identificaci%C3%B3n_Tributaria + */ + +function esArCheck(tin) { + var accum = 0; + var digits = tin.split(''); + var digit = parseInt(digits.pop(), 10); + for (var i = 0; i < digits.length; i++) { + accum += digits[9 - i] * (2 + i % 6); + } + var verif = 11 - accum % 11; + if (verif === 11) { + verif = 0; + } else if (verif === 10) { + verif = 9; + } + return digit === verif; +} + +/* + * es-ES validation function + * (Documento Nacional de Identidad (DNI) + * or Número de Identificación de Extranjero (NIE), persons only) + * Verify TIN validity by calculating check (last) character + */ +function esEsCheck(tin) { + // Split characters into an array for further processing + var chars = tin.toUpperCase().split(''); + + // Replace initial letter if needed + if (isNaN(parseInt(chars[0], 10)) && chars.length > 1) { + var lead_replace = 0; + switch (chars[0]) { + case 'Y': + lead_replace = 1; + break; + case 'Z': + lead_replace = 2; + break; + default: + } + chars.splice(0, 1, lead_replace); + // Fill with zeros if smaller than proper + } else { + while (chars.length < 9) { + chars.unshift(0); + } + } + + // Calculate checksum and check according to lookup + var lookup = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E']; + chars = chars.join(''); + var checksum = parseInt(chars.slice(0, 8), 10) % 23; + return chars[8] === lookup[checksum]; +} + +/* + * et-EE validation function + * (Isikukood (IK), persons only) + * Checks if birth date (century digit and six following) is valid and calculates check (last) digit + * Material not in DG TAXUD document sourced from: + * - `https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Estonia-TIN.pdf` + */ +function etEeCheck(tin) { + // Extract year and add century + var full_year = tin.slice(1, 3); + var century_digit = tin.slice(0, 1); + switch (century_digit) { + case '1': + case '2': + full_year = "18".concat(full_year); + break; + case '3': + case '4': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 0; + var weight = 1; + // Multiply by weight and add to checksum + for (var i = 0; i < 10; i++) { + checksum += digits[i] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + // Do again if modulo 11 of checksum is 10 + if (checksum % 11 === 10) { + checksum = 0; + weight = 3; + for (var _i3 = 0; _i3 < 10; _i3++) { + checksum += digits[_i3] * weight; + weight += 1; + if (weight === 10) { + weight = 1; + } + } + if (checksum % 11 === 10) { + return digits[10] === 0; + } + } + return checksum % 11 === digits[10]; +} + +/* + * fi-FI validation function + * (Henkilötunnus (HETU), persons only) + * Checks if birth date (first six digits plus century symbol) is valid + * and calculates check (last) digit + */ +function fiFiCheck(tin) { + // Extract year and add century + var full_year = tin.slice(4, 6); + var century_symbol = tin.slice(6, 7); + switch (century_symbol) { + case '+': + full_year = "18".concat(full_year); + break; + case '-': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(tin.slice(0, 2)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate check character + var checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31; + if (checksum < 10) { + return checksum === parseInt(tin.slice(10), 10); + } + checksum -= 10; + var letters_lookup = ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y']; + return letters_lookup[checksum] === tin.slice(10); +} + +/* + * fr/nl-BE validation function + * (Numéro national (N.N.), persons only) + * Checks if birth date (first six digits) is valid and calculates check (last two) digits + */ +function frBeCheck(tin) { + // Zero month/day value is acceptable + if (tin.slice(2, 4) !== '00' || tin.slice(4, 6) !== '00') { + // Extract date from first six digits of TIN + var date = "".concat(tin.slice(0, 2), "/").concat(tin.slice(2, 4), "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + } + var checksum = 97 - parseInt(tin.slice(0, 9), 10) % 97; + var checkdigits = parseInt(tin.slice(9, 11), 10); + if (checksum !== checkdigits) { + checksum = 97 - parseInt("2".concat(tin.slice(0, 9)), 10) % 97; + if (checksum !== checkdigits) { + return false; + } + } + return true; +} + +/* + * fr-FR validation function + * (Numéro fiscal de référence (numéro SPI), persons only) + * Verify TIN validity by calculating check (last three) digits + */ +function frFrCheck(tin) { + tin = tin.replace(/\s/g, ''); + var checksum = parseInt(tin.slice(0, 10), 10) % 511; + var checkdigits = parseInt(tin.slice(10, 13), 10); + return checksum === checkdigits; +} + +/* + * fr/lb-LU validation function + * (numéro d’identification personnelle, persons only) + * Verify birth date validity and run Luhn and Verhoeff checks + */ +function frLuCheck(tin) { + // Extract date and check validity + var date = "".concat(tin.slice(0, 4), "/").concat(tin.slice(4, 6), "/").concat(tin.slice(6, 8)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Run Luhn check + if (!luhnCheck(tin.slice(0, 12))) { + return false; + } + // Remove Luhn check digit and run Verhoeff check + return verhoeffCheck("".concat(tin.slice(0, 11)).concat(tin[12])); +} + +/* + * hr-HR validation function + * (Osobni identifikacijski broj (OIB), persons/entities) + * Verify TIN validity by calling iso7064Check(digits) + */ +function hrHrCheck(tin) { + return iso7064Check(tin); +} + +/* + * hu-HU validation function + * (Adóazonosító jel, persons only) + * Verify TIN validity by calculating check (last) digit + */ +function huHuCheck(tin) { + // split digits into an array for further processing + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var checksum = 8; + for (var i = 1; i < 9; i++) { + checksum += digits[i] * (i + 1); + } + return checksum % 11 === digits[9]; +} + +/* + * lt-LT validation function (should go here if needed) + * (Asmens kodas, persons/entities respectively) + * Current validation check is alias of etEeCheck- same format applies + */ + +/* + * it-IT first/last name validity check + * Accepts it-IT TIN-encoded names as a three-element character array and checks their validity + * Due to lack of clarity between resources ("Are only Italian consonants used? + * What happens if a person has X in their name?" etc.) only two test conditions + * have been implemented: + * Vowels may only be followed by other vowels or an X character + * and X characters after vowels may only be followed by other X characters. + */ +function itItNameCheck(name) { + // true at the first occurrence of a vowel + var vowelflag = false; + + // true at the first occurrence of an X AFTER vowel + // (to properly handle last names with X as consonant) + var xflag = false; + for (var i = 0; i < 3; i++) { + if (!vowelflag && /[AEIOU]/.test(name[i])) { + vowelflag = true; + } else if (!xflag && vowelflag && name[i] === 'X') { + xflag = true; + } else if (i > 0) { + if (vowelflag && !xflag) { + if (!/[AEIOU]/.test(name[i])) { + return false; + } + } + if (xflag) { + if (!/X/.test(name[i])) { + return false; + } + } + } + } + return true; +} + +/* + * it-IT validation function + * (Codice fiscale (TIN-IT), persons only) + * Verify name, birth date and codice catastale validity + * and calculate check character. + * Material not in DG-TAXUD document sourced from: + * `https://en.wikipedia.org/wiki/Italian_fiscal_code` + */ +function itItCheck(tin) { + // Capitalize and split characters into an array for further processing + var chars = tin.toUpperCase().split(''); + + // Check first and last name validity calling itItNameCheck() + if (!itItNameCheck(chars.slice(0, 3))) { + return false; + } + if (!itItNameCheck(chars.slice(3, 6))) { + return false; + } + + // Convert letters in number spaces back to numbers if any + var number_locations = [6, 7, 9, 10, 12, 13, 14]; + var number_replace = { + L: '0', + M: '1', + N: '2', + P: '3', + Q: '4', + R: '5', + S: '6', + T: '7', + U: '8', + V: '9' + }; + for (var _i4 = 0, _number_locations = number_locations; _i4 < _number_locations.length; _i4++) { + var i = _number_locations[_i4]; + if (chars[i] in number_replace) { + chars.splice(i, 1, number_replace[chars[i]]); + } + } + + // Extract month and day, and check date validity + var month_replace = { + A: '01', + B: '02', + C: '03', + D: '04', + E: '05', + H: '06', + L: '07', + M: '08', + P: '09', + R: '10', + S: '11', + T: '12' + }; + var month = month_replace[chars[8]]; + var day = parseInt(chars[9] + chars[10], 10); + if (day > 40) { + day -= 40; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(chars[6]).concat(chars[7], "/").concat(month, "/").concat(day); + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + + // Calculate check character by adding up even and odd characters as numbers + var checksum = 0; + for (var _i5 = 1; _i5 < chars.length - 1; _i5 += 2) { + var char_to_int = parseInt(chars[_i5], 10); + if (isNaN(char_to_int)) { + char_to_int = chars[_i5].charCodeAt(0) - 65; + } + checksum += char_to_int; + } + var odd_convert = { + // Maps of characters at odd places + A: 1, + B: 0, + C: 5, + D: 7, + E: 9, + F: 13, + G: 15, + H: 17, + I: 19, + J: 21, + K: 2, + L: 4, + M: 18, + N: 20, + O: 11, + P: 3, + Q: 6, + R: 8, + S: 12, + T: 14, + U: 16, + V: 10, + W: 22, + X: 25, + Y: 24, + Z: 23, + 0: 1, + 1: 0 + }; + for (var _i6 = 0; _i6 < chars.length - 1; _i6 += 2) { + var _char_to_int = 0; + if (chars[_i6] in odd_convert) { + _char_to_int = odd_convert[chars[_i6]]; + } else { + var multiplier = parseInt(chars[_i6], 10); + _char_to_int = 2 * multiplier + 1; + if (multiplier > 4) { + _char_to_int += 2; + } + } + checksum += _char_to_int; + } + if (String.fromCharCode(65 + checksum % 26) !== chars[15]) { + return false; + } + return true; +} + +/* + * lv-LV validation function + * (Personas kods (PK), persons only) + * Check validity of birth date and calculate check (last) digit + * Support only for old format numbers (not starting with '32', issued before 2017/07/01) + * Material not in DG TAXUD document sourced from: + * `https://boot.ritakafija.lv/forums/index.php?/topic/88314-personas-koda-algoritms-%C4%8Deksumma/` + */ +function lvLvCheck(tin) { + tin = tin.replace(/\W/, ''); + // Extract date from TIN + var day = tin.slice(0, 2); + if (day !== '32') { + // No date/checksum check if new format + var month = tin.slice(2, 4); + if (month !== '00') { + // No date check if unknown month + var full_year = tin.slice(4, 6); + switch (tin[6]) { + case '0': + full_year = "18".concat(full_year); + break; + case '1': + full_year = "19".concat(full_year); + break; + default: + full_year = "20".concat(full_year); + break; + } + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(2, 4), "/").concat(day); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + } + + // Calculate check digit + var checksum = 1101; + var multip_lookup = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; + for (var i = 0; i < tin.length - 1; i++) { + checksum -= parseInt(tin[i], 10) * multip_lookup[i]; + } + return parseInt(tin[10], 10) === checksum % 11; + } + return true; +} + +/* + * mt-MT validation function + * (Identity Card Number or Unique Taxpayer Reference, persons/entities) + * Verify Identity Card Number structure (no other tests found) + */ +function mtMtCheck(tin) { + if (tin.length !== 9) { + // No tests for UTR + var chars = tin.toUpperCase().split(''); + // Fill with zeros if smaller than proper + while (chars.length < 8) { + chars.unshift(0); + } + // Validate format according to last character + switch (tin[7]) { + case 'A': + case 'P': + if (parseInt(chars[6], 10) === 0) { + return false; + } + break; + default: + { + var first_part = parseInt(chars.join('').slice(0, 5), 10); + if (first_part > 32000) { + return false; + } + var second_part = parseInt(chars.join('').slice(5, 7), 10); + if (first_part === second_part) { + return false; + } + } + } + } + return true; +} + +/* + * nl-NL validation function + * (Burgerservicenummer (BSN) or Rechtspersonen Samenwerkingsverbanden Informatie Nummer (RSIN), + * persons/entities respectively) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function nlNlCheck(tin) { + return reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11 === parseInt(tin[8], 10); +} + +/* + * pl-PL validation function + * (Powszechny Elektroniczny System Ewidencji Ludności (PESEL) + * or Numer identyfikacji podatkowej (NIP), persons/entities) + * Verify TIN validity by validating birth date (PESEL) and calculating check (last) digit + */ +function plPlCheck(tin) { + // NIP + if (tin.length === 10) { + // Calculate last digit by multiplying with lookup + var lookup = [6, 5, 7, 2, 3, 4, 5, 6, 7]; + var _checksum = 0; + for (var i = 0; i < lookup.length; i++) { + _checksum += parseInt(tin[i], 10) * lookup[i]; + } + _checksum %= 11; + if (_checksum === 10) { + return false; + } + return _checksum === parseInt(tin[9], 10); + } + + // PESEL + // Extract full year using month + var full_year = tin.slice(0, 2); + var month = parseInt(tin.slice(2, 4), 10); + if (month > 80) { + full_year = "18".concat(full_year); + month -= 80; + } else if (month > 60) { + full_year = "22".concat(full_year); + month -= 60; + } else if (month > 40) { + full_year = "21".concat(full_year); + month -= 40; + } else if (month > 20) { + full_year = "20".concat(full_year); + month -= 20; + } else { + full_year = "19".concat(full_year); + } + // Add leading zero to month if needed + if (month < 10) { + month = "0".concat(month); + } + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate last digit by multiplying with odd one-digit numbers except 5 + var checksum = 0; + var multiplier = 1; + for (var _i7 = 0; _i7 < tin.length - 1; _i7++) { + checksum += parseInt(tin[_i7], 10) * multiplier % 10; + multiplier += 2; + if (multiplier > 10) { + multiplier = 1; + } else if (multiplier === 5) { + multiplier += 2; + } + } + checksum = 10 - checksum % 10; + return checksum === parseInt(tin[10], 10); +} + +/* +* pt-BR validation function +* (Cadastro de Pessoas Físicas (CPF, persons) +* Cadastro Nacional de Pessoas Jurídicas (CNPJ, entities) +* Both inputs will be validated +*/ + +function ptBrCheck(tin) { + if (tin.length === 11) { + var _sum; + var remainder; + _sum = 0; + if ( + // Reject known invalid CPFs + tin === '11111111111' || tin === '22222222222' || tin === '33333333333' || tin === '44444444444' || tin === '55555555555' || tin === '66666666666' || tin === '77777777777' || tin === '88888888888' || tin === '99999999999' || tin === '00000000000') return false; + for (var i = 1; i <= 9; i++) _sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i); + remainder = _sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(9, 10), 10)) return false; + _sum = 0; + for (var _i8 = 1; _i8 <= 10; _i8++) _sum += parseInt(tin.substring(_i8 - 1, _i8), 10) * (12 - _i8); + remainder = _sum * 10 % 11; + if (remainder === 10) remainder = 0; + if (remainder !== parseInt(tin.substring(10, 11), 10)) return false; + return true; + } + if ( + // Reject know invalid CNPJs + tin === '00000000000000' || tin === '11111111111111' || tin === '22222222222222' || tin === '33333333333333' || tin === '44444444444444' || tin === '55555555555555' || tin === '66666666666666' || tin === '77777777777777' || tin === '88888888888888' || tin === '99999999999999') { + return false; + } + var length = tin.length - 2; + var identifiers = tin.substring(0, length); + var verificators = tin.substring(length); + var sum = 0; + var pos = length - 7; + for (var _i9 = length; _i9 >= 1; _i9--) { + sum += identifiers.charAt(length - _i9) * pos; + pos -= 1; + if (pos < 2) { + pos = 9; + } + } + var result = sum % 11 < 2 ? 0 : 11 - sum % 11; + if (result !== parseInt(verificators.charAt(0), 10)) { + return false; + } + length += 1; + identifiers = tin.substring(0, length); + sum = 0; + pos = length - 7; + for (var _i0 = length; _i0 >= 1; _i0--) { + sum += identifiers.charAt(length - _i0) * pos; + pos -= 1; + if (pos < 2) { + pos = 9; + } + } + result = sum % 11 < 2 ? 0 : 11 - sum % 11; + if (result !== parseInt(verificators.charAt(1), 10)) { + return false; + } + return true; +} + +/* + * pt-PT validation function + * (Número de identificação fiscal (NIF), persons/entities) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function ptPtCheck(tin) { + var checksum = 11 - reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); +} + +/* + * ro-RO validation function + * (Cod Numeric Personal (CNP) or Cod de înregistrare fiscală (CIF), + * persons only) + * Verify CNP validity by calculating check (last) digit (test not found for CIF) + * Material not in DG TAXUD document sourced from: + * `https://en.wikipedia.org/wiki/National_identification_number#Romania` + */ +function roRoCheck(tin) { + if (tin.slice(0, 4) !== '9000') { + // No test found for this format + // Extract full year using century digit if possible + var full_year = tin.slice(1, 3); + switch (tin[0]) { + case '1': + case '2': + full_year = "19".concat(full_year); + break; + case '3': + case '4': + full_year = "18".concat(full_year); + break; + case '5': + case '6': + full_year = "20".concat(full_year); + break; + default: + } + + // Check date validity + var date = "".concat(full_year, "/").concat(tin.slice(3, 5), "/").concat(tin.slice(5, 7)); + if (date.length === 8) { + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + } else if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + + // Calculate check digit + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + if (checksum % 11 === 10) { + return digits[12] === 1; + } + return digits[12] === checksum % 11; + } + return true; +} + +/* + * sk-SK validation function + * (Rodné číslo (RČ) or bezvýznamové identifikačné číslo (BIČ), persons only) + * Checks validity of pre-1954 birth numbers (rodné číslo) only + * Due to the introduction of the pseudo-random BIČ it is not possible to test + * post-1954 birth numbers without knowing whether they are BIČ or RČ beforehand + */ +function skSkCheck(tin) { + if (tin.length === 9) { + tin = tin.replace(/\W/, ''); + if (tin.slice(6) === '000') { + return false; + } // Three-zero serial not assigned before 1954 + + // Extract full year from TIN length + var full_year = parseInt(tin.slice(0, 2), 10); + if (full_year > 53) { + return false; + } + if (full_year < 10) { + full_year = "190".concat(full_year); + } else { + full_year = "19".concat(full_year); + } + + // Extract month from TIN and normalize + var month = parseInt(tin.slice(2, 4), 10); + if (month > 50) { + month -= 50; + } + if (month < 10) { + month = "0".concat(month); + } + + // Check date validity + var date = "".concat(full_year, "/").concat(month, "/").concat(tin.slice(4, 6)); + if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + } + return true; +} + +/* + * sl-SI validation function + * (Davčna številka, persons/entities) + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function slSiCheck(tin) { + var checksum = 11 - reverseMultiplyAndSum(tin.split('').slice(0, 7).map(function (a) { + return parseInt(a, 10); + }), 8) % 11; + if (checksum === 10) { + return parseInt(tin[7], 10) === 0; + } + return checksum === parseInt(tin[7], 10); +} + +/* + * sv-SE validation function + * (Personnummer or samordningsnummer, persons only) + * Checks validity of birth date and calls luhnCheck() to validate check (last) digit + */ +function svSeCheck(tin) { + // Make copy of TIN and normalize to two-digit year form + var tin_copy = tin.slice(0); + if (tin.length > 11) { + tin_copy = tin_copy.slice(2); + } + + // Extract date of birth + var full_year = ''; + var month = tin_copy.slice(2, 4); + var day = parseInt(tin_copy.slice(4, 6), 10); + if (tin.length > 11) { + full_year = tin.slice(0, 4); + } else { + full_year = tin.slice(0, 2); + if (tin.length === 11 && day < 60) { + // Extract full year from centenarian symbol + // Should work just fine until year 10000 or so + var current_year = new Date().getFullYear().toString(); + var current_century = parseInt(current_year.slice(0, 2), 10); + current_year = parseInt(current_year, 10); + if (tin[6] === '-') { + if (parseInt("".concat(current_century).concat(full_year), 10) > current_year) { + full_year = "".concat(current_century - 1).concat(full_year); + } else { + full_year = "".concat(current_century).concat(full_year); + } + } else { + full_year = "".concat(current_century - 1).concat(full_year); + if (current_year - parseInt(full_year, 10) < 100) { + return false; + } + } + } + } + + // Normalize day and check date validity + if (day > 60) { + day -= 60; + } + if (day < 10) { + day = "0".concat(day); + } + var date = "".concat(full_year, "/").concat(month, "/").concat(day); + if (date.length === 8) { + if (!isDate(date, 'YY/MM/DD')) { + return false; + } + } else if (!isDate(date, 'YYYY/MM/DD')) { + return false; + } + return luhnCheck(tin.replace(/\W/, '')); +} + +/** + * uk-UA validation function + * Verify TIN validity by calculating check (last) digit (variant of MOD 11) + */ +function ukUaCheck(tin) { + // Calculate check digit + var digits = tin.split('').map(function (a) { + return parseInt(a, 10); + }); + var multipliers = [-1, 5, 7, 9, 4, 6, 10, 5, 7]; + var checksum = 0; + for (var i = 0; i < multipliers.length; i++) { + checksum += digits[i] * multipliers[i]; + } + return checksum % 11 === 10 ? digits[9] === 0 : digits[9] === checksum % 11; +} + +// Locale lookup objects + +/* + * Tax id regex formats for various locales + * + * Where not explicitly specified in DG-TAXUD document both + * uppercase and lowercase letters are acceptable. + */ +var taxIdFormat = { + 'bg-BG': /^\d{10}$/, + 'cs-CZ': /^\d{6}\/{0,1}\d{3,4}$/, + 'de-AT': /^\d{9}$/, + 'de-DE': /^[1-9]\d{10}$/, + 'dk-DK': /^\d{6}-{0,1}\d{4}$/, + 'el-CY': /^[09]\d{7}[A-Z]$/, + 'el-GR': /^([0-4]|[7-9])\d{8}$/, + 'en-CA': /^\d{9}$/, + 'en-GB': /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i, + 'en-IE': /^\d{7}[A-W][A-IW]{0,1}$/i, + 'en-US': /^\d{2}[- ]{0,1}\d{7}$/, + 'es-AR': /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/, + 'es-ES': /^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i, + 'et-EE': /^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/, + 'fi-FI': /^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i, + 'fr-BE': /^\d{11}$/, + 'fr-FR': /^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/, + // Conforms both to official spec and provided example + 'fr-LU': /^\d{13}$/, + 'hr-HR': /^\d{11}$/, + 'hu-HU': /^8\d{9}$/, + 'it-IT': /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i, + 'lv-LV': /^\d{6}-{0,1}\d{5}$/, + // Conforms both to DG TAXUD spec and original research + 'mt-MT': /^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i, + 'nl-NL': /^\d{9}$/, + 'pl-PL': /^\d{10,11}$/, + 'pt-BR': /(?:^\d{11}$)|(?:^\d{14}$)/, + 'pt-PT': /^\d{9}$/, + 'ro-RO': /^\d{13}$/, + 'sk-SK': /^\d{6}\/{0,1}\d{3,4}$/, + 'sl-SI': /^[1-9]\d{7}$/, + 'sv-SE': /^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/, + 'uk-UA': /^\d{10}$/ +}; +// taxIdFormat locale aliases +taxIdFormat['lb-LU'] = taxIdFormat['fr-LU']; +taxIdFormat['lt-LT'] = taxIdFormat['et-EE']; +taxIdFormat['nl-BE'] = taxIdFormat['fr-BE']; +taxIdFormat['fr-CA'] = taxIdFormat['en-CA']; + +// Algorithmic tax id check functions for various locales +var taxIdCheck = { + 'bg-BG': bgBgCheck, + 'cs-CZ': csCzCheck, + 'de-AT': deAtCheck, + 'de-DE': deDeCheck, + 'dk-DK': dkDkCheck, + 'el-CY': elCyCheck, + 'el-GR': elGrCheck, + 'en-CA': isCanadianSIN, + 'en-IE': enIeCheck, + 'en-US': enUsCheck, + 'es-AR': esArCheck, + 'es-ES': esEsCheck, + 'et-EE': etEeCheck, + 'fi-FI': fiFiCheck, + 'fr-BE': frBeCheck, + 'fr-FR': frFrCheck, + 'fr-LU': frLuCheck, + 'hr-HR': hrHrCheck, + 'hu-HU': huHuCheck, + 'it-IT': itItCheck, + 'lv-LV': lvLvCheck, + 'mt-MT': mtMtCheck, + 'nl-NL': nlNlCheck, + 'pl-PL': plPlCheck, + 'pt-BR': ptBrCheck, + 'pt-PT': ptPtCheck, + 'ro-RO': roRoCheck, + 'sk-SK': skSkCheck, + 'sl-SI': slSiCheck, + 'sv-SE': svSeCheck, + 'uk-UA': ukUaCheck +}; +// taxIdCheck locale aliases +taxIdCheck['lb-LU'] = taxIdCheck['fr-LU']; +taxIdCheck['lt-LT'] = taxIdCheck['et-EE']; +taxIdCheck['nl-BE'] = taxIdCheck['fr-BE']; +taxIdCheck['fr-CA'] = taxIdCheck['en-CA']; + +// Regexes for locales where characters should be omitted before checking format +var allsymbols = /[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g; +var sanitizeRegexes = { + 'de-AT': allsymbols, + 'de-DE': /[\/\\]/g, + 'fr-BE': allsymbols +}; +// sanitizeRegexes locale aliases +sanitizeRegexes['nl-BE'] = sanitizeRegexes['fr-BE']; + +/* + * Validator function + * Return true if the passed string is a valid tax identification number + * for the specified locale. + * Throw an error exception if the locale is not supported. + */ +function isTaxID(str) { + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US'; + assertString(str); + // Copy TIN to avoid replacement if sanitized + var strcopy = str.slice(0); + if (locale in taxIdFormat) { + if (locale in sanitizeRegexes) { + strcopy = strcopy.replace(sanitizeRegexes[locale], ''); + } + if (!taxIdFormat[locale].test(strcopy)) { + return false; + } + if (locale in taxIdCheck) { + return taxIdCheck[locale](strcopy); + } + // Fallthrough; not all locales have algorithmic checks + return true; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} + +/* eslint-disable max-len */ +var phones = { + 'am-AM': /^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/, + 'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/, + 'ar-BH': /^(\+?973)?(3|6)\d{7}$/, + 'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/, + 'ar-LB': /^(\+?961)?((3|81)\d{6}|7\d{7})$/, + 'ar-EG': /^((\+?20)|0)?1[0125]\d{8}$/, + 'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/, + 'ar-JO': /^(\+?962|0)?7[789]\d{7}$/, + 'ar-KW': /^(\+?965)([569]\d{7}|41\d{6})$/, + 'ar-LY': /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/, + 'ar-MA': /^(?:(?:\+|00)212|0)[5-7]\d{8}$/, + 'ar-OM': /^((\+|00)968)?([79][1-9])\d{6}$/, + 'ar-PS': /^(\+?970|0)5[6|9](\d{7})$/, + 'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/, + 'ar-SD': /^((\+?249)|0)?(9[012369]|1[012])\d{7}$/, + 'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/, + 'ar-TN': /^(\+?216)?[2459]\d{7}$/, + 'az-AZ': /^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/, + 'ar-QA': /^(\+?974|0)?([3567]\d{7})$/, + 'bs-BA': /^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/, + 'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/, + 'bg-BG': /^(\+?359|0)?8[789]\d{7}$/, + 'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/, + 'ca-AD': /^(\+376)?[346]\d{5}$/, + 'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'de-DE': /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/, + 'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/, + 'de-CH': /^(\+41|0)([1-9])\d{1,9}$/, + 'de-LU': /^(\+352)?((6\d1)\d{6})$/, + 'dv-MV': /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/, + 'el-GR': /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/, + 'el-CY': /^(\+?357?)?(9(9|7|6|5|4)\d{6})$/, + 'en-AI': /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/, + 'en-AU': /^(\+?61|0)4\d{8}$/, + 'en-AG': /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/, + 'en-BM': /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/, + 'en-BS': /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/, + 'en-GB': /^(\+?44|0)7[1-9]\d{8}$/, + 'en-GG': /^(\+?44|0)1481\d{6}$/, + 'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/, + 'en-GY': /^(\+592|0)6\d{6}$/, + 'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/, + 'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/, + 'en-IE': /^(\+?353|0)8[356789]\d{7}$/, + 'en-IN': /^(\+?91|0)?[6789]\d{9}$/, + 'en-JM': /^(\+?876)?\d{7}$/, + 'en-KE': /^(\+?254|0)(7|1)\d{8}$/, + 'fr-CF': /^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/, + 'en-SS': /^(\+?211|0)(9[1257])\d{7}$/, + 'en-KI': /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/, + 'en-KN': /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/, + 'en-LS': /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/, + 'en-MT': /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/, + 'en-MU': /^(\+?230|0)?\d{8}$/, + 'en-MW': /^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/, + 'en-NA': /^(\+?264|0)(6|8)\d{7}$/, + 'en-NG': /^(\+?234|0)?[789]\d{9}$/, + 'en-NZ': /^(\+?64|0)[28]\d{7,9}$/, + 'en-PG': /^(\+?675|0)?(7\d|8[18])\d{6}$/, + 'en-PK': /^((00|\+)?92|0)3[0-6]\d{8}$/, + 'en-PH': /^(09|\+639)\d{9}$/, + 'en-RW': /^(\+?250|0)?[7]\d{8}$/, + 'en-SG': /^(\+65)?[3689]\d{7}$/, + 'en-SL': /^(\+?232|0)\d{8}$/, + 'en-TZ': /^(\+?255|0)?[67]\d{8}$/, + 'en-UG': /^(\+?256|0)?[7]\d{8}$/, + 'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/, + 'en-ZA': /^(\+?27|0)\d{9}$/, + 'en-ZM': /^(\+?26)?0[79][567]\d{7}$/, + 'en-ZW': /^(\+263)[0-9]{9}$/, + 'en-BW': /^(\+?267)?(7[1-8]{1})\d{6}$/, + 'es-AR': /^\+?549(11|[2368]\d)\d{8}$/, + 'es-BO': /^(\+?591)?(6|7)\d{7}$/, + 'es-CO': /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/, + 'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/, + 'es-CR': /^(\+506)?[2-8]\d{7}$/, + 'es-CU': /^(\+53|0053)?5\d{7}$/, + 'es-DO': /^(\+?1)?8[024]9\d{7}$/, + 'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/, + 'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, + 'es-ES': /^(\+?34)?[6|7]\d{8}$/, + 'es-GT': /^(\+?502)?[2|6|7]\d{7}$/, + 'es-PE': /^(\+?51)?9\d{8}$/, + 'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/, + 'es-NI': /^(\+?505)\d{7,8}$/, + 'es-PA': /^(\+?507)\d{7,8}$/, + 'es-PY': /^(\+?595|0)9[9876]\d{7}$/, + 'es-SV': /^(\+?503)?[67]\d{7}$/, + 'es-UY': /^(\+598|0)9[1-9][\d]{6}$/, + 'es-VE': /^(\+?58)?(2|4)\d{9}$/, + 'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, + 'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, + 'fi-FI': /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/, + 'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/, + 'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'fr-BF': /^(\+226|0)[67]\d{7}$/, + 'fr-BJ': /^(\+229)\d{8}$/, + 'fr-CD': /^(\+?243|0)?(8|9)\d{8}$/, + 'fr-CM': /^(\+?237)6[0-9]{8}$/, + 'fr-FR': /^(\+?33|0)[67]\d{8}$/, + 'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/, + 'fr-GP': /^(\+?590|0|00590)[67]\d{8}$/, + 'fr-MQ': /^(\+?596|0|00596)[67]\d{8}$/, + 'fr-PF': /^(\+?689)?8[789]\d{6}$/, + 'fr-RE': /^(\+?262|0|00262)[67]\d{8}$/, + 'fr-WF': /^(\+681)?\d{6}$/, + 'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, + 'hu-HU': /^(\+?36|06)(20|30|31|50|70)\d{7}$/, + 'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, + 'ir-IR': /^(\+98|0)?9\d{9}$/, + 'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + 'it-SM': /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/, + 'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/, + 'ka-GE': /^(\+?995)?(79\d{7}|5\d{8})$/, + 'kk-KZ': /^(\+?7|8)?7\d{9}$/, + 'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + 'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, + 'ky-KG': /^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/, + 'lt-LT': /^(\+370|8)\d{8}$/, + 'lv-LV': /^(\+?371)2\d{7}$/, + 'mg-MG': /^((\+?261|0)(2|3)\d)?\d{7}$/, + 'mn-MN': /^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/, + 'my-MM': /^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/, + 'ms-MY': /^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/, + 'mz-MZ': /^(\+?258)?8[234567]\d{7}$/, + 'nb-NO': /^(\+?47)?[49]\d{7}$/, + 'ne-NP': /^(\+?977)?9[78]\d{8}$/, + 'nl-BE': /^(\+?32|0)4\d{8}$/, + 'nl-NL': /^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/, + 'nl-AW': /^(\+)?297(56|59|64|73|74|99)\d{5}$/, + 'nn-NO': /^(\+?47)?[49]\d{7}$/, + 'pl-PL': /^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/, + 'pt-BR': /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/, + 'pt-PT': /^(\+?351)?9[1236]\d{7}$/, + 'pt-AO': /^(\+?244)?9\d{8}$/, + 'ro-MD': /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/, + 'ro-RO': /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/, + 'ru-RU': /^(\+?7|8)?9\d{9}$/, + 'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/, + 'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/, + 'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + 'so-SO': /^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/, + 'sq-AL': /^(\+355|0)6[2-9]\d{7}$/, + 'sr-RS': /^(\+3816|06)[- \d]{5,9}$/, + 'sv-SE': /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/, + 'tg-TJ': /^(\+?992)?[5][5]\d{7}$/, + 'th-TH': /^(\+66|66|0)\d{9}$/, + 'tr-TR': /^(\+?90|0)?5\d{9}$/, + 'tk-TM': /^(\+993|993|8)\d{8}$/, + 'uk-UA': /^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/, + 'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/, + 'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/, + 'zh-CN': /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/, + 'zh-TW': /^(\+?886\-?|0)?9\d{8}$/, + 'dz-BT': /^(\+?975|0)?(17|16|77|02)\d{6}$/, + 'ar-YE': /^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/, + 'ar-EH': /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/, + 'fa-AF': /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/, + 'mk-MK': /^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/ +}; +/* eslint-enable max-len */ + +// aliases +phones['en-CA'] = phones['en-US']; +phones['fr-CA'] = phones['en-CA']; +phones['fr-BE'] = phones['nl-BE']; +phones['zh-HK'] = phones['en-HK']; +phones['zh-MO'] = phones['en-MO']; +phones['ga-IE'] = phones['en-IE']; +phones['fr-CH'] = phones['de-CH']; +phones['it-CH'] = phones['fr-CH']; +function isMobilePhone(str, locale, options) { + assertString(str); + if (options && options.strictMode && !str.startsWith('+')) { + return false; + } + if (Array.isArray(locale)) { + return locale.some(function (key) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + if (phone.test(str)) { + return true; + } + } + return false; + }); + } else if (locale in phones) { + return phones[locale].test(str); + // alias falsey locale as 'any' + } else if (!locale || locale === 'any') { + for (var key in phones) { + // istanbul ignore else + if (phones.hasOwnProperty(key)) { + var phone = phones[key]; + if (phone.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} +var locales$5 = Object.keys(phones); + +var eth = /^(0x)[0-9a-f]{40}$/i; +function isEthereumAddress(str) { + assertString(str); + return eth.test(str); +} + +function currencyRegex(options) { + var decimal_digits = "\\d{".concat(options.digits_after_decimal[0], "}"); + options.digits_after_decimal.forEach(function (digit, index) { + if (index !== 0) decimal_digits = "".concat(decimal_digits, "|\\d{").concat(digit, "}"); + }); + var symbol = "(".concat(options.symbol.replace(/\W/, function (m) { + return "\\".concat(m); + }), ")").concat(options.require_symbol ? '' : '?'), + negative = '-?', + whole_dollar_amount_without_sep = '[1-9]\\d*', + whole_dollar_amount_with_sep = "[1-9]\\d{0,2}(\\".concat(options.thousands_separator, "\\d{3})*"), + valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep], + whole_dollar_amount = "(".concat(valid_whole_dollar_amounts.join('|'), ")?"), + decimal_amount = "(\\".concat(options.decimal_separator, "(").concat(decimal_digits, "))").concat(options.require_decimal ? '' : '?'); + var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : ''); + + // default is negative sign before symbol, but there are two other options (besides parens) + if (options.allow_negatives && !options.parens_for_negatives) { + if (options.negative_sign_after_digits) { + pattern += negative; + } else if (options.negative_sign_before_digits) { + pattern = negative + pattern; + } + } + + // South African Rand, for example, uses R 123 (space) and R-123 (no space) + if (options.allow_negative_sign_placeholder) { + pattern = "( (?!\\-))?".concat(pattern); + } else if (options.allow_space_after_symbol) { + pattern = " ?".concat(pattern); + } else if (options.allow_space_after_digits) { + pattern += '( (?!$))?'; + } + if (options.symbol_after_digits) { + pattern += symbol; + } else { + pattern = symbol + pattern; + } + if (options.allow_negatives) { + if (options.parens_for_negatives) { + pattern = "(\\(".concat(pattern, "\\)|").concat(pattern, ")"); + } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) { + pattern = negative + pattern; + } + } + + // ensure there's a dollar and/or decimal amount, and that + // it doesn't start with a space or a negative sign followed by a space + return new RegExp("^(?!-? )(?=.*\\d)".concat(pattern, "$")); +} +var default_currency_options = { + symbol: '$', + require_symbol: false, + allow_space_after_symbol: false, + symbol_after_digits: false, + allow_negatives: true, + parens_for_negatives: false, + negative_sign_before_digits: false, + negative_sign_after_digits: false, + allow_negative_sign_placeholder: false, + thousands_separator: ',', + decimal_separator: '.', + allow_decimal: true, + require_decimal: false, + digits_after_decimal: [2], + allow_space_after_digits: false +}; +function isCurrency(str, options) { + assertString(str); + options = merge(options, default_currency_options); + return currencyRegex(options).test(str); +} + +var bech32 = /^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/; +var base58 = /^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/; +function isBtcAddress(str) { + assertString(str); + return bech32.test(str) || base58.test(str); +} + +// https://en.wikipedia.org/wiki/ISO_6346 +// according to ISO6346 standard, checksum digit is mandatory for freight container but recommended +// for other container types (J and Z) +var isISO6346Str = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/; +var isDigit = /^[0-9]$/; +function isISO6346(str) { + assertString(str); + str = str.toUpperCase(); + if (!isISO6346Str.test(str)) return false; + if (str.length === 11) { + var sum = 0; + for (var i = 0; i < str.length - 1; i++) { + if (!isDigit.test(str[i])) { + var convertedCode = void 0; + var letterCode = str.charCodeAt(i) - 55; + if (letterCode < 11) convertedCode = letterCode;else if (letterCode >= 11 && letterCode <= 20) convertedCode = 12 + letterCode % 11;else if (letterCode >= 21 && letterCode <= 30) convertedCode = 23 + letterCode % 21;else convertedCode = 34 + letterCode % 31; + sum += convertedCode * Math.pow(2, i); + } else sum += str[i] * Math.pow(2, i); + } + var checkSumDigit = sum % 11; + if (checkSumDigit === 10) checkSumDigit = 0; + return Number(str[str.length - 1]) === checkSumDigit; + } + return true; +} +var isFreightContainerID = isISO6346; + +var isISO6391Set = new Set(['aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'io', 'is', 'it', 'iu', 'ja', 'jv', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc', 'sd', 'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've', 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu']); +function isISO6391(str) { + assertString(str); + return isISO6391Set.has(str); +} + +/* eslint-disable max-len */ +// from http://goo.gl/0ejHHW +var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +// same as above, except with a strict 'T' separator between date and time +var iso8601StrictSeparator = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; +/* eslint-enable max-len */ +var isValidDate = function isValidDate(str) { + // str must have passed the ISO8601 check + // this check is meant to catch invalid dates + // like 2009-02-31 + // first check for ordinal dates + var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/); + if (ordinalMatch) { + var oYear = Number(ordinalMatch[1]); + var oDay = Number(ordinalMatch[2]); + // if is leap year + if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366; + return oDay <= 365; + } + var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number); + var year = match[1]; + var month = match[2]; + var day = match[3]; + var monthString = month ? "0".concat(month).slice(-2) : month; + var dayString = day ? "0".concat(day).slice(-2) : day; + + // create a date object and compare + var d = new Date("".concat(year, "-").concat(monthString || '01', "-").concat(dayString || '01')); + if (month && day) { + return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day; + } + return true; +}; +function isISO8601(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + assertString(str); + var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str); + if (check && options.strict) return isValidDate(str); + return check; +} + +/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */ + +var dateFullYear = /[0-9]{4}/; +var dateMonth = /(0[1-9]|1[0-2])/; +var dateMDay = /([12]\d|0[1-9]|3[01])/; +var timeHour = /([01][0-9]|2[0-3])/; +var timeMinute = /[0-5][0-9]/; +var timeSecond = /([0-5][0-9]|60)/; +var timeSecFrac = /(\.[0-9]+)?/; +var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source)); +var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")")); +var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source)); +var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source)); +var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source)); +var rfc3339 = new RegExp("^".concat(fullDate.source, "[ tT]").concat(fullTime.source, "$")); +function isRFC3339(str) { + assertString(str); + return rfc3339.test(str); +} + +// from https://www.unicode.org/iso15924/iso15924-codes.html +var validISO15924Codes = new Set(['Adlm', 'Afak', 'Aghb', 'Ahom', 'Arab', 'Aran', 'Armi', 'Armn', 'Avst', 'Bali', 'Bamu', 'Bass', 'Batk', 'Beng', 'Bhks', 'Blis', 'Bopo', 'Brah', 'Brai', 'Bugi', 'Buhd', 'Cakm', 'Cans', 'Cari', 'Cham', 'Cher', 'Chis', 'Chrs', 'Cirt', 'Copt', 'Cpmn', 'Cprt', 'Cyrl', 'Cyrs', 'Deva', 'Diak', 'Dogr', 'Dsrt', 'Dupl', 'Egyd', 'Egyh', 'Egyp', 'Elba', 'Elym', 'Ethi', 'Gara', 'Geok', 'Geor', 'Glag', 'Gong', 'Gonm', 'Goth', 'Gran', 'Grek', 'Gujr', 'Gukh', 'Guru', 'Hanb', 'Hang', 'Hani', 'Hano', 'Hans', 'Hant', 'Hatr', 'Hebr', 'Hira', 'Hluw', 'Hmng', 'Hmnp', 'Hrkt', 'Hung', 'Inds', 'Ital', 'Jamo', 'Java', 'Jpan', 'Jurc', 'Kali', 'Kana', 'Kawi', 'Khar', 'Khmr', 'Khoj', 'Kitl', 'Kits', 'Knda', 'Kore', 'Kpel', 'Krai', 'Kthi', 'Lana', 'Laoo', 'Latf', 'Latg', 'Latn', 'Leke', 'Lepc', 'Limb', 'Lina', 'Linb', 'Lisu', 'Loma', 'Lyci', 'Lydi', 'Mahj', 'Maka', 'Mand', 'Mani', 'Marc', 'Maya', 'Medf', 'Mend', 'Merc', 'Mero', 'Mlym', 'Modi', 'Mong', 'Moon', 'Mroo', 'Mtei', 'Mult', 'Mymr', 'Nagm', 'Nand', 'Narb', 'Nbat', 'Newa', 'Nkdb', 'Nkgb', 'Nkoo', 'Nshu', 'Ogam', 'Olck', 'Onao', 'Orkh', 'Orya', 'Osge', 'Osma', 'Ougr', 'Palm', 'Pauc', 'Pcun', 'Pelm', 'Perm', 'Phag', 'Phli', 'Phlp', 'Phlv', 'Phnx', 'Plrd', 'Piqd', 'Prti', 'Psin', 'Qaaa', 'Qaab', 'Qaac', 'Qaad', 'Qaae', 'Qaaf', 'Qaag', 'Qaah', 'Qaai', 'Qaaj', 'Qaak', 'Qaal', 'Qaam', 'Qaan', 'Qaao', 'Qaap', 'Qaaq', 'Qaar', 'Qaas', 'Qaat', 'Qaau', 'Qaav', 'Qaaw', 'Qaax', 'Qaay', 'Qaaz', 'Qaba', 'Qabb', 'Qabc', 'Qabd', 'Qabe', 'Qabf', 'Qabg', 'Qabh', 'Qabi', 'Qabj', 'Qabk', 'Qabl', 'Qabm', 'Qabn', 'Qabo', 'Qabp', 'Qabq', 'Qabr', 'Qabs', 'Qabt', 'Qabu', 'Qabv', 'Qabw', 'Qabx', 'Ranj', 'Rjng', 'Rohg', 'Roro', 'Runr', 'Samr', 'Sara', 'Sarb', 'Saur', 'Sgnw', 'Shaw', 'Shrd', 'Shui', 'Sidd', 'Sidt', 'Sind', 'Sinh', 'Sogd', 'Sogo', 'Sora', 'Soyo', 'Sund', 'Sunu', 'Sylo', 'Syrc', 'Syre', 'Syrj', 'Syrn', 'Tagb', 'Takr', 'Tale', 'Talu', 'Taml', 'Tang', 'Tavt', 'Tayo', 'Telu', 'Teng', 'Tfng', 'Tglg', 'Thaa', 'Thai', 'Tibt', 'Tirh', 'Tnsa', 'Todr', 'Tols', 'Toto', 'Tutg', 'Ugar', 'Vaii', 'Visp', 'Vith', 'Wara', 'Wcho', 'Wole', 'Xpeo', 'Xsux', 'Yezi', 'Yiii', 'Zanb', 'Zinh', 'Zmth', 'Zsye', 'Zsym', 'Zxxx', 'Zyyy', 'Zzzz']); +function isISO15924(str) { + assertString(str); + return validISO15924Codes.has(str); +} + +// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 +var validISO31661Alpha3CountriesCodes = new Set(['AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE', 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA', 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK', 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM', 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB', 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI', 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN', 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE', 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX', 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC', 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN', 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM', 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD', 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL', 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT', 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE']); +function isISO31661Alpha3(str) { + assertString(str); + return validISO31661Alpha3CountriesCodes.has(str.toUpperCase()); +} + +// from https://en.wikipedia.org/wiki/ISO_3166-1_numeric +var validISO31661NumericCountriesCodes = new Set(['004', '008', '010', '012', '016', '020', '024', '028', '031', '032', '036', '040', '044', '048', '050', '051', '052', '056', '060', '064', '068', '070', '072', '074', '076', '084', '086', '090', '092', '096', '100', '104', '108', '112', '116', '120', '124', '132', '136', '140', '144', '148', '152', '156', '158', '162', '166', '170', '174', '175', '178', '180', '184', '188', '191', '192', '196', '203', '204', '208', '212', '214', '218', '222', '226', '231', '232', '233', '234', '238', '239', '242', '246', '248', '250', '254', '258', '260', '262', '266', '268', '270', '275', '276', '288', '292', '296', '300', '304', '308', '312', '316', '320', '324', '328', '332', '334', '336', '340', '344', '348', '352', '356', '360', '364', '368', '372', '376', '380', '384', '388', '392', '398', '400', '404', '408', '410', '414', '417', '418', '422', '426', '428', '430', '434', '438', '440', '442', '446', '450', '454', '458', '462', '466', '470', '474', '478', '480', '484', '492', '496', '498', '499', '500', '504', '508', '512', '516', '520', '524', '528', '531', '533', '534', '535', '540', '548', '554', '558', '562', '566', '570', '574', '578', '580', '581', '583', '584', '585', '586', '591', '598', '600', '604', '608', '612', '616', '620', '624', '626', '630', '634', '638', '642', '643', '646', '652', '654', '659', '660', '662', '663', '666', '670', '674', '678', '682', '686', '688', '690', '694', '702', '703', '704', '705', '706', '710', '716', '724', '728', '729', '732', '740', '744', '748', '752', '756', '760', '762', '764', '768', '772', '776', '780', '784', '788', '792', '795', '796', '798', '800', '804', '807', '818', '826', '831', '832', '833', '834', '840', '850', '854', '858', '860', '862', '876', '882', '887', '894']); +function isISO31661Numeric(str) { + assertString(str); + return validISO31661NumericCountriesCodes.has(str); +} + +// from https://en.wikipedia.org/wiki/ISO_4217 +var validISO4217CurrencyCodes = new Set(['AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLE', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'USN', 'UYI', 'UYU', 'UYW', 'UZS', 'VED', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XCD', 'XDR', 'XOF', 'XPD', 'XPF', 'XPT', 'XSU', 'XTS', 'XUA', 'XXX', 'YER', 'ZAR', 'ZMW', 'ZWL']); +function isISO4217(str) { + assertString(str); + return validISO4217CurrencyCodes.has(str.toUpperCase()); +} + +var base32 = /^[A-Z2-7]+=*$/; +var crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/; +var defaultBase32Options = { + crockford: false +}; +function isBase32(str, options) { + assertString(str); + options = merge(options, defaultBase32Options); + if (options.crockford) { + return crockfordBase32.test(str); + } + var len = str.length; + if (len % 8 === 0 && base32.test(str)) { + return true; + } + return false; +} + +// Accepted chars - 123456789ABCDEFGH JKLMN PQRSTUVWXYZabcdefghijk mnopqrstuvwxyz +var base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/; +function isBase58(str) { + assertString(str); + if (base58Reg.test(str)) { + return true; + } + return false; +} + +var validMediaType = /^[a-z]+\/[a-z0-9\-\+\._]+$/i; +var validAttribute = /^[a-z\-]+=[a-z0-9\-]+$/i; +var validData = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i; +function isDataURI(str) { + assertString(str); + var data = str.split(','); + if (data.length < 2) { + return false; + } + var attributes = data.shift().trim().split(';'); + var schemeAndMediaType = attributes.shift(); + if (schemeAndMediaType.slice(0, 5) !== 'data:') { + return false; + } + var mediaType = schemeAndMediaType.slice(5); + if (mediaType !== '' && !validMediaType.test(mediaType)) { + return false; + } + for (var i = 0; i < attributes.length; i++) { + if (!(i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') && !validAttribute.test(attributes[i])) { + return false; + } + } + for (var _i = 0; _i < data.length; _i++) { + if (!validData.test(data[_i])) { + return false; + } + } + return true; +} + +var magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i; +function isMagnetURI(url) { + assertString(url); + if (url.indexOf('magnet:?') !== 0) { + return false; + } + return magnetURIComponent.test(url); +} + +function rtrim(str, chars) { + assertString(str); + if (chars) { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping + var pattern = new RegExp("[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+$"), 'g'); + return str.replace(pattern, ''); + } + // Use a faster and more safe than regex trim method https://blog.stevenlevithan.com/archives/faster-trim-javascript + var strIndex = str.length - 1; + while (/\s/.test(str.charAt(strIndex))) { + strIndex -= 1; + } + return str.slice(0, strIndex + 1); +} + +function ltrim(str, chars) { + assertString(str); + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping + var pattern = chars ? new RegExp("^[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+"), 'g') : /^\s+/g; + return str.replace(pattern, ''); +} + +function trim(str, chars) { + return rtrim(ltrim(str, chars), chars); +} + +function parseMailtoQueryString(queryString) { + var allowedParams = new Set(['subject', 'body', 'cc', 'bcc']), + query = { + cc: '', + bcc: '' + }; + var isParseFailed = false; + var queryParams = queryString.split('&'); + if (queryParams.length > 4) { + return false; + } + var _iterator = _createForOfIteratorHelper(queryParams), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var q = _step.value; + var _q$split = q.split('='), + _q$split2 = _slicedToArray(_q$split, 2), + key = _q$split2[0], + value = _q$split2[1]; + + // checked for invalid and duplicated query params + if (key && !allowedParams.has(key)) { + isParseFailed = true; + break; + } + if (value && (key === 'cc' || key === 'bcc')) { + query[key] = value; + } + if (key) { + allowedParams["delete"](key); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + return isParseFailed ? false : query; +} +function isMailtoURI(url, options) { + assertString(url); + if (url.indexOf('mailto:') !== 0) { + return false; + } + var _url$replace$split = url.replace('mailto:', '').split('?'), + _url$replace$split2 = _slicedToArray(_url$replace$split, 2), + to = _url$replace$split2[0], + _url$replace$split2$ = _url$replace$split2[1], + queryString = _url$replace$split2$ === void 0 ? '' : _url$replace$split2$; + if (!to && !queryString) { + return true; + } + var query = parseMailtoQueryString(queryString); + if (!query) { + return false; + } + return "".concat(to, ",").concat(query.cc, ",").concat(query.bcc).split(',').every(function (email) { + email = trim(email, ' '); + if (email) { + return isEmail(email, options); + } + return true; + }); +} + +/* + Checks if the provided string matches to a correct Media type format (MIME type) + + This function only checks is the string format follows the + established rules by the according RFC specifications. + This function supports 'charset' in textual media types + (https://tools.ietf.org/html/rfc6657). + + This function does not check against all the media types listed + by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml) + because of lightness purposes : it would require to include + all these MIME types in this library, which would weigh it + significantly. This kind of effort maybe is not worth for the use that + this function has in this entire library. + + More information in the RFC specifications : + - https://tools.ietf.org/html/rfc2045 + - https://tools.ietf.org/html/rfc2046 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.1 + - https://tools.ietf.org/html/rfc7231#section-3.1.1.5 +*/ + +// Match simple MIME types +// NB : +// Subtype length must not exceed 100 characters. +// This rule does not comply to the RFC specs (what is the max length ?). +var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i; // eslint-disable-line max-len + +// Handle "charset" in "text/*" +var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len + +// Handle "boundary" in "multipart/*" +var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len + +function isMimeType(str) { + assertString(str); + return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str); +} + +var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/; +var _long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/; +var latDMS = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i; +var longDMS = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i; +var defaultLatLongOptions = { + checkDMS: false +}; +function isLatLong(str, options) { + assertString(str); + options = merge(options, defaultLatLongOptions); + if (!includes(str, ',')) return false; + var pair = str.split(','); + if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false; + if (options.checkDMS) { + return latDMS.test(pair[0]) && longDMS.test(pair[1]); + } + return lat.test(pair[0]) && _long.test(pair[1]); +} + +// common patterns +var threeDigit = /^\d{3}$/; +var fourDigit = /^\d{4}$/; +var fiveDigit = /^\d{5}$/; +var sixDigit = /^\d{6}$/; +var patterns = { + AD: /^AD\d{3}$/, + AT: fourDigit, + AU: fourDigit, + AZ: /^AZ\d{4}$/, + BA: /^([7-8]\d{4}$)/, + BD: /^([1-8][0-9]{3}|9[0-4][0-9]{2})$/, + BE: fourDigit, + BG: fourDigit, + BR: /^\d{5}-?\d{3}$/, + BY: /^2[1-4]\d{4}$/, + CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, + CH: fourDigit, + CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/, + CO: /^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/, + CZ: /^\d{3}\s?\d{2}$/, + DE: fiveDigit, + DK: fourDigit, + DO: fiveDigit, + DZ: fiveDigit, + EE: fiveDigit, + ES: /^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/, + FI: fiveDigit, + FR: /^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/, + GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, + GR: /^\d{3}\s?\d{2}$/, + HR: /^([1-5]\d{4}$)/, + HT: /^HT\d{4}$/, + HU: fourDigit, + ID: fiveDigit, + IE: /^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i, + IL: /^(\d{5}|\d{7})$/, + IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/, + IR: /^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/, + IS: threeDigit, + IT: fiveDigit, + JP: /^\d{3}\-\d{4}$/, + KE: fiveDigit, + KR: /^(\d{5}|\d{6})$/, + LI: /^(948[5-9]|949[0-7])$/, + LT: /^LT\-\d{5}$/, + LU: fourDigit, + LV: /^LV\-\d{4}$/, + LK: fiveDigit, + MG: threeDigit, + MX: fiveDigit, + MT: /^[A-Za-z]{3}\s{0,1}\d{4}$/, + MY: fiveDigit, + NL: /^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i, + NO: fourDigit, + NP: /^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i, + NZ: fourDigit, + // https://www.pakpost.gov.pk/postcodes.php + PK: fiveDigit, + PL: /^\d{2}\-\d{3}$/, + PR: /^00[679]\d{2}([ -]\d{4})?$/, + PT: /^\d{4}\-\d{3}?$/, + RO: sixDigit, + RU: sixDigit, + SA: fiveDigit, + SE: /^[1-9]\d{2}\s?\d{2}$/, + SG: sixDigit, + SI: fourDigit, + SK: /^\d{3}\s?\d{2}$/, + TH: fiveDigit, + TN: fourDigit, + TW: /^\d{3}(\d{2,3})?$/, + UA: fiveDigit, + US: /^\d{5}(-\d{4})?$/, + ZA: fourDigit, + ZM: fiveDigit +}; +var locales$6 = Object.keys(patterns); +function isPostalCode(str, locale) { + assertString(str); + if (locale in patterns) { + return patterns[locale].test(str); + } else if (locale === 'any') { + for (var key in patterns) { + // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes + // istanbul ignore else + if (patterns.hasOwnProperty(key)) { + var pattern = patterns[key]; + if (pattern.test(str)) { + return true; + } + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} + +function escape(str) { + assertString(str); + return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>').replace(/\//g, '/').replace(/\\/g, '\').replace(/`/g, '`'); +} + +function unescape(str) { + assertString(str); + return str.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, '<').replace(/>/g, '>').replace(///g, '/').replace(/\/g, '\\').replace(/`/g, '`').replace(/&/g, '&'); + // & replacement has to be the last one to prevent + // bugs with intermediate strings containing escape sequences + // See: https://github.com/validatorjs/validator.js/issues/1827 +} + +function blacklist$1(str, chars) { + assertString(str); + return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), ''); +} + +function stripLow(str, keep_new_lines) { + assertString(str); + var chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F'; + return blacklist$1(str, chars); +} + +function whitelist(str, chars) { + assertString(str); + return str.replace(new RegExp("[^".concat(chars, "]+"), 'g'), ''); +} + +function isWhitelisted(str, chars) { + assertString(str); + for (var i = str.length - 1; i >= 0; i--) { + if (chars.indexOf(str[i]) === -1) { + return false; + } + } + return true; +} + +var default_normalize_email_options = { + // The following options apply to all email addresses + // Lowercases the local part of the email address. + // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024). + // The domain is always lowercased, as per RFC 1035 + all_lowercase: true, + // The following conversions are specific to GMail + // Lowercases the local part of the GMail address (known to be case-insensitive) + gmail_lowercase: true, + // Removes dots from the local part of the email address, as that's ignored by GMail + gmail_remove_dots: true, + // Removes the subaddress (e.g. "+foo") from the email address + gmail_remove_subaddress: true, + // Conversts the googlemail.com domain to gmail.com + gmail_convert_googlemaildotcom: true, + // The following conversions are specific to Outlook.com / Windows Live / Hotmail + // Lowercases the local part of the Outlook.com address (known to be case-insensitive) + outlookdotcom_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + outlookdotcom_remove_subaddress: true, + // The following conversions are specific to Yahoo + // Lowercases the local part of the Yahoo address (known to be case-insensitive) + yahoo_lowercase: true, + // Removes the subaddress (e.g. "-foo") from the email address + yahoo_remove_subaddress: true, + // The following conversions are specific to Yandex + // Lowercases the local part of the Yandex address (known to be case-insensitive) + yandex_lowercase: true, + // all yandex domains are equal, this explicitly sets the domain to 'yandex.ru' + yandex_convert_yandexru: true, + // The following conversions are specific to iCloud + // Lowercases the local part of the iCloud address (known to be case-insensitive) + icloud_lowercase: true, + // Removes the subaddress (e.g. "+foo") from the email address + icloud_remove_subaddress: true +}; + +// List of domains used by iCloud +var icloud_domains = ['icloud.com', 'me.com']; + +// List of domains used by Outlook.com and its predecessors +// This list is likely incomplete. +// Partial reference: +// https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/ +var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com']; + +// List of domains used by Yahoo Mail +// This list is likely incomplete +var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com']; + +// List of domains used by yandex.ru +var yandex_domains = ['yandex.ru', 'yandex.ua', 'yandex.kz', 'yandex.com', 'yandex.by', 'ya.ru']; + +// replace single dots, but not multiple consecutive dots +function dotsReplacer(match) { + if (match.length > 1) { + return match; + } + return ''; +} +function normalizeEmail(email, options) { + options = merge(options, default_normalize_email_options); + var raw_parts = email.split('@'); + var domain = raw_parts.pop(); + var user = raw_parts.join('@'); + var parts = [user, domain]; + + // The domain is always lowercased, as it's case-insensitive per RFC 1035 + parts[1] = parts[1].toLowerCase(); + if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') { + // Address is GMail + if (options.gmail_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (options.gmail_remove_dots) { + // this does not replace consecutive dots like example..email@gmail.com + parts[0] = parts[0].replace(/\.+/g, dotsReplacer); + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.gmail_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1]; + } else if (icloud_domains.indexOf(parts[1]) >= 0) { + // Address is iCloud + if (options.icloud_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.icloud_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (outlookdotcom_domains.indexOf(parts[1]) >= 0) { + // Address is Outlook.com + if (options.outlookdotcom_remove_subaddress) { + parts[0] = parts[0].split('+')[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.outlookdotcom_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yahoo_domains.indexOf(parts[1]) >= 0) { + // Address is Yahoo + if (options.yahoo_remove_subaddress) { + var components = parts[0].split('-'); + parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0]; + } + if (!parts[0].length) { + return false; + } + if (options.all_lowercase || options.yahoo_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + } else if (yandex_domains.indexOf(parts[1]) >= 0) { + if (options.all_lowercase || options.yandex_lowercase) { + parts[0] = parts[0].toLowerCase(); + } + parts[1] = options.yandex_convert_yandexru ? 'yandex.ru' : parts[1]; + } else if (options.all_lowercase) { + // Any other address + parts[0] = parts[0].toLowerCase(); + } + return parts.join('@'); +} + +var charsetRegex = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/; +function isSlug(str) { + assertString(str); + return charsetRegex.test(str); +} + +var validators$1 = { + 'cs-CZ': function csCZ(str) { + return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str); + }, + 'de-DE': function deDE(str) { + return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB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|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(str); + }, + 'de-LI': function deLI(str) { + return /^FL[- ]?\d{1,5}[UZ]?$/.test(str); + }, + 'en-IN': function enIN(str) { + return /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(str); + }, + 'en-SG': function enSG(str) { + return /^[A-Z]{3}[ -]?[\d]{4}[ -]?[A-Z]{1}$/.test(str); + }, + 'es-AR': function esAR(str) { + return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str); + }, + 'fi-FI': function fiFI(str) { + return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str); + }, + 'hu-HU': function huHU(str) { + return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(str); + }, + 'pt-BR': function ptBR(str) { + return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str); + }, + 'pt-PT': function ptPT(str) { + return /^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(str); + }, + 'sq-AL': function sqAL(str) { + return /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(str); + }, + 'sv-SE': function svSE(str) { + return /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim()); + }, + 'en-PK': function enPK(str) { + return /(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(str.trim()); + } +}; +function isLicensePlate(str, locale) { + assertString(str); + if (locale in validators$1) { + return validators$1[locale](str); + } else if (locale === 'any') { + for (var key in validators$1) { + /* eslint guard-for-in: 0 */ + var validator = validators$1[key]; + if (validator(str)) { + return true; + } + } + return false; + } + throw new Error("Invalid locale '".concat(locale, "'")); +} + +var upperCaseRegex = /^[A-Z]$/; +var lowerCaseRegex = /^[a-z]$/; +var numberRegex = /^[0-9]$/; +var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/; +var defaultOptions$1 = { + minLength: 8, + minLowercase: 1, + minUppercase: 1, + minNumbers: 1, + minSymbols: 1, + returnScore: false, + pointsPerUnique: 1, + pointsPerRepeat: 0.5, + pointsForContainingLower: 10, + pointsForContainingUpper: 10, + pointsForContainingNumber: 10, + pointsForContainingSymbol: 10 +}; + +/* Counts number of occurrences of each char in a string + * could be moved to util/ ? +*/ +function countChars(str) { + var result = {}; + Array.from(str).forEach(function (_char) { + var curVal = result[_char]; + if (curVal) { + result[_char] += 1; + } else { + result[_char] = 1; + } + }); + return result; +} + +/* Return information about a password */ +function analyzePassword(password) { + var charMap = countChars(password); + var analysis = { + length: password.length, + uniqueChars: Object.keys(charMap).length, + uppercaseCount: 0, + lowercaseCount: 0, + numberCount: 0, + symbolCount: 0 + }; + Object.keys(charMap).forEach(function (_char2) { + /* istanbul ignore else */ + if (upperCaseRegex.test(_char2)) { + analysis.uppercaseCount += charMap[_char2]; + } else if (lowerCaseRegex.test(_char2)) { + analysis.lowercaseCount += charMap[_char2]; + } else if (numberRegex.test(_char2)) { + analysis.numberCount += charMap[_char2]; + } else if (symbolRegex.test(_char2)) { + analysis.symbolCount += charMap[_char2]; + } + }); + return analysis; +} +function scorePassword(analysis, scoringOptions) { + var points = 0; + points += analysis.uniqueChars * scoringOptions.pointsPerUnique; + points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat; + if (analysis.lowercaseCount > 0) { + points += scoringOptions.pointsForContainingLower; + } + if (analysis.uppercaseCount > 0) { + points += scoringOptions.pointsForContainingUpper; + } + if (analysis.numberCount > 0) { + points += scoringOptions.pointsForContainingNumber; + } + if (analysis.symbolCount > 0) { + points += scoringOptions.pointsForContainingSymbol; + } + return points; +} +function isStrongPassword(str) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + assertString(str); + var analysis = analyzePassword(str); + options = merge(options || {}, defaultOptions$1); + if (options.returnScore) { + return scorePassword(analysis, options); + } + return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols; +} + +var AU = function AU(str) { + var match = str.match(/^(AU)?(\d{11})$/); + if (!match) { + return false; + } + // @see {@link https://abr.business.gov.au/Help/AbnFormat} + var weights = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]; + str = str.replace(/^AU/, ''); + var ABN = (parseInt(str.slice(0, 1), 10) - 1).toString() + str.slice(1); + var total = 0; + for (var i = 0; i < 11; i++) { + total += weights[i] * ABN.charAt(i); + } + return total !== 0 && total % 89 === 0; +}; +var CH = function CH(str) { + // @see {@link https://www.ech.ch/de/ech/ech-0097/5.2.0} + var hasValidCheckNumber = function hasValidCheckNumber(digits) { + var lastDigit = digits.pop(); // used as check number + var weights = [5, 4, 3, 2, 7, 6, 5, 4]; + var calculatedCheckNumber = (11 - digits.reduce(function (acc, el, idx) { + return acc + el * weights[idx]; + }, 0) % 11) % 11; + return lastDigit === calculatedCheckNumber; + }; + + // @see {@link https://www.estv.admin.ch/estv/de/home/mehrwertsteuer/uid/mwst-uid-nummer.html} + return /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber(str.match(/\d/g).map(function (el) { + return +el; + })); +}; +var PT = function PT(str) { + var match = str.match(/^(PT)?(\d{9})$/); + if (!match) { + return false; + } + var tin = match[2]; + var checksum = 11 - reverseMultiplyAndSum(tin.split('').slice(0, 8).map(function (a) { + return parseInt(a, 10); + }), 9) % 11; + if (checksum > 9) { + return parseInt(tin[8], 10) === 0; + } + return checksum === parseInt(tin[8], 10); +}; +var vatMatchers = { + /** + * European Union VAT identification numbers + */ + AT: function AT(str) { + return /^(AT)?U\d{8}$/.test(str); + }, + BE: function BE(str) { + return /^(BE)?\d{10}$/.test(str); + }, + BG: function BG(str) { + return /^(BG)?\d{9,10}$/.test(str); + }, + HR: function HR(str) { + return /^(HR)?\d{11}$/.test(str); + }, + CY: function CY(str) { + return /^(CY)?\w{9}$/.test(str); + }, + CZ: function CZ(str) { + return /^(CZ)?\d{8,10}$/.test(str); + }, + DK: function DK(str) { + return /^(DK)?\d{8}$/.test(str); + }, + EE: function EE(str) { + return /^(EE)?\d{9}$/.test(str); + }, + FI: function FI(str) { + return /^(FI)?\d{8}$/.test(str); + }, + FR: function FR(str) { + return /^(FR)([A-Z0-9]{2}\d{9})$/.test(str); + }, + DE: function DE(str) { + return /^(DE)?\d{9}$/.test(str); + }, + EL: function EL(str) { + return /^(EL)?\d{9}$/.test(str); + }, + HU: function HU(str) { + return /^(HU)?\d{8}$/.test(str); + }, + IE: function IE(str) { + return /^(IE)?\d{7}\w{1}(W)?$/.test(str); + }, + IT: function IT(str) { + return /^(IT)?\d{11}$/.test(str); + }, + LV: function LV(str) { + return /^(LV)?\d{11}$/.test(str); + }, + LT: function LT(str) { + return /^(LT)?\d{9,12}$/.test(str); + }, + LU: function LU(str) { + return /^(LU)?\d{8}$/.test(str); + }, + MT: function MT(str) { + return /^(MT)?\d{8}$/.test(str); + }, + NL: function NL(str) { + return /^(NL)?\d{9}B\d{2}$/.test(str); + }, + PL: function PL(str) { + return /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(str); + }, + PT: PT, + RO: function RO(str) { + return /^(RO)?\d{2,10}$/.test(str); + }, + SK: function SK(str) { + return /^(SK)?\d{10}$/.test(str); + }, + SI: function SI(str) { + return /^(SI)?\d{8}$/.test(str); + }, + ES: function ES(str) { + return /^(ES)?\w\d{7}[A-Z]$/.test(str); + }, + SE: function SE(str) { + return /^(SE)?\d{12}$/.test(str); + }, + /** + * VAT numbers of non-EU countries + */ + AL: function AL(str) { + return /^(AL)?\w{9}[A-Z]$/.test(str); + }, + MK: function MK(str) { + return /^(MK)?\d{13}$/.test(str); + }, + AU: AU, + BY: function BY(str) { + return /^(УНП )?\d{9}$/.test(str); + }, + CA: function CA(str) { + return /^(CA)?\d{9}$/.test(str); + }, + IS: function IS(str) { + return /^(IS)?\d{5,6}$/.test(str); + }, + IN: function IN(str) { + return /^(IN)?\d{15}$/.test(str); + }, + ID: function ID(str) { + return /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str); + }, + IL: function IL(str) { + return /^(IL)?\d{9}$/.test(str); + }, + KZ: function KZ(str) { + return /^(KZ)?\d{12}$/.test(str); + }, + NZ: function NZ(str) { + return /^(NZ)?\d{9}$/.test(str); + }, + NG: function NG(str) { + return /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str); + }, + NO: function NO(str) { + return /^(NO)?\d{9}MVA$/.test(str); + }, + PH: function PH(str) { + return /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(str); + }, + RU: function RU(str) { + return /^(RU)?(\d{10}|\d{12})$/.test(str); + }, + SM: function SM(str) { + return /^(SM)?\d{5}$/.test(str); + }, + SA: function SA(str) { + return /^(SA)?\d{15}$/.test(str); + }, + RS: function RS(str) { + return /^(RS)?\d{9}$/.test(str); + }, + CH: CH, + TR: function TR(str) { + return /^(TR)?\d{10}$/.test(str); + }, + UA: function UA(str) { + return /^(UA)?\d{12}$/.test(str); + }, + GB: function GB(str) { + return /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str); + }, + UZ: function UZ(str) { + return /^(UZ)?\d{9}$/.test(str); + }, + /** + * VAT numbers of Latin American countries + */ + AR: function AR(str) { + return /^(AR)?\d{11}$/.test(str); + }, + BO: function BO(str) { + return /^(BO)?\d{7}$/.test(str); + }, + BR: function BR(str) { + return /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(str); + }, + CL: function CL(str) { + return /^(CL)?\d{8}-\d{1}$/.test(str); + }, + CO: function CO(str) { + return /^(CO)?\d{10}$/.test(str); + }, + CR: function CR(str) { + return /^(CR)?\d{9,12}$/.test(str); + }, + EC: function EC(str) { + return /^(EC)?\d{13}$/.test(str); + }, + SV: function SV(str) { + return /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(str); + }, + GT: function GT(str) { + return /^(GT)?\d{7}-\d{1}$/.test(str); + }, + HN: function HN(str) { + return /^(HN)?$/.test(str); + }, + MX: function MX(str) { + return /^(MX)?\w{3,4}\d{6}\w{3}$/.test(str); + }, + NI: function NI(str) { + return /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(str); + }, + PA: function PA(str) { + return /^(PA)?$/.test(str); + }, + PY: function PY(str) { + return /^(PY)?\d{6,8}-\d{1}$/.test(str); + }, + PE: function PE(str) { + return /^(PE)?\d{11}$/.test(str); + }, + DO: function DO(str) { + return /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(str); + }, + UY: function UY(str) { + return /^(UY)?\d{12}$/.test(str); + }, + VE: function VE(str) { + return /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(str); + } +}; +function isVAT(str, countryCode) { + assertString(str); + assertString(countryCode); + if (countryCode in vatMatchers) { + return vatMatchers[countryCode](str); + } + throw new Error("Invalid country code: '".concat(countryCode, "'")); +} + +var version = '13.15.26'; +var validator = { + version: version, + toDate: toDate, + toFloat: toFloat, + toInt: toInt, + toBoolean: toBoolean, + equals: equals, + contains: contains, + matches: matches, + isEmail: isEmail, + isURL: isURL, + isMACAddress: isMACAddress, + isIP: isIP, + isIPRange: isIPRange, + isFQDN: isFQDN, + isBoolean: isBoolean, + isIBAN: isIBAN, + isBIC: isBIC, + isAbaRouting: isAbaRouting, + isAlpha: isAlpha, + isAlphaLocales: locales$1, + isAlphanumeric: isAlphanumeric, + isAlphanumericLocales: locales$2, + isNumeric: isNumeric, + isPassportNumber: isPassportNumber, + passportNumberLocales: locales$3, + isPort: isPort, + isLowercase: isLowercase, + isUppercase: isUppercase, + isAscii: isAscii, + isFullWidth: isFullWidth, + isHalfWidth: isHalfWidth, + isVariableWidth: isVariableWidth, + isMultibyte: isMultibyte, + isSemVer: isSemVer, + isSurrogatePair: isSurrogatePair, + isInt: isInt, + isIMEI: isIMEI, + isFloat: isFloat, + isFloatLocales: locales, + isDecimal: isDecimal, + isHexadecimal: isHexadecimal, + isOctal: isOctal, + isDivisibleBy: isDivisibleBy, + isHexColor: isHexColor, + isRgbColor: isRgbColor, + isHSL: isHSL, + isISRC: isISRC, + isMD5: isMD5, + isHash: isHash, + isJWT: isJWT, + isJSON: isJSON, + isEmpty: isEmpty, + isLength: isLength, + isLocale: isLocale, + isByteLength: isByteLength, + isULID: isULID, + isUUID: isUUID, + isMongoId: isMongoId, + isAfter: isAfter, + isBefore: isBefore, + isIn: isIn, + isLuhnNumber: isLuhnNumber, + isCreditCard: isCreditCard, + isIdentityCard: isIdentityCard, + isEAN: isEAN, + isISIN: isISIN, + isISBN: isISBN, + isISSN: isISSN, + isMobilePhone: isMobilePhone, + isMobilePhoneLocales: locales$5, + isPostalCode: isPostalCode, + isPostalCodeLocales: locales$6, + isEthereumAddress: isEthereumAddress, + isCurrency: isCurrency, + isBtcAddress: isBtcAddress, + isISO6346: isISO6346, + isFreightContainerID: isFreightContainerID, + isISO6391: isISO6391, + isISO8601: isISO8601, + isISO15924: isISO15924, + isRFC3339: isRFC3339, + isISO31661Alpha2: isISO31661Alpha2, + isISO31661Alpha3: isISO31661Alpha3, + isISO31661Numeric: isISO31661Numeric, + isISO4217: isISO4217, + isBase32: isBase32, + isBase58: isBase58, + isBase64: isBase64, + isDataURI: isDataURI, + isMagnetURI: isMagnetURI, + isMailtoURI: isMailtoURI, + isMimeType: isMimeType, + isLatLong: isLatLong, + ltrim: ltrim, + rtrim: rtrim, + trim: trim, + escape: escape, + unescape: unescape, + stripLow: stripLow, + whitelist: whitelist, + blacklist: blacklist$1, + isWhitelisted: isWhitelisted, + normalizeEmail: normalizeEmail, + toString: toString, + isSlug: isSlug, + isStrongPassword: isStrongPassword, + isTaxID: isTaxID, + isDate: isDate, + isTime: isTime, + isLicensePlate: isLicensePlate, + isVAT: isVAT, + ibanLocales: locales$4 +}; + +return validator; + +}))); diff --git a/src/hello/server/node_modules/validator/validator.min.js b/src/hello/server/node_modules/validator/validator.min.js new file mode 100644 index 00000000..4c92d3d4 --- /dev/null +++ b/src/hello/server/node_modules/validator/validator.min.js @@ -0,0 +1,23 @@ +/*! + * Copyright (c) 2018 Chris O'Hara + * + * 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. + */ +((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.validator=e()})(this,function(){function f(t){if(null==t)throw new TypeError("Expected a string but received a ".concat(t));if("String"!==t.constructor.name)throw new TypeError("Expected a string but received a ".concat(t.constructor.name))}function r(t){return f(t),t=Date.parse(t),isNaN(t)?null:new Date(t)}function o(t){return null==t}for(var t,n={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/,"ta-IN":/^[\u0B80-\u0BFF]+$/i,"te-IN":/^[\u0C00-\u0C7F]+$/i,"kn-IN":/^[\u0C80-\u0CFF]+$/i,"ml-IN":/^[\u0D00-\u0D7F]+$/i,"gu-IN":/^[\u0A80-\u0AFF]+$/i,"pa-IN":/^[\u0A00-\u0A7F]+$/i,"or-IN":/^[\u0B00-\u0B7F]+$/i},a={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/,"ta-IN":/^[0-9\u0B80-\u0BFF.]+$/i,"te-IN":/^[0-9\u0C00-\u0C7F.]+$/i,"kn-IN":/^[0-9\u0C80-\u0CFF.]+$/i,"ml-IN":/^[0-9\u0D00-\u0D7F.]+$/i,"gu-IN":/^[0-9\u0A80-\u0AFF.]+$/i,"pa-IN":/^[0-9\u0A00-\u0A7F.]+$/i,"or-IN":/^[0-9\u0B00-\u0B7F.]+$/i},i={"en-US":".",ar:"٫"},P=["AU","GB","HK","IN","NZ","ZA","ZM"],e=0;e=e.min)&&(!e.hasOwnProperty("max")||o(e.max)||r<=e.max)&&(!e.hasOwnProperty("lt")||o(e.lt)||re.gt)}n["fr-CA"]=n["fr-FR"],a["fr-CA"]=a["fr-FR"],n["pt-BR"]=n["pt-PT"],a["pt-BR"]=a["pt-PT"],i["pt-BR"]=i["pt-PT"],n["pl-Pl"]=n["pl-PL"],a["pl-Pl"]=a["pl-PL"],i["pl-Pl"]=i["pl-PL"],n["fa-AF"]=n.fa;var Q=Object.keys(i);function j(t){return z(t)?parseFloat(t):NaN}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function A(t,e){return(t=>{if(Array.isArray(t))return t})(t)||((t,e)=>{var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,a=t}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}})(t,e)||tt(t,e)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function q(t){return(t=>{if(Array.isArray(t))return J(t)})(t)||(t=>{if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)})(t)||tt(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tt(t,e){var r;if(t)return"string"==typeof t?J(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(t,e):void 0}function et(t){return"object"===u(t)&&null!==t?t="function"==typeof t.toString?t.toString():"[object Object]":(null==t||isNaN(t)&&!t.length)&&(t=""),String(t)}function $(t,e){var r,n=0$)/g,""),!(t=>{var e=t.replace(/^"(.+)"$/,"$1");if(e.trim()){if(/[\.";<>]/.test(e)){if(e===t)return;if(!(e.split('"').length===e.split('\\"').length))return}return 1}})(r=r.endsWith(" ")?r.slice(0,-1):r))return!1}else if(e.require_display_name)return!1}if(!e.ignore_max_length&&254{for(var r=[],n=Math.max(t.length,e.length),a=0;a=e.min,a=!e.hasOwnProperty("max")||o(e.max)||t<=e.max,i=!e.hasOwnProperty("lt")||o(e.lt)||te.gt;return r.test(t)&&n&&a&&i&&e}var _t=/^[0-9]{15}$/,Ut=/^\d{2}-\d{6}-\d{6}-\d{1}$/;var wt=/^[\x00-\x7F]+$/;var Kt=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;var yt=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;var xt=/[^\x00-\x7F]/;E="i",d=(d=["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"]).join("");var Wt=new RegExp(d,E);var kt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;var Yt={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},Vt=["","-","+"];var zt=/^(0x|0h)?[0-9A-F]+$/i;function Qt(t){return f(t),zt.test(t)}var jt=/^(0o)?[0-7]+$/i;var Jt=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,Xt=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i,qt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]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function ce(t,e){var t=t.replace(/[\s\-]+/gi,"").toUpperCase(),r=t.slice(0,2).toUpperCase(),n=r in R;if(e.whitelist){if(0{var t,e=[];for(t in v)v.hasOwnProperty(t)&&e.push(v[t]);return e})();var L={PL:function(t){f(t);var n={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(null!=t&&11===t.length&&Ht(t,{allow_leading_zeroes:!0})){var e=t.split("").slice(0,-1).reduce(function(t,e,r){return t+Number(e)*n[r+1]},0)%10,t=Number(t.charAt(t.length-1));if(0==e&&0===t||t===10-e)return!0}return!1},ES:function(t){f(t);var e,r={X:0,Y:1,Z:2},t=t.trim().toUpperCase();return!!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(t)&&(e=t.slice(0,-1).replace(/[X,Y,Z]/g,function(t){return r[t]}),t.endsWith(["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][e%23]))},FI:function(t){return f(t),11===t.length&&!!t.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)&&"0123456789ABCDEFHJKLMNPRSTUVWXY"[(1e3*parseInt(t.slice(0,6),10)+parseInt(t.slice(7,10),10))%31]===t.slice(10,11)},IN:function(t){var r,n=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],a=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],t=t.trim();return!!/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/.test(t)&&(r=0,t.replace(/\s/g,"").split("").map(Number).reverse().forEach(function(t,e){r=n[r][a[e%8][t]]}),0===r)},IR:function(t){if(!t.match(/^\d{10}$/))return!1;if(t="0000".concat(t).slice(t.length-6),0===parseInt(t.slice(3,9),10))return!1;for(var e=parseInt(t.slice(9,10),10),r=0,n=0;n<9;n++)r+=parseInt(t.slice(n,n+1),10)*(10-n);return(r%=11)<2&&e===r||2<=r&&e===11-r},IT:function(t){return 9===t.length&&"CA00000AA"!==t&&-1new Date)&&n.getFullYear()===e&&n.getMonth()===r-1&&n.getDate()===t},c=function(t){for(var e=t.substring(0,17),r=0,n=0;n<17;n++)r+=parseInt(e.charAt(n),10)*parseInt(a[n],10);return i[r%11]},u=function(t){return c(t)===t.charAt(17).toUpperCase()};return t=t,!!/^\d{15}|(\d{17}(\d|x|X))$/.test(t)&&(15===t.length?!!/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(e=t)&&(r=e.substring(0,2),!!o(r))&&(r="19".concat(e.substring(6,12)),!!s(r)):!!/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(e=t)&&(r=e.substring(0,2),!!o(r))&&(r=e.substring(6,14),!!s(r))&&u(e))},"zh-HK":function(t){var e=/^[0-9]$/;if(t=(t=t.trim()).toUpperCase(),!/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/.test(t))return!1;8===(t=t.replace(/\[|\]|\(|\)/g,"")).length&&(t="3".concat(t));for(var r=0,n=0;n<=7;n++)r+=(e.test(t[n])?t[n]:(t[n].charCodeAt(0)-55)%11)*(9-n);return(0===(r%=11)?"0":1===r?"A":String(11-r))===t[t.length-1]},"zh-TW":function(t){var a={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},t=t.trim().toUpperCase();return!!/^[A-Z][0-9]{9}$/.test(t)&&Array.from(t).reduce(function(t,e,r){var n;return 0===r?(n=a[e])%10*9+Math.floor(n/10):9===r?(10-t%10-Number(e))%10==0:t+Number(e)*(9-r)},0)},PK:function(t){t=t.trim();return/^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/.test(t)}};var ve=8,Le=14,Me=/^(\d{8}|\d{13}|\d{14})$/;function Be(r){var t=10-r.slice(0,-1).split("").map(function(t,e){return Number(t)*(t=r.length,e=e,t===ve||t===Le?e%2==0?3:1:e%2==0?1:3)}).reduce(function(t,e){return t+e},0)%10;return t<10?t:0}var Fe=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;var Ne=/^(?:[0-9]{9}X|[0-9]{10})$/,Ce=/^(?:[0-9]{13})$/,De=[1,3];function Te(t){for(var e=10,r=0;r{var t,e=[];for(t in Ge)Ge.hasOwnProperty(t)&&e.push.apply(e,q(Ge[t]));return e})().indexOf(t.slice(0,2))},"es-AR":function(t){for(var e=0,r=t.split(""),t=parseInt(r.pop(),10),n=0;na?"".concat(i-1):"".concat(i)).concat(r);else if(r="".concat(i-1).concat(r),a-parseInt(r,10)<100)return!1}if(60?,.\/\\ ]$/,Cr={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};function Dr(t){e={},Array.from(t).forEach(function(t){e[t]?e[t]+=1:e[t]=1});var e,r=e,n={length:t.length,uniqueChars:Object.keys(r).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(r).forEach(function(t){Mr.test(t)?n.uppercaseCount+=r[t]:Br.test(t)?n.lowercaseCount+=r[t]:Fr.test(t)?n.numberCount+=r[t]:Nr.test(t)&&(n.symbolCount+=r[t])}),n}var Tr={AT:function(t){return/^(AT)?U\d{8}$/.test(t)},BE:function(t){return/^(BE)?\d{10}$/.test(t)},BG:function(t){return/^(BG)?\d{9,10}$/.test(t)},HR:function(t){return/^(HR)?\d{11}$/.test(t)},CY:function(t){return/^(CY)?\w{9}$/.test(t)},CZ:function(t){return/^(CZ)?\d{8,10}$/.test(t)},DK:function(t){return/^(DK)?\d{8}$/.test(t)},EE:function(t){return/^(EE)?\d{9}$/.test(t)},FI:function(t){return/^(FI)?\d{8}$/.test(t)},FR:function(t){return/^(FR)([A-Z0-9]{2}\d{9})$/.test(t)},DE:function(t){return/^(DE)?\d{9}$/.test(t)},EL:function(t){return/^(EL)?\d{9}$/.test(t)},HU:function(t){return/^(HU)?\d{8}$/.test(t)},IE:function(t){return/^(IE)?\d{7}\w{1}(W)?$/.test(t)},IT:function(t){return/^(IT)?\d{11}$/.test(t)},LV:function(t){return/^(LV)?\d{11}$/.test(t)},LT:function(t){return/^(LT)?\d{9,12}$/.test(t)},LU:function(t){return/^(LU)?\d{8}$/.test(t)},MT:function(t){return/^(MT)?\d{8}$/.test(t)},NL:function(t){return/^(NL)?\d{9}B\d{2}$/.test(t)},PL:function(t){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(t)},PT:function(t){var e,t=t.match(/^(PT)?(\d{9})$/);return!!t&&(9<(e=11-M((t=t[2]).split("").slice(0,8).map(function(t){return parseInt(t,10)}),9)%11)?0===parseInt(t[8],10):e===parseInt(t[8],10))},RO:function(t){return/^(RO)?\d{2,10}$/.test(t)},SK:function(t){return/^(SK)?\d{10}$/.test(t)},SI:function(t){return/^(SI)?\d{8}$/.test(t)},ES:function(t){return/^(ES)?\w\d{7}[A-Z]$/.test(t)},SE:function(t){return/^(SE)?\d{12}$/.test(t)},AL:function(t){return/^(AL)?\w{9}[A-Z]$/.test(t)},MK:function(t){return/^(MK)?\d{13}$/.test(t)},AU:function(t){if(!t.match(/^(AU)?(\d{11})$/))return!1;for(var e=[10,1,3,5,7,9,11,13,15,17,19],r=(t=t.replace(/^AU/,""),(parseInt(t.slice(0,1),10)-1).toString()+t.slice(1)),n=0,a=0;a<11;a++)n+=e[a]*r.charAt(a);return 0!==n&&n%89==0},BY:function(t){return/^(УНП )?\d{9}$/.test(t)},CA:function(t){return/^(CA)?\d{9}$/.test(t)},IS:function(t){return/^(IS)?\d{5,6}$/.test(t)},IN:function(t){return/^(IN)?\d{15}$/.test(t)},ID:function(t){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(t)},IL:function(t){return/^(IL)?\d{9}$/.test(t)},KZ:function(t){return/^(KZ)?\d{12}$/.test(t)},NZ:function(t){return/^(NZ)?\d{9}$/.test(t)},NG:function(t){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(t)},NO:function(t){return/^(NO)?\d{9}MVA$/.test(t)},PH:function(t){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(t)},RU:function(t){return/^(RU)?(\d{10}|\d{12})$/.test(t)},SM:function(t){return/^(SM)?\d{5}$/.test(t)},SA:function(t){return/^(SA)?\d{15}$/.test(t)},RS:function(t){return/^(RS)?\d{9}$/.test(t)},CH:function(t){var e,n;return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(t)&&(t=t.match(/\d/g).map(function(t){return+t}),e=t.pop(),n=[5,4,3,2,7,6,5,4],e===(11-t.reduce(function(t,e,r){return t+e*n[r]},0)%11)%11)},TR:function(t){return/^(TR)?\d{10}$/.test(t)},UA:function(t){return/^(UA)?\d{12}$/.test(t)},GB:function(t){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(t)},UZ:function(t){return/^(UZ)?\d{9}$/.test(t)},AR:function(t){return/^(AR)?\d{11}$/.test(t)},BO:function(t){return/^(BO)?\d{7}$/.test(t)},BR:function(t){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(t)},CL:function(t){return/^(CL)?\d{8}-\d{1}$/.test(t)},CO:function(t){return/^(CO)?\d{10}$/.test(t)},CR:function(t){return/^(CR)?\d{9,12}$/.test(t)},EC:function(t){return/^(EC)?\d{13}$/.test(t)},SV:function(t){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(t)},GT:function(t){return/^(GT)?\d{7}-\d{1}$/.test(t)},HN:function(t){return/^(HN)?$/.test(t)},MX:function(t){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(t)},NI:function(t){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(t)},PA:function(t){return/^(PA)?$/.test(t)},PY:function(t){return/^(PY)?\d{6,8}-\d{1}$/.test(t)},PE:function(t){return/^(PE)?\d{11}$/.test(t)},DO:function(t){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(t)},UY:function(t){return/^(UY)?\d{12}$/.test(t)},VE:function(t){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(t)}};return{version:"13.15.26",toDate:r,toFloat:j,toInt:function(t,e){return f(t),parseInt(t,e||10)},toBoolean:function(t,e){return f(t),e?"1"===t||/^true$/i.test(t):"0"!==t&&!/^false$/i.test(t)&&""!==t},equals:function(t,e){return f(t),t===e},contains:function(t,e,r){return f(t),(r=$(r,rt)).ignoreCase?t.toLowerCase().split(et(e).toLowerCase()).length>r.minOccurrences:t.split(et(e)).length>r.minOccurrences},matches:function(t,e,r){return f(t),"[object RegExp]"!==Object.prototype.toString.call(e)&&(e=new RegExp(e,r)),!!t.match(e)},isEmail:$t,isURL:function(e,r){if(f(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((r=$(r,pt)).validate_length&&e.length>r.max_allowed_length)return!1;if(!r.allow_fragments&&S(e,"#"))return!1;if(!r.allow_query_components&&(S(e,"?")||S(e,"&")))return!1;function t(t){return s=!0,n=t.toLowerCase(),(!r.require_valid_protocol||-1!==r.protocols.indexOf(n))&&e.substring(o[0].length)}var n,a,i=e.split("#"),o=(e=(i=(e=i.shift()).split("?")).shift()).match(/^([a-z][a-z0-9+\-.]*):/i),s=!1;if(o){var c=o[1],u=e.substring(o[0].length);if("//"===u.slice(0,2)){if(!1===(e=t(c)))return!1}else{var l=u.indexOf("/"),l=-1===l?u:u.substring(0,l),d=l.indexOf("@");if(-1!==d){var l=l.substring(0,d),d=/^[a-zA-Z0-9\-_.%:]*$/.test(l),l=/%[0-9a-fA-F]{2}/.test(l);if(d&&!l){if(r.require_protocol)return!1}else if(!1===(e=t(c)))return!1}else if(/^[0-9]/.test(u)){if(r.require_protocol)return!1}else if(!1===(e=t(c)))return!1}}else if(r.require_protocol)return!1;if("//"===e.slice(0,2)){if(!s&&!r.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(""===e)return!1;if(""===(e=(i=e.split("/")).shift())&&!r.require_host)return!0;if(1<(i=e.split("@")).length){if(r.disallow_auth)return!1;if(""===i[0])return!1;if(0<=(d=i.shift()).indexOf(":")&&2{var e=new Set(["subject","body","cc","bcc"]),r={cc:"",bcc:""},n=!1;if(4<(t=t.split("&")).length)return!1;var a,i=X(t);try{for(i.s();!(a=i.n()).done;){var o=A(a.value.split("="),2),s=o[0],c=o[1];if(s&&!e.has(s)){n=!0;break}!c||"cc"!==s&&"bcc"!==s||(r[s]=c),s&&e.delete(s)}}catch(t){i.e(t)}finally{i.f()}return!n&&r})(t))&&"".concat(r,",").concat(t.cc,",").concat(t.bcc).split(",").every(function(t){return!(t=cr(t," "))||$t(t,e)}))},isMimeType:function(t){return f(t),ur.test(t)||lr.test(t)||dr.test(t)},isLatLong:function(t,e){return f(t),e=$(e,hr),!!S(t,",")&&!((t=t.split(","))[0].startsWith("(")&&!t[1].endsWith(")")||t[1].endsWith(")")&&!t[0].startsWith("("))&&(e.checkDMS?$r.test(t[0])&&pr.test(t[1]):fr.test(t[0])&&Ar.test(t[1]))},ltrim:sr,rtrim:or,trim:cr,escape:function(t){return f(t),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")},unescape:function(t){return f(t),t.replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/\/g,"\\").replace(/`/g,"`").replace(/&/g,"&")},stripLow:function(t,e){return f(t),Sr(t,e?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F")},whitelist:function(t,e){return f(t),t.replace(new RegExp("[^".concat(e,"]+"),"g"),"")},blacklist:Sr,isWhitelisted:function(t,e){f(t);for(var r=t.length-1;0<=r;r--)if(-1===e.indexOf(t[r]))return!1;return!0},normalizeEmail:function(t,e){e=$(e,mr);var r=(t=t.split("@")).pop();if((t=[t.join("@"),r])[1]=t[1].toLowerCase(),"gmail.com"===t[1]||"googlemail.com"===t[1]){if(e.gmail_remove_subaddress&&(t[0]=t[0].split("+")[0]),e.gmail_remove_dots&&(t[0]=t[0].replace(/\.+/g,vr)),!t[0].length)return!1;(e.all_lowercase||e.gmail_lowercase)&&(t[0]=t[0].toLowerCase()),t[1]=e.gmail_convert_googlemaildotcom?"gmail.com":t[1]}else if(0<=Zr.indexOf(t[1])){if(e.icloud_remove_subaddress&&(t[0]=t[0].split("+")[0]),!t[0].length)return!1;(e.all_lowercase||e.icloud_lowercase)&&(t[0]=t[0].toLowerCase())}else if(0<=Er.indexOf(t[1])){if(e.outlookdotcom_remove_subaddress&&(t[0]=t[0].split("+")[0]),!t[0].length)return!1;(e.all_lowercase||e.outlookdotcom_lowercase)&&(t[0]=t[0].toLowerCase())}else if(0<=Ir.indexOf(t[1])){if(e.yahoo_remove_subaddress&&(r=t[0].split("-"),t[0]=1=a.minLength&&t.lowercaseCount>=a.minLowercase&&t.uppercaseCount>=a.minUppercase&&t.numberCount>=a.minNumbers&&t.symbolCount>=a.minSymbols},isTaxID:function(t){var e=1 [sheetname]') + .option('-f, --file ', 'use specified workbook') + .option('-s, --sheet ', 'print specified sheet (default first sheet)') + .option('-N, --sheet-index ', 'use specified sheet index (0-based)') + .option('-p, --password ', 'if file is encrypted, try with specified pw') + .option('-l, --list-sheets', 'list sheet names and exit') + .option('-o, --output ', 'output to specified file') + + .option('-B, --xlsb', 'emit XLSB to or .xlsb') + .option('-M, --xlsm', 'emit XLSM to or .xlsm') + .option('-X, --xlsx', 'emit XLSX to or .xlsx') + .option('-I, --xlam', 'emit XLAM to or .xlam') + .option('-Y, --ods', 'emit ODS to or .ods') + .option('-8, --xls', 'emit XLS to or .xls (BIFF8)') + .option('-5, --biff5','emit XLS to or .xls (BIFF5)') + .option('-4, --biff4','emit XLS to or .xls (BIFF4)') + .option('-3, --biff3','emit XLS to or .xls (BIFF3)') + .option('-2, --biff2','emit XLS to or .xls (BIFF2)') + .option('-i, --xla', 'emit XLA to or .xla') + .option('-6, --xlml', 'emit SSML to or .xls (2003 XML)') + .option('-T, --fods', 'emit FODS to or .fods (Flat ODS)') + .option('--wk3', 'emit WK3 to or .txt (Lotus WK3)') + .option('--numbers', 'emit NUMBERS to or .numbers') + + .option('-S, --formulae', 'emit list of values and formulae') + .option('-j, --json', 'emit formatted JSON (all fields text)') + .option('-J, --raw-js', 'emit raw JS object (raw numbers)') + .option('-A, --arrays', 'emit rows as JS objects (raw numbers)') + .option('-H, --html', 'emit HTML to or .html') + .option('-D, --dif', 'emit DIF to or .dif (Lotus DIF)') + .option('-U, --dbf', 'emit DBF to or .dbf (MSVFP DBF)') + .option('-K, --sylk', 'emit SYLK to or .slk (Excel SYLK)') + .option('-P, --prn', 'emit PRN to or .prn (Lotus PRN)') + .option('-E, --eth', 'emit ETH to or .eth (Ethercalc)') + .option('-t, --txt', 'emit TXT to or .txt (UTF-8 TSV)') + .option('-r, --rtf', 'emit RTF to or .txt (Table RTF)') + .option('--wk1', 'emit WK1 to or .txt (Lotus WK1)') + .option('-z, --dump', 'dump internal representation as JSON') + .option('--props', 'dump workbook properties as CSV') + + .option('-F, --field-sep ', 'CSV field separator', ",") + .option('-R, --row-sep ', 'CSV row separator', "\n") + .option('-n, --sheet-rows ', 'Number of rows to process (0=all rows)') + .option('--codepage ', 'default to specified codepage when ambiguous') + .option('--req ', 'require module before processing') + .option('--sst', 'generate shared string table for XLS* formats') + .option('--compress', 'use compression when writing XLSX/M/B and ODS') + .option('--read', 'read but do not generate output') + .option('--book', 'for single-sheet formats, emit a file per worksheet') + .option('--all', 'parse everything; write as much as possible') + .option('--dev', 'development mode') + .option('--sparse', 'sparse mode') + .option('-q, --quiet', 'quiet mode'); + +program.on('--help', function() { + console.log(' Default output format is CSV'); + console.log(' Support email: dev@sheetjs.com'); + console.log(' Web Demo: http://oss.sheetjs.com/js-'+n+'/'); +}); + +/* flag, bookType, default ext */ +var workbook_formats = [ + ['xlsx', 'xlsx', 'xlsx'], + ['xlsm', 'xlsm', 'xlsm'], + ['xlam', 'xlam', 'xlam'], + ['xlsb', 'xlsb', 'xlsb'], + ['xls', 'xls', 'xls'], + ['xla', 'xla', 'xla'], + ['biff5', 'biff5', 'xls'], + ['numbers', 'numbers', 'numbers'], + ['ods', 'ods', 'ods'], + ['fods', 'fods', 'fods'], + ['wk3', 'wk3', 'wk3'] +]; +var wb_formats_2 = [ + ['xlml', 'xlml', 'xls'] +]; +program.parse(process.argv); + +var filename = '', sheetname = ''; +if(program.args[0]) { + filename = program.args[0]; + if(program.args[1]) sheetname = program.args[1]; +} +if(program.sheet) sheetname = program.sheet; +if(program.file) filename = program.file; + +if(!filename) { + console.error(n + ": must specify a filename"); + process.exit(1); +} +if(!fs.existsSync(filename)) { + console.error(n + ": " + filename + ": No such file or directory"); + process.exit(2); +} + +if(program.req) program.req.split(",").forEach(function(r) { + require((fs.existsSync(r) || fs.existsSync(r + '.js')) ? require('path').resolve(r) : r); +}); + +var opts = {}, wb/*:?Workbook*/; +if(program.listSheets) opts.bookSheets = true; +if(program.sheetRows) opts.sheetRows = program.sheetRows; +if(program.password) opts.password = program.password; +var seen = false; +function wb_fmt() { + seen = true; + opts.cellFormula = true; + opts.cellNF = true; + opts.xlfn = true; + if(program.output) sheetname = program.output; +} +function isfmt(m/*:string*/)/*:boolean*/ { + if(!program.output) return false; + var t = m.charAt(0) === "." ? m : "." + m; + return program.output.slice(-t.length) === t; +} +workbook_formats.forEach(function(m) { if(program[m[0]] || isfmt(m[0])) { wb_fmt(); } }); +wb_formats_2.forEach(function(m) { if(program[m[0]] || isfmt(m[0])) { wb_fmt(); } }); +if(seen) { +} else if(program.formulae) opts.cellFormula = true; +else opts.cellFormula = false; + +var wopts = ({WTF:opts.WTF, bookSST:program.sst}/*:any*/); +if(program.compress) wopts.compression = true; + +if(program.all) { + opts.cellFormula = true; + opts.bookVBA = true; + opts.cellNF = true; + opts.cellHTML = true; + opts.cellStyles = true; + opts.sheetStubs = true; + opts.cellDates = true; + wopts.cellFormula = true; + wopts.cellStyles = true; + wopts.sheetStubs = true; + wopts.bookVBA = true; +} +if(program.sparse) opts.dense = false; else opts.dense = true; +if(program.codepage) opts.codepage = +program.codepage; + +if(program.dev) { + opts.WTF = true; + wb = X.readFile(filename, opts); +} else try { + wb = X.readFile(filename, opts); +} catch(e) { + var msg = (program.quiet) ? "" : n + ": error parsing "; + msg += filename + ": " + e; + console.error(msg); + process.exit(3); +} +if(program.read) process.exit(0); +if(!wb) { console.error(n + ": error parsing " + filename + ": empty workbook"); process.exit(0); } +/*:: if(!wb) throw new Error("unreachable"); */ +if(program.listSheets) { + console.log((wb.SheetNames||[]).join("\n")); + process.exit(0); +} +if(program.dump) { + console.log(JSON.stringify(wb)); + process.exit(0); +} +if(program.props) { + if(wb) dump_props(wb); + process.exit(0); +} + +/* full workbook formats */ +workbook_formats.forEach(function(m) { if(program[m[0]] || isfmt(m[0])) { + wopts.bookType = m[1]; + if(wopts.bookType == "numbers") try { + var XLSX_ZAHL = require("../dist/xlsx.zahl"); + wopts.numbers = XLSX_ZAHL; + } catch(e) {} + if(wb) X.writeFile(wb, program.output || sheetname || ((filename || "") + "." + m[2]), wopts); + process.exit(0); +} }); + +wb_formats_2.forEach(function(m) { if(program[m[0]] || isfmt(m[0])) { + wopts.bookType = m[1]; + if(wb) X.writeFile(wb, program.output || sheetname || ((filename || "") + "." + m[2]), wopts); + process.exit(0); +} }); + +var target_sheet = sheetname || ''; +if(target_sheet === '') { + if(+program.sheetIndex < (wb.SheetNames||[]).length) target_sheet = wb.SheetNames[+program.sheetIndex]; + else target_sheet = (wb.SheetNames||[""])[0]; +} + +var ws; +try { + ws = wb.Sheets[target_sheet]; + if(!ws) { + console.error("Sheet " + target_sheet + " cannot be found"); + process.exit(3); + } +} catch(e) { + console.error(n + ": error parsing "+filename+" "+target_sheet+": " + e); + process.exit(4); +} + +if(!program.quiet && !program.book) console.error(target_sheet); + +/* single worksheet file formats */ +[ + ['biff2', '.xls'], + ['biff3', '.xls'], + ['biff4', '.xls'], + ['sylk', '.slk'], + ['html', '.html'], + ['prn', '.prn'], + ['eth', '.eth'], + ['rtf', '.rtf'], + ['txt', '.txt'], + ['dbf', '.dbf'], + ['wk1', '.wk1'], + ['dif', '.dif'] +].forEach(function(m) { if(program[m[0]] || isfmt(m[1])) { + wopts.bookType = m[0]; + if(program.book) { + /*:: if(wb == null) throw new Error("Unreachable"); */ + wb.SheetNames.forEach(function(n, i) { + wopts.sheet = n; + X.writeFile(wb, (program.output || sheetname || filename || "") + m[1] + "." + i, wopts); + }); + } else X.writeFile(wb, program.output || sheetname || ((filename || "") + m[1]), wopts); + process.exit(0); +} }); + +function outit(o, fn) { if(fn) fs.writeFileSync(fn, o); else console.log(o); } + +function doit(cb) { + /*:: if(!wb) throw new Error("unreachable"); */ + if(program.book) wb.SheetNames.forEach(function(n, i) { + /*:: if(!wb) throw new Error("unreachable"); */ + outit(cb(wb.Sheets[n]), (program.output || sheetname || filename) + "." + i); + }); + else outit(cb(ws), program.output); +} + +var jso = {}; +switch(true) { + case program.formulae: + doit(function(ws) { return X.utils.sheet_to_formulae(ws).join("\n"); }); + break; + + case program.arrays: jso.header = 1; + /* falls through */ + case program.rawJs: jso.raw = true; + /* falls through */ + case program.json: + doit(function(ws) { return JSON.stringify(X.utils.sheet_to_json(ws,jso)); }); + break; + + default: + if(!program.book) { + var stream = X.stream.to_csv(ws, {FS:program.fieldSep||",", RS:program.rowSep||"\n"}); + if(program.output) stream.pipe(fs.createWriteStream(program.output)); + else stream.pipe(process.stdout); + } else doit(function(ws) { return X.utils.sheet_to_csv(ws,{FS:program.fieldSep, RS:program.rowSep}); }); + break; +} + +function dump_props(wb/*:Workbook*/) { + var propaoa = []; + if(Object.assign && Object.entries) propaoa = Object.entries(Object.assign({}, wb.Props, wb.Custprops)); + else { + var Keys/*:: :Array = []*/, pi; + if(wb.Props) { + Keys = Object.keys(wb.Props); + for(pi = 0; pi < Keys.length; ++pi) { + if(Object.prototype.hasOwnProperty.call(Keys, Keys[pi])) propaoa.push([Keys[pi], Keys[/*::+*/Keys[pi]]]); + } + } + if(wb.Custprops) { + Keys = Object.keys(wb.Custprops); + for(pi = 0; pi < Keys.length; ++pi) { + if(Object.prototype.hasOwnProperty.call(Keys, Keys[pi])) propaoa.push([Keys[pi], Keys[/*::+*/Keys[pi]]]); + } + } + } + console.log(X.utils.sheet_to_csv(X.utils.aoa_to_sheet(propaoa))); +} diff --git a/src/hello/backend/node_modules/xlsx/bower.json b/src/hello/server/node_modules/xlsx/bower.json similarity index 100% rename from src/hello/backend/node_modules/xlsx/bower.json rename to src/hello/server/node_modules/xlsx/bower.json diff --git a/src/hello/backend/node_modules/xlsx/dist/LICENSE b/src/hello/server/node_modules/xlsx/dist/LICENSE similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/LICENSE rename to src/hello/server/node_modules/xlsx/dist/LICENSE diff --git a/src/hello/backend/node_modules/xlsx/dist/cpexcel.full.mjs b/src/hello/server/node_modules/xlsx/dist/cpexcel.full.mjs similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/cpexcel.full.mjs rename to src/hello/server/node_modules/xlsx/dist/cpexcel.full.mjs diff --git a/src/hello/backend/node_modules/xlsx/dist/cpexcel.js b/src/hello/server/node_modules/xlsx/dist/cpexcel.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/cpexcel.js rename to src/hello/server/node_modules/xlsx/dist/cpexcel.js diff --git a/src/hello/backend/node_modules/xlsx/dist/shim.min.js b/src/hello/server/node_modules/xlsx/dist/shim.min.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/shim.min.js rename to src/hello/server/node_modules/xlsx/dist/shim.min.js diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.core.min.js b/src/hello/server/node_modules/xlsx/dist/xlsx.core.min.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.core.min.js rename to src/hello/server/node_modules/xlsx/dist/xlsx.core.min.js diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.core.min.map b/src/hello/server/node_modules/xlsx/dist/xlsx.core.min.map similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.core.min.map rename to src/hello/server/node_modules/xlsx/dist/xlsx.core.min.map diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.extendscript.js b/src/hello/server/node_modules/xlsx/dist/xlsx.extendscript.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.extendscript.js rename to src/hello/server/node_modules/xlsx/dist/xlsx.extendscript.js diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.full.min.js b/src/hello/server/node_modules/xlsx/dist/xlsx.full.min.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.full.min.js rename to src/hello/server/node_modules/xlsx/dist/xlsx.full.min.js diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.full.min.map b/src/hello/server/node_modules/xlsx/dist/xlsx.full.min.map similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.full.min.map rename to src/hello/server/node_modules/xlsx/dist/xlsx.full.min.map diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.mini.min.js b/src/hello/server/node_modules/xlsx/dist/xlsx.mini.min.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.mini.min.js rename to src/hello/server/node_modules/xlsx/dist/xlsx.mini.min.js diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.mini.min.map b/src/hello/server/node_modules/xlsx/dist/xlsx.mini.min.map similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.mini.min.map rename to src/hello/server/node_modules/xlsx/dist/xlsx.mini.min.map diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.zahl.js b/src/hello/server/node_modules/xlsx/dist/xlsx.zahl.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.zahl.js rename to src/hello/server/node_modules/xlsx/dist/xlsx.zahl.js diff --git a/src/hello/backend/node_modules/xlsx/dist/xlsx.zahl.mjs b/src/hello/server/node_modules/xlsx/dist/xlsx.zahl.mjs similarity index 100% rename from src/hello/backend/node_modules/xlsx/dist/xlsx.zahl.mjs rename to src/hello/server/node_modules/xlsx/dist/xlsx.zahl.mjs diff --git a/src/hello/backend/node_modules/xlsx/formats.png b/src/hello/server/node_modules/xlsx/formats.png similarity index 100% rename from src/hello/backend/node_modules/xlsx/formats.png rename to src/hello/server/node_modules/xlsx/formats.png diff --git a/src/hello/backend/node_modules/xlsx/legend.png b/src/hello/server/node_modules/xlsx/legend.png similarity index 100% rename from src/hello/backend/node_modules/xlsx/legend.png rename to src/hello/server/node_modules/xlsx/legend.png diff --git a/src/hello/backend/node_modules/xlsx/package.json b/src/hello/server/node_modules/xlsx/package.json similarity index 100% rename from src/hello/backend/node_modules/xlsx/package.json rename to src/hello/server/node_modules/xlsx/package.json diff --git a/src/hello/backend/node_modules/xlsx/types/index.d.ts b/src/hello/server/node_modules/xlsx/types/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/xlsx/types/index.d.ts rename to src/hello/server/node_modules/xlsx/types/index.d.ts diff --git a/src/hello/backend/node_modules/xlsx/types/tsconfig.json b/src/hello/server/node_modules/xlsx/types/tsconfig.json similarity index 100% rename from src/hello/backend/node_modules/xlsx/types/tsconfig.json rename to src/hello/server/node_modules/xlsx/types/tsconfig.json diff --git a/src/hello/backend/node_modules/xlsx/xlsx.js b/src/hello/server/node_modules/xlsx/xlsx.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/xlsx.js rename to src/hello/server/node_modules/xlsx/xlsx.js diff --git a/src/hello/backend/node_modules/xlsx/xlsx.mjs b/src/hello/server/node_modules/xlsx/xlsx.mjs similarity index 100% rename from src/hello/backend/node_modules/xlsx/xlsx.mjs rename to src/hello/server/node_modules/xlsx/xlsx.mjs diff --git a/src/hello/backend/node_modules/xlsx/xlsxworker.js b/src/hello/server/node_modules/xlsx/xlsxworker.js similarity index 100% rename from src/hello/backend/node_modules/xlsx/xlsxworker.js rename to src/hello/server/node_modules/xlsx/xlsxworker.js diff --git a/src/hello/server/node_modules/xtend/.jshintrc b/src/hello/server/node_modules/xtend/.jshintrc new file mode 100644 index 00000000..77887b5f --- /dev/null +++ b/src/hello/server/node_modules/xtend/.jshintrc @@ -0,0 +1,30 @@ +{ + "maxdepth": 4, + "maxstatements": 200, + "maxcomplexity": 12, + "maxlen": 80, + "maxparams": 5, + + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": false, + "noarg": true, + "noempty": true, + "nonew": true, + "undef": true, + "unused": "vars", + "trailing": true, + + "quotmark": true, + "expr": true, + "asi": true, + + "browser": false, + "esnext": true, + "devel": false, + "node": false, + "nonstandard": false, + + "predef": ["require", "module", "__dirname", "__filename"] +} diff --git a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/LICENSE b/src/hello/server/node_modules/xtend/LICENSE similarity index 89% rename from src/hello/backend/node_modules/finalhandler/node_modules/statuses/LICENSE rename to src/hello/server/node_modules/xtend/LICENSE index 28a31618..0099f4f6 100644 --- a/src/hello/backend/node_modules/finalhandler/node_modules/statuses/LICENSE +++ b/src/hello/server/node_modules/xtend/LICENSE @@ -1,8 +1,5 @@ - The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2016 Douglas Christopher Wilson +Copyright (c) 2012-2014 Raynos. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/hello/server/node_modules/xtend/README.md b/src/hello/server/node_modules/xtend/README.md new file mode 100644 index 00000000..4a2703cf --- /dev/null +++ b/src/hello/server/node_modules/xtend/README.md @@ -0,0 +1,32 @@ +# xtend + +[![browser support][3]][4] + +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. + +## Examples + +```js +var extend = require("xtend") + +// extend returns a new object. Does not mutate arguments +var combination = extend({ + a: "a", + b: "c" +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + +## Stability status: Locked + +## MIT Licensed + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/src/hello/server/node_modules/xtend/immutable.js b/src/hello/server/node_modules/xtend/immutable.js new file mode 100644 index 00000000..94889c9d --- /dev/null +++ b/src/hello/server/node_modules/xtend/immutable.js @@ -0,0 +1,19 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/src/hello/server/node_modules/xtend/mutable.js b/src/hello/server/node_modules/xtend/mutable.js new file mode 100644 index 00000000..72debede --- /dev/null +++ b/src/hello/server/node_modules/xtend/mutable.js @@ -0,0 +1,17 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/src/hello/server/node_modules/xtend/package.json b/src/hello/server/node_modules/xtend/package.json new file mode 100644 index 00000000..f7a39d10 --- /dev/null +++ b/src/hello/server/node_modules/xtend/package.json @@ -0,0 +1,55 @@ +{ + "name": "xtend", + "version": "4.0.2", + "description": "extend like a boss", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" + ], + "author": "Raynos ", + "repository": "git://github.com/Raynos/xtend.git", + "main": "immutable", + "scripts": { + "test": "node test" + }, + "dependencies": {}, + "devDependencies": { + "tape": "~1.1.0" + }, + "homepage": "https://github.com/Raynos/xtend", + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" + }, + "license": "MIT", + "testling": { + "files": "test.js", + "browsers": [ + "ie/7..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "engines": { + "node": ">=0.4" + } +} diff --git a/src/hello/server/node_modules/xtend/test.js b/src/hello/server/node_modules/xtend/test.js new file mode 100644 index 00000000..b895b42b --- /dev/null +++ b/src/hello/server/node_modules/xtend/test.js @@ -0,0 +1,103 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) + +test("null prototype", function(assert) { + var a = { a: "foo" } + var b = Object.create(null) + b.b = "bar"; + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("null prototype mutable", function (assert) { + var a = { foo: "bar" } + var b = Object.create(null) + b.bar = "baz"; + + mutableExtend(a, b) + + assert.equal(a.bar, "baz") + assert.end() +}) + +test("prototype pollution", function (assert) { + var a = {} + var maliciousPayload = '{"__proto__":{"oops":"It works!"}}' + + assert.strictEqual(a.oops, undefined) + extend({}, maliciousPayload) + assert.strictEqual(a.oops, undefined) + assert.end() +}) + +test("prototype pollution mutable", function (assert) { + var a = {} + var maliciousPayload = '{"__proto__":{"oops":"It works!"}}' + + assert.strictEqual(a.oops, undefined) + mutableExtend({}, maliciousPayload) + assert.strictEqual(a.oops, undefined) + assert.end() +}) diff --git a/src/hello/backend/node_modules/yocto-queue/index.d.ts b/src/hello/server/node_modules/yocto-queue/index.d.ts similarity index 100% rename from src/hello/backend/node_modules/yocto-queue/index.d.ts rename to src/hello/server/node_modules/yocto-queue/index.d.ts diff --git a/src/hello/backend/node_modules/yocto-queue/index.js b/src/hello/server/node_modules/yocto-queue/index.js similarity index 100% rename from src/hello/backend/node_modules/yocto-queue/index.js rename to src/hello/server/node_modules/yocto-queue/index.js diff --git a/src/hello/backend/node_modules/yocto-queue/license b/src/hello/server/node_modules/yocto-queue/license similarity index 100% rename from src/hello/backend/node_modules/yocto-queue/license rename to src/hello/server/node_modules/yocto-queue/license diff --git a/src/hello/backend/node_modules/yocto-queue/package.json b/src/hello/server/node_modules/yocto-queue/package.json similarity index 100% rename from src/hello/backend/node_modules/yocto-queue/package.json rename to src/hello/server/node_modules/yocto-queue/package.json diff --git a/src/hello/backend/node_modules/yocto-queue/readme.md b/src/hello/server/node_modules/yocto-queue/readme.md similarity index 100% rename from src/hello/backend/node_modules/yocto-queue/readme.md rename to src/hello/server/node_modules/yocto-queue/readme.md diff --git a/src/hello/backend/package-lock.json b/src/hello/server/package-lock.json similarity index 76% rename from src/hello/backend/package-lock.json rename to src/hello/server/package-lock.json index 275e87da..383ff5ce 100644 --- a/src/hello/backend/package-lock.json +++ b/src/hello/server/package-lock.json @@ -10,15 +10,20 @@ "license": "MIT", "dependencies": { "axios": "^1.13.2", + "bcrypt": "^6.0.0", "bcryptjs": "^3.0.3", "child_process": "^1.0.2", + "cors": "^2.8.5", "dotenv": "^16.3.1", - "express": "^4.18.2", + "express": "^4.22.1", + "express-validator": "^7.3.1", "jsonwebtoken": "^9.0.2", + "multer": "^2.0.2", "mysql": "^2.18.1", "mysql2": "^3.15.3", "nodemailer": "^7.0.11", - "uuid": "^13.0.0" + "uuid": "^13.0.0", + "xlsx": "^0.18.5" }, "devDependencies": { "eslint": "^8.45.0", @@ -27,10 +32,11 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmmirror.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "version": "4.9.1", + "resolved": "https://registry.npmmirror.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -49,6 +55,7 @@ "resolved": "https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -58,6 +65,7 @@ "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -81,6 +89,7 @@ "resolved": "https://registry.npmmirror.com/@eslint/js/-/js-8.57.1.tgz", "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -91,6 +100,7 @@ "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, + "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", @@ -105,6 +115,7 @@ "resolved": "https://registry.npmmirror.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -118,13 +129,15 @@ "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "deprecated": "Use @eslint/object-schema instead", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -138,6 +151,7 @@ "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } @@ -147,6 +161,7 @@ "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -159,12 +174,14 @@ "version": "1.3.0", "resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -178,6 +195,7 @@ "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, + "license": "MIT", "peer": true, "bin": { "acorn": "bin/acorn" @@ -191,15 +209,26 @@ "resolved": "https://registry.npmmirror.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/adler-32": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz", + "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -216,6 +245,7 @@ "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -225,6 +255,7 @@ "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -240,6 +271,7 @@ "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -248,26 +280,36 @@ "node": ">= 8" } }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/aws-ssl-profiles": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "license": "MIT", "engines": { "node": ">= 6.0.0" } @@ -276,6 +318,7 @@ "version": "1.13.2", "resolved": "https://registry.npmmirror.com/axios/-/axios-1.13.2.tgz", "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", @@ -286,12 +329,28 @@ "version": "1.0.2", "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/bcrypt": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/bcrypt/-/bcrypt-6.0.0.tgz", + "integrity": "sha512-cU8v/EGSrnH+HnxV2z0J7/blxH8gq7Xh2JFT6Aroax7UohdmiJJlxApMxtKfuI7z68NvvVcmR78k2LbT6efhRg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^8.3.0", + "node-gyp-build": "^4.8.4" + }, + "engines": { + "node": ">= 18" + } }, "node_modules/bcryptjs": { "version": "3.0.3", "resolved": "https://registry.npmmirror.com/bcryptjs/-/bcryptjs-3.0.3.tgz", "integrity": "sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==", + "license": "BSD-3-Clause", "bin": { "bcrypt": "bin/bcrypt" } @@ -300,6 +359,7 @@ "version": "9.0.0", "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.0.0.tgz", "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "license": "MIT", "engines": { "node": "*" } @@ -309,6 +369,7 @@ "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -317,22 +378,23 @@ } }, "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "version": "1.20.4", + "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "license": "MIT", "dependencies": { - "bytes": "3.1.2", + "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", "type-is": "~1.6.18", - "unpipe": "1.0.0" + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8", @@ -343,6 +405,7 @@ "version": "2.6.9", "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -350,13 +413,15 @@ "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.12.tgz", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -367,6 +432,7 @@ "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -377,12 +443,31 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -391,6 +476,7 @@ "version": "1.0.2", "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -403,6 +489,7 @@ "version": "1.0.4", "resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.4.tgz", "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" @@ -419,15 +506,30 @@ "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/cfb": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz", + "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", + "license": "Apache-2.0", + "dependencies": { + "adler-32": "~1.3.0", + "crc-32": "~1.2.0" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -441,7 +543,7 @@ }, "node_modules/child_process": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/child_process/-/child_process-1.0.2.tgz", "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==", "license": "ISC" }, @@ -450,6 +552,7 @@ "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -474,6 +577,7 @@ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -481,11 +585,21 @@ "node": ">= 6" } }, + "node_modules/codepage": { + "version": "1.15.0", + "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz", + "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -497,12 +611,14 @@ "version": "1.1.4", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -514,12 +630,43 @@ "version": "0.0.1", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -531,33 +678,63 @@ "version": "1.0.5", "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "version": "0.7.2", + "resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmmirror.com/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -572,6 +749,7 @@ "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.1.3" }, @@ -588,12 +766,14 @@ "version": "0.1.4", "resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -602,6 +782,7 @@ "version": "2.1.0", "resolved": "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz", "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "license": "Apache-2.0", "engines": { "node": ">=0.10" } @@ -610,6 +791,7 @@ "version": "2.0.0", "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -618,6 +800,7 @@ "version": "1.2.0", "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -628,6 +811,7 @@ "resolved": "https://registry.npmmirror.com/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -639,6 +823,7 @@ "version": "16.6.1", "resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-16.6.1.tgz", "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -650,6 +835,7 @@ "version": "1.0.1", "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -663,6 +849,7 @@ "version": "1.0.11", "resolved": "https://registry.npmmirror.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } @@ -670,12 +857,14 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -684,6 +873,7 @@ "version": "1.0.1", "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -692,6 +882,7 @@ "version": "1.3.0", "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -700,6 +891,7 @@ "version": "1.1.1", "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, @@ -711,6 +903,7 @@ "version": "2.1.0", "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", @@ -724,13 +917,15 @@ "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -744,6 +939,7 @@ "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -800,6 +996,7 @@ "resolved": "https://registry.npmmirror.com/eslint-config-google/-/eslint-config-google-0.14.0.tgz", "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=0.10.0" }, @@ -812,6 +1009,7 @@ "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -828,6 +1026,7 @@ "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -840,6 +1039,7 @@ "resolved": "https://registry.npmmirror.com/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -853,10 +1053,11 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "version": "1.7.0", + "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -869,6 +1070,7 @@ "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -881,6 +1083,7 @@ "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -890,6 +1093,7 @@ "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -898,43 +1102,45 @@ "version": "1.8.1", "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/express": { - "version": "4.21.2", - "resolved": "https://registry.npmmirror.com/express/-/express-4.21.2.tgz", - "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "version": "4.22.1", + "resolved": "https://registry.npmmirror.com/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", "merge-descriptors": "1.0.3", "methods": "~1.1.2", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", + "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.13.0", + "qs": "~6.14.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", + "send": "~0.19.0", + "serve-static": "~1.16.2", "setprototypeof": "1.2.0", - "statuses": "2.0.1", + "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -947,10 +1153,24 @@ "url": "https://opencollective.com/express" } }, + "node_modules/express-validator": { + "version": "7.3.1", + "resolved": "https://registry.npmmirror.com/express-validator/-/express-validator-7.3.1.tgz", + "integrity": "sha512-IGenaSf+DnWc69lKuqlRE9/i/2t5/16VpH5bXoqdxWz1aCpRvEdrBuu1y95i/iL5QP8ZYVATiwLFhwk3EDl5vg==", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21", + "validator": "~13.15.23" + }, + "engines": { + "node": ">= 8.0.0" + } + }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -958,31 +1178,36 @@ "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmmirror.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "version": "1.20.1", + "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -992,6 +1217,7 @@ "resolved": "https://registry.npmmirror.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -1004,6 +1230,7 @@ "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1012,16 +1239,17 @@ } }, "node_modules/finalhandler": { - "version": "1.3.1", - "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.3.1.tgz", - "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "statuses": "2.0.1", + "statuses": "~2.0.2", "unpipe": "~1.0.0" }, "engines": { @@ -1032,6 +1260,7 @@ "version": "2.6.9", "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -1039,13 +1268,15 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1062,6 +1293,7 @@ "resolved": "https://registry.npmmirror.com/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.3", @@ -1075,7 +1307,8 @@ "version": "3.3.3", "resolved": "https://registry.npmmirror.com/flatted/-/flatted-3.3.3.tgz", "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/follow-redirects": { "version": "1.15.11", @@ -1087,6 +1320,7 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -1100,6 +1334,7 @@ "version": "4.0.5", "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.5.tgz", "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -1115,14 +1350,25 @@ "version": "0.2.0", "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, + "node_modules/frac": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz", + "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1131,14 +1377,16 @@ "version": "1.0.0", "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -1151,6 +1399,7 @@ "version": "1.1.2", "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1159,6 +1408,7 @@ "version": "2.3.1", "resolved": "https://registry.npmmirror.com/generate-function/-/generate-function-2.3.1.tgz", "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "license": "MIT", "dependencies": { "is-property": "^1.0.2" } @@ -1167,6 +1417,7 @@ "version": "1.3.0", "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", @@ -1190,6 +1441,7 @@ "version": "1.0.1", "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" @@ -1204,6 +1456,7 @@ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1224,6 +1477,7 @@ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -1236,6 +1490,7 @@ "resolved": "https://registry.npmmirror.com/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -1250,6 +1505,7 @@ "version": "1.2.0", "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1261,13 +1517,15 @@ "version": "1.4.0", "resolved": "https://registry.npmmirror.com/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1276,6 +1534,7 @@ "version": "1.1.0", "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1287,6 +1546,7 @@ "version": "1.0.2", "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" }, @@ -1301,6 +1561,7 @@ "version": "2.0.2", "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -1309,24 +1570,30 @@ } }, "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" }, "engines": { "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -1339,6 +1606,7 @@ "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.2.tgz", "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } @@ -1347,13 +1615,15 @@ "version": "1.0.1", "resolved": "https://registry.npmmirror.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/import-fresh": { "version": "3.3.1", "resolved": "https://registry.npmmirror.com/import-fresh/-/import-fresh-3.3.1.tgz", "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -1370,6 +1640,7 @@ "resolved": "https://registry.npmmirror.com/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -1380,6 +1651,7 @@ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -1388,12 +1660,14 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -1403,6 +1677,7 @@ "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -1415,6 +1690,7 @@ "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1424,6 +1700,7 @@ "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1436,6 +1713,7 @@ "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -1445,6 +1723,7 @@ "resolved": "https://registry.npmmirror.com/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1452,24 +1731,28 @@ "node_modules/is-property": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "license": "MIT" }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/js-yaml": { "version": "4.1.1", "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.1.tgz", "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -1481,26 +1764,30 @@ "version": "3.0.1", "resolved": "https://registry.npmmirror.com/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "version": "9.0.3", + "resolved": "https://registry.npmmirror.com/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", + "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", + "license": "MIT", "dependencies": { - "jws": "^3.2.2", + "jws": "^4.0.1", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", @@ -1517,9 +1804,10 @@ } }, "node_modules/jwa": { - "version": "1.4.2", - "resolved": "https://registry.npmmirror.com/jwa/-/jwa-1.4.2.tgz", - "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "license": "MIT", "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -1527,11 +1815,12 @@ } }, "node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmmirror.com/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "license": "MIT", "dependencies": { - "jwa": "^1.4.1", + "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, @@ -1540,6 +1829,7 @@ "resolved": "https://registry.npmmirror.com/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -1549,6 +1839,7 @@ "resolved": "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -1562,6 +1853,7 @@ "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -1572,64 +1864,72 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmmirror.com/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmmirror.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmmirror.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" }, "node_modules/lodash.isnumber": { "version": "3.0.3", "resolved": "https://registry.npmmirror.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmmirror.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmmirror.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmmirror.com/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" }, "node_modules/long": { "version": "5.3.2", "resolved": "https://registry.npmmirror.com/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==" - }, - "node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "engines": { - "node": ">=12" - } + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" }, "node_modules/lru.min": { "version": "1.1.3", "resolved": "https://registry.npmmirror.com/lru.min/-/lru.min-1.1.3.tgz", "integrity": "sha512-Lkk/vx6ak3rYkRR0Nhu4lFUT2VDnQSxBe8Hbl7f36358p6ow8Bnvr8lrLt98H8J1aGxfhbX4Fs5tYg2+FTwr5Q==", + "license": "MIT", "engines": { "bun": ">=1.0.0", "deno": ">=1.30.0", @@ -1644,6 +1944,7 @@ "version": "1.1.0", "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -1652,6 +1953,7 @@ "version": "0.3.0", "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1660,6 +1962,7 @@ "version": "1.0.3", "resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz", "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/sindresorhus" } @@ -1668,6 +1971,7 @@ "version": "1.1.2", "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1676,6 +1980,7 @@ "version": "1.6.0", "resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -1687,6 +1992,7 @@ "version": "1.52.0", "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1695,6 +2001,7 @@ "version": "2.1.35", "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -1707,6 +2014,7 @@ "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1714,15 +2022,56 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/multer": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.6.0", + "concat-stream": "^2.0.0", + "mkdirp": "^0.5.6", + "object-assign": "^4.1.1", + "type-is": "^1.6.18", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">= 10.16.0" + } }, "node_modules/mysql": { "version": "2.18.1", "resolved": "https://registry.npmmirror.com/mysql/-/mysql-2.18.1.tgz", "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "license": "MIT", "dependencies": { "bignumber.js": "9.0.0", "readable-stream": "2.3.7", @@ -1736,12 +2085,14 @@ "node_modules/mysql/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/mysql2": { - "version": "3.15.3", - "resolved": "https://registry.npmmirror.com/mysql2/-/mysql2-3.15.3.tgz", - "integrity": "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==", + "version": "3.16.0", + "resolved": "https://registry.npmmirror.com/mysql2/-/mysql2-3.16.0.tgz", + "integrity": "sha512-AEGW7QLLSuSnjCS4pk3EIqOmogegmze9h8EyrndavUQnIUcfkVal/sK7QznE+a3bc6rzPbAiui9Jcb+96tPwYA==", + "license": "MIT", "dependencies": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", @@ -1758,9 +2109,10 @@ } }, "node_modules/mysql2/node_modules/iconv-lite": { - "version": "0.7.0", - "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.7.0.tgz", - "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "version": "0.7.1", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.7.1.tgz", + "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -1776,39 +2128,64 @@ "version": "2.3.3", "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.3.tgz", "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/named-placeholders": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.3.tgz", - "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/named-placeholders/-/named-placeholders-1.1.6.tgz", + "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==", + "license": "MIT", "dependencies": { - "lru-cache": "^7.14.1" + "lru.min": "^1.1.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=8.0.0" } }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, + "node_modules/node-addon-api": { + "version": "8.5.0", + "resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-8.5.0.tgz", + "integrity": "sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==", + "license": "MIT", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmmirror.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/nodemailer": { - "version": "7.0.11", - "resolved": "https://registry.npmmirror.com/nodemailer/-/nodemailer-7.0.11.tgz", - "integrity": "sha512-gnXhNRE0FNhD7wPSCGhdNh46Hs6nm+uTyg+Kq0cZukNQiYdnCsoQjodNP9BQVG9XrcK/v6/MgpAPBUFyzh9pvw==", + "version": "7.0.12", + "resolved": "https://registry.npmmirror.com/nodemailer/-/nodemailer-7.0.12.tgz", + "integrity": "sha512-H+rnK5bX2Pi/6ms3sN4/jRQvYSMltV6vqup/0SFOrxYYY/qoNvhXPlYq3e+Pm9RFJRwrMGbMIwi81M4dxpomhA==", + "license": "MIT-0", "engines": { "node": ">=6.0.0" } @@ -1818,6 +2195,7 @@ "resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-3.1.11.tgz", "integrity": "sha512-is96t8F/1//UHAjNPHpbsNY46ELPpftGUoSVNXwUfMk/qdjSylYrWSu1XavVTBOn526kFiOR733ATgNBCQyH0g==", "dev": true, + "license": "MIT", "dependencies": { "chokidar": "^3.5.2", "debug": "^4", @@ -1846,6 +2224,7 @@ "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -1855,6 +2234,7 @@ "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -1867,6 +2247,16 @@ "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1875,6 +2265,7 @@ "version": "1.13.4", "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz", "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1886,6 +2277,7 @@ "version": "2.4.1", "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -1898,6 +2290,7 @@ "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } @@ -1907,6 +2300,7 @@ "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -1924,6 +2318,7 @@ "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -1939,6 +2334,7 @@ "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -1954,6 +2350,7 @@ "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -1965,6 +2362,7 @@ "version": "1.3.3", "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -1974,6 +2372,7 @@ "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1983,6 +2382,7 @@ "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1992,6 +2392,7 @@ "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1999,13 +2400,15 @@ "node_modules/path-to-regexp": { "version": "0.1.12", "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -2018,6 +2421,7 @@ "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -2025,12 +2429,14 @@ "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -2042,29 +2448,33 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmmirror.com/pstree.remy/-/pstree.remy-1.1.8.tgz", "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmmirror.com/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.1", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -2091,25 +2501,28 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "2.5.3", + "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8" @@ -2119,6 +2532,7 @@ "version": "2.3.7", "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.7.tgz", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -2132,13 +2546,15 @@ "node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -2151,6 +2567,7 @@ "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -2160,6 +2577,7 @@ "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -2171,6 +2589,7 @@ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -2200,6 +2619,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -2221,17 +2641,20 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/semver": { "version": "7.7.3", "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.3.tgz", "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2240,23 +2663,24 @@ } }, "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmmirror.com/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "version": "0.19.2", + "resolved": "https://registry.npmmirror.com/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "range-parser": "~1.2.1", - "statuses": "2.0.1" + "statuses": "~2.0.2" }, "engines": { "node": ">= 0.8.0" @@ -2266,6 +2690,7 @@ "version": "2.6.9", "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -2273,15 +2698,8 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "engines": { - "node": ">= 0.8" - } + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/seq-queue": { "version": "0.0.5", @@ -2289,14 +2707,15 @@ "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" }, "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "version": "1.16.3", + "resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", "dependencies": { "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.19.0" + "send": "~0.19.1" }, "engines": { "node": ">= 0.8.0" @@ -2305,13 +2724,15 @@ "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -2324,6 +2745,7 @@ "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2332,6 +2754,7 @@ "version": "1.1.0", "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz", "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", @@ -2350,6 +2773,7 @@ "version": "1.0.0", "resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.0.tgz", "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3" @@ -2365,6 +2789,7 @@ "version": "1.0.1", "resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz", "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", @@ -2382,6 +2807,7 @@ "version": "1.0.2", "resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", @@ -2401,6 +2827,7 @@ "resolved": "https://registry.npmmirror.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.5.3" }, @@ -2412,22 +2839,45 @@ "version": "2.3.1", "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.1.tgz", "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, + "node_modules/ssf": { + "version": "0.11.2", + "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz", + "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", + "license": "Apache-2.0", + "dependencies": { + "frac": "~1.1.2" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } @@ -2435,13 +2885,15 @@ "node_modules/string_decoder/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -2454,6 +2906,7 @@ "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -2466,6 +2919,7 @@ "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2477,13 +2931,15 @@ "version": "0.2.0", "resolved": "https://registry.npmmirror.com/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -2495,6 +2951,7 @@ "version": "1.0.1", "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", "engines": { "node": ">=0.6" } @@ -2504,6 +2961,7 @@ "resolved": "https://registry.npmmirror.com/touch/-/touch-3.1.1.tgz", "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", "dev": true, + "license": "ISC", "bin": { "nodetouch": "bin/nodetouch.js" } @@ -2513,6 +2971,7 @@ "resolved": "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -2525,6 +2984,7 @@ "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -2536,6 +2996,7 @@ "version": "1.6.18", "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -2544,16 +3005,24 @@ "node": ">= 0.6" } }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmmirror.com/undefsafe/-/undefsafe-2.0.5.tgz", "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2563,6 +3032,7 @@ "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -2570,19 +3040,21 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } }, "node_modules/uuid": { "version": "13.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-13.0.0.tgz", "integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==", "funding": [ "https://github.com/sponsors/broofa", @@ -2593,10 +3065,20 @@ "uuid": "dist-node/bin/uuid" } }, + "node_modules/validator": { + "version": "13.15.26", + "resolved": "https://registry.npmmirror.com/validator/-/validator-13.15.26.tgz", + "integrity": "sha512-spH26xU080ydGggxRyR1Yhcbgx+j3y5jbNXk/8L+iRvdIEQ4uTRH2Sgf2dokud6Q4oAtsbNvJ1Ft+9xmm6IZcA==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -2606,6 +3088,7 @@ "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2616,11 +3099,30 @@ "node": ">= 8" } }, + "node_modules/wmf": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz", + "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/word": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz", + "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", + "license": "Apache-2.0", + "engines": { + "node": ">=0.8" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2629,13 +3131,45 @@ "version": "1.0.2", "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "dev": true, + "license": "ISC" + }, + "node_modules/xlsx": { + "version": "0.18.5", + "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz", + "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", + "license": "Apache-2.0", + "dependencies": { + "adler-32": "~1.3.0", + "cfb": "~1.2.1", + "codepage": "~1.15.0", + "crc-32": "~1.2.1", + "ssf": "~0.11.2", + "wmf": "~1.0.1", + "word": "~0.3.0" + }, + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/src/hello/backend/package.json b/src/hello/server/package.json similarity index 82% rename from src/hello/backend/package.json rename to src/hello/server/package.json index 1cebf72d..b192ffb3 100644 --- a/src/hello/backend/package.json +++ b/src/hello/server/package.json @@ -18,11 +18,15 @@ "license": "MIT", "dependencies": { "axios": "^1.13.2", + "bcrypt": "^6.0.0", "bcryptjs": "^3.0.3", "child_process": "^1.0.2", + "cors": "^2.8.5", "dotenv": "^16.3.1", - "express": "^4.18.2", + "express": "^4.22.1", + "express-validator": "^7.3.1", "jsonwebtoken": "^9.0.2", + "multer": "^2.0.2", "mysql": "^2.18.1", "mysql2": "^3.15.3", "nodemailer": "^7.0.11", diff --git a/src/hello/backend/routes/AdminLog.js b/src/hello/server/routes/AdminLog.js similarity index 100% rename from src/hello/backend/routes/AdminLog.js rename to src/hello/server/routes/AdminLog.js diff --git a/src/hello/backend/routes/AdminNotice.js b/src/hello/server/routes/AdminNotice.js similarity index 100% rename from src/hello/backend/routes/AdminNotice.js rename to src/hello/server/routes/AdminNotice.js diff --git a/src/hello/backend/routes/AdminStatic.js b/src/hello/server/routes/AdminStatic.js similarity index 95% rename from src/hello/backend/routes/AdminStatic.js rename to src/hello/server/routes/AdminStatic.js index a6101c7b..7cba80d8 100644 --- a/src/hello/backend/routes/AdminStatic.js +++ b/src/hello/server/routes/AdminStatic.js @@ -1,47 +1,47 @@ -// routes/AdminStatic.js -const express = require('express'); -const router = express.Router(); -const dbModule = require('../db'); -const db = dbModule.promisePool; - -// 获取系统统计数据的接口 -router.get('/', async (req, res) => { - try { - // 获取用户数量 - const [usersResult] = await db.execute('SELECT COUNT(*) as count FROM users'); - const usersCount = usersResult[0].count; - - // 获取文件数量 - const [filesResult] = await db.execute('SELECT COUNT(*) as count FROM data_file'); - const filesCount = filesResult[0].count; - - // 获取生成记录数量 - const [generationsResult] = await db.execute('SELECT COUNT(*) as count FROM generation_history'); - const generationsCount = generationsResult[0].count; - - // 获取反馈数量 - const [feedbackResult] = await db.execute('SELECT COUNT(*) as count FROM feedback'); - const feedbackCount = feedbackResult[0].count; - - const stats = { - users: usersCount, - files: filesCount, - generations: generationsCount, - feedback: feedbackCount - }; - - res.json({ - success: true, - data: stats, - message: '统计数据获取成功' - }); - } catch (error) { - console.error('数据库查询错误:', error); - res.status(500).json({ - success: false, - message: '获取统计数据失败: ' + error.message - }); - } -}); - +// routes/AdminStatic.js +const express = require('express'); +const router = express.Router(); +const dbModule = require('../db'); +const db = dbModule.promisePool; + +// 获取系统统计数据的接口 +router.get('/', async (req, res) => { + try { + // 获取用户数量 + const [usersResult] = await db.execute('SELECT COUNT(*) as count FROM users'); + const usersCount = usersResult[0].count; + + // 获取文件数量 + const [filesResult] = await db.execute('SELECT COUNT(*) as count FROM data_file'); + const filesCount = filesResult[0].count; + + // 获取生成记录数量 + const [generationsResult] = await db.execute('SELECT COUNT(*) as count FROM generation_history'); + const generationsCount = generationsResult[0].count; + + // 获取反馈数量 + const [feedbackResult] = await db.execute('SELECT COUNT(*) as count FROM feedback'); + const feedbackCount = feedbackResult[0].count; + + const stats = { + users: usersCount, + files: filesCount, + generations: generationsCount, + feedback: feedbackCount + }; + + res.json({ + success: true, + data: stats, + message: '统计数据获取成功' + }); + } catch (error) { + console.error('数据库查询错误:', error); + res.status(500).json({ + success: false, + message: '获取统计数据失败: ' + error.message + }); + } +}); + module.exports = router; \ No newline at end of file diff --git a/src/hello/backend/routes/AdminUser.js b/src/hello/server/routes/AdminUser.js similarity index 69% rename from src/hello/backend/routes/AdminUser.js rename to src/hello/server/routes/AdminUser.js index d27f35ab..17fbfa1f 100644 --- a/src/hello/backend/routes/AdminUser.js +++ b/src/hello/server/routes/AdminUser.js @@ -1,244 +1,266 @@ -const express = require('express'); -const router = express.Router(); -const dbModule = require('../db'); -const db = dbModule.promisePool; -const { body, param, validationResult } = require('express-validator'); -const bcrypt = require('bcrypt'); - -// 统一的响应格式函数 -const formatResponse = (code, message, data = null) => { - const success = code === 200; - return { - success, - code, - message, - data - }; -}; - -// 获取用户列表 -router.get('/', async (req, res) => { - try { - const { - page = 1, - pageSize = 10, - keyword = '' - } = req.query; - - const offset = (page - 1) * pageSize; - - // 构建查询条件 - let whereConditions = []; - let queryParams = []; - - if (keyword) { - whereConditions.push('(username LIKE ? OR email LIKE ?)'); - queryParams.push(`%${keyword}%`, `%${keyword}%`); - } - - const whereClause = whereConditions.length > 0 - ? `WHERE ${whereConditions.join(' AND ')}` - : ''; - - // 获取总数 - const [countResult] = await db.query( - `SELECT COUNT(*) as total FROM users ${whereClause}`, - queryParams - ); - const total = countResult[0].total; - - // 获取分页数据(排除密码字段) - const [users] = await db.query( - `SELECT user_id, username, email, role, register_time - FROM users - ${whereClause} - ORDER BY register_time DESC - LIMIT ? OFFSET ?`, - [...queryParams, parseInt(pageSize), offset] - ); - - res.json(formatResponse(200, '获取用户列表成功', { - users: users, - pagination: { - page: parseInt(page), - pageSize: parseInt(pageSize), - total, - totalPages: Math.ceil(total / pageSize) - } - })); - - } catch (error) { - console.error('获取用户列表失败:', error); - res.status(500).json(formatResponse(500, '服务器内部错误')); - } -}); - -// 重置用户密码为666666 -router.patch('/:id/reset-password', async (req, res) => { - try { - const userId = parseInt(req.params.id); - - if (isNaN(userId)) { - return res.status(400).json(formatResponse(400, '用户ID必须是数字')); - } - - // 检查用户是否存在 - const [existingUsers] = await db.query( - 'SELECT user_id, username, email FROM users WHERE user_id = ?', - [userId] - ); - - if (existingUsers.length === 0) { - return res.status(404).json(formatResponse(404, '用户不存在')); - } - - // 使用bcrypt生成安全的哈希值 - const hashedPassword = await bcrypt.hash('666666', 10); - - // 更新密码 - await db.query( - 'UPDATE users SET password = ? WHERE user_id = ?', - [hashedPassword, userId] - ); - - const user = existingUsers[0]; - - res.json(formatResponse(200, '密码已重置为666666', { - user_id: user.user_id, - username: user.username, - email: user.email - })); - - } catch (error) { - console.error('重置密码失败:', error); - res.status(500).json(formatResponse(500, '服务器内部错误')); - } -}); - -// 删除用户 -router.delete('/:id', - param('id').isInt().withMessage('用户ID必须是整数'), - async (req, res) => { - try { - const errors = validationResult(req); - if (!errors.isEmpty()) { - return res.status(400).json(formatResponse(400, '参数错误', { - errors: errors.array() - })); - } - - const userId = parseInt(req.params.id); - - // 检查用户是否存在 - const [existingUsers] = await db.query( - 'SELECT user_id, username, email FROM users WHERE user_id = ?', - [userId] - ); - - if (existingUsers.length === 0) { - return res.status(404).json(formatResponse(404, '用户不存在')); - } - - // 检查是否为管理员自己(防止删除自己) - // 假设当前登录管理员ID为1,实际应用中应从认证信息中获取 - const currentAdminId = 1; - if (userId === currentAdminId) { - return res.status(400).json(formatResponse(400, '不能删除自己')); - } - - // 删除用户 - await db.query('DELETE FROM users WHERE user_id = ?', [userId]); - - const deletedUser = existingUsers[0]; - - res.json(formatResponse(200, '用户删除成功', { - user_id: deletedUser.user_id, - username: deletedUser.username, - email: deletedUser.email - })); - - } catch (error) { - console.error('删除用户失败:', error); - res.status(500).json(formatResponse(500, '服务器内部错误')); - } - } -); - -// 批量删除用户 -router.delete('/', async (req, res) => { - try { - const { ids } = req.body; - - if (!ids || !Array.isArray(ids) || ids.length === 0) { - return res.status(400).json(formatResponse(400, '请选择要删除的用户')); - } - - // 检查是否包含当前管理员自己 - const currentAdminId = 1; - if (ids.includes(currentAdminId)) { - return res.status(400).json(formatResponse(400, '不能删除自己')); - } - - // 使用参数化查询防止SQL注入 - const placeholders = ids.map(() => '?').join(','); - await db.query(`DELETE FROM users WHERE user_id IN (${placeholders})`, ids); - - res.json(formatResponse(200, '批量删除成功')); - } catch (error) { - console.error('批量删除用户时出错:', error); - res.status(500).json(formatResponse(500, '服务器内部错误')); - } -}); - -// 获取用户统计数据 -router.get('/statistics/overview', async (req, res) => { - try { - // 获取用户总数和角色分布 - const [roleStats] = await db.query(` - SELECT - role, - COUNT(*) as count - FROM users - GROUP BY role - `); - - // 获取最近30天的注册统计 - const [recentStats] = await db.query(` - SELECT - DATE(register_time) as date, - COUNT(*) as count - FROM users - WHERE register_time >= DATE_SUB(NOW(), INTERVAL 30 DAY) - GROUP BY DATE(register_time) - ORDER BY date DESC - `); - - // 获取总统计 - const [summaryResult] = await db.query(` - SELECT - COUNT(*) as total, - COUNT(CASE WHEN role = 'admin' THEN 1 END) as admin_count, - COUNT(CASE WHEN role = 'user' THEN 1 END) as user_count - FROM users - `); - - const total = summaryResult[0].total; - const adminCount = summaryResult[0].admin_count; - const userCount = summaryResult[0].user_count; - - res.json(formatResponse(200, '获取用户统计数据成功', { - recent: recentStats, - roleStats, - summary: { - total, - admin_count: adminCount, - user_count: userCount - } - })); - } catch (error) { - console.error('获取用户统计数据时出错:', error); - res.status(500).json(formatResponse(500, '服务器内部错误')); - } -}); - +const express = require('express'); +const router = express.Router(); +const dbModule = require('../db'); +const db = dbModule.promisePool; +const { body, param, validationResult } = require('express-validator'); +const bcrypt = require('bcrypt'); + +// 统一的响应格式函数 +const formatResponse = (code, message, data = null) => { + const success = code === 200; + return { + success, + code, + message, + data + }; +}; + +// 获取用户列表 +router.get('/', async (req, res) => { + try { + const { + page = 1, + pageSize = 10, + keyword = '' + } = req.query; + + const offset = (page - 1) * pageSize; + + // 构建查询条件 + let whereConditions = []; + let queryParams = []; + + if (keyword) { + whereConditions.push('(username LIKE ? OR email LIKE ?)'); + queryParams.push(`%${keyword}%`, `%${keyword}%`); + } + + const whereClause = whereConditions.length > 0 + ? `WHERE ${whereConditions.join(' AND ')}` + : ''; + + // 获取总数 + const [countResult] = await db.query( + `SELECT COUNT(*) as total FROM users ${whereClause}`, + queryParams + ); + const total = countResult[0].total; + + // 获取分页数据(排除密码字段) + const [users] = await db.query( + `SELECT user_id, username, email, role, register_time + FROM users + ${whereClause} + ORDER BY register_time DESC + LIMIT ? OFFSET ?`, + [...queryParams, parseInt(pageSize), offset] + ); + + res.json(formatResponse(200, '获取用户列表成功', { + users: users, + pagination: { + page: parseInt(page), + pageSize: parseInt(pageSize), + total, + totalPages: Math.ceil(total / pageSize) + } + })); + + } catch (error) { + console.error('获取用户列表失败:', error); + res.status(500).json(formatResponse(500, '服务器内部错误')); + } +}); + +// 重置用户密码为666666 +router.patch('/:id/reset-password', async (req, res) => { + try { + const userId = parseInt(req.params.id); + + if (isNaN(userId)) { + return res.status(400).json(formatResponse(400, '用户ID必须是数字')); + } + + // 检查用户是否存在 + const [existingUsers] = await db.query( + 'SELECT user_id, username, email FROM users WHERE user_id = ?', + [userId] + ); + + if (existingUsers.length === 0) { + return res.status(404).json(formatResponse(404, '用户不存在')); + } + + // 使用bcrypt生成安全的哈希值 + const hashedPassword = await bcrypt.hash('666666', 10); + + // 更新密码 + await db.query( + 'UPDATE users SET password = ? WHERE user_id = ?', + [hashedPassword, userId] + ); + + const user = existingUsers[0]; + + res.json(formatResponse(200, '密码已重置为666666', { + user_id: user.user_id, + username: user.username, + email: user.email + })); + + } catch (error) { + console.error('重置密码失败:', error); + res.status(500).json(formatResponse(500, '服务器内部错误')); + } +}); + +// 删除用户 +router.delete('/:id', + param('id').isInt().withMessage('用户ID必须是整数'), + async (req, res) => { + const connection = await db.getConnection(); // 获取数据库连接用于事务 + + try { + const errors = validationResult(req); + if (!errors.isEmpty()) { + return res.status(400).json(formatResponse(400, '参数错误', { + errors: errors.array() + })); + } + + const userId = parseInt(req.params.id); + + // 开始事务 + await connection.beginTransaction(); + + // 检查用户是否存在 + const [existingUsers] = await connection.query( + 'SELECT user_id, username, email FROM users WHERE user_id = ?', + [userId] + ); + + if (existingUsers.length === 0) { + await connection.rollback(); + return res.status(404).json(formatResponse(404, '用户不存在')); + } + + // 检查是否为管理员自己(防止删除自己) + // 实际应用中应从认证信息中获取当前用户ID + const currentAdminId = req.user?.userId || 1; // 从认证信息获取 + if (userId === currentAdminId) { + await connection.rollback(); + return res.status(400).json(formatResponse(400, '不能删除自己')); + } + + // 按正确顺序删除关联数据 + try { + // 1. 删除api_log记录 + await connection.query('DELETE FROM api_log WHERE user_id = ?', [userId]); + + // 2. 删除feedback记录 + await connection.query('DELETE FROM feedback WHERE user_id = ?', [userId]); + + // 3. 删除generation_history记录 + await connection.query('DELETE FROM generation_history WHERE user_id = ?', [userId]); + + // 4. 删除data_file记录 + await connection.query('DELETE FROM data_file WHERE user_id = ?', [userId]); + + // 5. 删除email_verification_codes记录 + const userEmail = existingUsers[0].email; + await connection.query('DELETE FROM email_verification_codes WHERE email = ?', [userEmail]); + + // 6. 最后删除用户 + await connection.query('DELETE FROM users WHERE user_id = ?', [userId]); + + // 提交事务 + await connection.commit(); + + const deletedUser = existingUsers[0]; + + res.json(formatResponse(200, '用户删除成功', { + user_id: deletedUser.user_id, + username: deletedUser.username, + email: deletedUser.email + })); + + } catch (error) { + await connection.rollback(); + throw error; // 重新抛出错误以便外层catch捕获 + } + + } catch (error) { + // 如果已经rollback过,这里不需要再次rollback + if (connection && !connection._rolledBack) { + await connection.rollback(); + } + + console.error('删除用户失败:', error); + + // 处理外键约束错误 + if (error.code === 'ER_ROW_IS_REFERENCED_2') { + res.status(400).json(formatResponse(400, '删除失败:用户有关联数据无法删除')); + } else { + res.status(500).json(formatResponse(500, '服务器内部错误')); + } + } finally { + if (connection) { + connection.release(); // 释放连接 + } + } + } +); + +// 获取用户统计数据 +router.get('/statistics/overview', async (req, res) => { + try { + // 获取用户总数和角色分布 + const [roleStats] = await db.query(` + SELECT + role, + COUNT(*) as count + FROM users + GROUP BY role + `); + + // 获取最近30天的注册统计 + const [recentStats] = await db.query(` + SELECT + DATE(register_time) as date, + COUNT(*) as count + FROM users + WHERE register_time >= DATE_SUB(NOW(), INTERVAL 30 DAY) + GROUP BY DATE(register_time) + ORDER BY date DESC + `); + + // 获取总统计 + const [summaryResult] = await db.query(` + SELECT + COUNT(*) as total, + COUNT(CASE WHEN role = 'admin' THEN 1 END) as admin_count, + COUNT(CASE WHEN role = 'user' THEN 1 END) as user_count + FROM users + `); + + const total = summaryResult[0].total; + const adminCount = summaryResult[0].admin_count; + const userCount = summaryResult[0].user_count; + + res.json(formatResponse(200, '获取用户统计数据成功', { + recent: recentStats, + roleStats, + summary: { + total, + admin_count: adminCount, + user_count: userCount + } + })); + } catch (error) { + console.error('获取用户统计数据时出错:', error); + res.status(500).json(formatResponse(500, '服务器内部错误')); + } +}); + module.exports = router; \ No newline at end of file diff --git a/src/hello/backend/routes/auth.js b/src/hello/server/routes/auth.js similarity index 100% rename from src/hello/backend/routes/auth.js rename to src/hello/server/routes/auth.js diff --git a/src/hello/server/routes/compile.js b/src/hello/server/routes/compile.js new file mode 100644 index 00000000..6569cbbd --- /dev/null +++ b/src/hello/server/routes/compile.js @@ -0,0 +1,429 @@ +// routes/compile.js +const express = require('express'); +const router = express.Router(); +const dbModule = require('../db'); +const db = dbModule.promisePool; +const { authenticateToken } = require('../middleware/auth'); +const fs = require('fs'); +const path = require('path'); +const { exec } = require('child_process'); +const util = require('util'); +const execPromise = util.promisify(exec); + +// ✅ 使用绝对路径,避免 pm2 / systemd 环境 PATH 不一致 +const XELATEX = '/usr/local/texlive/2025/bin/aarch64-linux/xelatex'; + +// 获取PDF URL接口 +router.get('/:history_id/pdf-url', authenticateToken, async (req, res) => { + try { + const { history_id } = req.params; + const user_id = req.user.user_id; + + const query = ` + SELECT generation_path + FROM generation_history + WHERE history_id = ? AND user_id = ? + `; + + const [records] = await db.query(query, [history_id, user_id]); + + if (records.length === 0) { + return res.status(404).json({ + success: false, + message: '历史记录不存在' + }); + } + + const record = records[0]; + + if (!record.generation_path) { + return res.status(404).json({ + success: false, + message: '该记录尚未生成PDF' + }); + } + + const pdfUrl = `/storage/generated_charts/user${user_id}/hist${history_id}.pdf`; + + res.json({ + success: true, + data: { + pdf_url: pdfUrl, + exists: fs.existsSync(path.join(__dirname, '..', '..', record.generation_path)) + } + }); + } catch (error) { + console.error('获取PDF URL失败:', error); + res.status(500).json({ + success: false, + message: error.message + }); + } +}); + +// LaTeX编译接口 +router.post('/:history_id', authenticateToken, async (req, res) => { + let tempDir = null; + + try { + const { history_id } = req.params; + const user_id = req.user.user_id; + + if (!history_id || isNaN(parseInt(history_id))) { + return res.status(400).json({ + success: false, + message: '无效的历史记录ID' + }); + } + + const query = ` + SELECT + h.history_id, + h.user_id, + h.generation_code, + h.generation_path + FROM generation_history h + WHERE h.history_id = ? AND h.user_id = ? + `; + + const [records] = await db.query(query, [history_id, user_id]); + + if (records.length === 0) { + return res.status(404).json({ + success: false, + message: '历史记录不存在或无权访问' + }); + } + + const historyRecord = records[0]; + + if (!historyRecord.generation_code || historyRecord.generation_code.trim() === '') { + return res.status(400).json({ + success: false, + message: '该历史记录没有可编译的图表代码' + }); + } + + // 目录准备 + const userStorageDir = path.join(__dirname, '..', 'storage', 'generated_charts', `user${user_id}`); + const finalDir = userStorageDir; + + if (!fs.existsSync(userStorageDir)) fs.mkdirSync(userStorageDir, { recursive: true }); + if (!fs.existsSync(finalDir)) fs.mkdirSync(finalDir, { recursive: true }); + + // 临时目录 + tempDir = path.join(userStorageDir, `temp_${Date.now()}`); + if (!fs.existsSync(tempDir)) fs.mkdirSync(tempDir, { recursive: true }); + + // ✅ 方案B:完整 tex 原样编译;片段才套模板 + const inputTex = historyRecord.generation_code; + + let latexDocument = isFullLatexDocument(inputTex) + ? inputTex + : createChineseLatexDocument(inputTex); + + // ✅ 自动注入缺失宏包(修复 pgfplotstable 报错) + latexDocument = injectPackagesIfNeeded(latexDocument); + + + // tex 文件名固定为 hist{id}.tex + const texFileName = `hist${history_id}.tex`; + const texFilePath = path.join(tempDir, texFileName); + + fs.writeFileSync(texFilePath, latexDocument, 'utf8'); + + // 编译(两遍) + const compileResult = await compileLatexWithXeLaTeX(texFilePath, tempDir); + + // ✅ 强制 jobname 后,PDF 名就是 hist{id}.pdf + const tempPdfPath = path.join(tempDir, `hist${history_id}.pdf`); + const pdfExists = fs.existsSync(tempPdfPath); + + if (!pdfExists) { + await safeCleanup(tempDir); + return res.status(500).json({ + success: false, + message: truncateLog([ + compileResult.stdout || '', + compileResult.stderr || '' + ].join('\n')) + + }); + } + + // 移动到最终目录 + const finalPdfPath = path.join(finalDir, `hist${history_id}.pdf`); + if (fs.existsSync(finalPdfPath)) fs.unlinkSync(finalPdfPath); + fs.renameSync(tempPdfPath, finalPdfPath); + + // 清理临时目录 + await safeCleanup(tempDir); + + // 更新数据库生成路径 + const updateQuery = ` + UPDATE generation_history + SET generation_path = ? + WHERE history_id = ? AND user_id = ? + `; + + const relativePath = path.relative(path.join(__dirname, '..', '..'), finalPdfPath); + await db.query(updateQuery, [relativePath, history_id, user_id]); + + return res.json({ + success: true, + message: '编译成功', + data: { + history_id: parseInt(history_id), + pdf_path: relativePath, + pdf_url: `/storage/generated_charts/user${user_id}/hist${history_id}.pdf`, + file_size: fs.statSync(finalPdfPath).size + } + }); + } catch (error) { + if (tempDir && fs.existsSync(tempDir)) { + await safeCleanup(tempDir); + } + + console.error('编译错误:', error); + return res.status(500).json({ + success: false, + message: error.message + }); + } +}); + +function injectPackagesIfNeeded(latex) { + if (!latex) return latex; + + let out = latex; + + // --------------------------- + // 1) pgfplotstable 自动注入 + // --------------------------- + const needsPgfplotstable = + /\\pgfplotstable(createcol|set|read|typeset)/.test(out) || + /\\pgfplotstable/.test(out); + + const hasPgfplotstable = + /\\usepackage(\[[^\]]*\])?\{pgfplotstable\}/.test(out); + + if (needsPgfplotstable && !hasPgfplotstable) { + out = injectUsepackage(out, '\\usepackage{pgfplotstable}'); + } + + // --------------------------- + // 2) 中文支持:只要检测到中文就兜底保证可显示 + // --------------------------- + const hasChineseChars = /[\u4e00-\u9fff]/.test(out); + if (hasChineseChars) { + const hasCtex = /\\usepackage(\[[^\]]*\])?\{ctex\}/.test(out); + + // ✅ 关键:只要有中文且没有 ctex,就注入 ctex + // 不要被 xeCJK/fontspec 迷惑(用户可能写了 SimSun 这种服务器没有的字体) + if (!hasCtex) { + out = injectUsepackage(out, '\\usepackage[UTF8]{ctex}'); + } + + // ✅ 修复坏字体:把 SimSun/微软雅黑/宋体等替换为服务器字体 + out = sanitizeBadCJKFonts(out, { + fallback: 'Noto Serif CJK SC', // 你服务器一定要有这个字体;没有就改成 WenQuanYi Zen Hei / Source Han Serif SC + mode: 'replace' // replace: 替换坏字体;remove: 直接删除 setCJKmainfont 行 + }); + + // ✅ 如果用户只写了 xeCJK 没写 fontspec(偶尔会导致字体选择不完整),补一下 + // 注意:如果已经有 ctex,一般不需要 fontspec;但补也不冲突 + const hasXeCJK = /\\usepackage(\[[^\]]*\])?\{xeCJK\}/.test(out); + const hasFontspec = /\\usepackage(\[[^\]]*\])?\{fontspec\}/.test(out); + if (hasXeCJK && !hasFontspec) { + out = injectUsepackage(out, '\\usepackage{fontspec}'); + } + } + + return out; +} + +/** + * 修复用户指定的 Windows/不可用中文字体: + * - 找到 \setCJKmainfont{...} + * - 如果字体属于坏字体列表,就替换成 fallback(或直接删除) + */ +function sanitizeBadCJKFonts(latex, options = {}) { + const fallback = options.fallback || 'Noto Serif CJK SC'; + const mode = options.mode || 'replace'; // replace | remove + + // 你可以继续扩展 + const badFonts = [ + 'SimSun', + 'SimHei', + 'Microsoft YaHei', + 'MicrosoftYaHei', + 'PingFang SC', // 某些 Linux 没有 + 'Songti SC', + 'Heiti SC', + 'STSong', + 'STHeiti', + '宋体', + '黑体', + '微软雅黑', + ]; + + // 匹配:\setCJKmainfont{...} + const re = /\\setCJKmainfont\s*\{([^}]+)\}/g; + + return latex.replace(re, (full, fontNameRaw) => { + const fontName = String(fontNameRaw || '').trim(); + + // 如果 fontName 在坏字体列表里,进行处理 + const isBad = badFonts.some(bf => bf.toLowerCase() === fontName.toLowerCase()); + if (!isBad) return full; + + if (mode === 'remove') { + return `% removed bad CJK font "${fontName}" (server incompatible)`; + } + + return `\\setCJKmainfont{${fallback}} % replaced bad CJK font "${fontName}"`; + }); +} + + +/** + * 将某条 \usepackage{...} 注入到 LaTeX preamble 内 + * 注入优先级: + * 1) 最后一个 \documentclass 后面 + * 2) 第一个 \usepackage 前面 + * 3) \begin{document} 前面 + * 4) 若都找不到(极少见),直接加到最前面 + */ +function injectUsepackage(latex, pkgLine) { + if (!latex || !pkgLine) return latex; + + // 已经有同样的注入行(避免重复) + if (latex.includes(pkgLine)) return latex; + + // 1) 插在 \documentclass 后(最理想) + const docclassMatch = latex.match(/\\documentclass(\[[^\]]*\])?\{[^\}]+\}/); + if (docclassMatch) { + const idx = latex.indexOf(docclassMatch[0]) + docclassMatch[0].length; + return latex.slice(0, idx) + '\n' + pkgLine + '\n' + latex.slice(idx); + } + + // 2) 插在第一个 \usepackage 前面 + const usepkgMatch = latex.match(/\\usepackage(\[[^\]]*\])?\{[^\}]+\}/); + if (usepkgMatch) { + const idx = latex.indexOf(usepkgMatch[0]); + return latex.slice(0, idx) + pkgLine + '\n' + latex.slice(idx); + } + + // 3) 插在 \begin{document} 前 + const beginDocMatch = latex.match(/\\begin\{document\}/); + if (beginDocMatch) { + const idx = latex.indexOf(beginDocMatch[0]); + return latex.slice(0, idx) + pkgLine + '\n' + latex.slice(idx); + } + + // 4) 兜底:加到最前面 + return pkgLine + '\n' + latex; +} + + +function truncateLog(text, maxLen = 6000) { + if (!text) return ''; + const t = String(text); + if (t.length <= maxLen) return t; + return t.slice(0, maxLen) + `\n\n... (log truncated, total ${t.length} chars)`; +} + + +/** + * 判断是否为完整 LaTeX 文档: + * - 有 \documentclass + * - 有 \begin{document} + * 只要满足这两项,就原样编译(不截断 preamble,避免 filecontents 丢失导致图空白) + */ +function isFullLatexDocument(tex) { + if (!tex) return false; + const t = tex.trim(); + return /\\documentclass(\[.*?\])?\{.*?\}/.test(t) && /\\begin\{document\}/.test(t); +} + +// 片段模式:创建支持中文的 LaTeX 文档(standalone 更适合画图输出) +function createChineseLatexDocument(chartCode) { + return `\\documentclass[border=5pt]{standalone} +\\usepackage[UTF8]{ctex} +\\usepackage{pgfplots} +\\pgfplotsset{compat=1.18} +\\usepackage{amsmath} +\\usepackage{amssymb} +\\usepackage{xcolor} + +\\begin{document} + +${chartCode} + +\\end{document}`; +} + + +// 使用 XeLaTeX 编译 +async function compileLatexWithXeLaTeX(texFilePath, outputDir) { + const fileName = path.basename(texFilePath, '.tex'); // hist12 + const dirName = path.dirname(texFilePath); + + // ✅ 强制 jobname,保证输出就是 hist{id}.pdf + // ✅ -file-line-error:报错可读性更强 + // ✅ 两遍编译:处理引用/拟合/某些 pgfplots 计算更稳定 + const command = ` +cd "${dirName}" && +"${XELATEX}" -interaction=nonstopmode -file-line-error -jobname="${fileName}" -output-directory="${outputDir}" "${texFilePath}" && +"${XELATEX}" -interaction=nonstopmode -file-line-error -jobname="${fileName}" -output-directory="${outputDir}" "${texFilePath}" +`; + + try { + const { stdout, stderr } = await execPromise(command, { + timeout: 30000, + // ✅ 避免 pgfplots 输出多导致默认 buffer 爆掉 + maxBuffer: 10 * 1024 * 1024 + }); + + const pdfPath = path.join(outputDir, `${fileName}.pdf`); + const success = fs.existsSync(pdfPath); + + return { success, stdout, stderr }; + } catch (error) { + const pdfPath = path.join(outputDir, `${fileName}.pdf`); + const pdfExists = fs.existsSync(pdfPath); + + return { + success: pdfExists, + stdout: error.stdout || '', + stderr: error.stderr || error.message || '' + }; + } +} + +// 安全清理函数 +async function safeCleanup(dirPath) { + try { + if (!fs.existsSync(dirPath)) return; + + const files = fs.readdirSync(dirPath); + for (const file of files) { + const filePath = path.join(dirPath, file); + try { + if (fs.statSync(filePath).isFile()) fs.unlinkSync(filePath); + } catch (e) { + // 忽略删除错误 + } + } + + try { + fs.rmdirSync(dirPath); + } catch (e) { + // 忽略目录删除错误 + } + } catch (e) { + // 忽略清理错误 + } +} + +module.exports = router; diff --git a/src/hello/backend/routes/datasets.js b/src/hello/server/routes/datasets.js similarity index 100% rename from src/hello/backend/routes/datasets.js rename to src/hello/server/routes/datasets.js diff --git a/src/hello/backend/routes/deepseek.js b/src/hello/server/routes/deepseek.js similarity index 85% rename from src/hello/backend/routes/deepseek.js rename to src/hello/server/routes/deepseek.js index 933f55e3..0d16f0e4 100644 --- a/src/hello/backend/routes/deepseek.js +++ b/src/hello/server/routes/deepseek.js @@ -1,397 +1,423 @@ -const express = require('express'); -const router = express.Router(); -const axios = require('axios'); -const dbModule = require('../db'); -const db = dbModule.promisePool; -const { authenticateToken } = require('../middleware/auth'); -const fs = require('fs'); -const path = require('path'); -const XLSX = require('xlsx'); // 添加Excel解析库 - -// 安装所需依赖:npm install xlsx - -// 读取和解析文件内容的辅助函数,上限需要测试,目前为100MB未测试 -const readFileContent = async (filePath, maxSize = 100000000) => { - return new Promise((resolve, reject) => { - // 检查文件是否存在 - if (!fs.existsSync(filePath)) { - return reject(new Error('文件不存在')); - } - - // 检查文件大小 - const stats = fs.statSync(filePath); - if (stats.size > maxSize) { - return reject(new Error(`文件过大,最大支持 ${maxSize} 字节`)); - } - - // 获取文件扩展名 - const ext = path.extname(filePath).toLowerCase(); - - try { - // 处理Excel文件 - if (ext === '.xlsx' || ext === '.xls') { - // 使用xlsx库解析Excel文件 - const workbook = XLSX.readFile(filePath); - const sheetName = workbook.SheetNames[0]; // 获取第一个工作表 - const worksheet = workbook.Sheets[sheetName]; - - // 将Excel数据转换为JSON - const jsonData = XLSX.utils.sheet_to_json(worksheet, { header: 1 }); - - // 将数据格式化为易读的文本 - let formattedData = 'Excel文件内容(解析为表格格式):\n'; - - jsonData.forEach((row, index) => { - formattedData += `行${index + 1}: ${JSON.stringify(row)}\n`; - }); - - resolve(formattedData); - } - // 处理CSV文件 - else if (ext === '.csv') { - fs.readFile(filePath, 'utf8', (err, data) => { - if (err) { - reject(err); - } else { - resolve(`CSV文件内容:\n${data}`); - } - }); - } - // 处理文本文件 - else { - fs.readFile(filePath, 'utf8', (err, data) => { - if (err) { - reject(err); - } else { - resolve(`文件内容:\n${data}`); - } - }); - } - } catch (error) { - reject(new Error(`解析文件失败: ${error.message}`)); - } - }); -}; - -// 构建包含数据集信息的消息 -const buildMessagesWithDataset = async (userMessage, dataIds, userId) => { - // 基础消息结构 - let messages = [ - { - role: 'system', - content: `你是一个专业的图表生成助手,擅长根据用户需求和数据集生成LaTeX PGFPlots代码。 - -请根据用户的描述和上传的数据文件,生成相应的图表代码。 - -如果用户上传的是Excel文件,我会将文件内容解析为表格格式提供给你。你需要: -1. 分析数据结构和内容 -2. 根据数据特点生成合适的图表 -3. 使用实际数据替换模板中的示例数据 -4. 设置合适的坐标轴标签、标题和图例 - -请直接生成包含实际数据的完整LaTeX代码。` - }, - { - role: 'user', - content: userMessage - } - ]; - - if (!dataIds || dataIds.length === 0) { - return messages; - } - - try { - let datasetContent = ''; - - // 查询数据集信息 - const query = ` - SELECT data_id, data_name, file_path, file_name - FROM data_file - WHERE data_id IN (?) AND user_id = ? - `; - - const [datasets] = await db.query(query, [dataIds, userId]); - - if (datasets.length === 0) { - console.log('未找到指定的数据集'); - return messages; - } - - // 读取每个数据集的内容 - for (const dataset of datasets) { - try { - const content = await readFileContent(dataset.file_path); - datasetContent += `\n\n=== 数据集: ${dataset.data_name} (${dataset.file_name}) ===\n${content}`; - } catch (error) { - console.error(`读取数据集 ${dataset.data_id} 失败:`, error.message); - datasetContent += `\n\n=== 数据集: ${dataset.data_name} (${dataset.file_name}) ===\n[无法读取文件内容: ${error.message}]`; - } - } - - // 如果有数据集内容,将其作为系统消息的一部分 - if (datasetContent) { - messages[0].content += `\n\n用户提供了以下数据文件内容:${datasetContent}`; - } - - return messages; - - } catch (error) { - console.error('构建数据集消息失败:', error); - return messages; - } -}; - -// 保存历史记录到数据库和文件系统 -const saveGenerationHistory = async (userId, userInput, aiResponse, dataIds, chartCode) => { - try { - // 获取数据集信息 - let dataId = null; - let fileName = ''; - let datasetName = ''; - - if (dataIds && dataIds.length > 0) { - const query = ` - SELECT data_id, data_name, file_name - FROM data_file - WHERE data_id = ? AND user_id = ? - LIMIT 1 - `; - const [datasets] = await db.query(query, [dataIds[0], userId]); - if (datasets.length > 0) { - dataId = datasets[0].data_id; - datasetName = datasets[0].data_name; - fileName = datasets[0].file_name; - } - } - - // 构建生成描述 - const generationDescription = userInput ? - ` ${userInput.substring(0, 150)}${userInput.length > 150 ? '...' : ''}` : - 'AI图表生成'; - - // 直接使用传入的 chartCode - let finalChartCode = chartCode || ''; - - // 如果传入的 chartCode 为空,才尝试从 aiResponse 中提取 - if (!finalChartCode && aiResponse) { - const codeMatch = aiResponse.match(/```(?:latex|tex)?\s*([\s\S]*?)\s*```/); - if (codeMatch) { - finalChartCode = codeMatch[1].trim(); - } else { - finalChartCode = aiResponse; - } - } - - console.log(`💾 保存图表代码,长度: ${finalChartCode.length}`); - - // 保存到数据库 generation_history 表 - const insertHistoryQuery = ` - INSERT INTO generation_history - (user_id, data_id, generation_description, generation_code, generation_path) - VALUES (?, ?, ?, ?, ?) - `; - - const [result] = await db.query(insertHistoryQuery, [ - userId, - dataId, - generationDescription, - finalChartCode, - null - ]); - - // 获取自增的 history_id - const historyId = result.insertId; - - console.log(`✅ 历史记录已保存到数据库,ID: ${historyId}`); - - // 保存到文件系统 - const historyDir = path.join(__dirname, '..', 'storage', 'history', userId.toString()); - - if (!fs.existsSync(historyDir)) { - fs.mkdirSync(historyDir, { recursive: true }); - } - - const historyFilePath = path.join(historyDir, `${historyId}.json`); - const historyData = { - history_id: historyId, - user_id: userId, - data_id: dataId, - file_name: fileName, - dataset_name: datasetName, - user_input: userInput, - ai_response: aiResponse, - chart_code: finalChartCode, - generation_description: generationDescription, - created_at: new Date().toISOString(), - metadata: { - data_ids: dataIds || [], - has_chart_code: !!finalChartCode, - code_length: finalChartCode.length, - code_source: chartCode ? 'from_request' : 'extracted_from_response' - } - }; - - fs.writeFileSync(historyFilePath, JSON.stringify(historyData, null, 2)); - console.log(`✅ 历史记录已保存到文件系统: ${historyFilePath}`); - - // 记录API调用日志 - const apiLogQuery = ` - INSERT INTO api_log - (user_id, history_id, call_status, call_time) - VALUES (?, ?, 'success', NOW()) - `; - - const [apiLogResult] = await db.query(apiLogQuery, [userId, historyId]); - const callId = apiLogResult.insertId; - - console.log(`✅ API调用日志已记录,call_id: ${callId}`); - - return { - historyId, - callId, - filePath: historyFilePath, - chartCodeLength: finalChartCode.length - }; - - } catch (error) { - console.error('保存历史记录失败:', error); - return null; - } -}; - -// 简化的 DeepSeek API 接口 -router.post('/', authenticateToken, async (req, res) => { - try { - const { message, data_ids, chart_code } = req.body; - - if (!message) { - return res.status(400).json({ - success: false, - message: 'message字段是必需的' - }); - } - - // 构建包含数据集的消息 - const messages = await buildMessagesWithDataset( - message, - data_ids, - req.user.user_id - ); - - // DeepSeek API配置 - const DEEPSEEK_API_URL = process.env.DEEPSEEK_API_URL; - const DEEPSEEK_API_KEY = process.env.DEEPSEEK_API_KEY; - - if (!DEEPSEEK_API_KEY) { - return res.status(500).json({ - success: false, - message: 'DeepSeek API密钥未配置' - }); - } - - // 调用DeepSeek API - const response = await axios.post( - DEEPSEEK_API_URL, - { - model: "deepseek-chat", - messages: messages, - temperature: 0.7, - max_tokens: 2048, - stream: false - }, - { - headers: { - 'Authorization': `Bearer ${DEEPSEEK_API_KEY}`, - 'Content-Type': 'application/json' - }, - timeout: 30000 - } - ); - - console.log(`用户 ${req.user.user_id} 调用了DeepSeek API,附带数据集: ${data_ids || '无'}`); - - // 获取AI回复 - const aiReply = response.data.choices[0].message.content; - - // 提取图表代码 - let finalChartCode = chart_code || ''; - if (!finalChartCode && aiReply) { - const codeMatch = aiReply.match(/```(?:latex|tex)?\s*([\s\S]*?)\s*```/); - if (codeMatch) { - finalChartCode = codeMatch[1].trim(); - } - } - - console.log('📊 图表代码处理过程:'); - console.log('最终提取的 finalChartCode 长度:', finalChartCode.length); - - // 保存历史记录 - const savedHistory = await saveGenerationHistory( - req.user.user_id, - message, - aiReply, - data_ids, - finalChartCode - ); - - // 返回响应 - res.json({ - success: true, - data: { - reply: aiReply, - chart_code: finalChartCode, - usage: response.data.usage, - dataset_count: data_ids ? data_ids.length : 0, - history_id: savedHistory ? savedHistory.historyId : null, - chart_code_length: finalChartCode.length - } - }); - - } catch (error) { - console.error('DeepSeek API调用错误:', error.response?.data || error.message); - - // 记录失败的API调用 - try { - if (req.user && req.user.user_id) { - const errorMessage = error.response?.data?.error?.message || error.message || '未知错误'; - - const apiLogQuery = ` - INSERT INTO api_log - (user_id, history_id, call_status, call_time, call_error) - VALUES (?, NULL, 'failed', NOW(), ?) - `; - - await db.query(apiLogQuery, [ - req.user.user_id, - errorMessage.substring(0, 500) - ]); - - console.log(`❌ API调用失败日志已记录,用户ID: ${req.user.user_id}`); - } - } catch (logError) { - console.error('保存API失败日志时出错:', logError.message); - } - - if (error.response) { - res.status(error.response.status).json({ - success: false, - message: `DeepSeek API错误: ${error.response.data.error?.message || '未知错误'}`, - error: error.response.data.error - }); - } else if (error.request) { - res.status(500).json({ - success: false, - message: '无法连接到DeepSeek API,请检查网络设置' - }); - } else { - res.status(500).json({ - success: false, - message: '服务器内部错误: ' + error.message - }); - } - } -}); - - +const express = require('express'); +const router = express.Router(); +const axios = require('axios'); +const dbModule = require('../db'); +const db = dbModule.promisePool; +const { authenticateToken } = require('../middleware/auth'); +const fs = require('fs'); +const path = require('path'); +const XLSX = require('xlsx'); // 添加Excel解析库 + +// 安装所需依赖:npm install xlsx + +// 读取和解析文件内容的辅助函数,上限需要测试,目前为100MB未测试 +const readFileContent = async (filePath, maxSize = 100000000) => { + return new Promise((resolve, reject) => { + // 检查文件是否存在 + if (!fs.existsSync(filePath)) { + return reject(new Error('文件不存在')); + } + + // 检查文件大小 + const stats = fs.statSync(filePath); + if (stats.size > maxSize) { + return reject(new Error(`文件过大,最大支持 ${maxSize} 字节`)); + } + + // 获取文件扩展名 + const ext = path.extname(filePath).toLowerCase(); + + try { + // 处理Excel文件 + if (ext === '.xlsx' || ext === '.xls') { + // 使用xlsx库解析Excel文件 + const workbook = XLSX.readFile(filePath); + const sheetName = workbook.SheetNames[0]; // 获取第一个工作表 + const worksheet = workbook.Sheets[sheetName]; + + // 将Excel数据转换为JSON + const jsonData = XLSX.utils.sheet_to_json(worksheet, { header: 1 }); + + // 将数据格式化为易读的文本 + let formattedData = 'Excel文件内容(解析为表格格式):\n'; + + jsonData.forEach((row, index) => { + formattedData += `行${index + 1}: ${JSON.stringify(row)}\n`; + }); + + resolve(formattedData); + } + // 处理CSV文件 + else if (ext === '.csv') { + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + reject(err); + } else { + resolve(`CSV文件内容:\n${data}`); + } + }); + } + // 处理文本文件 + else { + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + reject(err); + } else { + resolve(`文件内容:\n${data}`); + } + }); + } + } catch (error) { + reject(new Error(`解析文件失败: ${error.message}`)); + } + }); +}; + +// 构建包含数据集信息的消息:即系统提示词 +const buildMessagesWithDataset = async (userMessage, dataIds, userId) => { + //定义系统提示词 + const systemPrompt = ` + 你是一个专业的 LaTeX PGFPlots 图表生成助手。 + + 你的任务: + - 根据用户输入的数据和需求,生成可编译的 LaTeX 代码,用于绘制图表(折线图、柱状图、饼图、散点图等)。 + - 输出必须是完整的 standalone 文档,编译后直接得到单页图像/PDF。 + - 只输出 LaTeX 代码本身,不要额外解释、不用 Markdown、不加代码块标记。 + + 严格约束(必须遵守): + 1) 代码必须能在 Linux 服务器的 XeLaTeX (TeX Live 2025) 环境中编译通过。 + 2) 中文支持必须使用:\\usepackage[UTF8]{ctex} + 3) 禁止使用 Windows 专属字体或硬编码字体:SimSun、SimHei、Microsoft YaHei、微软雅黑、宋体、黑体 等。 + 4) 禁止输出 \\setCJKmainfont{SimSun} 或类似硬编码字体设置。 + 5) 文档类必须是:\\documentclass[border=5pt]{standalone} + 6) 使用 pgfplots 绘图:\\usepackage{pgfplots} 并设置 \\pgfplotsset{compat=1.18} + 7) 如果涉及表格/pgfplotstable 相关命令,必须显式加载:\\usepackage{pgfplotstable} + 8) 如果需要 TikZ 节点、注释、文字说明,都必须能正确显示中文(依赖 ctex 即可)。 + 9) 输出图表要尽量清晰美观:合理的尺寸(width/height)、网格(ymajorgrids)、标签、标题、图例、数值标注(nodes near coords)。 + + 输出格式示例(必须符合此结构): + \\documentclass[border=5pt]{standalone} + \\usepackage[UTF8]{ctex} + \\usepackage{pgfplots} + \\pgfplotsset{compat=1.18} + \\begin{document} + \\begin{tikzpicture} + \\begin{axis}[...] + ... + \\end{axis} + \\end{tikzpicture} + \\end{document} + + 现在开始:请根据用户输入生成完整可编译的 LaTeX 图表代码。 + `; + + // 基础消息结构 + let messages = [ + { + role: 'system', + content: systemPrompt + }, + { + role: 'user', + content: userMessage + } + ]; + + if (!dataIds || dataIds.length === 0) { + return messages; + } + + try { + let datasetContent = ''; + + // 查询数据集信息 + const query = ` + SELECT data_id, data_name, file_path, file_name + FROM data_file + WHERE data_id IN (?) AND user_id = ? + `; + + const [datasets] = await db.query(query, [dataIds, userId]); + + if (datasets.length === 0) { + console.log('未找到指定的数据集'); + return messages; + } + + // 读取每个数据集的内容 + for (const dataset of datasets) { + try { + const content = await readFileContent(dataset.file_path); + datasetContent += `\n\n=== 数据集: ${dataset.data_name} (${dataset.file_name}) ===\n${content}`; + } catch (error) { + console.error(`读取数据集 ${dataset.data_id} 失败:`, error.message); + datasetContent += `\n\n=== 数据集: ${dataset.data_name} (${dataset.file_name}) ===\n[无法读取文件内容: ${error.message}]`; + } + } + + // 如果有数据集内容,将其作为系统消息的一部分 + if (datasetContent) { + messages[0].content += `\n\n用户提供了以下数据文件内容:${datasetContent}`; + } + + return messages; + + } catch (error) { + console.error('构建数据集消息失败:', error); + return messages; + } +}; + +// 保存历史记录到数据库和文件系统 +const saveGenerationHistory = async (userId, userInput, aiResponse, dataIds, chartCode) => { + try { + // 获取数据集信息 + let dataId = null; + let fileName = ''; + let datasetName = ''; + + if (dataIds && dataIds.length > 0) { + const query = ` + SELECT data_id, data_name, file_name + FROM data_file + WHERE data_id = ? AND user_id = ? + LIMIT 1 + `; + const [datasets] = await db.query(query, [dataIds[0], userId]); + if (datasets.length > 0) { + dataId = datasets[0].data_id; + datasetName = datasets[0].data_name; + fileName = datasets[0].file_name; + } + } + + // 构建生成描述 + const generationDescription = userInput ? + ` ${userInput.substring(0, 150)}${userInput.length > 150 ? '...' : ''}` : + 'AI图表生成'; + + // 直接使用传入的 chartCode + let finalChartCode = chartCode || ''; + + // 如果传入的 chartCode 为空,才尝试从 aiResponse 中提取 + if (!finalChartCode && aiResponse) { + const codeMatch = aiResponse.match(/```(?:latex|tex)?\s*([\s\S]*?)\s*```/); + if (codeMatch) { + finalChartCode = codeMatch[1].trim(); + } else { + finalChartCode = aiResponse; + } + } + + console.log(`💾 保存图表代码,长度: ${finalChartCode.length}`); + + // 保存到数据库 generation_history 表 + const insertHistoryQuery = ` + INSERT INTO generation_history + (user_id, data_id, generation_description, generation_code, generation_path) + VALUES (?, ?, ?, ?, ?) + `; + + const [result] = await db.query(insertHistoryQuery, [ + userId, + dataId, + generationDescription, + finalChartCode, + null + ]); + + // 获取自增的 history_id + const historyId = result.insertId; + + console.log(`✅ 历史记录已保存到数据库,ID: ${historyId}`); + + // 保存到文件系统 + const historyDir = path.join(__dirname, '..', 'storage', 'history', userId.toString()); + + if (!fs.existsSync(historyDir)) { + fs.mkdirSync(historyDir, { recursive: true }); + } + + const historyFilePath = path.join(historyDir, `${historyId}.json`); + const historyData = { + history_id: historyId, + user_id: userId, + data_id: dataId, + file_name: fileName, + dataset_name: datasetName, + user_input: userInput, + ai_response: aiResponse, + chart_code: finalChartCode, + generation_description: generationDescription, + created_at: new Date().toISOString(), + metadata: { + data_ids: dataIds || [], + has_chart_code: !!finalChartCode, + code_length: finalChartCode.length, + code_source: chartCode ? 'from_request' : 'extracted_from_response' + } + }; + + fs.writeFileSync(historyFilePath, JSON.stringify(historyData, null, 2)); + console.log(`✅ 历史记录已保存到文件系统: ${historyFilePath}`); + + // 记录API调用日志 + const apiLogQuery = ` + INSERT INTO api_log + (user_id, history_id, call_status, call_time) + VALUES (?, ?, 'success', NOW()) + `; + + const [apiLogResult] = await db.query(apiLogQuery, [userId, historyId]); + const callId = apiLogResult.insertId; + + console.log(`✅ API调用日志已记录,call_id: ${callId}`); + + return { + historyId, + callId, + filePath: historyFilePath, + chartCodeLength: finalChartCode.length + }; + + } catch (error) { + console.error('保存历史记录失败:', error); + return null; + } +}; + +// 简化的 DeepSeek API 接口 +router.post('/', authenticateToken, async (req, res) => { + try { + const { message, data_ids, chart_code } = req.body; + + if (!message) { + return res.status(400).json({ + success: false, + message: 'message字段是必需的' + }); + } + + // 构建包含数据集的消息 + const messages = await buildMessagesWithDataset( + message, + data_ids, + req.user.user_id + ); + + // DeepSeek API配置 + const DEEPSEEK_API_URL = process.env.DEEPSEEK_API_URL; + const DEEPSEEK_API_KEY = process.env.DEEPSEEK_API_KEY; + + if (!DEEPSEEK_API_KEY) { + return res.status(500).json({ + success: false, + message: 'DeepSeek API密钥未配置' + }); + } + + // 调用DeepSeek API + const response = await axios.post( + DEEPSEEK_API_URL, + { + model: "deepseek-chat", + messages: messages, + temperature: 0.7, + max_tokens: 2048, + stream: false + }, + { + headers: { + 'Authorization': `Bearer ${DEEPSEEK_API_KEY}`, + 'Content-Type': 'application/json' + }, + timeout: 30000 + } + ); + + console.log(`用户 ${req.user.user_id} 调用了DeepSeek API,附带数据集: ${data_ids || '无'}`); + + // 获取AI回复 + const aiReply = response.data.choices[0].message.content; + + // 提取图表代码 + let finalChartCode = chart_code || ''; + if (!finalChartCode && aiReply) { + const codeMatch = aiReply.match(/```(?:latex|tex)?\s*([\s\S]*?)\s*```/); + if (codeMatch) { + finalChartCode = codeMatch[1].trim(); + } + } + + console.log('📊 图表代码处理过程:'); + console.log('最终提取的 finalChartCode 长度:', finalChartCode.length); + + // 保存历史记录 + const savedHistory = await saveGenerationHistory( + req.user.user_id, + message, + aiReply, + data_ids, + finalChartCode + ); + + // 返回响应 + res.json({ + success: true, + data: { + reply: aiReply, + chart_code: finalChartCode, + usage: response.data.usage, + dataset_count: data_ids ? data_ids.length : 0, + history_id: savedHistory ? savedHistory.historyId : null, + chart_code_length: finalChartCode.length + } + }); + + } catch (error) { + console.error('DeepSeek API调用错误:', error.response?.data || error.message); + + // 记录失败的API调用 + try { + if (req.user && req.user.user_id) { + const errorMessage = error.response?.data?.error?.message || error.message || '未知错误'; + + const apiLogQuery = ` + INSERT INTO api_log + (user_id, history_id, call_status, call_time, call_error) + VALUES (?, NULL, 'failed', NOW(), ?) + `; + + await db.query(apiLogQuery, [ + req.user.user_id, + errorMessage.substring(0, 500) + ]); + + console.log(`❌ API调用失败日志已记录,用户ID: ${req.user.user_id}`); + } + } catch (logError) { + console.error('保存API失败日志时出错:', logError.message); + } + + if (error.response) { + res.status(error.response.status).json({ + success: false, + message: `DeepSeek API错误: ${error.response.data.error?.message || '未知错误'}`, + error: error.response.data.error + }); + } else if (error.request) { + res.status(500).json({ + success: false, + message: '无法连接到DeepSeek API,请检查网络设置' + }); + } else { + res.status(500).json({ + success: false, + message: '服务器内部错误: ' + error.message + }); + } + } +}); + + module.exports = router; \ No newline at end of file diff --git a/src/hello/backend/routes/feedback.js b/src/hello/server/routes/feedback.js similarity index 100% rename from src/hello/backend/routes/feedback.js rename to src/hello/server/routes/feedback.js diff --git a/src/hello/backend/routes/history.js b/src/hello/server/routes/history.js similarity index 100% rename from src/hello/backend/routes/history.js rename to src/hello/server/routes/history.js diff --git a/src/hello/backend/routes/notice.js b/src/hello/server/routes/notice.js similarity index 100% rename from src/hello/backend/routes/notice.js rename to src/hello/server/routes/notice.js diff --git a/src/hello/backend/routes/verification.js b/src/hello/server/routes/verification.js similarity index 100% rename from src/hello/backend/routes/verification.js rename to src/hello/server/routes/verification.js diff --git a/src/hello/backend/services/verificationService.js b/src/hello/server/services/verificationService.js similarity index 100% rename from src/hello/backend/services/verificationService.js rename to src/hello/server/services/verificationService.js diff --git a/src/hello/server/storage/generated_charts/user1/hist1.pdf b/src/hello/server/storage/generated_charts/user1/hist1.pdf new file mode 100644 index 00000000..ef1f30b5 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist1.pdf differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist10.pdf b/src/hello/server/storage/generated_charts/user1/hist10.pdf similarity index 100% rename from src/hello/backend/storage/generated_charts/user1/hist10.pdf rename to src/hello/server/storage/generated_charts/user1/hist10.pdf diff --git a/src/hello/server/storage/generated_charts/user1/hist11.pdf b/src/hello/server/storage/generated_charts/user1/hist11.pdf new file mode 100644 index 00000000..c549e97c Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist11.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist12.pdf b/src/hello/server/storage/generated_charts/user1/hist12.pdf new file mode 100644 index 00000000..d24e04ca Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist12.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist13.pdf b/src/hello/server/storage/generated_charts/user1/hist13.pdf new file mode 100644 index 00000000..4205ce47 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist13.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist15.pdf b/src/hello/server/storage/generated_charts/user1/hist15.pdf new file mode 100644 index 00000000..2d694317 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist15.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist2.pdf b/src/hello/server/storage/generated_charts/user1/hist2.pdf new file mode 100644 index 00000000..77d39683 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist2.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist3.pdf b/src/hello/server/storage/generated_charts/user1/hist3.pdf new file mode 100644 index 00000000..4fb85981 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist3.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist4.pdf b/src/hello/server/storage/generated_charts/user1/hist4.pdf new file mode 100644 index 00000000..760fbc66 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist4.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist5.pdf b/src/hello/server/storage/generated_charts/user1/hist5.pdf new file mode 100644 index 00000000..bfa45ac5 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist5.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist6.pdf b/src/hello/server/storage/generated_charts/user1/hist6.pdf new file mode 100644 index 00000000..f70e2259 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist6.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist7.pdf b/src/hello/server/storage/generated_charts/user1/hist7.pdf new file mode 100644 index 00000000..b6d1649e Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist7.pdf differ diff --git a/src/hello/server/storage/generated_charts/user1/hist8.pdf b/src/hello/server/storage/generated_charts/user1/hist8.pdf new file mode 100644 index 00000000..238c18ad Binary files /dev/null and b/src/hello/server/storage/generated_charts/user1/hist8.pdf differ diff --git a/src/hello/backend/storage/generated_charts/user1/hist9.pdf b/src/hello/server/storage/generated_charts/user1/hist9.pdf similarity index 100% rename from src/hello/backend/storage/generated_charts/user1/hist9.pdf rename to src/hello/server/storage/generated_charts/user1/hist9.pdf diff --git a/src/hello/server/storage/generated_charts/user2/hist10.pdf b/src/hello/server/storage/generated_charts/user2/hist10.pdf new file mode 100644 index 00000000..f6147a94 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist10.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist11.pdf b/src/hello/server/storage/generated_charts/user2/hist11.pdf new file mode 100644 index 00000000..6fc89175 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist11.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist12.pdf b/src/hello/server/storage/generated_charts/user2/hist12.pdf new file mode 100644 index 00000000..ac20799f Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist12.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist14.pdf b/src/hello/server/storage/generated_charts/user2/hist14.pdf new file mode 100644 index 00000000..fa37a5fa Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist14.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist15.pdf b/src/hello/server/storage/generated_charts/user2/hist15.pdf new file mode 100644 index 00000000..91641035 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist15.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist16.pdf b/src/hello/server/storage/generated_charts/user2/hist16.pdf new file mode 100644 index 00000000..91ccacf3 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist16.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist17.pdf b/src/hello/server/storage/generated_charts/user2/hist17.pdf new file mode 100644 index 00000000..482c0ab1 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist17.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist18.pdf b/src/hello/server/storage/generated_charts/user2/hist18.pdf new file mode 100644 index 00000000..8d0ffcdb Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist18.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist19.pdf b/src/hello/server/storage/generated_charts/user2/hist19.pdf new file mode 100644 index 00000000..05512ff6 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist19.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist2.pdf b/src/hello/server/storage/generated_charts/user2/hist2.pdf new file mode 100644 index 00000000..26fec276 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist2.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist20.pdf b/src/hello/server/storage/generated_charts/user2/hist20.pdf new file mode 100644 index 00000000..18dd678b Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist20.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist21.pdf b/src/hello/server/storage/generated_charts/user2/hist21.pdf new file mode 100644 index 00000000..9ddce581 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist21.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist22.pdf b/src/hello/server/storage/generated_charts/user2/hist22.pdf new file mode 100644 index 00000000..d10f94a8 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist22.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist23.pdf b/src/hello/server/storage/generated_charts/user2/hist23.pdf new file mode 100644 index 00000000..9ea7ceab Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist23.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist24.pdf b/src/hello/server/storage/generated_charts/user2/hist24.pdf new file mode 100644 index 00000000..b0ace305 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist24.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist25.pdf b/src/hello/server/storage/generated_charts/user2/hist25.pdf new file mode 100644 index 00000000..5c08e9f1 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist25.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist3.pdf b/src/hello/server/storage/generated_charts/user2/hist3.pdf new file mode 100644 index 00000000..47fcab36 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist3.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist4.pdf b/src/hello/server/storage/generated_charts/user2/hist4.pdf new file mode 100644 index 00000000..102f74ff Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist4.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist5.pdf b/src/hello/server/storage/generated_charts/user2/hist5.pdf new file mode 100644 index 00000000..9630c045 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist5.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist6.pdf b/src/hello/server/storage/generated_charts/user2/hist6.pdf new file mode 100644 index 00000000..5312de5e Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist6.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist7.pdf b/src/hello/server/storage/generated_charts/user2/hist7.pdf new file mode 100644 index 00000000..cce848cc Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist7.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist8.pdf b/src/hello/server/storage/generated_charts/user2/hist8.pdf new file mode 100644 index 00000000..478f8c53 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist8.pdf differ diff --git a/src/hello/server/storage/generated_charts/user2/hist9.pdf b/src/hello/server/storage/generated_charts/user2/hist9.pdf new file mode 100644 index 00000000..92857511 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user2/hist9.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist10.pdf b/src/hello/server/storage/generated_charts/user3/hist10.pdf new file mode 100644 index 00000000..26ef0c91 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist10.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist12.pdf b/src/hello/server/storage/generated_charts/user3/hist12.pdf new file mode 100644 index 00000000..03fd10e4 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist12.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist13.pdf b/src/hello/server/storage/generated_charts/user3/hist13.pdf new file mode 100644 index 00000000..4df4703c Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist13.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist14.pdf b/src/hello/server/storage/generated_charts/user3/hist14.pdf new file mode 100644 index 00000000..78626b8d Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist14.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist15.pdf b/src/hello/server/storage/generated_charts/user3/hist15.pdf new file mode 100644 index 00000000..4a6a3cdf Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist15.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist16.pdf b/src/hello/server/storage/generated_charts/user3/hist16.pdf new file mode 100644 index 00000000..34ea9fe7 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist16.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist17.pdf b/src/hello/server/storage/generated_charts/user3/hist17.pdf new file mode 100644 index 00000000..f3dffae9 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist17.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist18.pdf b/src/hello/server/storage/generated_charts/user3/hist18.pdf new file mode 100644 index 00000000..1d1de09d Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist18.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist19.pdf b/src/hello/server/storage/generated_charts/user3/hist19.pdf new file mode 100644 index 00000000..a142328e Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist19.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist20.pdf b/src/hello/server/storage/generated_charts/user3/hist20.pdf new file mode 100644 index 00000000..3b5c74c7 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist20.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist21.pdf b/src/hello/server/storage/generated_charts/user3/hist21.pdf new file mode 100644 index 00000000..2a6674b2 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist21.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist22.pdf b/src/hello/server/storage/generated_charts/user3/hist22.pdf new file mode 100644 index 00000000..560cefcf Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist22.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist23.pdf b/src/hello/server/storage/generated_charts/user3/hist23.pdf new file mode 100644 index 00000000..eebb2f85 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist23.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist24.pdf b/src/hello/server/storage/generated_charts/user3/hist24.pdf new file mode 100644 index 00000000..bb1b8621 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist24.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist25.pdf b/src/hello/server/storage/generated_charts/user3/hist25.pdf new file mode 100644 index 00000000..cbc89a5d Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist25.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist7.pdf b/src/hello/server/storage/generated_charts/user3/hist7.pdf new file mode 100644 index 00000000..3e596221 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist7.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist8.pdf b/src/hello/server/storage/generated_charts/user3/hist8.pdf new file mode 100644 index 00000000..fb0510a4 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist8.pdf differ diff --git a/src/hello/server/storage/generated_charts/user3/hist9.pdf b/src/hello/server/storage/generated_charts/user3/hist9.pdf new file mode 100644 index 00000000..7eddbc80 Binary files /dev/null and b/src/hello/server/storage/generated_charts/user3/hist9.pdf differ diff --git a/src/hello/server/storage/history/1/1.json b/src/hello/server/storage/history/1/1.json new file mode 100644 index 00000000..57c6b331 --- /dev/null +++ b/src/hello/server/storage/history/1/1.json @@ -0,0 +1,20 @@ +{ + "history_id": 1, + "user_id": 1, + "data_id": 1, + "file_name": "test.xlsx", + "dataset_name": "近五年数据", + "user_input": "生成折线图,粉色", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n xlabel={年份},\n ylabel={数值(万)},\n title={近五年数据折线图},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n grid=both,\n grid style={line width=.1pt, draw=gray!20},\n major grid style={line width=.2pt,draw=gray!50},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=pink!80!red,\n thick,\n mark=*,\n mark size=2.5pt,\n mark options={fill=pink!50!white}\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n every node near coord/.style={\n anchor=south,\n yshift=8pt,\n font=\\footnotesize\n }\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据变化趋势折线图。数据在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n**代码说明:**\n\n1. **颜色设置**:使用 `color=pink!80!red` 创建粉色系折线,标记点填充为浅粉色\n2. **数据点**:使用 `coordinates` 直接输入6个年份的数据点\n3. **数据标签**:通过第二个 `\\addplot` 在数据点上方显示具体数值(带\"万\"单位)\n4. **坐标轴**:\n - X轴:年份从2021到2026\n - Y轴:数值范围300-500万,覆盖所有数据点\n5. **网格**:添加主次网格线增强可读性\n6. **图例**:放置在图表下方居中位置\n7. **标题和说明**:包含主标题和详细的图表说明\n\n**使用建议:**\n- 如需调整粉色深浅,可修改 `pink!80!red` 中的百分比(如 `pink!60!red` 更粉,`pink!100!red` 更红)\n- 如需调整图表尺寸,修改 `width` 和 `height` 参数\n- 编译时需要安装完整的TeX发行版(如TeX Live或MiKTeX)并包含pgfplots包", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n xlabel={年份},\n ylabel={数值(万)},\n title={近五年数据折线图},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n grid=both,\n grid style={line width=.1pt, draw=gray!20},\n major grid style={line width=.2pt,draw=gray!50},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=pink!80!red,\n thick,\n mark=*,\n mark size=2.5pt,\n mark options={fill=pink!50!white}\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n every node near coord/.style={\n anchor=south,\n yshift=8pt,\n font=\\footnotesize\n }\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据变化趋势折线图。数据在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 生成折线图,粉色", + "created_at": "2025-12-17T02:59:05.923Z", + "metadata": { + "data_ids": [ + 1 + ], + "has_chart_code": true, + "code_length": 1472, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/10.json b/src/hello/server/storage/history/1/10.json new file mode 100644 index 00000000..89dfa609 --- /dev/null +++ b/src/hello/server/storage/history/1/10.json @@ -0,0 +1,18 @@ +{ + "history_id": 10, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 绿色柱状图数据\n\\addplot[fill=green!70!black, draw=green!90!black] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}修改为粉红色", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!70!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!70!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\b...", + "created_at": "2025-12-17T03:20:41.287Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1018, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/11.json b/src/hello/server/storage/history/1/11.json new file mode 100644 index 00000000..1a4c94f0 --- /dev/null +++ b/src/hello/server/storage/history/1/11.json @@ -0,0 +1,18 @@ +{ + "history_id": 11, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 绿色柱状图数据\n\\addplot[fill=green!70!black, draw=green!90!black] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}修改为粉红色", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!80!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!80!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\b...", + "created_at": "2025-12-17T03:28:01.585Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1018, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/12.json b/src/hello/server/storage/history/1/12.json new file mode 100644 index 00000000..d61d1027 --- /dev/null +++ b/src/hello/server/storage/history/1/12.json @@ -0,0 +1,18 @@ +{ + "history_id": 12, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 绿色柱状图数据\n\\addplot[fill=green!70!black, draw=green!90!black] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}修改为粉红色", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!80!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!80!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\b...", + "created_at": "2025-12-17T03:38:24.923Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1018, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/13.json b/src/hello/server/storage/history/1/13.json new file mode 100644 index 00000000..2bd559e7 --- /dev/null +++ b/src/hello/server/storage/history/1/13.json @@ -0,0 +1,18 @@ +{ + "history_id": 13, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "生成雷达图示例", + "ai_response": "我将为您生成一个雷达图的LaTeX PGFPlots示例代码。雷达图(也称为蜘蛛图或星形图)非常适合比较多个变量的值。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{polaraxis}[\n width=8cm,\n height=8cm,\n grid=both,\n major grid style={gray!50},\n minor grid style={gray!20},\n xtick={0,60,...,300},\n xticklabels={数学, 物理, 化学, 生物, 英语, 历史},\n ytick={0,20,40,60,80,100},\n ymin=0,\n ymax=100,\n yticklabels={0,20,40,60,80,100},\n ylabel=分数,\n legend style={at={(0.5,-0.1)}, anchor=north, legend columns=3},\n title=学生成绩雷达图\n]\n\n% 学生A的数据\n\\addplot+[mark=*, line width=1.5pt, fill opacity=0.3, fill=red!30] \n coordinates {\n (0,85) % 数学\n (60,78) % 物理\n (120,92) % 化学\n (180,88) % 生物\n (240,76) % 英语\n (300,81) % 历史\n (360,85) % 闭合图形\n };\n \n% 学生B的数据\n\\addplot+[mark=square*, line width=1.5pt, fill opacity=0.3, fill=blue!30] \n coordinates {\n (0,92) % 数学\n (60,85) % 物理\n (120,78) % 化学\n (180,82) % 生物\n (240,88) % 英语\n (300,75) % 历史\n (360,92) % 闭合图形\n };\n \n% 学生C的数据\n\\addplot+[mark=triangle*, line width=1.5pt, fill opacity=0.3, fill=green!30] \n coordinates {\n (0,78) % 数学\n (60,90) % 物理\n (120,85) % 化学\n (180,79) % 生物\n (240,92) % 英语\n (300,88) % 历史\n (360,78) % 闭合图形\n };\n\n\\legend{学生A, 学生B, 学生C}\n\n\\end{polaraxis}\n\\end{tikzpicture}\n\\caption{三位学生在不同科目上的成绩对比雷达图}\n\\end{figure}\n\n\\end{document}\n```\n\n这个雷达图示例展示了:\n\n1. **数据设置**:\n - 比较三位学生在六个科目(数学、物理、化学、生物、英语、历史)上的成绩\n - 每个科目对应极坐标中的一个角度(0°, 60°, 120°, 180°, 240°, 300°)\n - 分数范围从0到100\n\n2. **可视化特性**:\n - 使用不同颜色和标记区分三位学生\n - 半透明填充增强可读性\n - 网格线帮助读取数值\n - 图例位于图表下方\n\n3. **自定义选项**:\n - 可以修改`xticklabels`来改变变量名称\n - 调整`ymax`改变数值范围\n - 修改颜色、标记样式和线宽来自定义外观\n - 添加或删除数据系列来比较更多或更少的项目\n\n要使用此代码,您需要安装支持PGFPlots的LaTeX发行版(如TeX Live或MiKTeX)。编译时可能需要两次编译以确保所有元素正确渲染。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{polaraxis}[\n width=8cm,\n height=8cm,\n grid=both,\n major grid style={gray!50},\n minor grid style={gray!20},\n xtick={0,60,...,300},\n xticklabels={数学, 物理, 化学, 生物, 英语, 历史},\n ytick={0,20,40,60,80,100},\n ymin=0,\n ymax=100,\n yticklabels={0,20,40,60,80,100},\n ylabel=分数,\n legend style={at={(0.5,-0.1)}, anchor=north, legend columns=3},\n title=学生成绩雷达图\n]\n\n% 学生A的数据\n\\addplot+[mark=*, line width=1.5pt, fill opacity=0.3, fill=red!30] \n coordinates {\n (0,85) % 数学\n (60,78) % 物理\n (120,92) % 化学\n (180,88) % 生物\n (240,76) % 英语\n (300,81) % 历史\n (360,85) % 闭合图形\n };\n \n% 学生B的数据\n\\addplot+[mark=square*, line width=1.5pt, fill opacity=0.3, fill=blue!30] \n coordinates {\n (0,92) % 数学\n (60,85) % 物理\n (120,78) % 化学\n (180,82) % 生物\n (240,88) % 英语\n (300,75) % 历史\n (360,92) % 闭合图形\n };\n \n% 学生C的数据\n\\addplot+[mark=triangle*, line width=1.5pt, fill opacity=0.3, fill=green!30] \n coordinates {\n (0,78) % 数学\n (60,90) % 物理\n (120,85) % 化学\n (180,79) % 生物\n (240,92) % 英语\n (300,88) % 历史\n (360,78) % 闭合图形\n };\n\n\\legend{学生A, 学生B, 学生C}\n\n\\end{polaraxis}\n\\end{tikzpicture}\n\\caption{三位学生在不同科目上的成绩对比雷达图}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 生成雷达图示例", + "created_at": "2025-12-17T03:49:52.394Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1480, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/14.json b/src/hello/server/storage/history/1/14.json new file mode 100644 index 00000000..0ed47c89 --- /dev/null +++ b/src/hello/server/storage/history/1/14.json @@ -0,0 +1,18 @@ +{ + "history_id": 14, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "你能生成什么图表类型", + "ai_response": "我可以生成多种常见的图表类型,包括但不限于:\n\n## 📊 **基础图表**\n- **折线图** - 显示数据随时间或类别的变化趋势\n- **柱状图/条形图** - 比较不同类别的数值\n- **散点图** - 展示两个变量之间的关系\n- **饼图/环形图** - 显示各部分占总体的比例\n\n## 📈 **高级图表**\n- **面积图** - 显示数据随时间的变化和累积效果\n- **箱线图** - 展示数据分布和异常值\n- **直方图** - 显示数据分布频率\n- **热力图** - 用颜色表示矩阵数据\n- **误差棒图** - 显示数据的不确定性\n\n## 🔄 **组合图表**\n- **双轴图** - 不同量纲数据的对比\n- **堆叠图** - 显示各部分对总体的贡献\n- **分组柱状图** - 多组数据的对比\n\n## 📐 **专业图表**\n- **3D图表** - 三维数据可视化\n- **极坐标图** - 周期性数据展示\n- **等高线图** - 显示三维数据的二维投影\n\n## 🎯 **特殊用途图表**\n- **甘特图** - 项目进度管理\n- **雷达图** - 多维度数据对比\n- **桑基图** - 流量或能量流动可视化\n\n**使用方法:**\n1. 告诉我你想要生成的图表类型\n2. 提供数据(可以直接描述,或上传Excel/CSV文件)\n3. 说明图表的具体要求(标题、坐标轴标签、颜色偏好等)\n\n**示例请求:**\n- \"请帮我生成一个展示2023年各季度销售额的柱状图\"\n- \"我需要一个比较A/B/C三组实验结果的折线图\"\n- \"请根据上传的销售数据生成月度趋势图\"\n\n你希望生成哪种类型的图表?请提供具体需求和数据,我会为你生成相应的LaTeX PGFPlots代码。", + "chart_code": "我可以生成多种常见的图表类型,包括但不限于:\n\n## 📊 **基础图表**\n- **折线图** - 显示数据随时间或类别的变化趋势\n- **柱状图/条形图** - 比较不同类别的数值\n- **散点图** - 展示两个变量之间的关系\n- **饼图/环形图** - 显示各部分占总体的比例\n\n## 📈 **高级图表**\n- **面积图** - 显示数据随时间的变化和累积效果\n- **箱线图** - 展示数据分布和异常值\n- **直方图** - 显示数据分布频率\n- **热力图** - 用颜色表示矩阵数据\n- **误差棒图** - 显示数据的不确定性\n\n## 🔄 **组合图表**\n- **双轴图** - 不同量纲数据的对比\n- **堆叠图** - 显示各部分对总体的贡献\n- **分组柱状图** - 多组数据的对比\n\n## 📐 **专业图表**\n- **3D图表** - 三维数据可视化\n- **极坐标图** - 周期性数据展示\n- **等高线图** - 显示三维数据的二维投影\n\n## 🎯 **特殊用途图表**\n- **甘特图** - 项目进度管理\n- **雷达图** - 多维度数据对比\n- **桑基图** - 流量或能量流动可视化\n\n**使用方法:**\n1. 告诉我你想要生成的图表类型\n2. 提供数据(可以直接描述,或上传Excel/CSV文件)\n3. 说明图表的具体要求(标题、坐标轴标签、颜色偏好等)\n\n**示例请求:**\n- \"请帮我生成一个展示2023年各季度销售额的柱状图\"\n- \"我需要一个比较A/B/C三组实验结果的折线图\"\n- \"请根据上传的销售数据生成月度趋势图\"\n\n你希望生成哪种类型的图表?请提供具体需求和数据,我会为你生成相应的LaTeX PGFPlots代码。", + "generation_description": " 你能生成什么图表类型", + "created_at": "2025-12-17T03:50:38.922Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 752, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/15.json b/src/hello/server/storage/history/1/15.json new file mode 100644 index 00000000..64af39b9 --- /dev/null +++ b/src/hello/server/storage/history/1/15.json @@ -0,0 +1,18 @@ +{ + "history_id": 15, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{polaraxis}[\n width=8cm,\n height=8cm,\n grid=both,\n major grid style={gray!50},\n minor grid style={gray!20},\n xtick={0,60,...,300},\n xticklabels={数学, 物理, 化学, 生物, 英语, 历史},\n ytick={0,20,40,60,80,100},\n ymin=0,\n ymax=100,\n yticklabels={0,20,40,60,80,100},\n ylabel=分数,\n legend style={at={(0.5,-0.1)}, anchor=north, legend columns=3},\n title=学生成绩雷达图\n]\n\n% 学生A的数据\n\\addplot+[mark=*, line width=1.5pt, fill opacity=0.3, fill=red!30] \n coordinates {\n (0,85) % 数学\n (60,78) % 物理\n (120,92) % 化学\n (180,88) % 生物\n (240,76) % 英语\n (300,81) % 历史\n (360,85) % 闭合图形\n };\n \n% 学生B的数据\n\\addplot+[mark=square*, line width=1.5pt, fill opacity=0.3, fill=blue!30] \n coordinates {\n (0,92) % 数学\n (60,85) % 物理\n (120,78) % 化学\n (180,82) % 生物\n (240,88) % 英语\n (300,75) % 历史\n (360,92) % 闭合图形\n };\n \n% 学生C的数据\n\\addplot+[mark=triangle*, line width=1.5pt, fill opacity=0.3, fill=green!30] \n coordinates {\n (0,78) % 数学\n (60,90) % 物理\n (120,85) % 化学\n (180,79) % 生物\n (240,92) % 英语\n (300,88) % 历史\n (360,78) % 闭合图形\n };\n\n\\legend{学生A, 学生B, 学生C}\n\n\\end{polaraxis}\n\\end{tikzpicture}\n\\caption{三位学生在不同科目上的成绩对比雷达图}\n\\end{figure}\n\n\\end{document}我编译这个代码不能正常显示图表,除了一些字之外就是空白", + "ai_response": "您提供的代码在编译时出现空白图表的问题,通常是由于以下原因造成的:\n\n1. **缺少必要的包**:`pgfplots` 需要正确配置\n2. **坐标轴设置问题**:极坐标图的设置需要调整\n3. **数据格式问题**:极坐标的数据格式需要特别注意\n\n以下是修正后的完整代码,我添加了必要的包并调整了坐标轴设置:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{polaraxis}[\n width=8cm,\n height=8cm,\n grid=both,\n major grid style={gray!50},\n minor grid style={gray!20},\n xtick={0,60,...,300},\n xticklabels={数学, 物理, 化学, 生物, 英语, 历史},\n ytick={0,20,40,60,80,100},\n ymin=0,\n ymax=100,\n yticklabels={0,20,40,60,80,100},\n ylabel=分数,\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n title=学生成绩雷达图,\n domain=0:360,\n samples=360,\n data cs=polar\n]\n\n% 学生A的数据\n\\addplot+[mark=*, line width=1.5pt, fill opacity=0.3, fill=red!30] \n coordinates {\n (0,85) % 数学\n (60,78) % 物理\n (120,92) % 化学\n (180,88) % 生物\n (240,76) % 英语\n (300,81) % 历史\n (360,85) % 闭合图形\n };\n \n% 学生B的数据\n\\addplot+[mark=square*, line width=1.5pt, fill opacity=0.3, fill=blue!30] \n coordinates {\n (0,92) % 数学\n (60,85) % 物理\n (120,78) % 化学\n (180,82) % 生物\n (240,88) % 英语\n (300,75) % 历史\n (360,92) % 闭合图形\n };\n \n% 学生C的数据\n\\addplot+[mark=triangle*, line width=1.5pt, fill opacity=0.3, fill=green!30] \n coordinates {\n (0,78) % 数学\n (60,90) % 物理\n (120,85) % 化学\n (180,79) % 生物\n (240,92) % 英语\n (300,88) % 历史\n (360,78) % 闭合图形\n };\n\n\\legend{学生A, 学生B, 学生C}\n\n\\end{polaraxis}\n\\end{tikzpicture}\n\\caption{三位学生在不同科目上的成绩对比雷达图}\n\\end{figure}\n\n\\end{document}\n```\n\n**主要修改:**\n\n1. **添加了 `\\usepackage{tikz}`**:`pgfplots` 依赖于 `tikz` 包\n2. **添加了极坐标轴的关键参数**:\n - `domain=0:360`:定义角度范围\n - `samples=360`:设置采样点数量\n - `data cs=polar`:明确指定数据坐标系统为极坐标\n3. **调整了图例位置**:将图例向下移动了一点(`at={(0.5,-0.15)}`)\n\n**编译建议:**\n1. 使用支持完整TeX环境的编译器(如TeXLive、MikTeX)\n2. 编译两次以确保所有引用正确解析\n3. 如果仍有问题,尝试使用 `pdflatex` 编译而不是 `latex`\n\n如果仍然无法显示,请告诉我您使用的编译器和具体的错误信息,我可以提供进一步的帮助。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{polaraxis}[\n width=8cm,\n height=8cm,\n grid=both,\n major grid style={gray!50},\n minor grid style={gray!20},\n xtick={0,60,...,300},\n xticklabels={数学, 物理, 化学, 生物, 英语, 历史},\n ytick={0,20,40,60,80,100},\n ymin=0,\n ymax=100,\n yticklabels={0,20,40,60,80,100},\n ylabel=分数,\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n title=学生成绩雷达图,\n domain=0:360,\n samples=360,\n data cs=polar\n]\n\n% 学生A的数据\n\\addplot+[mark=*, line width=1.5pt, fill opacity=0.3, fill=red!30] \n coordinates {\n (0,85) % 数学\n (60,78) % 物理\n (120,92) % 化学\n (180,88) % 生物\n (240,76) % 英语\n (300,81) % 历史\n (360,85) % 闭合图形\n };\n \n% 学生B的数据\n\\addplot+[mark=square*, line width=1.5pt, fill opacity=0.3, fill=blue!30] \n coordinates {\n (0,92) % 数学\n (60,85) % 物理\n (120,78) % 化学\n (180,82) % 生物\n (240,88) % 英语\n (300,75) % 历史\n (360,92) % 闭合图形\n };\n \n% 学生C的数据\n\\addplot+[mark=triangle*, line width=1.5pt, fill opacity=0.3, fill=green!30] \n coordinates {\n (0,78) % 数学\n (60,90) % 物理\n (120,85) % 化学\n (180,79) % 生物\n (240,92) % 英语\n (300,88) % 历史\n (360,78) % 闭合图形\n };\n\n\\legend{学生A, 学生B, 学生C}\n\n\\end{polaraxis}\n\\end{tikzpicture}\n\\caption{三位学生在不同科目上的成绩对比雷达图}\n\\end{figure}\n\n\\end{document}", + "generation_description": " \\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\b...", + "created_at": "2025-12-17T03:53:53.419Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1553, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/16.json b/src/hello/server/storage/history/1/16.json new file mode 100644 index 00000000..a336e8e7 --- /dev/null +++ b/src/hello/server/storage/history/1/16.json @@ -0,0 +1,18 @@ +{ + "history_id": 16, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "你是谁\n搜索", + "ai_response": "我是DeepSeek,一个由深度求索公司开发的AI助手!😊\n\n我可以帮你处理各种任务,包括:\n- 回答问题和提供信息\n- 协助写作和编程\n- 分析文档和数据\n- 生成图表代码(特别是LaTeX PGFPlots图表)\n- 文件处理(支持上传图像、txt、pdf、ppt、word、excel等格式)\n\n如果你有需要生成图表的数据文件,可以上传给我,我会帮你分析数据并生成相应的LaTeX代码!\n\n有什么我可以帮助你的吗?", + "chart_code": "我是DeepSeek,一个由深度求索公司开发的AI助手!😊\n\n我可以帮你处理各种任务,包括:\n- 回答问题和提供信息\n- 协助写作和编程\n- 分析文档和数据\n- 生成图表代码(特别是LaTeX PGFPlots图表)\n- 文件处理(支持上传图像、txt、pdf、ppt、word、excel等格式)\n\n如果你有需要生成图表的数据文件,可以上传给我,我会帮你分析数据并生成相应的LaTeX代码!\n\n有什么我可以帮助你的吗?", + "generation_description": " 你是谁\n搜索", + "created_at": "2025-12-17T02:37:27.409Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 211, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/17.json b/src/hello/server/storage/history/1/17.json similarity index 100% rename from src/hello/backend/storage/history/1/17.json rename to src/hello/server/storage/history/1/17.json diff --git a/src/hello/backend/storage/history/1/18.json b/src/hello/server/storage/history/1/18.json similarity index 100% rename from src/hello/backend/storage/history/1/18.json rename to src/hello/server/storage/history/1/18.json diff --git a/src/hello/backend/storage/history/1/19.json b/src/hello/server/storage/history/1/19.json similarity index 100% rename from src/hello/backend/storage/history/1/19.json rename to src/hello/server/storage/history/1/19.json diff --git a/src/hello/server/storage/history/1/2.json b/src/hello/server/storage/history/1/2.json new file mode 100644 index 00000000..bb2d4b97 --- /dev/null +++ b/src/hello/server/storage/history/1/2.json @@ -0,0 +1,18 @@ +{ + "history_id": 2, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "生成一个饼图示例", + "ai_response": "我将为您生成一个简单的饼图示例,使用PGFPlots的`pie`库。以下是完整的LaTeX代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n text=legend,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside,\n color={blue!30, red!30, green!30, yellow!30, orange!30}\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}\n```\n\n这个饼图展示了以下特点:\n\n1. **数据**:包含5个部门的预算分配比例:\n - 研发部门:35%\n - 市场部门:25%\n - 行政部门:20%\n - 人力资源:12%\n - 其他:8%\n\n2. **样式设置**:\n - 饼图半径为3\n - 使用图例显示标签(而不是直接在饼图上)\n - 设置了不同颜色的扇形区域\n - 添加了标题和图表标题\n\n3. **编译要求**:\n - 需要安装PGFPlots包(通常TeX发行版已包含)\n - 需要启用`pie`库\n\n如果您有特定的数据想要可视化,请提供数据文件或详细描述,我可以为您生成相应的饼图代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n text=legend,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside,\n color={blue!30, red!30, green!30, yellow!30, orange!30}\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 生成一个饼图示例", + "created_at": "2025-12-17T03:03:28.243Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 565, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/20.json b/src/hello/server/storage/history/1/20.json similarity index 100% rename from src/hello/backend/storage/history/1/20.json rename to src/hello/server/storage/history/1/20.json diff --git a/src/hello/backend/storage/history/1/21.json b/src/hello/server/storage/history/1/21.json similarity index 100% rename from src/hello/backend/storage/history/1/21.json rename to src/hello/server/storage/history/1/21.json diff --git a/src/hello/server/storage/history/1/3.json b/src/hello/server/storage/history/1/3.json new file mode 100644 index 00000000..1a03d351 --- /dev/null +++ b/src/hello/server/storage/history/1/3.json @@ -0,0 +1,18 @@ +{ + "history_id": 3, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n text=legend,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside,\n color={blue!30, red!30, green!30, yellow!30, orange!30}\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}我的pdf图上有横轴纵轴但是没有数据显示,怎么修改", + "ai_response": "根据您的描述,问题在于饼图没有显示数据标签。在PGFPlots的饼图中,有多种显示文本的方式。您当前的代码中同时使用了`text=legend`(在legend中显示)和`text=inside`(在饼图内部显示),这可能导致冲突。\n\n以下是修改后的代码,主要调整:\n1. 移除`text=legend`,只使用`text=inside`在饼图内部显示数据\n2. 调整了颜色方案,使饼图更清晰\n3. 优化了图例位置\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside, % 在饼图内部显示数据\n color={blue!40, red!40, green!40, yellow!40, orange!40},\n sum=100, % 确保总和为100%\n before number={\\ }, % 在数字前添加空格\n after number={\\%} % 在数字后添加百分号\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}\n```\n\n如果您希望同时显示图例和内部标签,可以使用以下版本:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=legend, % 在图例中显示标签\n color={blue!40, red!40, green!40, yellow!40, orange!40},\n sum=100,\n pos={0,0}\n]{\n 35/研发部门 (35\\%),\n 25/市场部门 (25\\%),\n 20/行政部门 (20\\%),\n 12/人力资源 (12\\%),\n 8/其他 (8\\%)\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}\n```\n\n**主要修改说明:**\n\n1. **第一个版本**:只在饼图内部显示百分比数据\n - 使用 `text=inside` 在饼图扇区内显示数据\n - 添加 `after number={\\%}` 显示百分号\n - 移除可能导致冲突的 `text=legend`\n\n2. **第二个版本**:在图例中显示完整信息\n - 使用 `text=legend` 在图例中显示\n - 在数据标签中手动添加百分比信息\n - 使用 `pos={0,0}` 确保饼图居中\n\n如果问题仍然存在,请检查:\n1. 是否安装了完整的LaTeX发行版(如TeX Live或MiKTeX)\n2. 是否包含了所有必要的包\n3. 编译时是否使用了正确的引擎(推荐使用XeLaTeX或LuaLaTeX)", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside, % 在饼图内部显示数据\n color={blue!40, red!40, green!40, yellow!40, orange!40},\n sum=100, % 确保总和为100%\n before number={\\ }, % 在数字前添加空格\n after number={\\%} % 在数字后添加百分号\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}", + "generation_description": " \\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpi...", + "created_at": "2025-12-17T03:05:20.599Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 665, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/4.json b/src/hello/server/storage/history/1/4.json new file mode 100644 index 00000000..5997b33c --- /dev/null +++ b/src/hello/server/storage/history/1/4.json @@ -0,0 +1,18 @@ +{ + "history_id": 4, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside, % 在饼图内部显示数据\n color={blue!40, red!40, green!40, yellow!40, orange!40},\n sum=100, % 确保总和为100%\n before number={\\ }, % 在数字前添加空格\n after number={\\%} % 在数字后添加百分号\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}需要安装什么包吗,", + "ai_response": "根据您提供的 LaTeX 代码,您已经正确加载了所需的包。具体来说:\n\n**已安装的包:**\n1. `pgfplots` - 用于绘制图表\n2. `\\usepgfplotslibrary{pie}` - 加载饼图库\n3. `tikz` - 提供绘图环境\n\n**编译要求:**\n- 您需要使用支持 PGFPlots 的 LaTeX 发行版(如 TeX Live、MiKTeX 等)\n- 编译时可能需要添加 `-shell-escape` 参数(如果使用外部数据文件)\n- 建议使用 XeLaTeX 或 LuaLaTeX 以获得更好的中文支持\n\n**完整可编译代码:**\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside, % 在饼图内部显示数据\n color={blue!40, red!40, green!40, yellow!40, orange!40},\n sum=100, % 确保总和为100%\n before number={\\ }, % 在数字前添加空格\n after number={\\%} % 在数字后添加百分号\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}\n```\n\n**如果遇到编译问题:**\n1. 确保已安装完整版的 TeX Live 或 MiKTeX\n2. 如果缺少包,使用包管理器安装:\n - TeX Live: `tlmgr install pgfplots`\n - MiKTeX: 通过 MiKTeX Console 安装\n\n您的代码已经完整且可以直接编译,不需要额外安装其他包。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n pie,\n radius=3,\n scale font,\n legend style={at={(1.2,0.5)}, anchor=west},\n title={2023年公司各部门预算分配},\n title style={yshift=10pt}\n]\n\n\\pie[\n text=inside, % 在饼图内部显示数据\n color={blue!40, red!40, green!40, yellow!40, orange!40},\n sum=100, % 确保总和为100%\n before number={\\ }, % 在数字前添加空格\n after number={\\%} % 在数字后添加百分号\n]{\n 35/研发部门,\n 25/市场部门,\n 20/行政部门,\n 12/人力资源,\n 8/其他\n}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{公司各部门预算分配饼图}\n\\end{figure}\n\n\\end{document}", + "generation_description": " \\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{pie}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpi...", + "created_at": "2025-12-17T03:06:27.774Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 665, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/5.json b/src/hello/server/storage/history/1/5.json new file mode 100644 index 00000000..c02a2155 --- /dev/null +++ b/src/hello/server/storage/history/1/5.json @@ -0,0 +1,20 @@ +{ + "history_id": 5, + "user_id": 1, + "data_id": 2, + "file_name": "test.xlsx", + "dataset_name": "test", + "user_input": "生成柱状图,绿色", + "ai_response": "根据您提供的数据,我将生成一个绿色柱状图,展示2021年至2026年的数据变化趋势。\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 绿色柱状图数据\n\\addplot[fill=green!70!black, draw=green!90!black] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n**代码说明:**\n\n1. **数据转换**:将原始数据中的\"万\"字去除,只保留数值部分(如\"377万\"转换为377)\n\n2. **图表特性**:\n - 使用绿色主题(`fill=green!70!black, draw=green!90!black`)\n - 柱状图上方显示具体数值\n - 添加了垂直网格线便于读数\n - 设置了合适的Y轴范围(300-500)\n - 图例位于图表下方居中位置\n\n3. **中文支持**:使用xeCJK包和SimSun字体支持中文显示\n\n4. **布局优化**:\n - 柱状图宽度适中(20pt)\n - X轴标签自动旋转避免重叠\n - 图表尺寸为12cm×8cm\n\n要使用此代码,您需要:\n1. 确保LaTeX环境支持xeCJK\n2. 安装SimSun字体或更改为您系统中可用的中文字体\n3. 使用XeLaTeX或LuaLaTeX编译\n\n如果您需要调整颜色深浅、柱状图宽度或其他样式,请告诉我,我可以进一步修改代码。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 绿色柱状图数据\n\\addplot[fill=green!70!black, draw=green!90!black] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 生成柱状图,绿色", + "created_at": "2025-12-17T03:08:05.773Z", + "metadata": { + "data_ids": [ + 2 + ], + "has_chart_code": true, + "code_length": 1023, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/6.json b/src/hello/server/storage/history/1/6.json new file mode 100644 index 00000000..01c1f889 --- /dev/null +++ b/src/hello/server/storage/history/1/6.json @@ -0,0 +1,18 @@ +{ + "history_id": 6, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "修改为粉红色", + "ai_response": "由于您没有提供具体的数据集或图表类型,我将基于常见的柱状图示例,生成一个使用粉红色主题的 LaTeX PGFPlots 代码。您可以根据自己的数据调整 `\\addplot` 中的数据点。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例柱状图(粉红色主题)},\n xlabel={类别},\n ylabel={数值},\n ymin=0, ymax=120,\n symbolic x coords={A, B, C, D, E},\n xtick=data,\n enlarge x limits=0.15,\n bar width=0.5cm,\n ybar,\n nodes near coords,\n nodes near coords align={vertical},\n every axis plot/.append style={\n fill=pink!70, % 柱状填充色为粉红色\n draw=magenta, % 边框为洋红色\n },\n grid=major,\n grid style={dashed,gray!30},\n major grid style={line width=0.5pt,draw=gray!50},\n axis background/.style={fill=white},\n title style={font=\\large\\bfseries, color=magenta!80!black},\n xlabel style={font=\\normalsize\\color{magenta!80!black}},\n ylabel style={font=\\normalsize\\color{magenta!80!black}},\n tick label style={font=\\small, color=magenta!50!black},\n]\n\n\\addplot coordinates {(A,40) (B,85) (C,55) (D,70) (E,90)};\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n### 说明:\n1. **颜色设置**:\n - `fill=pink!70`:柱状图填充为 70% 浓度的粉红色。\n - `draw=magenta`:柱状图边框为洋红色。\n - 标题、坐标轴标签和刻度标签均使用了粉红/洋红色系。\n\n2. **图表元素**:\n - 包含网格线,提升可读性。\n - 每个柱子上方显示具体数值(`nodes near coords`)。\n - 坐标轴范围根据数据自动调整(这里预设为 0-120)。\n\n3. **使用建议**:\n - 如需更深的粉红色,可调整 `pink!XX` 中的浓度(如 `pink!90`)。\n - 如需其他图表类型(如折线图、散点图),请提供具体数据和需求。\n\n请将 `\\addplot coordinates` 中的数据替换为您的实际数据。如果需要进一步调整(如更改图表类型、颜色细节等),请提供更多信息。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例柱状图(粉红色主题)},\n xlabel={类别},\n ylabel={数值},\n ymin=0, ymax=120,\n symbolic x coords={A, B, C, D, E},\n xtick=data,\n enlarge x limits=0.15,\n bar width=0.5cm,\n ybar,\n nodes near coords,\n nodes near coords align={vertical},\n every axis plot/.append style={\n fill=pink!70, % 柱状填充色为粉红色\n draw=magenta, % 边框为洋红色\n },\n grid=major,\n grid style={dashed,gray!30},\n major grid style={line width=0.5pt,draw=gray!50},\n axis background/.style={fill=white},\n title style={font=\\large\\bfseries, color=magenta!80!black},\n xlabel style={font=\\normalsize\\color{magenta!80!black}},\n ylabel style={font=\\normalsize\\color{magenta!80!black}},\n tick label style={font=\\small, color=magenta!50!black},\n]\n\n\\addplot coordinates {(A,40) (B,85) (C,55) (D,70) (E,90)};\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 修改为粉红色", + "created_at": "2025-12-17T03:08:48.041Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1017, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/7.json b/src/hello/server/storage/history/1/7.json new file mode 100644 index 00000000..ee3deaff --- /dev/null +++ b/src/hello/server/storage/history/1/7.json @@ -0,0 +1,18 @@ +{ + "history_id": 7, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 绿色柱状图数据\n\\addplot[fill=green!70!black, draw=green!90!black] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}修改为粉红色", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!80!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!80!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\b...", + "created_at": "2025-12-17T03:09:22.287Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1018, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/8.json b/src/hello/server/storage/history/1/8.json new file mode 100644 index 00000000..02f592c0 --- /dev/null +++ b/src/hello/server/storage/history/1/8.json @@ -0,0 +1,18 @@ +{ + "history_id": 8, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 绿色柱状图数据\n\\addplot[fill=green!70!black, draw=green!90!black] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}修改为粉红色", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!70!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数值(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=5pt,\n rotate=0\n },\n title={2021-2026年数据统计},\n ymin=300,\n ymax=500,\n ytick={300,350,400,450,500},\n enlarge x limits=0.15,\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 粉红色柱状图数据\n\\addplot[fill=pink!70!red, draw=pink!90!red] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据统计}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\b...", + "created_at": "2025-12-17T03:19:21.936Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1018, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/1/9.json b/src/hello/server/storage/history/1/9.json new file mode 100644 index 00000000..3c4c24f2 --- /dev/null +++ b/src/hello/server/storage/history/1/9.json @@ -0,0 +1,18 @@ +{ + "history_id": 9, + "user_id": 1, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "你是谁", + "ai_response": "我是您的专业图表生成助手,专注于根据您提供的描述和数据集生成LaTeX PGFPlots代码。如果您上传了Excel文件,我会将其解析为表格格式,分析数据结构,并生成包含实际数据的完整LaTeX代码,包括合适的坐标轴标签、标题和图例。请随时提供您的需求和数据,我将为您生成相应的图表代码!", + "chart_code": "我是您的专业图表生成助手,专注于根据您提供的描述和数据集生成LaTeX PGFPlots代码。如果您上传了Excel文件,我会将其解析为表格格式,分析数据结构,并生成包含实际数据的完整LaTeX代码,包括合适的坐标轴标签、标题和图例。请随时提供您的需求和数据,我将为您生成相应的图表代码!", + "generation_description": " 你是谁", + "created_at": "2025-12-17T03:20:23.498Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 144, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/backend/storage/history/1/hist_1_1765207202219_6608.json b/src/hello/server/storage/history/1/hist_1_1765207202219_6608.json similarity index 100% rename from src/hello/backend/storage/history/1/hist_1_1765207202219_6608.json rename to src/hello/server/storage/history/1/hist_1_1765207202219_6608.json diff --git a/src/hello/backend/storage/history/1/hist_1_1765208684905_4279.json b/src/hello/server/storage/history/1/hist_1_1765208684905_4279.json similarity index 100% rename from src/hello/backend/storage/history/1/hist_1_1765208684905_4279.json rename to src/hello/server/storage/history/1/hist_1_1765208684905_4279.json diff --git a/src/hello/backend/storage/history/1/hist_1_1765249710384_177.json b/src/hello/server/storage/history/1/hist_1_1765249710384_177.json similarity index 100% rename from src/hello/backend/storage/history/1/hist_1_1765249710384_177.json rename to src/hello/server/storage/history/1/hist_1_1765249710384_177.json diff --git a/src/hello/backend/storage/history/1/hist_1_1765252347630_2901.json b/src/hello/server/storage/history/1/hist_1_1765252347630_2901.json similarity index 100% rename from src/hello/backend/storage/history/1/hist_1_1765252347630_2901.json rename to src/hello/server/storage/history/1/hist_1_1765252347630_2901.json diff --git a/src/hello/backend/storage/history/1/hist_1_1765267811988_900.json b/src/hello/server/storage/history/1/hist_1_1765267811988_900.json similarity index 100% rename from src/hello/backend/storage/history/1/hist_1_1765267811988_900.json rename to src/hello/server/storage/history/1/hist_1_1765267811988_900.json diff --git a/src/hello/backend/storage/history/1/hist_1_1765270586206_3440.json b/src/hello/server/storage/history/1/hist_1_1765270586206_3440.json similarity index 100% rename from src/hello/backend/storage/history/1/hist_1_1765270586206_3440.json rename to src/hello/server/storage/history/1/hist_1_1765270586206_3440.json diff --git a/src/hello/backend/storage/history/1/hist_1_1765282137303_4985.json b/src/hello/server/storage/history/1/hist_1_1765282137303_4985.json similarity index 100% rename from src/hello/backend/storage/history/1/hist_1_1765282137303_4985.json rename to src/hello/server/storage/history/1/hist_1_1765282137303_4985.json diff --git a/src/hello/server/storage/history/2/1.json b/src/hello/server/storage/history/2/1.json new file mode 100644 index 00000000..6d4e710d --- /dev/null +++ b/src/hello/server/storage/history/2/1.json @@ -0,0 +1,18 @@ +{ + "history_id": 1, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "你是谁", + "ai_response": "我是一个专业的图表生成助手,专门根据用户提供的描述和数据集生成LaTeX PGFPlots代码。如果你有数据文件(如Excel)和图表需求,我可以帮你生成相应的LaTeX代码,包括分析数据结构、选择合适的图表类型,并设置坐标轴标签、标题和图例等。请提供你的数据和需求,我会直接生成完整的LaTeX代码。", + "chart_code": "我是一个专业的图表生成助手,专门根据用户提供的描述和数据集生成LaTeX PGFPlots代码。如果你有数据文件(如Excel)和图表需求,我可以帮你生成相应的LaTeX代码,包括分析数据结构、选择合适的图表类型,并设置坐标轴标签、标题和图例等。请提供你的数据和需求,我会直接生成完整的LaTeX代码。", + "generation_description": " 你是谁", + "created_at": "2026-01-01T09:06:31.002Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 151, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/10.json b/src/hello/server/storage/history/2/10.json new file mode 100644 index 00000000..b01dfdb1 --- /dev/null +++ b/src/hello/server/storage/history/2/10.json @@ -0,0 +1,18 @@ +{ + "history_id": 10, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "粉红色折线图", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色折线图示例},\n xlabel={X轴},\n ylabel={Y轴},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n width=12cm,\n height=8cm,\n]\n\n% 粉红色折线\n\\addplot [\n color=pink!80!red,\n mark=*,\n line width=1.5pt,\n mark size=3pt,\n] coordinates {\n (1, 20)\n (2, 35)\n (3, 45)\n (4, 60)\n (5, 75)\n (6, 50)\n (7, 65)\n (8, 85)\n (9, 70)\n (10, 90)\n};\n\n\\legend{数据序列}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个代码生成一个粉红色的折线图,包含以下特点:\n\n1. **颜色设置**:使用 `color=pink!80!red` 创建粉红色线条\n2. **数据点**:使用星形标记(`mark=*`),大小设置为3pt\n3. **线条粗细**:1.5pt的线宽\n4. **坐标轴范围**:X轴0-10,Y轴0-100\n5. **网格**:启用主要网格线\n6. **图例**:位于左上角\n7. **图表尺寸**:宽12cm,高8cm\n\n您可以根据需要:\n- 修改坐标数据\n- 调整颜色深浅(如 `pink!60!red` 更浅,`pink!100!red` 更深)\n- 更改标记样式(如 `mark=square*`、`mark=triangle*` 等)\n- 调整图表标题和轴标签", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色折线图示例},\n xlabel={X轴},\n ylabel={Y轴},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n width=12cm,\n height=8cm,\n]\n\n% 粉红色折线\n\\addplot [\n color=pink!80!red,\n mark=*,\n line width=1.5pt,\n mark size=3pt,\n] coordinates {\n (1, 20)\n (2, 35)\n (3, 45)\n (4, 60)\n (5, 75)\n (6, 50)\n (7, 65)\n (8, 85)\n (9, 70)\n (10, 90)\n};\n\n\\legend{数据序列}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 粉红色折线图", + "created_at": "2025-12-21T13:33:24.808Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 672, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/11.json b/src/hello/server/storage/history/2/11.json new file mode 100644 index 00000000..490a0a69 --- /dev/null +++ b/src/hello/server/storage/history/2/11.json @@ -0,0 +1,18 @@ +{ + "history_id": 11, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "雷达图示例", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n \\begin{polaraxis}[\n width=0.8\\textwidth,\n height=0.8\\textwidth,\n grid=both,\n major grid style={black!30},\n minor grid style={black!10},\n minor x tick num=4,\n minor y tick num=1,\n xtick={0,30,...,330},\n xticklabels={指标A, 指标B, 指标C, 指标D, 指标E, 指标F, 指标G, 指标H, 指标I, 指标J, 指标K, 指标L},\n ytick={0.2,0.4,0.6,0.8,1.0},\n yticklabels={20\\%, 40\\%, 60\\%, 80\\%, 100\\%},\n ymax=1,\n ymin=0,\n legend style={at={(0.5,-0.1)}, anchor=north, legend columns=3},\n title={性能指标雷达图}\n ]\n \n % 数据集1\n \\addplot+[mark=*, thick, fill opacity=0.3, fill] coordinates {\n (0,0.8) (30,0.7) (60,0.9) (90,0.6) (120,0.85) (150,0.75)\n (180,0.95) (210,0.65) (240,0.8) (270,0.7) (300,0.9) (330,0.85)\n };\n \\addlegendentry{产品A}\n \n % 数据集2\n \\addplot+[mark=square*, thick, fill opacity=0.3, fill] coordinates {\n (0,0.9) (30,0.6) (60,0.8) (90,0.7) (120,0.95) (150,0.65)\n (180,0.85) (210,0.75) (240,0.9) (270,0.6) (300,0.8) (330,0.7)\n };\n \\addlegendentry{产品B}\n \n % 数据集3\n \\addplot+[mark=triangle*, thick, fill opacity=0.3, fill] coordinates {\n (0,0.7) (30,0.8) (60,0.6) (90,0.9) (120,0.7) (150,0.85)\n (180,0.75) (210,0.9) (240,0.65) (270,0.8) (300,0.7) (330,0.95)\n };\n \\addlegendentry{产品C}\n \n \\end{polaraxis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个雷达图示例展示了三个不同产品在12个指标上的性能对比。主要特点包括:\n\n1. **极坐标系统**:使用polaraxis环境创建雷达图\n2. **网格设置**:包含主网格和次网格,便于读数\n3. **坐标轴标签**:\n - 径向:百分比刻度(20%到100%)\n - 角度:12个指标标签\n4. **数据系列**:\n - 三个数据集,分别代表三个产品\n - 每个数据集有12个数据点,对应12个指标\n - 使用不同的标记形状(圆形、方形、三角形)\n - 半透明填充增强视觉效果\n5. **图例**:底部水平排列,三列布局\n\n您可以根据实际需求:\n- 修改坐标轴标签和标题\n- 调整数据点的数量和数值\n- 更改颜色方案和标记样式\n- 添加或删除数据系列", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\usepgfplotslibrary{polar}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n \\begin{polaraxis}[\n width=0.8\\textwidth,\n height=0.8\\textwidth,\n grid=both,\n major grid style={black!30},\n minor grid style={black!10},\n minor x tick num=4,\n minor y tick num=1,\n xtick={0,30,...,330},\n xticklabels={指标A, 指标B, 指标C, 指标D, 指标E, 指标F, 指标G, 指标H, 指标I, 指标J, 指标K, 指标L},\n ytick={0.2,0.4,0.6,0.8,1.0},\n yticklabels={20\\%, 40\\%, 60\\%, 80\\%, 100\\%},\n ymax=1,\n ymin=0,\n legend style={at={(0.5,-0.1)}, anchor=north, legend columns=3},\n title={性能指标雷达图}\n ]\n \n % 数据集1\n \\addplot+[mark=*, thick, fill opacity=0.3, fill] coordinates {\n (0,0.8) (30,0.7) (60,0.9) (90,0.6) (120,0.85) (150,0.75)\n (180,0.95) (210,0.65) (240,0.8) (270,0.7) (300,0.9) (330,0.85)\n };\n \\addlegendentry{产品A}\n \n % 数据集2\n \\addplot+[mark=square*, thick, fill opacity=0.3, fill] coordinates {\n (0,0.9) (30,0.6) (60,0.8) (90,0.7) (120,0.95) (150,0.65)\n (180,0.85) (210,0.75) (240,0.9) (270,0.6) (300,0.8) (330,0.7)\n };\n \\addlegendentry{产品B}\n \n % 数据集3\n \\addplot+[mark=triangle*, thick, fill opacity=0.3, fill] coordinates {\n (0,0.7) (30,0.8) (60,0.6) (90,0.9) (120,0.7) (150,0.85)\n (180,0.75) (210,0.9) (240,0.65) (270,0.8) (300,0.7) (330,0.95)\n };\n \\addlegendentry{产品C}\n \n \\end{polaraxis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 雷达图示例", + "created_at": "2025-12-21T13:34:12.797Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1528, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/12.json b/src/hello/server/storage/history/2/12.json new file mode 100644 index 00000000..24ed087d --- /dev/null +++ b/src/hello/server/storage/history/2/12.json @@ -0,0 +1,20 @@ +{ + "history_id": 12, + "user_id": 2, + "data_id": 3, + "file_name": "test1.xlsx", + "dataset_name": "考研", + "user_input": "柱状图", + "ai_response": "根据您提供的考研报名人数数据,我将生成一个展示2011-2026年考研报名人数变化的柱状图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n ylabel={报名人数},\n xlabel={年份},\n symbolic x coords={2021,2022,2023,2024,2025,2026},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.append style={\n font=\\small,\n yshift=5pt,\n rotate=90\n },\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2011-2026年考研报名人数变化趋势},\n title style={yshift=10pt, font=\\large\\bfseries},\n tick label style={font=\\small},\n label style={font=\\small},\n legend style={font=\\small}\n]\n\n% 添加数据柱\n\\addplot[fill=blue!50] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加趋势线(可选)\n\\addplot[red, thick, dashed, mark=none] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n\\legend{报名人数, 趋势线}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n**代码说明:**\n\n1. **图表类型**:使用 `ybar` 创建垂直柱状图\n2. **数据点**:包含2021-2026年共6个数据点\n3. **数据标签**:每个柱子上方显示具体数值(旋转90度以便阅读)\n4. **坐标轴**:\n - X轴:年份(2021-2026)\n - Y轴:报名人数(单位:万),范围0-500万\n5. **视觉元素**:\n - 蓝色柱状图表示各年份报名人数\n - 红色虚线显示人数变化趋势\n - 添加网格线便于读数\n6. **中文字体**:使用xeCJK包支持中文显示\n\n**使用说明:**\n1. 需要安装LaTeX发行版(如TeX Live或MiKTeX)\n2. 需要安装中文字体(代码中使用SimSun,可根据需要修改)\n3. 编译时使用XeLaTeX以支持中文\n\n如果您需要调整颜色、柱宽、字体大小或其他样式,请告诉我,我可以进一步修改代码。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n ylabel={报名人数},\n xlabel={年份},\n symbolic x coords={2021,2022,2023,2024,2025,2026},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.append style={\n font=\\small,\n yshift=5pt,\n rotate=90\n },\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2011-2026年考研报名人数变化趋势},\n title style={yshift=10pt, font=\\large\\bfseries},\n tick label style={font=\\small},\n label style={font=\\small},\n legend style={font=\\small}\n]\n\n% 添加数据柱\n\\addplot[fill=blue!50] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加趋势线(可选)\n\\addplot[red, thick, dashed, mark=none] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n\\legend{报名人数, 趋势线}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 柱状图", + "created_at": "2025-12-22T07:52:12.967Z", + "metadata": { + "data_ids": [ + 3 + ], + "has_chart_code": true, + "code_length": 1159, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/13.json b/src/hello/server/storage/history/2/13.json new file mode 100644 index 00000000..dcf19bf6 --- /dev/null +++ b/src/hello/server/storage/history/2/13.json @@ -0,0 +1,18 @@ +{ + "history_id": 13, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "你是谁", + "ai_response": "我是一个专业的图表生成助手,擅长根据用户需求和数据集生成LaTeX PGFPlots代码。如果您有数据文件(如Excel)和图表需求,我可以帮助您生成相应的LaTeX代码,包括数据解析、图表类型选择、坐标轴设置等。请提供您的数据和需求,我将为您生成完整的LaTeX PGFPlots代码。", + "chart_code": "我是一个专业的图表生成助手,擅长根据用户需求和数据集生成LaTeX PGFPlots代码。如果您有数据文件(如Excel)和图表需求,我可以帮助您生成相应的LaTeX代码,包括数据解析、图表类型选择、坐标轴设置等。请提供您的数据和需求,我将为您生成完整的LaTeX PGFPlots代码。", + "generation_description": " 你是谁", + "created_at": "2025-12-29T04:23:12.026Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 144, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/14.json b/src/hello/server/storage/history/2/14.json new file mode 100644 index 00000000..1570e3d3 --- /dev/null +++ b/src/hello/server/storage/history/2/14.json @@ -0,0 +1,18 @@ +{ + "history_id": 14, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "生成折线图", + "ai_response": "由于您没有提供具体的数据集,我将为您生成一个通用的折线图LaTeX PGFPlots代码模板。您可以根据需要修改数据、标签和样式。\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n title={示例折线图},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1,20)\n (2,35)\n (3,45)\n (4,60)\n (5,75)\n (6,85)\n (7,90)\n };\n \\addlegendentry{数据集A}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1,10)\n (2,25)\n (3,40)\n (4,55)\n (5,65)\n (6,70)\n (7,80)\n };\n \\addlegendentry{数据集B}\n\n% 第三条折线\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (1,30)\n (2,50)\n (3,60)\n (4,70)\n (5,80)\n (6,90)\n (7,95)\n };\n \\addlegendentry{数据集C}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n如果您有具体的数据文件(如Excel、CSV等),请上传文件,我可以:\n1. 解析您的实际数据\n2. 根据数据特点调整图表类型和样式\n3. 生成包含您实际数据的完整LaTeX代码\n\n请提供您的数据文件或详细描述您的数据结构和需求,我将为您生成更精确的图表代码。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n title={示例折线图},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1,20)\n (2,35)\n (3,45)\n (4,60)\n (5,75)\n (6,85)\n (7,90)\n };\n \\addlegendentry{数据集A}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1,10)\n (2,25)\n (3,40)\n (4,55)\n (5,65)\n (6,70)\n (7,80)\n };\n \\addlegendentry{数据集B}\n\n% 第三条折线\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (1,30)\n (2,50)\n (3,60)\n (4,70)\n (5,80)\n (6,90)\n (7,95)\n };\n \\addlegendentry{数据集C}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 生成折线图", + "created_at": "2025-12-29T04:23:47.377Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1005, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/15.json b/src/hello/server/storage/history/2/15.json new file mode 100644 index 00000000..19339a53 --- /dev/null +++ b/src/hello/server/storage/history/2/15.json @@ -0,0 +1,18 @@ +{ + "history_id": 15, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "生成柱状图", + "ai_response": "由于您没有提供具体的数据集,我将为您生成一个通用的柱状图LaTeX PGFPlots 代码示例。您可以根据需要修改数据、标签和样式。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例柱状图},\n xlabel={类别},\n ylabel={数值},\n symbolic x coords={A, B, C, D, E},\n xtick=data,\n ybar,\n bar width=0.5cm,\n ymajorgrids=true,\n grid style=dashed,\n nodes near coords,\n nodes near coords align={vertical},\n enlarge x limits=0.15,\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot coordinates {(A,40) (B,65) (C,50) (D,80) (E,90)};\n\\addplot coordinates {(A,30) (B,45) (C,60) (D,70) (E,85)};\n\n\\legend{数据集1, 数据集2}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n如果您有具体的数据,请提供:\n1. 数据文件(如Excel、CSV等)\n2. 或直接列出数据\n3. 图表的具体要求(如标题、颜色、尺寸等)\n\n我可以为您生成定制化的代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例柱状图},\n xlabel={类别},\n ylabel={数值},\n symbolic x coords={A, B, C, D, E},\n xtick=data,\n ybar,\n bar width=0.5cm,\n ymajorgrids=true,\n grid style=dashed,\n nodes near coords,\n nodes near coords align={vertical},\n enlarge x limits=0.15,\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n\\addplot coordinates {(A,40) (B,65) (C,50) (D,80) (E,90)};\n\\addplot coordinates {(A,30) (B,45) (C,60) (D,70) (E,85)};\n\n\\legend{数据集1, 数据集2}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 生成柱状图", + "created_at": "2025-12-29T05:17:40.845Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 694, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/16.json b/src/hello/server/storage/history/2/16.json new file mode 100644 index 00000000..05d33ded --- /dev/null +++ b/src/hello/server/storage/history/2/16.json @@ -0,0 +1,20 @@ +{ + "history_id": 16, + "user_id": 2, + "data_id": 4, + "file_name": "test.xlsx", + "dataset_name": "test", + "user_input": "折线图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north east,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线图\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 在数据点上添加数值标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n font=\\small\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n## 图表特点说明:\n\n1. **数据转换**:将\"377万\"等字符串转换为数值377,便于绘图\n2. **坐标轴设置**:\n - X轴:年份标签(2021年-2026年)\n - Y轴:数值范围300-500万,显示网格线\n3. **视觉效果**:\n - 蓝色折线,带圆点标记\n - 平滑曲线连接数据点\n - 每个数据点上方显示具体数值\n4. **布局**:\n - 图表尺寸:12cm × 8cm\n - 标题居中加粗\n - 包含图例和说明文字\n\n## 使用说明:\n\n1. 将代码保存为`.tex`文件\n2. 使用支持PGFPlots的LaTeX编译器编译(如TeX Live、MiKTeX)\n3. 需要安装`pgfplots`包\n\n图表清晰地展示了数据先上升后下降的趋势,2023年为峰值(474万),2026年降至最低(343万)。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north east,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线图\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 在数据点上添加数值标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n font=\\small\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2025-12-17T08:04:08.080Z", + "metadata": { + "data_ids": [ + 4 + ], + "has_chart_code": true, + "code_length": 1334, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/17.json b/src/hello/server/storage/history/2/17.json new file mode 100644 index 00000000..17cb5999 --- /dev/null +++ b/src/hello/server/storage/history/2/17.json @@ -0,0 +1,20 @@ +{ + "history_id": 17, + "user_id": 2, + "data_id": 6, + "file_name": "test.txt", + "dataset_name": "test", + "user_input": "柱状图,粉色", + "ai_response": "```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style={dashed, lightgray},\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n xticklabel style={rotate=0},\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n title={年度数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n ymin=0,\n ymax=500,\n ytick={0,100,200,300,400,500},\n axis lines=left,\n tick style={black, thin},\n every axis plot/.append style={\n fill=magenta!70,\n draw=magenta!90,\n line width=0.5pt\n }\n]\n\n\\addplot coordinates {\n (2021年,377)\n (2022年,457)\n (2023年,474)\n (2024年,438)\n (2025年,388)\n (2026年,343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n这个柱状图的特点:\n\n1. **粉色主题**:使用 `magenta!70` 作为填充色,`magenta!90` 作为边框色\n2. **数据标签**:每个柱子上方显示具体数值\n3. **网格线**:添加了水平网格线便于读数\n4. **坐标轴设置**:\n - X轴:年份标签(2021年-2026年)\n - Y轴:数量(万),范围0-500\n5. **图表尺寸**:12cm×8cm,适合嵌入文档\n6. **中文字体**:使用xeCJK包支持中文显示\n\n如果需要调整粉色深浅,可以修改:\n- `magenta!70` 中的数字(0-100)控制透明度\n- 或者使用其他粉色系颜色如 `pink!80`、`violet!60` 等", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style={dashed, lightgray},\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n xticklabel style={rotate=0},\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n title={年度数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n ymin=0,\n ymax=500,\n ytick={0,100,200,300,400,500},\n axis lines=left,\n tick style={black, thin},\n every axis plot/.append style={\n fill=magenta!70,\n draw=magenta!90,\n line width=0.5pt\n }\n]\n\n\\addplot coordinates {\n (2021年,377)\n (2022年,457)\n (2023年,474)\n (2024年,438)\n (2025年,388)\n (2026年,343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 柱状图,粉色", + "created_at": "2025-12-17T08:53:36.207Z", + "metadata": { + "data_ids": [ + 6 + ], + "has_chart_code": true, + "code_length": 1043, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/18.json b/src/hello/server/storage/history/2/18.json new file mode 100644 index 00000000..02f6377c --- /dev/null +++ b/src/hello/server/storage/history/2/18.json @@ -0,0 +1,18 @@ +{ + "history_id": 18, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style={dashed, lightgray},\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n xticklabel style={rotate=0},\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n title={年度数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n ymin=0,\n ymax=500,\n ytick={0,100,200,300,400,500},\n axis lines=left,\n tick style={black, thin},\n every axis plot/.append style={\n fill=magenta!70,\n draw=magenta!90,\n line width=0.5pt\n }\n]\n\n\\addplot coordinates {\n (2021年,377)\n (2022年,457)\n (2023年,474)\n (2024年,438)\n (2025年,388)\n (2026年,343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}两边的柱形图超出范围了;修改为粉色", + "ai_response": "```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style={dashed, lightgray},\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n xticklabel style={rotate=0},\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n title={年度数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n ymin=0,\n ymax=500,\n ytick={0,100,200,300,400,500},\n axis lines=left,\n tick style={black, thin},\n enlarge x limits=0.1, % 增加x轴两侧的空白,防止柱形超出边界\n every axis plot/.append style={\n fill=pink!70, % 修改为粉色\n draw=pink!90, % 修改为粉色\n line width=0.5pt\n }\n]\n\n\\addplot coordinates {\n (2021年,377)\n (2022年,457)\n (2023年,474)\n (2024年,438)\n (2025年,388)\n (2026年,343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n主要修改:\n1. 添加了 `enlarge x limits=0.1` 选项,这会为x轴两侧增加10%的空白,防止柱形图超出坐标轴范围\n2. 将颜色从magenta改为pink(粉色),包括填充色和边框色", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style={dashed, lightgray},\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n xticklabel style={rotate=0},\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n title={年度数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n ymin=0,\n ymax=500,\n ytick={0,100,200,300,400,500},\n axis lines=left,\n tick style={black, thin},\n enlarge x limits=0.1, % 增加x轴两侧的空白,防止柱形超出边界\n every axis plot/.append style={\n fill=pink!70, % 修改为粉色\n draw=pink!90, % 修改为粉色\n line width=0.5pt\n }\n]\n\n\\addplot coordinates {\n (2021年,377)\n (2022年,457)\n (2023年,474)\n (2024年,438)\n (2025年,388)\n (2026年,343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun}\n\n\\begin{document}\n\\b...", + "created_at": "2025-12-17T08:54:40.138Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1100, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/19.json b/src/hello/server/storage/history/2/19.json new file mode 100644 index 00000000..d804bc24 --- /dev/null +++ b/src/hello/server/storage/history/2/19.json @@ -0,0 +1,18 @@ +{ + "history_id": 19, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "是粉红色,你的不是", + "ai_response": "好的,我理解您想要一个粉红色的图表。作为图表生成助手,我无法直接看到您上传的文件或之前对话中提到的具体数据。为了生成您想要的粉红色图表,我需要您提供以下信息:\n\n1. **您的数据**:请将您的数据以文本形式(例如CSV格式)粘贴在下方,或者详细描述数据的结构和内容(例如:“我有三列数据:年份、产品A销量、产品B销量”)。\n2. **图表类型**:您希望生成什么类型的图表?(例如:折线图、柱状图、散点图、饼图)\n3. **图表的具体要求**:除了主色调为粉红色,您对图表还有其他要求吗?(例如:坐标轴标签、标题、图例位置、网格线等)\n\n**示例请求格式:**\n```\n图表类型:折线图\n数据:\n年份, 销量\n2021, 150\n2022, 200\n2023, 180\n要求:图表线条和标题使用粉红色,添加网格线。\n```\n\n一旦您提供了这些信息,我将立即为您生成一份使用粉红色主题、并整合了您实际数据的完整 LaTeX PGFPlots 代码。\n\n**例如,根据上面的示例数据,我会生成类似下面的代码(关键部分已标红):**\n\n```latex\n\\documentclass[tikz,border=10pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xcolor}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={\\textcolor{magenta!80!red}{年度销量趋势图}}, % 粉红色标题\n xlabel={年份},\n ylabel={销量},\n xmin=2020.5, xmax=2023.5,\n ymin=140, ymax=220,\n xtick={2021,2022,2023},\n grid=both, % 添加网格\n grid style={line width=.1pt, draw=gray!20},\n major grid style={line width=.2pt,draw=gray!50},\n legend pos=north west,\n width=10cm,\n height=6cm\n]\n\n% 使用粉红色绘制折线\n\\addplot [\n color=magenta!80!red, % 粉红色线条\n mark=*, % 数据点标记\n line width=1.5pt,\n ]\n coordinates {\n (2021, 150)\n (2022, 200)\n (2023, 180)\n };\n \\legend{总销量}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n**请提供您的数据和具体要求,我马上为您定制。**", + "chart_code": "图表类型:折线图\n数据:\n年份, 销量\n2021, 150\n2022, 200\n2023, 180\n要求:图表线条和标题使用粉红色,添加网格线。", + "generation_description": " 是粉红色,你的不是", + "created_at": "2025-12-17T08:56:29.103Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 72, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/2.json b/src/hello/server/storage/history/2/2.json new file mode 100644 index 00000000..951238bb --- /dev/null +++ b/src/hello/server/storage/history/2/2.json @@ -0,0 +1,18 @@ +{ + "history_id": 2, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "帮我生成一恶搞折线图", + "ai_response": "我将为您生成一个折线图的LaTeX PGFPlots代码。由于您没有提供具体的数据,我将创建一个示例折线图,展示如何绘制多条折线。\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n title={示例折线图:产品销量趋势},\n xlabel={月份},\n ylabel={销量(单位:千)},\n xmin=1, xmax=12,\n ymin=0, ymax=120,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月},\n legend pos=north west,\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!50},\n]\n\n% 产品A数据\n\\addplot[\n color=blue,\n mark=square*,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 20)(2, 35)(3, 45)(4, 38)(5, 52)(6, 65)\n (7, 78)(8, 85)(9, 92)(10, 88)(11, 95)(12, 105)\n};\n\\addlegendentry{产品A}\n\n% 产品B数据\n\\addplot[\n color=red,\n mark=triangle*,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 15)(2, 28)(3, 42)(4, 55)(5, 48)(6, 60)\n (7, 72)(8, 68)(9, 75)(10, 82)(11, 90)(12, 98)\n};\n\\addlegendentry{产品B}\n\n% 产品C数据\n\\addplot[\n color=green!70!black,\n mark=*,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 10)(2, 22)(3, 35)(4, 42)(5, 58)(6, 52)\n (7, 65)(8, 78)(9, 85)(10, 92)(11, 88)(12, 95)\n};\n\\addlegendentry{产品C}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n如果您有具体的数据文件(如Excel、CSV等),请上传文件,我可以:\n1. 根据您的实际数据生成图表\n2. 调整图表样式(颜色、标记、线型等)\n3. 设置合适的坐标轴范围和标签\n4. 添加必要的注释和说明\n\n请告诉我您的具体需求,或者上传您的数据文件,我可以为您生成更符合实际需求的折线图代码。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n title={示例折线图:产品销量趋势},\n xlabel={月份},\n ylabel={销量(单位:千)},\n xmin=1, xmax=12,\n ymin=0, ymax=120,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月},\n legend pos=north west,\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!50},\n]\n\n% 产品A数据\n\\addplot[\n color=blue,\n mark=square*,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 20)(2, 35)(3, 45)(4, 38)(5, 52)(6, 65)\n (7, 78)(8, 85)(9, 92)(10, 88)(11, 95)(12, 105)\n};\n\\addlegendentry{产品A}\n\n% 产品B数据\n\\addplot[\n color=red,\n mark=triangle*,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 15)(2, 28)(3, 42)(4, 55)(5, 48)(6, 60)\n (7, 72)(8, 68)(9, 75)(10, 82)(11, 90)(12, 98)\n};\n\\addlegendentry{产品B}\n\n% 产品C数据\n\\addplot[\n color=green!70!black,\n mark=*,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 10)(2, 22)(3, 35)(4, 42)(5, 58)(6, 52)\n (7, 65)(8, 78)(9, 85)(10, 92)(11, 88)(12, 95)\n};\n\\addlegendentry{产品C}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 帮我生成一恶搞折线图", + "created_at": "2026-01-01T09:06:56.620Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1259, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/20.json b/src/hello/server/storage/history/2/20.json new file mode 100644 index 00000000..46c46f30 --- /dev/null +++ b/src/hello/server/storage/history/2/20.json @@ -0,0 +1,18 @@ +{ + "history_id": 20, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "粉红色折线图", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{data.csv}\nx,y\n1,2\n2,4\n3,1\n4,3\n5,5\n6,2\n7,4\n8,6\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色折线图示例},\n xlabel={X轴},\n ylabel={Y轴},\n xmin=0, xmax=9,\n ymin=0, ymax=7,\n xtick={1,2,3,4,5,6,7,8},\n ytick={0,1,2,3,4,5,6,7},\n legend pos=north west,\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!25},\n width=12cm,\n height=8cm\n]\n\n\\addplot[\n color=magenta!80!white,\n mark=*,\n mark options={fill=magenta!50!white},\n line width=1.5pt,\n smooth\n] table[x=x, y=y, col sep=comma] {data.csv};\n\\legend{数据序列}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个LaTeX代码生成一个粉红色的折线图,包含以下特点:\n\n1. **颜色设置**:使用`magenta!80!white`作为折线颜色,`magenta!50!white`作为标记点填充色\n2. **数据点**:包含8个数据点,用星形标记表示\n3. **平滑曲线**:使用`smooth`选项使折线更平滑\n4. **网格线**:添加了浅灰色网格便于读数\n5. **坐标轴**:设置了合适的范围和刻度\n6. **图例**:位于左上角\n\n如果您有特定的数据需要可视化,请提供数据文件或数据表,我可以为您生成包含实际数据的定制化图表代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{data.csv}\nx,y\n1,2\n2,4\n3,1\n4,3\n5,5\n6,2\n7,4\n8,6\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色折线图示例},\n xlabel={X轴},\n ylabel={Y轴},\n xmin=0, xmax=9,\n ymin=0, ymax=7,\n xtick={1,2,3,4,5,6,7,8},\n ytick={0,1,2,3,4,5,6,7},\n legend pos=north west,\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!25},\n width=12cm,\n height=8cm\n]\n\n\\addplot[\n color=magenta!80!white,\n mark=*,\n mark options={fill=magenta!50!white},\n line width=1.5pt,\n smooth\n] table[x=x, y=y, col sep=comma] {data.csv};\n\\legend{数据序列}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 粉红色折线图", + "created_at": "2025-12-17T09:01:48.534Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 800, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/21.json b/src/hello/server/storage/history/2/21.json new file mode 100644 index 00000000..4a973b17 --- /dev/null +++ b/src/hello/server/storage/history/2/21.json @@ -0,0 +1,18 @@ +{ + "history_id": 21, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "是粉红色,你的不是", + "ai_response": "好的,我理解您需要生成一个粉红色的图表。由于您没有提供具体的数据和图表类型,我将创建一个使用粉红色主题的示例柱状图。您可以将此代码中的数据和标签替换为您自己的内容。\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xcolor}\n\n% 定义粉红色系\n\\definecolor{lightpink}{RGB}{255,182,193}\n\\definecolor{deeppink}{RGB}{255,20,147}\n\\definecolor{palevioletred}{RGB}{219,112,147}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色主题示例柱状图},\n xlabel={类别},\n ylabel={数值},\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n symbolic x coords={A, B, C, D, E},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every axis plot/.append style={\n fill,\n draw=black,\n very thin\n },\n cycle list={\n {fill=lightpink!80!white},\n {fill=deeppink!80!white},\n {fill=palevioletred!80!white}\n }\n]\n\n% 第一组数据 - 浅粉色\n\\addplot+ coordinates {\n (A, 42)\n (B, 58)\n (C, 35)\n (D, 67)\n (E, 49)\n};\n\\addlegendentry{数据集 1}\n\n% 第二组数据 - 深粉色\n\\addplot+ coordinates {\n (A, 38)\n (B, 45)\n (C, 62)\n (D, 51)\n (E, 55)\n};\n\\addlegendentry{数据集 2}\n\n% 第三组数据 - 紫红色\n\\addplot+ coordinates {\n (A, 55)\n (B, 32)\n (C, 48)\n (D, 41)\n (E, 60)\n};\n\\addlegendentry{数据集 3}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n如果您有特定的数据文件(如Excel文件),请上传它,并告诉我:\n1. 您想要展示什么数据\n2. 希望生成什么类型的图表(折线图、柱状图、散点图等)\n3. 任何特定的格式要求\n\n我会根据您的实际数据生成完全定制的粉红色主题图表代码。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xcolor}\n\n% 定义粉红色系\n\\definecolor{lightpink}{RGB}{255,182,193}\n\\definecolor{deeppink}{RGB}{255,20,147}\n\\definecolor{palevioletred}{RGB}{219,112,147}\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色主题示例柱状图},\n xlabel={类别},\n ylabel={数值},\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n symbolic x coords={A, B, C, D, E},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every axis plot/.append style={\n fill,\n draw=black,\n very thin\n },\n cycle list={\n {fill=lightpink!80!white},\n {fill=deeppink!80!white},\n {fill=palevioletred!80!white}\n }\n]\n\n% 第一组数据 - 浅粉色\n\\addplot+ coordinates {\n (A, 42)\n (B, 58)\n (C, 35)\n (D, 67)\n (E, 49)\n};\n\\addlegendentry{数据集 1}\n\n% 第二组数据 - 深粉色\n\\addplot+ coordinates {\n (A, 38)\n (B, 45)\n (C, 62)\n (D, 51)\n (E, 55)\n};\n\\addlegendentry{数据集 2}\n\n% 第三组数据 - 紫红色\n\\addplot+ coordinates {\n (A, 55)\n (B, 32)\n (C, 48)\n (D, 41)\n (E, 60)\n};\n\\addlegendentry{数据集 3}\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 是粉红色,你的不是", + "created_at": "2025-12-17T09:09:13.824Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1264, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/22.json b/src/hello/server/storage/history/2/22.json new file mode 100644 index 00000000..bd73ae54 --- /dev/null +++ b/src/hello/server/storage/history/2/22.json @@ -0,0 +1,18 @@ +{ + "history_id": 22, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "是粉红色,你的不是", + "ai_response": "我理解您想要粉红色的图表。让我为您生成一个使用粉红色主题的LaTeX PGFPlots图表代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色主题数据图表},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n grid style={dashed, gray!30},\n width=12cm,\n height=8cm,\n % 粉红色主题设置\n axis background/.style={fill=pink!5},\n axis line style={pink!80!black},\n tick style={pink!80!black},\n title style={color=pink!70!red},\n xlabel style={color=pink!70!red},\n ylabel style={color=pink!70!red},\n legend style={fill=pink!10, draw=pink!50}\n]\n\n% 第一条曲线 - 深粉红色\n\\addplot [\n domain=0:10,\n samples=100,\n color=pink!80!red,\n thick\n] {x^2};\n\\addlegendentry{二次函数 $y = x^2$}\n\n% 第二条曲线 - 浅粉红色\n\\addplot [\n domain=0:10,\n samples=100,\n color=pink!50,\n thick,\n dashed\n] {10*x};\n\\addlegendentry{线性函数 $y = 10x$}\n\n% 散点数据点 - 使用不同的粉红色调\n\\addplot[\n only marks,\n mark=*,\n mark size=3pt,\n color=pink!60!purple,\n fill=pink!30\n] coordinates {\n (1,1) (2,4) (3,9) (4,16) (5,25)\n (6,36) (7,49) (8,64) (9,81) (10,100)\n};\n\n\\addlegendentry{数据点}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个图表具有以下粉红色主题特征:\n\n1. **背景颜色**:浅粉红色背景(pink!5)\n2. **坐标轴颜色**:粉红色边框(pink!80!black)\n3. **刻度颜色**:粉红色刻度\n4. **标题和标签**:粉红色文字\n5. **图例**:粉红色背景边框\n6. **曲线颜色**:\n - 第一条曲线:深粉红色(pink!80!red)\n - 第二条曲线:浅粉红色(pink!50)\n - 散点:紫粉色(pink!60!purple)\n\n您可以根据需要调整:\n- 将 `pink!5` 中的数字改为0-100之间的值来调整颜色深浅(数字越小颜色越浅)\n- 使用不同的粉红色变体:`pink!50!red`、`pink!50!purple`、`hotpink`、`magenta`等\n- 调整线条粗细、标记大小等参数\n\n如果您有特定的数据集需要可视化,请提供数据,我可以为您生成包含实际数据的粉红色主题图表。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色主题数据图表},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n grid style={dashed, gray!30},\n width=12cm,\n height=8cm,\n % 粉红色主题设置\n axis background/.style={fill=pink!5},\n axis line style={pink!80!black},\n tick style={pink!80!black},\n title style={color=pink!70!red},\n xlabel style={color=pink!70!red},\n ylabel style={color=pink!70!red},\n legend style={fill=pink!10, draw=pink!50}\n]\n\n% 第一条曲线 - 深粉红色\n\\addplot [\n domain=0:10,\n samples=100,\n color=pink!80!red,\n thick\n] {x^2};\n\\addlegendentry{二次函数 $y = x^2$}\n\n% 第二条曲线 - 浅粉红色\n\\addplot [\n domain=0:10,\n samples=100,\n color=pink!50,\n thick,\n dashed\n] {10*x};\n\\addlegendentry{线性函数 $y = 10x$}\n\n% 散点数据点 - 使用不同的粉红色调\n\\addplot[\n only marks,\n mark=*,\n mark size=3pt,\n color=pink!60!purple,\n fill=pink!30\n] coordinates {\n (1,1) (2,4) (3,9) (4,16) (5,25)\n (6,36) (7,49) (8,64) (9,81) (10,100)\n};\n\n\\addlegendentry{数据点}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 是粉红色,你的不是", + "created_at": "2025-12-17T09:11:05.908Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1271, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/23.json b/src/hello/server/storage/history/2/23.json new file mode 100644 index 00000000..7bf71ce2 --- /dev/null +++ b/src/hello/server/storage/history/2/23.json @@ -0,0 +1,18 @@ +{ + "history_id": 23, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "是粉红色,你的不是", + "ai_response": "好的,我理解您需要生成一个粉红色的图表。由于您没有提供具体的数据集和图表类型,我将基于常见的柱状图示例,使用粉红色主题为您生成完整的 LaTeX PGFPlots 代码。\n\n您可以将以下代码复制到 LaTeX 文档中编译,它会生成一个粉红色系的柱状图。如果您有具体的数据文件或需求,请提供给我,我可以为您定制。\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xcolor}\n\n% 定义粉红色系\n\\definecolor{myPink}{RGB}{255, 182, 193} % 浅粉红\n\\definecolor{myDarkPink}{RGB}{219, 112, 147} % 中粉红\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色主题示例柱状图},\n xlabel={类别},\n ylabel={数值},\n ymin=0, ymax=120,\n symbolic x coords={A, B, C, D, E, F},\n xtick=data,\n nodes near coords, % 在柱子上方显示数值\n nodes near coords align={vertical},\n every axis plot/.append style={thick},\n major grid style={dashed, myPink!30},\n grid=major,\n ymajorgrids=true,\n enlargelimits=0.15,\n bar width=30pt,\n % 使用粉红色填充和边框\n fill=myPink,\n draw=myDarkPink,\n]\n\n% 示例数据 - 如果您有自己的数据,请替换这里的坐标\n\\addplot[ybar, fill=myPink, draw=myDarkPink] coordinates {\n (A, 42)\n (B, 78)\n (C, 95)\n (D, 63)\n (E, 110)\n (F, 56)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n**代码说明:**\n1. 使用 `\\definecolor` 定义了两个粉红色调:`myPink`(浅粉)和 `myDarkPink`(深粉)。\n2. 图表样式:\n - 柱子填充为浅粉红 (`fill=myPink`)\n - 柱子边框为深粉红 (`draw=myDarkPink`)\n - 网格线为浅粉红半透明 (`myPink!30`)\n3. 这是一个简单的柱状图,包含 A-F 六个类别的示例数据。\n\n**如果您有具体需求,请告诉我:**\n- 您想绘制什么类型的图表?(折线图、散点图、饼图等)\n- 您是否有数据文件?可以上传或提供数据内容。\n- 您对图表样式有什么特殊要求?\n\n我可以根据您的具体数据和需求生成完全定制的粉红色主题图表代码。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xcolor}\n\n% 定义粉红色系\n\\definecolor{myPink}{RGB}{255, 182, 193} % 浅粉红\n\\definecolor{myDarkPink}{RGB}{219, 112, 147} % 中粉红\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={粉红色主题示例柱状图},\n xlabel={类别},\n ylabel={数值},\n ymin=0, ymax=120,\n symbolic x coords={A, B, C, D, E, F},\n xtick=data,\n nodes near coords, % 在柱子上方显示数值\n nodes near coords align={vertical},\n every axis plot/.append style={thick},\n major grid style={dashed, myPink!30},\n grid=major,\n ymajorgrids=true,\n enlargelimits=0.15,\n bar width=30pt,\n % 使用粉红色填充和边框\n fill=myPink,\n draw=myDarkPink,\n]\n\n% 示例数据 - 如果您有自己的数据,请替换这里的坐标\n\\addplot[ybar, fill=myPink, draw=myDarkPink] coordinates {\n (A, 42)\n (B, 78)\n (C, 95)\n (D, 63)\n (E, 110)\n (F, 56)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 是粉红色,你的不是", + "created_at": "2025-12-17T09:12:27.697Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 912, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/24.json b/src/hello/server/storage/history/2/24.json new file mode 100644 index 00000000..0a15498e --- /dev/null +++ b/src/hello/server/storage/history/2/24.json @@ -0,0 +1,18 @@ +{ + "history_id": 24, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "粉红色折线图", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n xlabel={X轴},\n ylabel={Y轴},\n title={粉红色折线图示例},\n grid=major,\n legend style={at={(0.98,0.02)}, anchor=south east},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n]\n\n% 粉红色折线数据\n\\addplot[\n color=pink!80!red,\n mark=*,\n mark options={fill=pink!50},\n thick,\n smooth\n] coordinates {\n (0, 10)\n (1, 25)\n (2, 45)\n (3, 30)\n (4, 60)\n (5, 75)\n (6, 50)\n (7, 85)\n (8, 65)\n (9, 95)\n (10, 70)\n};\n\n\\addlegendentry{粉红色折线}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个LaTeX代码生成一个粉红色的折线图,包含以下特点:\n\n1. **颜色设置**:使用 `color=pink!80!red` 创建粉红色线条\n2. **数据点标记**:使用星形标记点,填充为浅粉色\n3. **平滑曲线**:设置 `smooth` 参数使折线更平滑\n4. **坐标轴设置**:\n - X轴范围:0-10\n - Y轴范围:0-100\n - 显示网格\n - 添加图例\n5. **示例数据**:包含11个数据点,展示一个波动上升的趋势\n\n您可以根据需要:\n- 修改坐标轴标签和标题\n- 调整颜色深浅(如 `pink!60!red` 或 `pink!100!red`)\n- 更换数据点标记样式\n- 修改数据坐标值\n\n要使用此代码,您需要安装支持PGFPlots的LaTeX发行版(如TeX Live或MiKTeX)。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n xlabel={X轴},\n ylabel={Y轴},\n title={粉红色折线图示例},\n grid=major,\n legend style={at={(0.98,0.02)}, anchor=south east},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n]\n\n% 粉红色折线数据\n\\addplot[\n color=pink!80!red,\n mark=*,\n mark options={fill=pink!50},\n thick,\n smooth\n] coordinates {\n (0, 10)\n (1, 25)\n (2, 45)\n (3, 30)\n (4, 60)\n (5, 75)\n (6, 50)\n (7, 85)\n (8, 65)\n (9, 95)\n (10, 70)\n};\n\n\\addlegendentry{粉红色折线}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 粉红色折线图", + "created_at": "2025-12-17T09:16:12.526Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 746, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/25.json b/src/hello/server/storage/history/2/25.json new file mode 100644 index 00000000..8fa4aa97 --- /dev/null +++ b/src/hello/server/storage/history/2/25.json @@ -0,0 +1,18 @@ +{ + "history_id": 25, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n xlabel={X轴},\n ylabel={Y轴},\n title={粉红色折线图示例},\n grid=major,\n legend style={at={(0.98,0.02)}, anchor=south east},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n]\n\n% 粉红色折线数据\n\\addplot[\n color=pink!80!red,\n mark=*,\n mark options={fill=pink!50},\n thick,\n smooth\n] coordinates {\n (0, 10)\n (1, 25)\n (2, 45)\n (3, 30)\n (4, 60)\n (5, 75)\n (6, 50)\n (7, 85)\n (8, 65)\n (9, 95)\n (10, 70)\n};\n\n\\addlegendentry{粉红色折线}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}修改为红色", + "ai_response": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n xlabel={X轴},\n ylabel={Y轴},\n title={红色折线图示例},\n grid=major,\n legend style={at={(0.98,0.02)}, anchor=south east},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n]\n\n% 红色折线数据\n\\addplot[\n color=red,\n mark=*,\n mark options={fill=red!50},\n thick,\n smooth\n] coordinates {\n (0, 10)\n (1, 25)\n (2, 45)\n (3, 30)\n (4, 60)\n (5, 75)\n (6, 50)\n (7, 85)\n (8, 65)\n (9, 95)\n (10, 70)\n};\n\n\\addlegendentry{红色折线}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=10cm,\n height=6cm,\n xlabel={X轴},\n ylabel={Y轴},\n title={红色折线图示例},\n grid=major,\n legend style={at={(0.98,0.02)}, anchor=south east},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n]\n\n% 红色折线数据\n\\addplot[\n color=red,\n mark=*,\n mark options={fill=red!50},\n thick,\n smooth\n] coordinates {\n (0, 10)\n (1, 25)\n (2, 45)\n (3, 30)\n (4, 60)\n (5, 75)\n (6, 50)\n (7, 85)\n (8, 65)\n (9, 95)\n (10, 70)\n};\n\n\\addlegendentry{红色折线}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " \\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}...", + "created_at": "2025-12-17T10:50:58.403Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 734, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/backend/storage/history/2/26.json b/src/hello/server/storage/history/2/26.json similarity index 100% rename from src/hello/backend/storage/history/2/26.json rename to src/hello/server/storage/history/2/26.json diff --git a/src/hello/backend/storage/history/2/27.json b/src/hello/server/storage/history/2/27.json similarity index 100% rename from src/hello/backend/storage/history/2/27.json rename to src/hello/server/storage/history/2/27.json diff --git a/src/hello/backend/storage/history/2/28.json b/src/hello/server/storage/history/2/28.json similarity index 100% rename from src/hello/backend/storage/history/2/28.json rename to src/hello/server/storage/history/2/28.json diff --git a/src/hello/backend/storage/history/2/29.json b/src/hello/server/storage/history/2/29.json similarity index 100% rename from src/hello/backend/storage/history/2/29.json rename to src/hello/server/storage/history/2/29.json diff --git a/src/hello/server/storage/history/2/3.json b/src/hello/server/storage/history/2/3.json new file mode 100644 index 00000000..16e70d00 --- /dev/null +++ b/src/hello/server/storage/history/2/3.json @@ -0,0 +1,20 @@ +{ + "history_id": 3, + "user_id": 2, + "data_id": 1, + "file_name": "test1.xlsx", + "dataset_name": "test1", + "user_input": "折线图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。数据中包含了年份和对应的数值(单位:万)。\n\n以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n xmajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n mark options={fill=white}\n]\ncoordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 在每个数据点上添加数值标签\n\\node[above] at (axis cs:2021,377) {377};\n\\node[above] at (axis cs:2022,457) {457};\n\\node[above] at (axis cs:2023,474) {474};\n\\node[above] at (axis cs:2024,438) {438};\n\\node[above] at (axis cs:2025,388) {388};\n\\node[above] at (axis cs:2026,343) {343};\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据变化趋势折线图。数据显示在2023年达到峰值(474万),随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n## 图表特点说明:\n\n1. **数据可视化**:使用蓝色折线连接了2021-2026年的数据点\n2. **数据标签**:在每个数据点上方显示了具体的数值\n3. **坐标轴设置**:\n - X轴:年份标签(2021年-2026年)\n - Y轴:数值范围(300-500万)\n4. **网格线**:添加了水平和垂直网格线,便于读取数值\n5. **趋势分析**:从图中可以明显看出:\n - 2021-2023年:数据呈上升趋势\n - 2023年:达到峰值474万\n - 2023-2026年:数据呈下降趋势\n\n## 使用说明:\n\n1. 将上述代码保存为`.tex`文件\n2. 使用支持PGFPlots的LaTeX编译器编译(如TeX Live、MiKTeX等)\n3. 如需调整图表大小,可以修改`width`和`height`参数\n4. 如需更改颜色,可以修改`color`参数(如`red`、`green`、`orange`等)\n\n这个折线图清晰地展示了数据的整体趋势和每年的具体数值变化。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n xmajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n mark options={fill=white}\n]\ncoordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 在每个数据点上添加数值标签\n\\node[above] at (axis cs:2021,377) {377};\n\\node[above] at (axis cs:2022,457) {457};\n\\node[above] at (axis cs:2023,474) {474};\n\\node[above] at (axis cs:2024,438) {438};\n\\node[above] at (axis cs:2025,388) {388};\n\\node[above] at (axis cs:2026,343) {343};\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据变化趋势折线图。数据显示在2023年达到峰值(474万),随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2026-01-01T09:07:57.105Z", + "metadata": { + "data_ids": [ + 1 + ], + "has_chart_code": true, + "code_length": 1362, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/4.json b/src/hello/server/storage/history/2/4.json new file mode 100644 index 00000000..e0ad8db5 --- /dev/null +++ b/src/hello/server/storage/history/2/4.json @@ -0,0 +1,18 @@ +{ + "history_id": 4, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "sad1", + "ai_response": "我注意到您输入了\"sad1\",但没有提供具体的图表需求或数据文件。为了帮助您生成LaTeX PGFPlots图表代码,我需要更多信息:\n\n1. **图表类型**:您想要创建什么类型的图表?\n - 折线图 (Line plot)\n - 柱状图 (Bar chart)\n - 散点图 (Scatter plot)\n - 饼图 (Pie chart)\n - 其他类型\n\n2. **数据**:请提供您的数据,可以是:\n - 直接粘贴数据\n - 上传数据文件\n - 描述数据结构\n\n3. **图表要求**:\n - 坐标轴标签\n - 图表标题\n - 图例位置\n - 颜色偏好\n - 其他特殊要求\n\n如果您已经上传了数据文件,请告诉我文件名,我会帮您分析数据并生成相应的图表代码。\n\n**示例请求格式**:\n\"请帮我生成一个折线图,显示2010-2020年销售额变化,X轴是年份,Y轴是销售额(万元)\"\n\n请提供更多详细信息,我将为您生成专业的LaTeX PGFPlots代码。", + "chart_code": "我注意到您输入了\"sad1\",但没有提供具体的图表需求或数据文件。为了帮助您生成LaTeX PGFPlots图表代码,我需要更多信息:\n\n1. **图表类型**:您想要创建什么类型的图表?\n - 折线图 (Line plot)\n - 柱状图 (Bar chart)\n - 散点图 (Scatter plot)\n - 饼图 (Pie chart)\n - 其他类型\n\n2. **数据**:请提供您的数据,可以是:\n - 直接粘贴数据\n - 上传数据文件\n - 描述数据结构\n\n3. **图表要求**:\n - 坐标轴标签\n - 图表标题\n - 图例位置\n - 颜色偏好\n - 其他特殊要求\n\n如果您已经上传了数据文件,请告诉我文件名,我会帮您分析数据并生成相应的图表代码。\n\n**示例请求格式**:\n\"请帮我生成一个折线图,显示2010-2020年销售额变化,X轴是年份,Y轴是销售额(万元)\"\n\n请提供更多详细信息,我将为您生成专业的LaTeX PGFPlots代码。", + "generation_description": " sad1", + "created_at": "2026-01-01T10:03:25.184Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 458, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/5.json b/src/hello/server/storage/history/2/5.json new file mode 100644 index 00000000..33011daa --- /dev/null +++ b/src/hello/server/storage/history/2/5.json @@ -0,0 +1,18 @@ +{ + "history_id": 5, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "折线图", + "ai_response": "我将为您生成一个折线图的LaTeX PGFPlots代码。由于您没有提供具体的数据集,我将创建一个示例折线图,展示如何绘制多条折线。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图:不同产品销售额随时间变化},\n xlabel={月份},\n ylabel={销售额(万元)},\n xmin=1, xmax=12,\n ymin=0, ymax=120,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月},\n legend pos=north west,\n grid=major,\n grid style={dashed, gray!30},\n ymajorgrids=true,\n xmajorgrids=true,\n]\n\n% 产品A的数据\n\\addplot[\n color=blue,\n mark=square,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 20)(2, 25)(3, 30)(4, 35)(5, 40)(6, 45)\n (7, 50)(8, 55)(9, 60)(10, 65)(11, 70)(12, 75)\n};\n\\addlegendentry{产品A}\n\n% 产品B的数据\n\\addplot[\n color=red,\n mark=triangle,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 15)(2, 22)(3, 28)(4, 33)(5, 37)(6, 42)\n (7, 48)(8, 53)(9, 58)(10, 62)(11, 67)(12, 72)\n};\n\\addlegendentry{产品B}\n\n% 产品C的数据\n\\addplot[\n color=green,\n mark=o,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 10)(2, 18)(3, 25)(4, 32)(5, 38)(6, 45)\n (7, 52)(8, 58)(9, 63)(10, 68)(11, 73)(12, 78)\n};\n\\addlegendentry{产品C}\n\n% 产品D的数据\n\\addplot[\n color=orange,\n mark=diamond,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 5)(2, 12)(3, 20)(4, 28)(5, 36)(6, 44)\n (7, 52)(8, 60)(9, 68)(10, 76)(11, 84)(12, 92)\n};\n\\addlegendentry{产品D}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{四种产品在一年内的销售额变化趋势。从图中可以看出,所有产品都呈现增长趋势,其中产品D的增长最为显著。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n这个折线图展示了以下特点:\n\n1. **四条折线**:分别代表四种不同的产品(A、B、C、D)\n2. **时间轴**:X轴表示12个月份\n3. **数值轴**:Y轴表示销售额(万元)\n4. **视觉区分**:\n - 不同颜色区分不同产品\n - 不同标记形状(方形、三角形、圆形、菱形)\n - 图例清晰标注\n\n5. **辅助元素**:\n - 网格线便于读数\n - 标题和坐标轴标签\n - 详细的图例说明\n\n如果您有具体的数据集,请提供数据文件,我可以为您生成基于实际数据的折线图代码。您也可以根据需要调整:\n- 线条样式(虚线、点线等)\n- 颜色方案\n- 标记样式\n- 坐标轴范围\n- 图例位置等参数", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图:不同产品销售额随时间变化},\n xlabel={月份},\n ylabel={销售额(万元)},\n xmin=1, xmax=12,\n ymin=0, ymax=120,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月},\n legend pos=north west,\n grid=major,\n grid style={dashed, gray!30},\n ymajorgrids=true,\n xmajorgrids=true,\n]\n\n% 产品A的数据\n\\addplot[\n color=blue,\n mark=square,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 20)(2, 25)(3, 30)(4, 35)(5, 40)(6, 45)\n (7, 50)(8, 55)(9, 60)(10, 65)(11, 70)(12, 75)\n};\n\\addlegendentry{产品A}\n\n% 产品B的数据\n\\addplot[\n color=red,\n mark=triangle,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 15)(2, 22)(3, 28)(4, 33)(5, 37)(6, 42)\n (7, 48)(8, 53)(9, 58)(10, 62)(11, 67)(12, 72)\n};\n\\addlegendentry{产品B}\n\n% 产品C的数据\n\\addplot[\n color=green,\n mark=o,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 10)(2, 18)(3, 25)(4, 32)(5, 38)(6, 45)\n (7, 52)(8, 58)(9, 63)(10, 68)(11, 73)(12, 78)\n};\n\\addlegendentry{产品C}\n\n% 产品D的数据\n\\addplot[\n color=orange,\n mark=diamond,\n mark size=2pt,\n thick\n]\ncoordinates {\n (1, 5)(2, 12)(3, 20)(4, 28)(5, 36)(6, 44)\n (7, 52)(8, 60)(9, 68)(10, 76)(11, 84)(12, 92)\n};\n\\addlegendentry{产品D}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{四种产品在一年内的销售额变化趋势。从图中可以看出,所有产品都呈现增长趋势,其中产品D的增长最为显著。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2026-01-01T10:04:35.765Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1582, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/6.json b/src/hello/server/storage/history/2/6.json new file mode 100644 index 00000000..c9c904ce --- /dev/null +++ b/src/hello/server/storage/history/2/6.json @@ -0,0 +1,20 @@ +{ + "history_id": 6, + "user_id": 2, + "data_id": 2, + "file_name": "test.txt", + "dataset_name": "test", + "user_input": "柱状图", + "ai_response": "根据您提供的国家公务员考试近五年招录人数数据,我将生成一个柱状图来展示这一趋势。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xcolor}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={招录人数},\n xlabel={年份},\n symbolic x coords={2021,2022,2023,2024,2025},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=8pt,\n /pgf/number format/.cd,\n fixed,\n precision=0,\n use comma\n },\n ymin=20000,\n ymax=42000,\n ytick={20000,25000,30000,35000,40000},\n title={国家公务员考试近五年招录人数统计},\n title style={yshift=10pt, font=\\large\\bfseries},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1,\n cells={anchor=west},\n draw=none\n },\n enlarge x limits=0.15,\n]\n\n% 定义柱状图颜色\n\\definecolor{barcolor}{RGB}{65,105,225}\n\n% 绘制柱状图\n\\addplot[\n fill=barcolor,\n draw=black,\n line width=0.5pt\n] coordinates {\n (2021,25726)\n (2022,31200)\n (2023,37100)\n (2024,39561)\n (2025,39721)\n};\n\n% 添加图例\n\\legend{招录人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个柱状图具有以下特点:\n\n1. **数据展示**:清晰展示了2021-2025年国家公务员考试的招录人数\n - 2021年:25,726人\n - 2022年:31,200人\n - 2023年:37,100人\n - 2024年:39,561人\n - 2025年:39,721人\n\n2. **视觉设计**:\n - 使用蓝色柱状图,简洁美观\n - 每个柱子上方显示具体数值\n - 添加了网格线便于读数\n - 设置了合适的Y轴范围(20,000-42,000)\n\n3. **趋势观察**:从图中可以明显看出:\n - 2021-2024年招录人数持续增长\n - 2024-2025年增长趋于平缓\n - 五年间招录人数增长了约54.4%\n\n您可以直接编译这段LaTeX代码生成柱状图。如果需要调整颜色、尺寸或其他样式,请告诉我。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xcolor}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={招录人数},\n xlabel={年份},\n symbolic x coords={2021,2022,2023,2024,2025},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=8pt,\n /pgf/number format/.cd,\n fixed,\n precision=0,\n use comma\n },\n ymin=20000,\n ymax=42000,\n ytick={20000,25000,30000,35000,40000},\n title={国家公务员考试近五年招录人数统计},\n title style={yshift=10pt, font=\\large\\bfseries},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1,\n cells={anchor=west},\n draw=none\n },\n enlarge x limits=0.15,\n]\n\n% 定义柱状图颜色\n\\definecolor{barcolor}{RGB}{65,105,225}\n\n% 绘制柱状图\n\\addplot[\n fill=barcolor,\n draw=black,\n line width=0.5pt\n] coordinates {\n (2021,25726)\n (2022,31200)\n (2023,37100)\n (2024,39561)\n (2025,39721)\n};\n\n% 添加图例\n\\legend{招录人数}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 柱状图", + "created_at": "2026-01-01T10:05:03.956Z", + "metadata": { + "data_ids": [ + 2 + ], + "has_chart_code": true, + "code_length": 1233, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/7.json b/src/hello/server/storage/history/2/7.json new file mode 100644 index 00000000..58cce67a --- /dev/null +++ b/src/hello/server/storage/history/2/7.json @@ -0,0 +1,18 @@ +{ + "history_id": 7, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "折线图示例", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={折线图示例},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n width=12cm,\n height=8cm,\n]\n\n% 第一条折线\n\\addplot [\n color=blue,\n mark=square,\n ]\n coordinates {\n (1, 10)\n (2, 25)\n (3, 45)\n (4, 60)\n (5, 75)\n (6, 85)\n (7, 90)\n (8, 95)\n (9, 98)\n (10, 100)\n };\n \\addlegendentry{数据集A}\n\n% 第二条折线\n\\addplot [\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1, 5)\n (2, 15)\n (3, 30)\n (4, 50)\n (5, 65)\n (6, 75)\n (7, 82)\n (8, 88)\n (9, 92)\n (10, 95)\n };\n \\addlegendentry{数据集B}\n\n% 第三条折线\n\\addplot [\n color=green,\n mark=*,\n ]\n coordinates {\n (1, 8)\n (2, 20)\n (3, 35)\n (4, 55)\n (5, 70)\n (6, 80)\n (7, 87)\n (8, 92)\n (9, 96)\n (10, 98)\n };\n \\addlegendentry{数据集C}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个折线图示例包含以下特点:\n\n1. **三条不同颜色的折线**:分别用蓝色、红色和绿色表示\n2. **不同的标记形状**:正方形、三角形和圆形\n3. **完整的坐标轴设置**:\n - X轴范围:0-10\n - Y轴范围:0-100\n - 网格线\n - 图例位置在左上角\n4. **三条折线的数据**:\n - 数据集A:从10到100的递增数据\n - 数据集B:从5到95的递增数据\n - 数据集C:从8到98的递增数据\n\n您可以根据需要:\n- 修改坐标数据\n- 调整颜色和标记样式\n- 更改坐标轴范围和标签\n- 添加或删除数据系列", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={折线图示例},\n xlabel={X轴标签},\n ylabel={Y轴标签},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n legend pos=north west,\n grid=major,\n width=12cm,\n height=8cm,\n]\n\n% 第一条折线\n\\addplot [\n color=blue,\n mark=square,\n ]\n coordinates {\n (1, 10)\n (2, 25)\n (3, 45)\n (4, 60)\n (5, 75)\n (6, 85)\n (7, 90)\n (8, 95)\n (9, 98)\n (10, 100)\n };\n \\addlegendentry{数据集A}\n\n% 第二条折线\n\\addplot [\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1, 5)\n (2, 15)\n (3, 30)\n (4, 50)\n (5, 65)\n (6, 75)\n (7, 82)\n (8, 88)\n (9, 92)\n (10, 95)\n };\n \\addlegendentry{数据集B}\n\n% 第三条折线\n\\addplot [\n color=green,\n mark=*,\n ]\n coordinates {\n (1, 8)\n (2, 20)\n (3, 35)\n (4, 55)\n (5, 70)\n (6, 80)\n (7, 87)\n (8, 92)\n (9, 96)\n (10, 98)\n };\n \\addlegendentry{数据集C}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 折线图示例", + "created_at": "2025-12-19T00:22:46.178Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1120, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/8.json b/src/hello/server/storage/history/2/8.json new file mode 100644 index 00000000..f6559921 --- /dev/null +++ b/src/hello/server/storage/history/2/8.json @@ -0,0 +1,20 @@ +{ + "history_id": 8, + "user_id": 2, + "data_id": 4, + "file_name": "test1.xlsx", + "dataset_name": "test1", + "user_input": "柱状图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据的柱状图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=-8pt,\n rotate=90\n },\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 添加柱状图数据\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据柱状图展示}\n\\end{figure}\n\n\\end{document}\n```\n\n代码说明:\n\n1. **图表类型**:使用`ybar`创建垂直柱状图\n2. **数据设置**:\n - X轴:年份(2021年-2026年)\n - Y轴:数量(单位:万)\n - 数据点:使用实际数据值(已去除\"万\"字,仅保留数值)\n3. **可视化特性**:\n - 每个柱子上方显示具体数值\n - 添加了垂直网格线便于读数\n - 设置了合适的Y轴范围(0-500)\n - 柱状图使用蓝色填充\n4. **布局优化**:\n - 数值标签旋转90度以避免重叠\n - 图例位于图表下方居中位置\n - 设置了合适的图表尺寸\n\n您可以直接编译此LaTeX代码生成柱状图。图表清晰地展示了数据在2023年达到峰值(474万),随后呈下降趋势。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n ybar,\n bar width=15pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={\n font=\\small,\n yshift=-8pt,\n rotate=90\n },\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1\n }\n]\n\n% 添加柱状图数据\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021-2026年数据柱状图展示}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 柱状图", + "created_at": "2025-12-19T00:25:56.865Z", + "metadata": { + "data_ids": [ + 4 + ], + "has_chart_code": true, + "code_length": 1048, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/2/9.json b/src/hello/server/storage/history/2/9.json new file mode 100644 index 00000000..10d6baf6 --- /dev/null +++ b/src/hello/server/storage/history/2/9.json @@ -0,0 +1,18 @@ +{ + "history_id": 9, + "user_id": 2, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "生成饼图,大一30%,大二20%,大三25%,大四25%", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n \\begin{axis}[\n axis equal,\n hide axis,\n enlargelimits=false,\n clip=false,\n title={各年级学生比例分布},\n title style={yshift=1cm, font=\\large\\bfseries}\n ]\n \n \\addplot[\n pie,\n text=legend,\n slice type={freshman},\n pie values/.style={font=\\small},\n color={blue!60},\n explode={0.05}\n ]\n coordinates{\n (30,大一)\n (20,大二)\n (25,大三)\n (25,大四)\n };\n \n \\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n这个LaTeX代码生成一个饼图,显示各年级学生比例分布:\n- 大一:30%(蓝色)\n- 大二:20%\n- 大三:25%\n- 大四:25%\n\n图表特点:\n1. 使用`pgfplots`的饼图功能\n2. 设置等比例坐标轴确保圆形\n3. 隐藏坐标轴,只显示饼图\n4. 添加标题\"各年级学生比例分布\"\n5. 使用图例显示各部分的标签\n6. 设置轻微爆炸效果(0.05)增强可读性\n7. 使用蓝色调作为主色\n\n要使用此代码,需要确保LaTeX环境中安装了pgfplots包。编译后即可得到清晰的饼图。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n \\begin{axis}[\n axis equal,\n hide axis,\n enlargelimits=false,\n clip=false,\n title={各年级学生比例分布},\n title style={yshift=1cm, font=\\large\\bfseries}\n ]\n \n \\addplot[\n pie,\n text=legend,\n slice type={freshman},\n pie values/.style={font=\\small},\n color={blue!60},\n explode={0.05}\n ]\n coordinates{\n (30,大一)\n (20,大二)\n (25,大三)\n (25,大四)\n };\n \n \\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 生成饼图,大一30%,大二20%,大三25%,大四25%", + "created_at": "2025-12-21T13:30:38.133Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 643, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/10.json b/src/hello/server/storage/history/3/10.json new file mode 100644 index 00000000..ca41808e --- /dev/null +++ b/src/hello/server/storage/history/3/10.json @@ -0,0 +1,18 @@ +{ + "history_id": 10, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n font=\\small\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n font=\\small\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n这段代码已经是一个完整的、可直接编译的LaTeX文档,它包含了您提供的实际数据。主要特点包括:\n\n1. **数据完整**:包含了2021-2026年的所有数据点\n2. **图表设置合理**:\n - 坐标轴范围:x轴2021-2026,y轴300-500\n - 网格线便于读数\n - 平滑的蓝色折线带星形标记\n3. **数据标签**:每个数据点上方都显示了具体数值\n4. **中文支持**:使用xeCJK包和SimSun字体(请根据您的系统调整字体)\n5. **完整文档结构**:包含文档类、包引入、图表环境和结束标记\n\n您可以直接复制这段代码到LaTeX编辑器中编译生成图表。如果需要调整字体、颜色或图表尺寸,可以修改相应的参数。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n font=\\small\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " \\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document...", + "created_at": "2026-01-01T11:32:09.238Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1336, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/12.json b/src/hello/server/storage/history/3/12.json new file mode 100644 index 00000000..320125de --- /dev/null +++ b/src/hello/server/storage/history/3/12.json @@ -0,0 +1,18 @@ +{ + "history_id": 12, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "折线图", + "ai_response": "我将为您生成一个折线图的LaTeX PGFPlots代码。由于您没有提供具体的数据集,我将创建一个示例折线图,展示如何绘制多条折线。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图:不同产品季度销售额},\n xlabel={季度},\n ylabel={销售额(万元)},\n xmin=1, xmax=4,\n ymin=0, ymax=120,\n xtick={1,2,3,4},\n xticklabels={Q1, Q2, Q3, Q4},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n width=12cm,\n height=8cm\n]\n\n% 产品A数据\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1, 45)(2, 52)(3, 68)(4, 72)\n };\n \\addlegendentry{产品A}\n\n% 产品B数据\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1, 38)(2, 48)(3, 55)(4, 65)\n };\n \\addlegendentry{产品B}\n\n% 产品C数据\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (1, 28)(2, 35)(3, 42)(4, 50)\n };\n \\addlegendentry{产品C}\n\n% 产品D数据\n\\addplot[\n color=orange,\n mark=diamond,\n ]\n coordinates {\n (1, 20)(2, 32)(3, 45)(4, 58)\n };\n \\addlegendentry{产品D}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n如果您有具体的数据集,请提供:\n1. 数据文件(Excel、CSV等)\n2. 图表的具体要求(标题、坐标轴标签、图例等)\n3. 任何特定的样式要求(颜色、标记样式等)\n\n我可以根据您的实际数据生成相应的代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图:不同产品季度销售额},\n xlabel={季度},\n ylabel={销售额(万元)},\n xmin=1, xmax=4,\n ymin=0, ymax=120,\n xtick={1,2,3,4},\n xticklabels={Q1, Q2, Q3, Q4},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n width=12cm,\n height=8cm\n]\n\n% 产品A数据\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (1, 45)(2, 52)(3, 68)(4, 72)\n };\n \\addlegendentry{产品A}\n\n% 产品B数据\n\\addplot[\n color=red,\n mark=triangle,\n ]\n coordinates {\n (1, 38)(2, 48)(3, 55)(4, 65)\n };\n \\addlegendentry{产品B}\n\n% 产品C数据\n\\addplot[\n color=green,\n mark=*,\n ]\n coordinates {\n (1, 28)(2, 35)(3, 42)(4, 50)\n };\n \\addlegendentry{产品C}\n\n% 产品D数据\n\\addplot[\n color=orange,\n mark=diamond,\n ]\n coordinates {\n (1, 20)(2, 32)(3, 45)(4, 58)\n };\n \\addlegendentry{产品D}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2026-01-01T15:00:25.663Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1046, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/13.json b/src/hello/server/storage/history/3/13.json new file mode 100644 index 00000000..6ef60591 --- /dev/null +++ b/src/hello/server/storage/history/3/13.json @@ -0,0 +1,18 @@ +{ + "history_id": 13, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "折线图", + "ai_response": "我将为您生成一个折线图的LaTeX PGFPlots代码。由于您没有提供具体的数据集,我将创建一个示例折线图来展示如何使用PGFPlots绘制折线图。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图:某公司季度销售额},\n xlabel={季度},\n ylabel={销售额(万元)},\n xmin=0.5, xmax=4.5,\n ymin=0, ymax=120,\n xtick={1,2,3,4},\n xticklabels={Q1, Q2, Q3, Q4},\n legend pos=north west,\n grid=major,\n grid style={dashed, gray!30},\n ymajorgrids=true,\n xmajorgrids=true,\n]\n\n% 产品A的数据\n\\addplot[\n color=blue,\n mark=square,\n mark size=3pt,\n thick\n]\ncoordinates {\n (1, 45)\n (2, 68)\n (3, 72)\n (4, 85)\n};\n\\addlegendentry{产品A}\n\n% 产品B的数据\n\\addplot[\n color=red,\n mark=triangle,\n mark size=3pt,\n thick\n]\ncoordinates {\n (1, 38)\n (2, 52)\n (3, 65)\n (4, 78)\n};\n\\addlegendentry{产品B}\n\n% 产品C的数据\n\\addplot[\n color=green,\n mark=*,\n mark size=3pt,\n thick\n]\ncoordinates {\n (1, 28)\n (2, 42)\n (3, 58)\n (4, 95)\n};\n\\addlegendentry{产品C}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{三种产品在四个季度的销售额变化趋势}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n这个折线图展示了以下特点:\n\n1. **图表设置**:\n - 设置了合适的图表尺寸(宽度的80%,高度的60%)\n - 添加了标题、坐标轴标签\n - 设置了x轴和y轴的范围\n - 添加了网格线便于读数\n\n2. **数据系列**:\n - 三个产品系列(A、B、C)\n - 每个系列使用不同的颜色和标记形状\n - 数据点用坐标对表示\n\n3. **可视化元素**:\n - 图例位于左上角\n - 每个数据系列使用粗线连接\n - 每个数据点都有明显的标记\n\n如果您有具体的数据集,请提供数据文件,我可以:\n1. 根据您的实际数据调整坐标轴范围\n2. 使用您的实际数据替换示例数据\n3. 根据数据特点调整图表样式\n4. 设置更合适的标题和标签\n\n请上传您的数据文件,我将为您生成包含实际数据的完整LaTeX代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图:某公司季度销售额},\n xlabel={季度},\n ylabel={销售额(万元)},\n xmin=0.5, xmax=4.5,\n ymin=0, ymax=120,\n xtick={1,2,3,4},\n xticklabels={Q1, Q2, Q3, Q4},\n legend pos=north west,\n grid=major,\n grid style={dashed, gray!30},\n ymajorgrids=true,\n xmajorgrids=true,\n]\n\n% 产品A的数据\n\\addplot[\n color=blue,\n mark=square,\n mark size=3pt,\n thick\n]\ncoordinates {\n (1, 45)\n (2, 68)\n (3, 72)\n (4, 85)\n};\n\\addlegendentry{产品A}\n\n% 产品B的数据\n\\addplot[\n color=red,\n mark=triangle,\n mark size=3pt,\n thick\n]\ncoordinates {\n (1, 38)\n (2, 52)\n (3, 65)\n (4, 78)\n};\n\\addlegendentry{产品B}\n\n% 产品C的数据\n\\addplot[\n color=green,\n mark=*,\n mark size=3pt,\n thick\n]\ncoordinates {\n (1, 28)\n (2, 42)\n (3, 58)\n (4, 95)\n};\n\\addlegendentry{产品C}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{三种产品在四个季度的销售额变化趋势}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2026-01-01T15:26:58.850Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1135, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/14.json b/src/hello/server/storage/history/3/14.json new file mode 100644 index 00000000..160c3f08 --- /dev/null +++ b/src/hello/server/storage/history/3/14.json @@ -0,0 +1,20 @@ +{ + "history_id": 14, + "user_id": 3, + "data_id": 4, + "file_name": "test1.xlsx", + "dataset_name": "test1", + "user_input": "折线图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\node[above] at (axis cs:2021,377) {377万};\n\\node[above] at (axis cs:2022,457) {457万};\n\\node[above] at (axis cs:2023,474) {474万};\n\\node[above] at (axis cs:2024,438) {438万};\n\\node[above] at (axis cs:2025,388) {388万};\n\\node[below] at (axis cs:2026,343) {343万};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n## 图表特点说明:\n\n1. **数据表示**:将\"377万\"等字符串转换为数值377,并在图表中显示原始标签\n2. **坐标轴设置**:\n - X轴:年份(2021-2026)\n - Y轴:数值范围300-500万,覆盖所有数据点\n3. **视觉效果**:\n - 蓝色折线,带圆形数据点标记\n - 平滑的折线连接\n - 每个数据点上方/下方显示原始数值标签\n - 虚线网格便于读数\n4. **布局**:\n - 图表宽度为页面宽度的80%\n - 包含标题和坐标轴标签\n - 添加了描述性图注\n\n## 使用说明:\n\n1. 将上述代码保存为`.tex`文件\n2. 使用支持PGFPlots的LaTeX编译器(如TeX Live、MiKTeX)编译\n3. 需要安装`pgfplots`包\n\n如果您需要调整图表样式(如颜色、线型、标记样式等),请告诉我,我可以为您修改代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\node[above] at (axis cs:2021,377) {377万};\n\\node[above] at (axis cs:2022,457) {457万};\n\\node[above] at (axis cs:2023,474) {474万};\n\\node[above] at (axis cs:2024,438) {438万};\n\\node[above] at (axis cs:2025,388) {388万};\n\\node[below] at (axis cs:2026,343) {343万};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2026-01-01T15:27:46.887Z", + "metadata": { + "data_ids": [ + 4 + ], + "has_chart_code": true, + "code_length": 1346, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/15.json b/src/hello/server/storage/history/3/15.json new file mode 100644 index 00000000..7f30fcf8 --- /dev/null +++ b/src/hello/server/storage/history/3/15.json @@ -0,0 +1,18 @@ +{ + "history_id": 15, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\node[above] at (axis cs:2021,377) {377万};\n\\node[above] at (axis cs:2022,457) {457万};\n\\node[above] at (axis cs:2023,474) {474万};\n\\node[above] at (axis cs:2024,438) {438万};\n\\node[above] at (axis cs:2025,388) {388万};\n\\node[below] at (axis cs:2026,343) {343万};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}改为柱状图", + "ai_response": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2020.5, xmax=2026.5,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries},\n ybar,\n bar width=20pt,\n enlarge x limits=0.15,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.append style={font=\\small, yshift=5pt}\n]\n\n% 绘制柱状图\n\\addplot[\n fill=blue!50,\n draw=blue,\n line width=0.8pt\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加图例\n\\addlegendentry{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势柱状图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:bar_chart}\n\\end{figure}\n\n\\end{document}", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2020.5, xmax=2026.5,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries},\n ybar,\n bar width=20pt,\n enlarge x limits=0.15,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.append style={font=\\small, yshift=5pt}\n]\n\n% 绘制柱状图\n\\addplot[\n fill=blue!50,\n draw=blue,\n line width=0.8pt\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加图例\n\\addlegendentry{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势柱状图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:bar_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " \\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin...", + "created_at": "2026-01-01T15:28:30.049Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1241, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/16.json b/src/hello/server/storage/history/3/16.json new file mode 100644 index 00000000..08f11f05 --- /dev/null +++ b/src/hello/server/storage/history/3/16.json @@ -0,0 +1,20 @@ +{ + "history_id": 16, + "user_id": 3, + "data_id": 4, + "file_name": "test1.xlsx", + "dataset_name": "test1", + "user_input": "折线图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!25},\n legend pos=north east,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\node[above, font=\\scriptsize] at (axis cs:2021,377) {377万};\n\\node[above, font=\\scriptsize] at (axis cs:2022,457) {457万};\n\\node[above, font=\\scriptsize] at (axis cs:2023,474) {474万};\n\\node[above, font=\\scriptsize] at (axis cs:2024,438) {438万};\n\\node[above, font=\\scriptsize] at (axis cs:2025,388) {388万};\n\\node[below, font=\\scriptsize] at (axis cs:2026,343) {343万};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值(474万),随后呈下降趋势。}\n\\label{fig:trend}\n\\end{figure}\n\n\\end{document}\n```\n\n## 图表特点说明:\n\n1. **数据可视化**:使用蓝色折线清晰展示2021-2026年的数据变化趋势\n2. **数据点标记**:每个年份对应一个星形标记点,并显示具体数值\n3. **坐标轴设置**:\n - X轴:年份标签(2021年-2026年)\n - Y轴:数值范围300-500万,覆盖所有数据点\n4. **网格线**:添加浅灰色网格线,便于读取数值\n5. **趋势分析**:从图中可以明显看出:\n - 2021-2023年:数据呈上升趋势,2023年达到峰值474万\n - 2023-2026年:数据呈下降趋势,2026年降至343万\n\n## 使用说明:\n\n1. 将上述代码保存为`.tex`文件\n2. 使用支持PGFPlots的LaTeX编译器(如TeXLive、MiKTeX)编译\n3. 如需调整图表尺寸,可修改`width`和`height`参数\n4. 如需更改颜色,可修改`color=blue`为其他颜色(如red、green等)\n\n这个折线图能直观展示数据的波动趋势,特别适合观察时间序列数据的变化规律。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n grid=both,\n grid style={line width=.1pt, draw=gray!10},\n major grid style={line width=.2pt,draw=gray!25},\n legend pos=north east,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2.5pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\node[above, font=\\scriptsize] at (axis cs:2021,377) {377万};\n\\node[above, font=\\scriptsize] at (axis cs:2022,457) {457万};\n\\node[above, font=\\scriptsize] at (axis cs:2023,474) {474万};\n\\node[above, font=\\scriptsize] at (axis cs:2024,438) {438万};\n\\node[above, font=\\scriptsize] at (axis cs:2025,388) {388万};\n\\node[below, font=\\scriptsize] at (axis cs:2026,343) {343万};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值(474万),随后呈下降趋势。}\n\\label{fig:trend}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2026-01-01T15:31:44.022Z", + "metadata": { + "data_ids": [ + 4 + ], + "has_chart_code": true, + "code_length": 1524, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/17.json b/src/hello/server/storage/history/3/17.json new file mode 100644 index 00000000..4b8ecc9d --- /dev/null +++ b/src/hello/server/storage/history/3/17.json @@ -0,0 +1,18 @@ +{ + "history_id": 17, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "散点图", + "ai_response": "由于您没有提供具体的数据集,我将为您生成一个通用的散点图LaTeX PGFPlots 代码示例。您可以根据需要修改数据点、坐标轴标签、标题等参数。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{scatter_data.csv}\nx, y\n1, 2\n2, 4\n3, 5\n4, 4\n5, 7\n6, 6\n7, 8\n8, 7\n9, 10\n10, 9\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例散点图},\n xlabel={X轴},\n ylabel={Y轴},\n xmin=0, xmax=11,\n ymin=0, ymax=12,\n xtick={0,2,4,6,8,10},\n ytick={0,2,4,6,8,10,12},\n legend pos=north west,\n grid=major,\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n]\n\n% 绘制散点\n\\addplot[\n only marks,\n mark=*,\n mark size=2pt,\n color=blue,\n] table[x=x, y=y, col sep=comma] {scatter_data.csv};\n\\addlegendentry{数据点}\n\n% 可选的回归线(线性拟合示例)\n\\addplot[\n no marks,\n color=red,\n thick,\n] table[\n x=x,\n y={create col/linear regression={y=y}},\n col sep=comma\n] {scatter_data.csv};\n\\addlegendentry{线性拟合}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{这是一个散点图示例,展示了数据点的分布情况。}\n\\label{fig:scatter}\n\\end{figure}\n\n\\end{document}\n```\n\n### 代码说明:\n1. **数据文件**:使用 `filecontents` 包创建了一个 CSV 文件 `scatter_data.csv`,包含示例数据点。\n2. **散点绘制**:使用 `\\addplot` 和 `only marks` 选项绘制散点,标记样式为蓝色星形。\n3. **可选回归线**:代码中包含了一条线性回归线(红色),用于展示数据趋势。如果您不需要,可以删除相关部分。\n4. **坐标轴设置**:设置了标题、轴标签、范围、刻度、网格和图例位置。\n5. **图表尺寸**:通过 `width` 和 `height` 参数调整图表大小。\n\n### 使用方式:\n1. 将代码保存为 `.tex` 文件。\n2. 使用 LaTeX 编译器(如 pdflatex、xelatex 或 lualatex)编译生成 PDF。\n3. 如需修改数据,请更新 `scatter_data.csv` 部分或直接替换为您的数据文件路径。\n\n如果您有具体的数据集或特殊要求,请提供详细信息,我可以为您定制更合适的代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{scatter_data.csv}\nx, y\n1, 2\n2, 4\n3, 5\n4, 4\n5, 7\n6, 6\n7, 8\n8, 7\n9, 10\n10, 9\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{figure}[h]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例散点图},\n xlabel={X轴},\n ylabel={Y轴},\n xmin=0, xmax=11,\n ymin=0, ymax=12,\n xtick={0,2,4,6,8,10},\n ytick={0,2,4,6,8,10,12},\n legend pos=north west,\n grid=major,\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n]\n\n% 绘制散点\n\\addplot[\n only marks,\n mark=*,\n mark size=2pt,\n color=blue,\n] table[x=x, y=y, col sep=comma] {scatter_data.csv};\n\\addlegendentry{数据点}\n\n% 可选的回归线(线性拟合示例)\n\\addplot[\n no marks,\n color=red,\n thick,\n] table[\n x=x,\n y={create col/linear regression={y=y}},\n col sep=comma\n] {scatter_data.csv};\n\\addlegendentry{线性拟合}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{这是一个散点图示例,展示了数据点的分布情况。}\n\\label{fig:scatter}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 散点图", + "created_at": "2026-01-01T15:34:41.575Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1002, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/18.json b/src/hello/server/storage/history/3/18.json new file mode 100644 index 00000000..e21955fa --- /dev/null +++ b/src/hello/server/storage/history/3/18.json @@ -0,0 +1,18 @@ +{ + "history_id": 18, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "饼图", + "ai_response": "```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n \\begin{axis}[\n title={示例饼图},\n axis equal,\n axis lines=none,\n enlargelimits=false,\n clip=false,\n pie chart,\n pie values/.style={font=\\small},\n text=black,\n every node/.style={inner sep=0pt},\n nodes near coords,\n nodes near coords style={font=\\footnotesize},\n scale=1.5\n ]\n \n % 示例数据 - 请根据实际数据修改\n \\pie[text=legend]{\n 30/类别 A,\n 25/类别 B,\n 20/类别 C,\n 15/类别 D,\n 10/类别 E\n }\n \n \\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n**说明:**\n1. 这是一个基础的饼图模板,使用了PGFPlots的饼图功能\n2. 当前使用的是示例数据(类别A-E,占比30%、25%、20%、15%、10%)\n3. 图表会自动显示百分比标签和图例\n\n**如果需要使用实际数据,请:**\n1. 提供具体的数据集(可以上传Excel文件或直接列出数据)\n2. 说明每个数据项的名称和数值\n3. 指定图表标题(如果需要修改)\n\n**示例数据格式:**\n```latex\n\\pie[text=legend]{\n 数值1/名称1,\n 数值2/名称2,\n 数值3/名称3,\n ...\n}\n```\n\n请提供您的实际数据,我可以为您生成包含真实数据的完整代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{tikz}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n \\begin{axis}[\n title={示例饼图},\n axis equal,\n axis lines=none,\n enlargelimits=false,\n clip=false,\n pie chart,\n pie values/.style={font=\\small},\n text=black,\n every node/.style={inner sep=0pt},\n nodes near coords,\n nodes near coords style={font=\\footnotesize},\n scale=1.5\n ]\n \n % 示例数据 - 请根据实际数据修改\n \\pie[text=legend]{\n 30/类别 A,\n 25/类别 B,\n 20/类别 C,\n 15/类别 D,\n 10/类别 E\n }\n \n \\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 饼图", + "created_at": "2026-01-01T15:45:11.182Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 685, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/19.json b/src/hello/server/storage/history/3/19.json new file mode 100644 index 00000000..caa8a374 --- /dev/null +++ b/src/hello/server/storage/history/3/19.json @@ -0,0 +1,18 @@ +{ + "history_id": 19, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "生成考研人数趋势图", + "ai_response": "由于您没有提供具体的数据文件,我将基于常见的考研人数趋势数据生成一个示例图表。以下是完整的LaTeX代码,您可以根据实际数据修改其中的数值:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={全国硕士研究生报考人数趋势(2017-2023)},\n xlabel={年份},\n ylabel={报考人数(万人)},\n xmin=2016, xmax=2024,\n ymin=150, ymax=500,\n xtick={2017,2018,2019,2020,2021,2022,2023},\n ytick={150,200,250,300,350,400,450,500},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n]\n\n% 实际数据点(示例数据,请根据实际情况修改)\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2017,201)(2018,238)(2019,290)(2020,341)(2021,377)(2022,457)(2023,474)\n };\n \\addlegendentry{报考人数}\n\n% 添加趋势线(二次拟合)\n\\addplot[\n color=red,\n dashed,\n domain=2017:2023,\n samples=100,\n ]\n {0.5*x^2 - 2000*x + 2e6}; % 近似拟合曲线,实际使用时请用真实拟合公式\n \\addlegendentry{趋势线}\n\n% 在每个数据点上添加数值标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n ]\n coordinates {\n (2017,201)[201]\n (2018,238)[238]\n (2019,290)[290]\n (2020,341)[341]\n (2021,377)[377]\n (2022,457)[457]\n (2023,474)[474]\n };\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n如果您有具体的Excel数据文件,请上传文件,我可以:\n1. 读取实际数据\n2. 生成更精确的图表\n3. 添加数据表格\n4. 调整图表样式以适应您的数据特点\n\n常见的数据调整建议:\n- 如果数据年份不同,请修改`xtick`和坐标点\n- 如果人数单位不同,请调整`ylabel`和数值\n- 如果需要其他图表类型(如柱状图),请告知\n\n请提供您的数据文件以获得更准确的图表代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{width=10cm,compat=1.18}\n\\usepackage{pgfplotstable}\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n title={全国硕士研究生报考人数趋势(2017-2023)},\n xlabel={年份},\n ylabel={报考人数(万人)},\n xmin=2016, xmax=2024,\n ymin=150, ymax=500,\n xtick={2017,2018,2019,2020,2021,2022,2023},\n ytick={150,200,250,300,350,400,450,500},\n legend pos=north west,\n ymajorgrids=true,\n grid style=dashed,\n]\n\n% 实际数据点(示例数据,请根据实际情况修改)\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (2017,201)(2018,238)(2019,290)(2020,341)(2021,377)(2022,457)(2023,474)\n };\n \\addlegendentry{报考人数}\n\n% 添加趋势线(二次拟合)\n\\addplot[\n color=red,\n dashed,\n domain=2017:2023,\n samples=100,\n ]\n {0.5*x^2 - 2000*x + 2e6}; % 近似拟合曲线,实际使用时请用真实拟合公式\n \\addlegendentry{趋势线}\n\n% 在每个数据点上添加数值标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n ]\n coordinates {\n (2017,201)[201]\n (2018,238)[238]\n (2019,290)[290]\n (2020,341)[341]\n (2021,377)[377]\n (2022,457)[457]\n (2023,474)[474]\n };\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 生成考研人数趋势图", + "created_at": "2026-01-02T06:38:44.397Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1149, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/20.json b/src/hello/server/storage/history/3/20.json new file mode 100644 index 00000000..43c0506a --- /dev/null +++ b/src/hello/server/storage/history/3/20.json @@ -0,0 +1,20 @@ +{ + "history_id": 20, + "user_id": 3, + "data_id": 4, + "file_name": "test1.xlsx", + "dataset_name": "test1", + "user_input": "柱状图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据的柱状图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计柱状图},\n title style={yshift=10pt, font=\\large\\bfseries}\n]\n\n\\addplot[fill=blue!50!cyan] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n**代码说明:**\n\n1. **数据设置**:\n - 使用 `symbolic x coords` 设置年份为分类坐标\n - 坐标点使用实际数据值(已去除\"万\"字,直接使用数值)\n\n2. **图表特性**:\n - `ybar`:创建垂直柱状图\n - `bar width=20pt`:设置柱状宽度\n - `nodes near coords`:在每个柱状上方显示数值\n - `ymajorgrids=true`:显示主要网格线\n - `enlarge x limits=0.15`:在两侧留出一些空间\n\n3. **样式设置**:\n - 使用蓝青色填充 (`fill=blue!50!cyan`)\n - 设置Y轴范围为0-500,以容纳所有数据\n - 包含中文标题和标签\n\n**使用注意事项:**\n1. 如果您没有安装中文字体,可以移除 `\\usepackage{xeCJK}` 和 `\\setCJKmainfont` 部分,并将中文标签改为英文\n2. 您可以根据需要调整颜色、柱状宽度、图表尺寸等参数\n3. 数据中的\"万\"字已在坐标值中去除,直接使用数值\n\n这个柱状图清晰地展示了2021-2026年的数据变化趋势,2023年达到峰值474万,之后呈下降趋势。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计柱状图},\n title style={yshift=10pt, font=\\large\\bfseries}\n]\n\n\\addplot[fill=blue!50!cyan] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 柱状图", + "created_at": "2026-01-02T06:59:24.814Z", + "metadata": { + "data_ids": [ + 4 + ], + "has_chart_code": true, + "code_length": 835, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/21.json b/src/hello/server/storage/history/3/21.json new file mode 100644 index 00000000..2ce80a84 --- /dev/null +++ b/src/hello/server/storage/history/3/21.json @@ -0,0 +1,18 @@ +{ + "history_id": 21, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计柱状图},\n title style={yshift=10pt, font=\\large\\bfseries}\n]\n\n\\addplot[fill=blue!50!cyan] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}添加中文说明", + "ai_response": "```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计柱状图},\n title style={yshift=10pt, font=\\large\\bfseries},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1,\n font=\\small\n }\n]\n\n\\addplot[fill=blue!50!cyan] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\\addlegendentry{年度数据}\n\n% 添加中文说明\n\\node[align=center, font=\\small, text width=10cm, anchor=north] at (axis description cs:0.5,-0.25) {\n 图表说明:\\\\\n 1. 本图表展示了2021年至2026年的年度数据变化趋势\\\\\n 2. 数据显示在2023年达到峰值(474万),随后呈下降趋势\\\\\n 3. 2026年数据相比峰值下降了27.6\\%\\\\\n 4. 建议关注2024年后的持续下降趋势,分析原因并采取相应措施\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n```\n\n主要修改说明:\n\n1. **添加了图例**:在图表下方添加了\"年度数据\"的图例说明\n\n2. **添加了详细的中文说明**:在图表下方添加了一个说明框,包含:\n - 图表的基本描述\n - 数据趋势分析\n - 关键数据点说明\n - 建议和提示\n\n3. **调整了布局**:通过调整legend位置和添加说明节点,确保图表整体布局美观\n\n4. **保持了原有样式**:保留了原有的柱状图样式、颜色和所有数据点\n\n这个修改后的代码可以直接编译生成包含完整中文说明的柱状图。如果您需要调整说明内容的位置、字体大小或具体文字,可以修改相应的参数。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n nodes near coords style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计柱状图},\n title style={yshift=10pt, font=\\large\\bfseries},\n legend style={\n at={(0.5,-0.15)},\n anchor=north,\n legend columns=-1,\n font=\\small\n }\n]\n\n\\addplot[fill=blue!50!cyan] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\\addlegendentry{年度数据}\n\n% 添加中文说明\n\\node[align=center, font=\\small, text width=10cm, anchor=north] at (axis description cs:0.5,-0.25) {\n 图表说明:\\\\\n 1. 本图表展示了2021年至2026年的年度数据变化趋势\\\\\n 2. 数据显示在2023年达到峰值(474万),随后呈下降趋势\\\\\n 3. 2026年数据相比峰值下降了27.6\\%\\\\\n 4. 建议关注2024年后的持续下降趋势,分析原因并采取相应措施\n};\n\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n...", + "created_at": "2026-01-02T07:01:52.050Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1245, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/22.json b/src/hello/server/storage/history/3/22.json new file mode 100644 index 00000000..2793524f --- /dev/null +++ b/src/hello/server/storage/history/3/22.json @@ -0,0 +1,18 @@ +{ + "history_id": 22, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "你是谁", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图},\n xlabel={横轴 (X)},\n ylabel={纵轴 (Y)},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n width=10cm,\n height=8cm,\n]\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (0,10)(1,30)(2,45)(3,60)(4,75)(5,85)(6,90)(7,92)(8,95)(9,98)(10,100)\n };\n \\addlegendentry{系列A}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={示例折线图},\n xlabel={横轴 (X)},\n ylabel={纵轴 (Y)},\n xmin=0, xmax=10,\n ymin=0, ymax=100,\n xtick={0,2,4,6,8,10},\n ytick={0,20,40,60,80,100},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n width=10cm,\n height=8cm,\n]\n\\addplot[\n color=blue,\n mark=square,\n ]\n coordinates {\n (0,10)(1,30)(2,45)(3,60)(4,75)(5,85)(6,90)(7,92)(8,95)(9,98)(10,100)\n };\n \\addlegendentry{系列A}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 你是谁", + "created_at": "2026-01-02T09:37:56.595Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 644, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/23.json b/src/hello/server/storage/history/3/23.json new file mode 100644 index 00000000..49bf08a5 --- /dev/null +++ b/src/hello/server/storage/history/3/23.json @@ -0,0 +1,18 @@ +{ + "history_id": 23, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "你能生成什么图表", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.6cm,\n enlarge x limits=0.2,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.6cm,\n enlarge x limits=0.2,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " 你能生成什么图表", + "created_at": "2026-01-02T09:38:29.530Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 807, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/24.json b/src/hello/server/storage/history/3/24.json new file mode 100644 index 00000000..95e851be --- /dev/null +++ b/src/hello/server/storage/history/3/24.json @@ -0,0 +1,18 @@ +{ + "history_id": 24, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.6cm,\n enlarge x limits=0.2,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}横轴间距拉开一点", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.5cm,\n enlarge x limits=0.4,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.5cm,\n enlarge x limits=0.4,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图,...", + "created_at": "2026-01-02T09:39:10.631Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 807, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/25.json b/src/hello/server/storage/history/3/25.json new file mode 100644 index 00000000..97a02085 --- /dev/null +++ b/src/hello/server/storage/history/3/25.json @@ -0,0 +1,18 @@ +{ + "history_id": 25, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.5cm,\n enlarge x limits=0.4,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}\n横轴图表类别的间隔再扩大一点,字体互相遮挡了", + "ai_response": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.5cm,\n enlarge x limits=0.6,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n x tick label style={rotate=0, yshift=-0.1cm, text width=1.5cm, align=center},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage[UTF8]{ctex}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图, 散点图, 面积图, 箱线图, 等高线图},\n xtick=data,\n ybar,\n ymin=0,\n ymax=10,\n ytick={0,2,4,6,8,10},\n ymajorgrids=true,\n bar width=0.5cm,\n enlarge x limits=0.6,\n nodes near coords,\n nodes near coords align={vertical},\n ylabel style={yshift=-0.2cm},\n title style={yshift=0.5cm},\n tick label style={font=\\small},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3},\n x tick label style={rotate=0, yshift=-0.1cm, text width=1.5cm, align=center},\n]\n\\addplot coordinates {(折线图,10) (柱状图,10) (饼图,9) (散点图,10) (面积图,8) (箱线图,7) (等高线图,6)};\n\\legend{支持度评分}\n\\end{axis}\n\\end{tikzpicture}\n\\end{document}", + "generation_description": " \\begin{document}\n\\begin{tikzpicture}\n\\begin{axis}[\n title={我能生成的图表类型示例},\n xlabel={图表类别},\n ylabel={支持程度},\n symbolic x coords={折线图, 柱状图, 饼图,...", + "created_at": "2026-01-02T09:40:13.875Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 889, + "code_source": "extracted_from_response" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/7.json b/src/hello/server/storage/history/3/7.json new file mode 100644 index 00000000..5368b83b --- /dev/null +++ b/src/hello/server/storage/history/3/7.json @@ -0,0 +1,18 @@ +{ + "history_id": 7, + "user_id": 3, + "data_id": null, + "file_name": "", + "dataset_name": "", + "user_input": "生成折线图", + "ai_response": "由于您没有提供具体的数据集,我将生成一个通用的折线图LaTeX PGFPlots代码示例。您可以根据需要修改数据、标签和样式。\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{data.csv}\nMonth,Value1,Value2\nJan,10,15\nFeb,12,18\nMar,8,12\nApr,14,20\nMay,16,22\nJun,18,25\nJul,20,28\nAug,22,30\nSep,19,26\nOct,17,23\nNov,15,20\nDec,12,17\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图},\n xlabel={月份},\n ylabel={数值},\n xmin=0, xmax=13,\n ymin=0, ymax=35,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n tick label style={font=\\small},\n label style={font=\\small},\n legend style={font=\\small}\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n mark size=2pt,\n thick\n] coordinates {\n (1,10) (2,12) (3,8) (4,14) (5,16) (6,18)\n (7,20) (8,22) (9,19) (10,17) (11,15) (12,12)\n};\n\\addlegendentry{数据集1}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n mark size=2pt,\n thick\n] coordinates {\n (1,15) (2,18) (3,12) (4,20) (5,22) (6,25)\n (7,28) (8,30) (9,26) (10,23) (11,20) (12,17)\n};\n\\addlegendentry{数据集2}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{这是一个示例折线图,展示了两个数据集在12个月份中的变化趋势。}\n\\label{fig:linechart}\n\\end{figure}\n\n\\end{document}\n```\n\n如果您有具体的数据文件,请上传Excel或CSV文件,我可以:\n1. 解析您的实际数据\n2. 根据数据特点调整图表类型和样式\n3. 生成包含您实际数据的完整LaTeX代码\n\n请提供您的数据文件,我将为您生成定制化的折线图代码。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{filecontents}\n\n\\begin{filecontents*}{data.csv}\nMonth,Value1,Value2\nJan,10,15\nFeb,12,18\nMar,8,12\nApr,14,20\nMay,16,22\nJun,18,25\nJul,20,28\nAug,22,30\nSep,19,26\nOct,17,23\nNov,15,20\nDec,12,17\n\\end{filecontents*}\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=0.8\\textwidth,\n height=0.6\\textwidth,\n title={示例折线图},\n xlabel={月份},\n ylabel={数值},\n xmin=0, xmax=13,\n ymin=0, ymax=35,\n xtick={1,2,3,4,5,6,7,8,9,10,11,12},\n xticklabels={Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec},\n legend pos=north west,\n grid=major,\n grid style={dashed,gray!30},\n tick label style={font=\\small},\n label style={font=\\small},\n legend style={font=\\small}\n]\n\n% 第一条折线\n\\addplot[\n color=blue,\n mark=square,\n mark size=2pt,\n thick\n] coordinates {\n (1,10) (2,12) (3,8) (4,14) (5,16) (6,18)\n (7,20) (8,22) (9,19) (10,17) (11,15) (12,12)\n};\n\\addlegendentry{数据集1}\n\n% 第二条折线\n\\addplot[\n color=red,\n mark=triangle,\n mark size=2pt,\n thick\n] coordinates {\n (1,15) (2,18) (3,12) (4,20) (5,22) (6,25)\n (7,28) (8,30) (9,26) (10,23) (11,20) (12,17)\n};\n\\addlegendentry{数据集2}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{这是一个示例折线图,展示了两个数据集在12个月份中的变化趋势。}\n\\label{fig:linechart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 生成折线图", + "created_at": "2026-01-01T11:03:30.126Z", + "metadata": { + "data_ids": [], + "has_chart_code": true, + "code_length": 1360, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/8.json b/src/hello/server/storage/history/3/8.json new file mode 100644 index 00000000..96599bfc --- /dev/null +++ b/src/hello/server/storage/history/3/8.json @@ -0,0 +1,20 @@ +{ + "history_id": 8, + "user_id": 3, + "data_id": 4, + "file_name": "test1.xlsx", + "dataset_name": "test1", + "user_input": "柱状图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据的柱状图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n% 添加柱状图数据\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}\n```\n\n**代码说明:**\n\n1. **数据转换**:将原始数据中的\"万\"字去除,只保留数值部分(377万 → 377,457万 → 457等)\n\n2. **图表特性**:\n - 使用蓝色柱状图展示数据\n - 在每个柱子上方显示具体数值\n - 添加了网格线便于读数\n - 设置了合适的Y轴范围(0-500)\n - 包含中文字体支持(需要xeLaTeX编译)\n\n3. **编译说明**:\n - 需要使用xeLaTeX编译以支持中文字体\n - 如果您的系统没有SimSun字体,请更改为其他中文字体,如:\n - Windows: `Microsoft YaHei`, `SimHei`\n - macOS: `PingFang SC`, `STHeiti`\n - Linux: `WenQuanYi Micro Hei`, `Noto Sans CJK SC`\n\n4. **可选修改**:\n - 如需更改颜色,修改`fill=blue!50`中的颜色值\n - 如需调整柱子宽度,修改`bar width=20pt`\n - 如需隐藏数值标签,删除`nodes near coords`行\n\n这个柱状图清晰地展示了2021-2026年的数据变化趋势,从图中可以看出2023年达到峰值(474万),之后呈下降趋势。", + "chart_code": "\\documentclass[border=5pt]{standalone}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n ybar,\n bar width=20pt,\n ymajorgrids=true,\n grid style=dashed,\n ylabel={数量(万)},\n xlabel={年份},\n symbolic x coords={2021年,2022年,2023年,2024年,2025年,2026年},\n xtick=data,\n nodes near coords,\n nodes near coords align={vertical},\n every node near coord/.style={font=\\small},\n enlarge x limits=0.15,\n ymin=0,\n ymax=500,\n title={2021-2026年数据统计},\n legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1},\n]\n\n% 添加柱状图数据\n\\addplot[fill=blue!50] coordinates {\n (2021年, 377)\n (2022年, 457)\n (2023年, 474)\n (2024年, 438)\n (2025年, 388)\n (2026年, 343)\n};\n\n\\legend{数据值}\n\n\\end{axis}\n\\end{tikzpicture}\n\n\\end{document}", + "generation_description": " 柱状图", + "created_at": "2026-01-01T11:17:43.578Z", + "metadata": { + "data_ids": [ + 4 + ], + "has_chart_code": true, + "code_length": 899, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/3/9.json b/src/hello/server/storage/history/3/9.json new file mode 100644 index 00000000..44ce70e1 --- /dev/null +++ b/src/hello/server/storage/history/3/9.json @@ -0,0 +1,20 @@ +{ + "history_id": 9, + "user_id": 3, + "data_id": 4, + "file_name": "test1.xlsx", + "dataset_name": "test1", + "user_input": "折线图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n font=\\small\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}\n```\n\n## 代码说明:\n\n1. **数据转换**:将\"377万\"等字符串转换为数值377,便于绘图\n2. **图表特性**:\n - 蓝色折线带圆点标记\n - 每个数据点上方显示原始数据标签(如\"377万\")\n - 设置了合适的坐标轴范围(x轴:2021-2026,y轴:300-500)\n - 添加了网格线便于读数\n - 包含中文字体支持(需要xeLaTeX编译)\n\n3. **观察要点**:\n - 数据在2023年达到峰值(474万)\n - 2023年后呈下降趋势\n - 2026年预计降至343万\n\n## 编译建议:\n- 使用xeLaTeX编译以支持中文字体\n- 如果字体报错,请将`SimSun`改为您系统中可用的中文字体名\n- 或者移除`\\usepackage{xeCJK}`和`\\setCJKmainfont`命令,将中文改为英文\n\n这个折线图清晰地展示了数据的年度变化趋势,便于观察和分析数据的发展规律。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{xeCJK}\n\\setCJKmainfont{SimSun} % 设置中文字体,请根据您的系统调整\n\n\\begin{document}\n\n\\begin{figure}[htbp]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north west,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\addplot[\n nodes near coords,\n only marks,\n point meta=explicit symbolic,\n mark=none,\n font=\\small\n] coordinates {\n (2021, 377) [377万]\n (2022, 457) [457万]\n (2023, 474) [474万]\n (2024, 438) [438万]\n (2025, 388) [388万]\n (2026, 343) [343万]\n};\n\n\\legend{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势折线图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:line_chart}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 折线图", + "created_at": "2026-01-01T11:20:37.942Z", + "metadata": { + "data_ids": [ + 4 + ], + "has_chart_code": true, + "code_length": 1336, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/server/storage/history/4/11.json b/src/hello/server/storage/history/4/11.json new file mode 100644 index 00000000..8d1a45c2 --- /dev/null +++ b/src/hello/server/storage/history/4/11.json @@ -0,0 +1,20 @@ +{ + "history_id": 11, + "user_id": 4, + "data_id": 5, + "file_name": "1.xlsx", + "dataset_name": "1", + "user_input": "生成折线图", + "ai_response": "根据您提供的数据,我将生成一个展示2021-2026年数据变化的折线图。以下是完整的LaTeX PGFPlots代码:\n\n```latex\n\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north east,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\node[above] at (axis cs:2021,377) {377万};\n\\node[above] at (axis cs:2022,457) {457万};\n\\node[above] at (axis cs:2023,474) {474万};\n\\node[above] at (axis cs:2024,438) {438万};\n\\node[above] at (axis cs:2025,388) {388万};\n\\node[below] at (axis cs:2026,343) {343万};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:trend}\n\\end{figure}\n\n\\end{document}\n```\n\n## 图表特点说明:\n\n1. **数据可视化**:使用蓝色折线清晰展示2021-2026年的数据变化趋势\n2. **坐标轴设置**:\n - X轴:年份(2021-2026)\n - Y轴:数值范围300-500万,覆盖所有数据点\n3. **数据点标记**:\n - 每个数据点用蓝色星号标记\n - 每个点上方/下方显示具体数值\n4. **趋势分析**:从图中可以明显看出:\n - 2021-2023年:数据呈上升趋势,2023年达到峰值474万\n - 2023-2026年:数据呈下降趋势,2026年降至343万\n5. **网格线**:添加水平网格线便于读数\n6. **标题和标注**:包含清晰的标题、坐标轴标签和图例\n\n## 使用说明:\n\n1. 将上述代码保存为`.tex`文件\n2. 使用支持PGFPlots的LaTeX编译器编译(如TeXLive、MiKTeX等)\n3. 如需调整图表尺寸,可修改`width`和`height`参数\n4. 如需更改颜色,可修改`color=blue`为其他颜色(如red、green等)\n\n这个折线图清晰地展示了数据的整体趋势和每年的具体数值,便于分析和展示。", + "chart_code": "\\documentclass{article}\n\\usepackage{pgfplots}\n\\pgfplotsset{compat=1.18}\n\\usepackage{geometry}\n\\geometry{a4paper, margin=1in}\n\n\\begin{document}\n\n\\begin{figure}[ht]\n\\centering\n\\begin{tikzpicture}\n\\begin{axis}[\n width=12cm,\n height=8cm,\n title={2021-2026年数据变化趋势},\n xlabel={年份},\n ylabel={数值(万)},\n xmin=2021, xmax=2026,\n ymin=300, ymax=500,\n xtick={2021,2022,2023,2024,2025,2026},\n xticklabels={2021年,2022年,2023年,2024年,2025年,2026年},\n ymajorgrids=true,\n grid style=dashed,\n legend pos=north east,\n legend style={cells={anchor=west}},\n tick label style={font=\\small},\n label style={font=\\small},\n title style={font=\\large\\bfseries}\n]\n\n% 绘制折线\n\\addplot[\n color=blue,\n mark=*,\n mark size=2pt,\n line width=1.2pt,\n smooth\n] coordinates {\n (2021, 377)\n (2022, 457)\n (2023, 474)\n (2024, 438)\n (2025, 388)\n (2026, 343)\n};\n\n% 添加数据点标签\n\\node[above] at (axis cs:2021,377) {377万};\n\\node[above] at (axis cs:2022,457) {457万};\n\\node[above] at (axis cs:2023,474) {474万};\n\\node[above] at (axis cs:2024,438) {438万};\n\\node[above] at (axis cs:2025,388) {388万};\n\\node[below] at (axis cs:2026,343) {343万};\n\n% 添加图例\n\\addlegendentry{数据趋势}\n\n\\end{axis}\n\\end{tikzpicture}\n\\caption{2021年至2026年数据变化趋势图。数据显示在2023年达到峰值474万,随后呈下降趋势。}\n\\label{fig:trend}\n\\end{figure}\n\n\\end{document}", + "generation_description": " 生成折线图", + "created_at": "2026-01-01T14:42:02.376Z", + "metadata": { + "data_ids": [ + 5 + ], + "has_chart_code": true, + "code_length": 1320, + "code_source": "from_request" + } +} \ No newline at end of file diff --git a/src/hello/backend/texput.log b/src/hello/server/texput.log similarity index 100% rename from src/hello/backend/texput.log rename to src/hello/server/texput.log diff --git a/src/hello/backend/uploads/1765287580162-341313732.txt b/src/hello/server/uploads/1765961572328-257249794.txt similarity index 100% rename from src/hello/backend/uploads/1765287580162-341313732.txt rename to src/hello/server/uploads/1765961572328-257249794.txt diff --git a/src/hello/server/uploads/1766072141068-54840704.txt b/src/hello/server/uploads/1766072141068-54840704.txt new file mode 100644 index 00000000..82ce3918 --- /dev/null +++ b/src/hello/server/uploads/1766072141068-54840704.txt @@ -0,0 +1,3 @@ +国家公务员考试近五年招录人数 +2021年 2022年 2023年 2024年 2025年 +25726 31200 37100 39561 39721 diff --git a/src/hello/backend/uploads/1765267707726-501696718.xlsx b/src/hello/server/uploads/1766102219457-475578971.xlsx similarity index 100% rename from src/hello/backend/uploads/1765267707726-501696718.xlsx rename to src/hello/server/uploads/1766102219457-475578971.xlsx diff --git a/src/hello/server/uploads/1766996458352-314000113.txt b/src/hello/server/uploads/1766996458352-314000113.txt new file mode 100644 index 00000000..f2a503e3 --- /dev/null +++ b/src/hello/server/uploads/1766996458352-314000113.txt @@ -0,0 +1,3 @@ +2025年 14亿 +2026年 13亿 +2027年 15亿 \ No newline at end of file diff --git a/src/hello/server/uploads/1767261878434-492553094.txt b/src/hello/server/uploads/1767261878434-492553094.txt new file mode 100644 index 00000000..82ce3918 --- /dev/null +++ b/src/hello/server/uploads/1767261878434-492553094.txt @@ -0,0 +1,3 @@ +国家公务员考试近五年招录人数 +2021年 2022年 2023年 2024年 2025年 +25726 31200 37100 39561 39721 diff --git a/src/hello/backend/uploads/1765270536790-948383825.xlsx b/src/hello/server/uploads/1767261936811-581417926.xlsx similarity index 100% rename from src/hello/backend/uploads/1765270536790-948383825.xlsx rename to src/hello/server/uploads/1767261936811-581417926.xlsx diff --git a/src/hello/backend/uploads/1765286271404-287236427.xlsx b/src/hello/server/uploads/1767266236734-330620602.xlsx similarity index 100% rename from src/hello/backend/uploads/1765286271404-287236427.xlsx rename to src/hello/server/uploads/1767266236734-330620602.xlsx diff --git a/src/hello/server/uploads/1767278488513-503333867.xlsx b/src/hello/server/uploads/1767278488513-503333867.xlsx new file mode 100644 index 00000000..7342c1fa Binary files /dev/null and b/src/hello/server/uploads/1767278488513-503333867.xlsx differ diff --git a/src/hello/src/Admin.vue b/src/hello/src/Admin.vue index 7307119d..ba3e9a3b 100644 --- a/src/hello/src/Admin.vue +++ b/src/hello/src/Admin.vue @@ -75,6 +75,7 @@