diff --git a/.gitignore b/.gitignore index 773dc12ae6d8bf3db341c98f0849cb127a1ada1b..7e58f2513b21bf132bff48f99ef854ed190aa9ff 100644 --- a/.gitignore +++ b/.gitignore @@ -5,12 +5,19 @@ !ThinFilm_Analyzer/ !ThinFilm_Analyzer/** !Dockerfile +!README.md !.gitignore !start_production.bat !start_app.bat !upload_to_hf.py -# Force ignore sub-project folders (even if whitelist above was loose) +# Force ignore sub-project folders +LPS_Streamlit_App/ +# ... (others) + +# Fix: Force ignore node_modules even if whitelisted above +ThinFilm_Analyzer/frontend/node_modules/ +ThinFilm_Analyzer/backend/app/data_cache/ LPS_Streamlit_App/ LPS_Streamlit_App_GDrive/ Literature_Map_App/ diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..40ffdbcbe010ba41e0a4659c2f8312514ffbe40e --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +--- +title: CharacLab +emoji: 🧪 +colorFrom: blue +colorTo: cyan +sdk: docker +pinned: false +--- + +# CharacLab - ThinFilm Analyzer + +An advanced analysis tool for thin film characterization data (XRD, XRR, RHEED, AFM, MEB). +Powered by React (Frontend) and FastAPI (Backend). +Data is securely fetched from a private Hugging Face Dataset. diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/browser_field/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/browser_field/package.json deleted file mode 100644 index bf406f0830f8aab6aaec9e3f60f1623fbe6854e6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/browser_field/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "browser_field", - "main": "a", - "browser": "b" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/cup.coffee b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/index.js deleted file mode 100644 index bd816eaba4ca3be8e4d68cfc0ae9f64b5aa712cc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/package.json deleted file mode 100644 index d7f4fc8079f60aaee820b293537b21d488a1bc31..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "." -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/index.js deleted file mode 100644 index bd816eaba4ca3be8e4d68cfc0ae9f64b5aa712cc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/package.json deleted file mode 100644 index f51287b9d1e739a8827578a541e89f7e91450615..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "./" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/index.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/package.json deleted file mode 100644 index a7416c0c7aa4a1df56419f92dcc7519836db8978..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "false_main", - "main": false -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/foo.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816eaba4ca3be8e4d68cfc0ae9f64b5aa712cc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a6f4ede17ec05e767ca8ccacbc3015ff70..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index b7188041763f8a94977f173a26c41fdbf5f2effb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "wrong.js" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/invalid_main/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/invalid_main/package.json deleted file mode 100644 index 0590748642ae2eadb17726ec3d1b501c94652277..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/invalid_main/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "invalid_main", - "main": [ - "why is this a thing", - "srsly omg wtf" - ] -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.coffee b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/lerna.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/lerna.json deleted file mode 100644 index d6707ca0cd64d48d212b90abe2e72f24b092572f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/lerna.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "packages": [ - "packages/*" - ], - "version": "0.0.0" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/package.json deleted file mode 100644 index 4391d392ea2761caea4d8286cc8ccc56cfa3e4a5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "ljharb-monorepo-symlink-test", - "private": true, - "version": "0.0.0", - "description": "", - "main": "index.js", - "scripts": { - "postinstall": "lerna bootstrap", - "test": "node packages/package-a" - }, - "author": "", - "license": "MIT", - "dependencies": { - "jquery": "^3.3.1", - "resolve": "../../../" - }, - "devDependencies": { - "lerna": "^3.4.3" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js deleted file mode 100644 index 8875a32df0ffc4eda94bb6c6dd9855ac604820c4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var assert = require('assert'); -var path = require('path'); -var resolve = require('resolve'); - -var basedir = __dirname + '/node_modules/@my-scope/package-b'; - -var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); - -/* - * preserveSymlinks === false - * will search NPM package from - * - packages/package-b/node_modules - * - packages/node_modules - * - node_modules - */ -assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); -assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); - -/* - * preserveSymlinks === true - * will search NPM package from - * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules - * - packages/package-a/node_modules/@my-scope/packages/node_modules - * - packages/package-a/node_modules/@my-scope/node_modules - * - packages/package-a/node_modules/node_modules - * - packages/package-a/node_modules - * - packages/node_modules - * - node_modules - */ -assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); -assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); - -console.log(' * all monorepo paths successfully resolved through symlinks'); diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json deleted file mode 100644 index 204de51e05878b3451223ba654c5e4a790ef1e51..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@my-scope/package-a", - "version": "0.0.0", - "private": true, - "description": "", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@my-scope/package-b": "^0.0.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json deleted file mode 100644 index f57c3b5f5e454d3948e1a4bc5aec10fdcd79d8b5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "@my-scope/package-b", - "private": true, - "version": "0.0.0", - "description": "", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "echo \"Error: run tests from root\" && exit 1" - }, - "dependencies": { - "@my-scope/package-a": "^0.0.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js deleted file mode 100644 index 9b4846a82a77be169097f041f791070732229cb7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +++ /dev/null @@ -1,26 +0,0 @@ -var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); -var b; -var c; - -var test = function test() { - console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); - console.log(b, ': preserveSymlinks true'); - console.log(c, ': preserveSymlinks false'); - - if (a !== b && a !== c) { - throw 'async: no match'; - } - console.log('async: success! a matched either b or c\n'); -}; - -require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { - if (err) { throw err; } - b = result.replace(process.cwd(), '$CWD'); - if (b && c) { test(); } -}); -require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { - if (err) { throw err; } - c = result.replace(process.cwd(), '$CWD'); - if (b && c) { test(); } -}); - diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json deleted file mode 100644 index acfe9e9517720ab5532c247052fadb214c5ffef3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "mylib", - "version": "0.0.0", - "description": "", - "private": true, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "buffer": "*" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js deleted file mode 100644 index 3283efc2ec81f8d2a62be9a1fd28a192403ce549..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +++ /dev/null @@ -1,12 +0,0 @@ -var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); -var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); -var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); - -console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); -console.log(b, ': preserveSymlinks true'); -console.log(c, ': preserveSymlinks false'); - -if (a !== b && a !== c) { - throw 'sync: no match'; -} -console.log('sync: success! a matched either b or c\n'); diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/lib/other-lib.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/root.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/quux/foo/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816eaba4ca3be8e4d68cfc0ae9f64b5aa712cc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo.js deleted file mode 100644 index 888cae37af95c51299d735439cf896dc4d5aaafc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 42; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo/index.js deleted file mode 100644 index bd816eaba4ca3be8e4d68cfc0ae9f64b5aa712cc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/bar.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/bar.js deleted file mode 100644 index cb1c2c01e753b31f6e550e991a82022f7acf8638..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/bar.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'bar'; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/package.json b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/package.json deleted file mode 100644 index 8e1b585914a7b46cd21d5d8709ac08bc1fe84962..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "bar.js" -} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/without_basedir/main.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5b31975be69da5efea03fac676afa5f2199831be..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../../../'); - -module.exports = function (t, cb) { - resolve('mymodule', null, cb); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver_sync.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index a6df8ced4682af11914d60c7a6a96b8a33ab438b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,730 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var test = require('tape'); - -var resolve = require('../'); -var sync = require('../sync'); - -var requireResolveSupportsPaths = require.resolve.length > 1 - && !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 - -var requireResolveDefaultPathsBroken = (/^v8\.9\.|^v9\.[01]\.0|^v9\.2\./).test(process.version); -// broken in node v8.9.x, v9.0, v9.1, v9.2.x. see https://github.com/nodejs/node/pull/17113 - -test('`./sync` entry point', function (t) { - t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`'); - t.end(); -}); - -test('foo', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./foo', { basedir: dir }), - path.join(dir, 'foo.js'), - './foo' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./foo', { basedir: dir }), - require.resolve('./foo', { paths: [dir] }), - './foo: resolve.sync === require.resolve' - ); - } - - t.equal( - resolve.sync('./foo.js', { basedir: dir }), - path.join(dir, 'foo.js'), - './foo.js' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./foo.js', { basedir: dir }), - require.resolve('./foo.js', { paths: [dir] }), - './foo.js: resolve.sync === require.resolve' - ); - } - - t.equal( - resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }), - path.join(dir, 'foo.js') - ); - - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }); - - // Test that filename is reported as the "from" value when passed. - t.throws( - function () { - resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') }); - }, - { - name: 'Error', - message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'" - } - ); - - t.end(); -}); - -test('bar', function (t) { - var dir = path.join(__dirname, 'resolver'); - - var basedir = path.join(dir, 'bar'); - - t.equal( - resolve.sync('foo', { basedir: basedir }), - path.join(dir, 'bar/node_modules/foo/index.js'), - 'foo in bar' - ); - if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { - t.equal( - resolve.sync('foo', { basedir: basedir }), - require.resolve('foo', { paths: [basedir] }), - 'foo in bar: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -test('baz', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./baz', { basedir: dir }), - path.join(dir, 'baz/quux.js'), - './baz' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./baz', { basedir: dir }), - require.resolve('./baz', { paths: [dir] }), - './baz: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -test('biz', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules'); - - t.equal( - resolve.sync('./grux', { basedir: dir }), - path.join(dir, 'grux/index.js') - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./grux', { basedir: dir }), - require.resolve('./grux', { paths: [dir] }), - './grux: resolve.sync === require.resolve' - ); - } - - var tivDir = path.join(dir, 'grux'); - t.equal( - resolve.sync('tiv', { basedir: tivDir }), - path.join(dir, 'tiv/index.js') - ); - if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { - t.equal( - resolve.sync('tiv', { basedir: tivDir }), - require.resolve('tiv', { paths: [tivDir] }), - 'tiv: resolve.sync === require.resolve' - ); - } - - var gruxDir = path.join(dir, 'tiv'); - t.equal( - resolve.sync('grux', { basedir: gruxDir }), - path.join(dir, 'grux/index.js') - ); - if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) { - t.equal( - resolve.sync('grux', { basedir: gruxDir }), - require.resolve('grux', { paths: [gruxDir] }), - 'grux: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -test('normalize', function (t) { - var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); - - t.equal( - resolve.sync('../grux', { basedir: dir }), - path.join(dir, 'index.js') - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('../grux', { basedir: dir }), - require.resolve('../grux', { paths: [dir] }), - '../grux: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -test('cup', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'cup.coffee'), - './cup -> ./cup.coffee' - ); - - t.equal( - resolve.sync('./cup.coffee', { basedir: dir }), - path.join(dir, 'cup.coffee'), - './cup.coffee' - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir: dir, - extensions: ['.js'] - }); - }); - - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }), - require.resolve('./cup.coffee', { paths: [dir] }), - './cup.coffee: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -test('mug', function (t) { - var dir = path.join(__dirname, 'resolver'); - - t.equal( - resolve.sync('./mug', { basedir: dir }), - path.join(dir, 'mug.js'), - './mug -> ./mug.js' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./mug', { basedir: dir }), - require.resolve('./mug', { paths: [dir] }), - './mug: resolve.sync === require.resolve' - ); - } - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.coffee', '.js'] - }), - path.join(dir, 'mug.coffee'), - './mug -> ./mug.coffee' - ); - - t.equal( - resolve.sync('./mug', { - basedir: dir, - extensions: ['.js', '.coffee'] - }), - path.join(dir, 'mug.js'), - './mug -> ./mug.js' - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'bar'); - var otherDir = path.join(resolverDir, 'other_path'); - - t.equal( - resolve.sync('root', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/root.js') - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir: dir, - paths: [otherDir] - }), - path.join(resolverDir, 'other_path/lib/other-lib.js') - ); - - t.throws(function () { - resolve.sync('root', { basedir: dir }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir: dir, - paths: [otherDir] - }); - }); - - t.end(); -}); - -test('path iterator', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - - var exactIterator = function (x, start, getPackageCandidates, opts) { - return [path.join(resolverDir, x)]; - }; - - t.equal( - resolve.sync('baz', { packageIterator: exactIterator }), - path.join(resolverDir, 'baz/quux.js') - ); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - var dir = path.join(resolverDir, 'incorrect_main'); - - t.equal( - resolve.sync('./incorrect_main', { basedir: resolverDir }), - path.join(dir, 'index.js') - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./incorrect_main', { basedir: resolverDir }), - require.resolve('./incorrect_main', { paths: [resolverDir] }), - './incorrect_main: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -test('missing index', function (t) { - t.plan(requireResolveSupportsPaths ? 2 : 1); - - var resolverDir = path.join(__dirname, 'resolver'); - try { - resolve.sync('./missing_index', { basedir: resolverDir }); - t.fail('did not fail'); - } catch (err) { - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); - } - if (requireResolveSupportsPaths) { - try { - require.resolve('./missing_index', { basedir: resolverDir }); - t.fail('require.resolve did not fail'); - } catch (err) { - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); - } - } -}); - -test('missing main', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - - try { - resolve.sync('./missing_main', { basedir: resolverDir }); - t.fail('require.resolve did not fail'); - } catch (err) { - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); - } - if (requireResolveSupportsPaths) { - try { - resolve.sync('./missing_main', { basedir: resolverDir }); - t.fail('require.resolve did not fail'); - } catch (err) { - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); - } - } - - t.end(); -}); - -test('null main', function (t) { - var resolverDir = path.join(__dirname, 'resolver'); - - try { - resolve.sync('./null_main', { basedir: resolverDir }); - t.fail('require.resolve did not fail'); - } catch (err) { - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); - } - if (requireResolveSupportsPaths) { - try { - resolve.sync('./null_main', { basedir: resolverDir }); - t.fail('require.resolve did not fail'); - } catch (err) { - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code'); - } - } - - t.end(); -}); - -test('main: false', function (t) { - var basedir = path.join(__dirname, 'resolver'); - var dir = path.join(basedir, 'false_main'); - t.equal( - resolve.sync('./false_main', { basedir: basedir }), - path.join(dir, 'index.js'), - '`"main": false`: resolves to `index.js`' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./false_main', { basedir: basedir }), - require.resolve('./false_main', { paths: [basedir] }), - '`"main": false`: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -var stubStatSync = function stubStatSync(fn) { - var statSync = fs.statSync; - try { - fs.statSync = function () { - throw new EvalError('Unknown Error'); - }; - return fn(); - } finally { - fs.statSync = statSync; - } -}; - -test('#79 - re-throw non ENOENT errors from stat', function (t) { - var dir = path.join(__dirname, 'resolver'); - - stubStatSync(function () { - t.throws(function () { - resolve.sync('foo', { basedir: dir }); - }, /Unknown Error/); - }); - - t.end(); -}); - -test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { - var dir = path.join(__dirname, 'resolver'); - var basedir = path.join(dir, 'same_names'); - - t.equal( - resolve.sync('./foo', { basedir: basedir }), - path.join(dir, 'same_names/foo.js') - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./foo', { basedir: basedir }), - require.resolve('./foo', { paths: [basedir] }), - './foo: resolve.sync === require.resolve' - ); - } - - t.equal( - resolve.sync('./foo/', { basedir: basedir }), - path.join(dir, 'same_names/foo/index.js') - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./foo/', { basedir: basedir }), - require.resolve('./foo/', { paths: [basedir] }), - './foo/: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { - var dir = path.join(__dirname, 'resolver'); - var basedir = path.join(dir, 'same_names/foo'); - - t.equal( - resolve.sync('./', { basedir: basedir }), - path.join(dir, 'same_names/foo/index.js'), - './' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./', { basedir: basedir }), - require.resolve('./', { paths: [basedir] }), - './: resolve.sync === require.resolve' - ); - } - - t.equal( - resolve.sync('.', { basedir: basedir }), - path.join(dir, 'same_names/foo/index.js'), - '.' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('.', { basedir: basedir }), - require.resolve('.', { paths: [basedir] }), - '.: resolve.sync === require.resolve', - { todo: true } - ); - } - - t.end(); -}); - -test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { - var testFile = path.basename(__filename); - - t.test('sanity check', function (st) { - st.equal( - resolve.sync('./' + testFile), - __filename, - 'sanity check' - ); - st.equal( - resolve.sync('./' + testFile), - require.resolve('./' + testFile), - 'sanity check: resolve.sync === require.resolve' - ); - - st.end(); - }); - - t.test('with a fake directory', function (st) { - function run() { return resolve.sync('./' + testFile + '/blah'); } - - st.throws(run, 'throws an error'); - - try { - run(); - } catch (e) { - st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - st.equal( - e.message, - 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', - 'can not find nonexistent module' - ); - } - - st.end(); - }); - - t.end(); -}); - -test('sync dot main', function (t) { - var start = new Date(); - - t.equal( - resolve.sync('./resolver/dot_main'), - path.join(__dirname, 'resolver/dot_main/index.js'), - './resolver/dot_main' - ); - t.equal( - resolve.sync('./resolver/dot_main'), - require.resolve('./resolver/dot_main'), - './resolver/dot_main: resolve.sync === require.resolve' - ); - - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - - t.end(); -}); - -test('sync dot slash main', function (t) { - var start = new Date(); - - t.equal( - resolve.sync('./resolver/dot_slash_main'), - path.join(__dirname, 'resolver/dot_slash_main/index.js') - ); - t.equal( - resolve.sync('./resolver/dot_slash_main'), - require.resolve('./resolver/dot_slash_main'), - './resolver/dot_slash_main: resolve.sync === require.resolve' - ); - - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - - t.end(); -}); - -test('not a directory', function (t) { - var path = './foo'; - try { - resolve.sync(path, { basedir: __filename }); - t.fail(); - } catch (err) { - t.ok(err, 'a non-directory errors'); - t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'"); - t.equal(err && err.code, 'MODULE_NOT_FOUND'); - } - t.end(); -}); - -test('non-string "main" field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - try { - var result = resolve.sync('./invalid_main', { basedir: dir }); - t.equal(result, undefined, 'result should not exist'); - t.fail('should not get here'); - } catch (err) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid_main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - } - t.end(); -}); - -test('non-string "main" field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - try { - var result = resolve.sync('./invalid_main', { basedir: dir }); - t.equal(result, undefined, 'result should not exist'); - t.fail('should not get here'); - } catch (err) { - t.ok(err, 'errors on non-string main'); - t.equal(err.message, 'package “invalid_main” `main` must be a string'); - t.equal(err.code, 'INVALID_PACKAGE_MAIN'); - } - t.end(); -}); - -test('browser field in package.json', function (t) { - var dir = path.join(__dirname, 'resolver'); - var res = resolve.sync('./browser_field', { - basedir: dir, - packageFilter: function packageFilter(pkg) { - if (pkg.browser) { - pkg.main = pkg.browser; // eslint-disable-line no-param-reassign - delete pkg.browser; // eslint-disable-line no-param-reassign - } - return pkg; - } - }); - t.equal(res, path.join(dir, 'browser_field', 'b.js')); - t.end(); -}); - -test('absolute paths', function (t) { - var extensionless = __filename.slice(0, -path.extname(__filename).length); - - t.equal( - resolve.sync(__filename), - __filename, - 'absolute path to this file resolves' - ); - t.equal( - resolve.sync(__filename), - require.resolve(__filename), - 'absolute path to this file: resolve.sync === require.resolve' - ); - - t.equal( - resolve.sync(extensionless), - __filename, - 'extensionless absolute path to this file resolves' - ); - t.equal( - resolve.sync(__filename), - require.resolve(__filename), - 'absolute path to this file: resolve.sync === require.resolve' - ); - - t.equal( - resolve.sync(__filename, { basedir: process.cwd() }), - __filename, - 'absolute path to this file with a basedir resolves' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync(__filename, { basedir: process.cwd() }), - require.resolve(__filename, { paths: [process.cwd()] }), - 'absolute path to this file + basedir: resolve.sync === require.resolve' - ); - } - - t.equal( - resolve.sync(extensionless, { basedir: process.cwd() }), - __filename, - 'extensionless absolute path to this file with a basedir resolves' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync(extensionless, { basedir: process.cwd() }), - require.resolve(extensionless, { paths: [process.cwd()] }), - 'extensionless absolute path to this file + basedir: resolve.sync === require.resolve' - ); - } - - t.end(); -}); - -var malformedDir = path.join(__dirname, 'resolver/malformed_package_json'); -test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) { - t.plan(5 + (requireResolveSupportsPaths ? 1 : 0)); - - var basedir = malformedDir; - var expected = path.join(basedir, 'index.js'); - - t.equal( - resolve.sync('./index.js', { basedir: basedir }), - expected, - 'malformed package.json is silently ignored' - ); - if (requireResolveSupportsPaths) { - t.equal( - resolve.sync('./index.js', { basedir: basedir }), - require.resolve('./index.js', { paths: [basedir] }), - 'malformed package.json: resolve.sync === require.resolve' - ); - } - - var res1 = resolve.sync( - './index.js', - { - basedir: basedir, - packageFilter: function (pkg, pkgfile, dir) { - t.fail('should not reach here'); - } - } - ); - - t.equal( - res1, - expected, - 'with packageFilter: malformed package.json is silently ignored' - ); - - var res2 = resolve.sync( - './index.js', - { - basedir: basedir, - readPackageSync: function (readFileSync, pkgfile) { - t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path'); - var result = String(readFileSync(pkgfile)); - try { - return JSON.parse(result); - } catch (e) { - t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error'); - } - } - } - ); - - t.equal( - res2, - expected, - 'with readPackageSync: malformed package.json is silently ignored' - ); -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core.js deleted file mode 100644 index 3a5f4fcff728f305c2d3d17a416fea4cbfe31f6b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core.js +++ /dev/null @@ -1,54 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('shadowed core modules still return core module', function (t) { - t.plan(2); - - resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { - t.ifError(err); - t.equal(res, 'util'); - }); -}); - -test('shadowed core modules still return core module [sync]', function (t) { - t.plan(1); - - var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); - - t.equal(res, 'util'); -}); - -test('shadowed core modules return shadow when appending `/`', function (t) { - t.plan(2); - - resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); - }); -}); - -test('shadowed core modules return shadow when appending `/` [sync]', function (t) { - t.plan(1); - - var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); - - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); -}); - -test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) { - t.plan(2); - - resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); - }); -}); - -test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) { - t.plan(1); - - var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }); - - t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core/node_modules/util/index.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core/node_modules/util/index.js deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/subdirs.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/subdirs.js deleted file mode 100644 index b7b8450a9ef231940eca37b8fe951310147a9470..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/symlinks.js b/ThinFilm_Analyzer/frontend/node_modules/resolve/test/symlinks.js deleted file mode 100644 index 35f881afb8c7e043567cf85953d9046c011cec3d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/resolve/test/symlinks.js +++ /dev/null @@ -1,176 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var test = require('tape'); -var map = require('array.prototype.map'); -var resolve = require('../'); - -var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink'); -var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package'); -var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a'); -var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a'); -try { - fs.unlinkSync(symlinkDir); -} catch (err) {} -try { - fs.unlinkSync(packageDir); -} catch (err) {} -try { - fs.unlinkSync(modADir); -} catch (err) {} -try { - fs.unlinkSync(symlinkModADir); -} catch (err) {} - -try { - fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction'); -} -try { - fs.symlinkSync('../../package', packageDir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction'); -} -try { - fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir'); -} catch (err) { - // if fails then it is probably on Windows and lets try to create a junction - fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction'); -} - -test('symlink', function (t) { - t.plan(2); - - resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) { - t.error(err); - t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')); - }); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.plan(4); - - resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) { - t.ok(err, 'there is an error'); - t.notOk(res, 'no result'); - - t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); - t.equal( - err && err.message, - 'Cannot find module \'foo\' from \'' + symlinkDir + '\'', - 'can not find nonexistent module' - ); - }); -}); - -test('sync symlink', function (t) { - var start = new Date(); - t.doesNotThrow(function () { - t.equal( - resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), - path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js') - ); - }); - t.ok(new Date() - start < 50, 'resolve.sync timedout'); - t.end(); -}); - -test('sync symlink when preserveSymlinks = true', function (t) { - t.throws(function () { - resolve.sync('foo', { basedir: symlinkDir }); - }, /Cannot find module 'foo'/); - t.end(); -}); - -test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) { - var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); - var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false }); - - t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); - t.end(); -}); - -test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) { - t.plan(2); - var basedir = path.join(__dirname, 'resolver', 'symlinked', '_'); - resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) { - t.notOk(err, 'no error'); - t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js')); - }); -}); - -test('packageFilter', function (t) { - function relative(x) { - return path.relative(__dirname, x); - } - - function testPackageFilter(preserveSymlinks) { - return function (st) { - st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition - - var destMain = 'symlinks/dest/node_modules/mod-a/index.js'; - var destPkg = 'symlinks/dest/node_modules/mod-a/package.json'; - var sourceMain = 'symlinks/source/node_modules/mod-a/index.js'; - var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json'; - var destDir = path.join(__dirname, 'symlinks', 'dest'); - - /* eslint multiline-comment-style: 0 */ - /* v2.x will restore these tests - var packageFilterPath = []; - var actualPath = resolve.sync('mod-a', { - basedir: destDir, - preserveSymlinks: preserveSymlinks, - packageFilter: function (pkg, pkgfile, dir) { - packageFilterPath.push(pkgfile); - } - }); - st.equal( - relative(actualPath), - path.normalize(preserveSymlinks ? destMain : sourceMain), - 'sync: actual path is correct' - ); - st.deepEqual( - map(packageFilterPath, relative), - map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize), - 'sync: packageFilter pkgfile arg is correct' - ); - */ - - var asyncPackageFilterPath = []; - resolve( - 'mod-a', - { - basedir: destDir, - preserveSymlinks: preserveSymlinks, - packageFilter: function (pkg, pkgfile) { - asyncPackageFilterPath.push(pkgfile); - } - }, - function (err, actualPath) { - st.error(err, 'no error'); - st.equal( - relative(actualPath), - path.normalize(preserveSymlinks ? destMain : sourceMain), - 'async: actual path is correct' - ); - st.deepEqual( - map(asyncPackageFilterPath, relative), - map( - preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg], - path.normalize - ), - 'async: packageFilter pkgfile arg is correct' - ); - } - ); - }; - } - - t.test('preserveSymlinks: false', testPackageFilter(false)); - - t.test('preserveSymlinks: true', testPackageFilter(true)); - - t.end(); -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/right-now/LICENSE.md b/ThinFilm_Analyzer/frontend/node_modules/right-now/LICENSE.md deleted file mode 100644 index ee27ba4b4412b0e4a05af5e3d8a005bc6681fdf3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/right-now/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/right-now/README.md b/ThinFilm_Analyzer/frontend/node_modules/right-now/README.md deleted file mode 100644 index 9eab02be90fc79f6dca76e91e3d091ed340dd436..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/right-now/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# right-now [![stable](http://hughsk.github.io/stability-badges/dist/stable.svg)](http://github.com/hughsk/stability-badges) # - -Get the quickest, most high-resolution timestamp possible in node or the -browser. - -Instead of returning the date, `right-now` may use `performance.now`, -`Date.now`, `+new Date` or `process.hrtime` to get a timestamp suitable for -measuring intervals of time. Handy for both animation loops and precision -benchmarking. - -It's pretty small but saves me writing this boilerplate every time :) - -## Installation ## - -``` bash -npm install right-now -``` - -## Usage ## - -### `require('right-now')()` ### - -Returns a timestamp. In node, this uses `process.hrtime`. In the browser, -support for the following is checked in this order: - -* `performance.now()` -* `Date.now()` -* `+new Date` diff --git a/ThinFilm_Analyzer/frontend/node_modules/right-now/browser.js b/ThinFilm_Analyzer/frontend/node_modules/right-now/browser.js deleted file mode 100644 index 245e58d93a41495c8a1d2647bac3aff9f5fee089..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/right-now/browser.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = - global.performance && - global.performance.now ? function now() { - return performance.now() - } : Date.now || function now() { - return +new Date - } diff --git a/ThinFilm_Analyzer/frontend/node_modules/right-now/index.js b/ThinFilm_Analyzer/frontend/node_modules/right-now/index.js deleted file mode 100644 index 22798637a81d655cc0c69eb57e2823fd780155b0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/right-now/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = function now() { - var time = process.hrtime() - return time[0] * 1e3 + time[1] / 1e6 -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/right-now/package.json b/ThinFilm_Analyzer/frontend/node_modules/right-now/package.json deleted file mode 100644 index 29bb95918f79660534559925141d609b266a942d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/right-now/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "right-now", - "version": "1.0.0", - "description": "Get the quickest, most high-resolution timestamp possible in node or the browser", - "main": "index.js", - "browser": "browser.js", - "scripts": { - "test": "say sorry" - }, - "repository": { - "type": "git", - "url": "git://github.com/hughsk/right-now.git" - }, - "keywords": [ - "time", - "high", - "resolution", - "fast", - "quick", - "nanosecond", - "millsecond", - "performance", - "now" - ], - "author": "Hugh Kennedy (http://hughskennedy.com/)", - "license": "MIT", - "readmeFilename": "README.md" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/rollup/LICENSE.md b/ThinFilm_Analyzer/frontend/node_modules/rollup/LICENSE.md deleted file mode 100644 index 7b806824370697048284c1726fc4d1b567bfea68..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/rollup/LICENSE.md +++ /dev/null @@ -1,679 +0,0 @@ -# Rollup core license -Rollup is released under the MIT license: - -The MIT License (MIT) - -Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/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. - -# Licenses of bundled dependencies -The published Rollup artifact additionally contains code with the following licenses: -MIT, ISC, 0BSD - -# Bundled dependencies: -## @jridgewell/sourcemap-codec -License: MIT -By: Justin Ridgewell -Repository: git+https://github.com/jridgewell/sourcemaps.git - -> Copyright 2024 Justin Ridgewell -> -> 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. - ---------------------------------------- - -## @rollup/pluginutils -License: MIT -By: Rich Harris -Repository: rollup/plugins - -> The MIT License (MIT) -> -> Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/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. - ---------------------------------------- - -## anymatch -License: ISC -By: Elan Shanker -Repository: https://github.com/micromatch/anymatch - -> The ISC License -> -> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted, provided that the above -> copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## binary-extensions -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/binary-extensions - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> Copyright (c) Paul Miller (https://paulmillr.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## braces -License: MIT -By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm -Repository: micromatch/braces - -> The MIT License (MIT) -> -> Copyright (c) 2014-present, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## builtin-modules -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/builtin-modules - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## chokidar -License: MIT -By: Paul Miller, Elan Shanker -Repository: git+https://github.com/paulmillr/chokidar.git - -> The MIT License (MIT) -> -> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker -> -> 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. - ---------------------------------------- - -## date-time -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/date-time - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## fill-range -License: MIT -By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling -Repository: jonschlinkert/fill-range - -> The MIT License (MIT) -> -> Copyright (c) 2014-present, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## flru -License: MIT -By: Luke Edwards -Repository: lukeed/flru - -> MIT License -> -> Copyright (c) Luke Edwards (lukeed.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## glob-parent -License: ISC -By: Gulp Team, Elan Shanker, Blaine Bublitz -Repository: gulpjs/glob-parent - -> The ISC License -> -> Copyright (c) 2015, 2019 Elan Shanker -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted, provided that the above -> copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## is-binary-path -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/is-binary-path - -> MIT License -> -> Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## is-extglob -License: MIT -By: Jon Schlinkert -Repository: jonschlinkert/is-extglob - -> The MIT License (MIT) -> -> Copyright (c) 2014-2016, Jon Schlinkert -> -> 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. - ---------------------------------------- - -## is-glob -License: MIT -By: Jon Schlinkert, Brian Woodward, Daniel Perez -Repository: micromatch/is-glob - -> The MIT License (MIT) -> -> Copyright (c) 2014-2017, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## is-number -License: MIT -By: Jon Schlinkert, Olsten Larck, Rouven Weßling -Repository: jonschlinkert/is-number - -> The MIT License (MIT) -> -> Copyright (c) 2014-present, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## is-reference -License: MIT -By: Rich Harris -Repository: git+https://github.com/Rich-Harris/is-reference.git - ---------------------------------------- - -## locate-character -License: MIT -By: Rich Harris -Repository: git+https://gitlab.com/Rich-Harris/locate-character.git - ---------------------------------------- - -## magic-string -License: MIT -By: Rich Harris -Repository: git+https://github.com/Rich-Harris/magic-string.git - -> Copyright 2018 Rich Harris -> -> 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. - ---------------------------------------- - -## normalize-path -License: MIT -By: Jon Schlinkert, Blaine Bublitz -Repository: jonschlinkert/normalize-path - -> The MIT License (MIT) -> -> Copyright (c) 2014-2018, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## parse-ms -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/parse-ms - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## picocolors -License: ISC -By: Alexey Raspopov -Repository: alexeyraspopov/picocolors - -> ISC License -> -> Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted, provided that the above -> copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## picomatch -License: MIT -By: Jon Schlinkert -Repository: micromatch/picomatch - -> The MIT License (MIT) -> -> Copyright (c) 2017-present, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## pretty-bytes -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/pretty-bytes - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## pretty-ms -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/pretty-ms - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## readdirp -License: MIT -By: Thorsten Lorenz, Paul Miller -Repository: git://github.com/paulmillr/readdirp.git - -> MIT License -> -> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - -## signal-exit -License: ISC -By: Ben Coe -Repository: https://github.com/tapjs/signal-exit.git - -> The ISC License -> -> Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors -> -> Permission to use, copy, modify, and/or distribute this software -> for any purpose with or without fee is hereby granted, provided -> that the above copyright notice and this permission notice -> appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## time-zone -License: MIT -By: Sindre Sorhus -Repository: sindresorhus/time-zone - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## to-regex-range -License: MIT -By: Jon Schlinkert, Rouven Weßling -Repository: micromatch/to-regex-range - -> The MIT License (MIT) -> -> Copyright (c) 2015-present, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## tslib -License: 0BSD -By: Microsoft Corp. -Repository: https://github.com/Microsoft/tslib.git - -> Copyright (c) Microsoft Corporation. -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted. -> -> 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. - ---------------------------------------- - -## yargs-parser -License: ISC -By: Ben Coe -Repository: https://github.com/yargs/yargs-parser.git - -> Copyright (c) 2016, Contributors -> -> Permission to use, copy, modify, and/or distribute this software -> for any purpose with or without fee is hereby granted, provided -> that the above copyright notice and this permission notice -> appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/rollup/README.md b/ThinFilm_Analyzer/frontend/node_modules/rollup/README.md deleted file mode 100644 index 0c4fe959efe87652e32e26b655af02e615201e33..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/rollup/README.md +++ /dev/null @@ -1,134 +0,0 @@ -

- -

- -

- - npm version - - - node compatibility - - - install size - - - code coverage - - - backers - - - sponsors - - - license - - - Join the chat at https://is.gd/rollup_chat - -

- -

Rollup

- -## Overview - -Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today. - -## Quick Start Guide - -Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/command-line-interface/) with an optional configuration file or else through its [JavaScript API](https://rollupjs.org/javascript-api/). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](https://rollupjs.org/introduction/). - -### Commands - -These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js. - -For browsers: - -```bash -# compile to a - --------------------------------------------------------------------------------- - - - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. Line numbers in - this library are 1-based (note that the underlying source map - specification uses 0-based line numbers -- this library handles the - translation). - -* `column`: The column number in the generated source. Column numbers - in this library are 0-based. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. The line number is 1-based. - -* `column`: The column number in the original source, or null if this - information is not available. The column number is 0-based. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. The line number is - 1-based. - -* `column`: The column number in the original source. The column - number is 0-based. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. The line - number is 1-based. - -* `column`: The column number in the generated source, or null. The - column number is 0-based. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. The line number is - 1-based. - -* `column`: Optional. The column number in the original source. The - column number is 0-based. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. The line - number is 1-based. - -* `column`: The column number in the generated source, or null. The - column number is 0-based. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. The line number is 1-based. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. The column number - is 0-based. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.debug.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index aad0620d70e16717ec338fc1d332279739e0d97c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3234 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAxNjI0YzcyOTliODg3ZjdiZGY2NCIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3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blxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4pO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gbWFwcGluZy5vcmlnaW5hbENvbHVtbjtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuYW1lSWR4ID0gdGhpcy5fbmFtZXMuaW5kZXhPZihtYXBwaW5nLm5hbWUpO1xuICAgICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShuYW1lSWR4IC0gcHJldmlvdXNOYW1lKTtcbiAgICAgICAgICBwcmV2aW91c05hbWUgPSBuYW1lSWR4O1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJlc3VsdCArPSBuZXh0O1xuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG4gIH07XG5cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZ2VuZXJhdGVTb3VyY2VzQ29udGVudChhU291cmNlcywgYVNvdXJjZVJvb3QpIHtcbiAgICByZXR1cm4gYVNvdXJjZXMubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIGlmICghdGhpcy5fc291cmNlc0NvbnRlbnRzKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgaWYgKGFTb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgc291cmNlID0gdXRpbC5yZWxhdGl2ZShhU291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHZhciBrZXkgPSB1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSk7XG4gICAgICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHRoaXMuX3NvdXJjZ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ywgMClcbiAgICB9O1xuXG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX2ZpbmRTb3VyY2VJbmRleChuZWVkbGUuc291cmNlKTtcbiAgICBpZiAobmVlZGxlLnNvdXJjZSA8IDApIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG5cbiAgICB2YXIgbWFwcGluZ3MgPSBbXTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKG5lZWRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbENvbHVtblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHV0aWwuY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EKTtcbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgaWYgKGFBcmdzLmNvbHVtbiA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHZhciBvcmlnaW5hbExpbmUgPSBtYXBwaW5nLm9yaWdpbmFsTGluZTtcblxuICAgICAgICAvLyBJdGVyYXRlIHVudGlsIGVpdGhlciB3ZSBydW4gb3V0IG9mIG1hcHBpbmdzLCBvciB3ZSBydW4gaW50b1xuICAgICAgICAvLyBhIG1hcHBpbmcgZm9yIGEgZGlmZmVyZW50IGxpbmUgdGhhbiB0aGUgb25lIHdlIGZvdW5kLiBTaW5jZVxuICAgICAgICAvLyBtYXBwaW5ncyBhcmUgc29ydGVk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i5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiA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AgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRo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BwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.js deleted file mode 100644 index b4eb08742598ff797f613e9bf15e55ce70c9fb10..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3233 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.min.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index c7c72dad8b59de41f3c932da18a5e5577ba76cb8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(t){var o=t;null!==n&&(o=i.relative(n,t)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(t);null!=s&&r.setSourceContent(t,s)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(y))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=f(e.source,n.source);return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:f(e.name,n.name)))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=f(e.source,n.source),0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:f(e.name,n.name)))))}function f(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}function m(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function _(e,n,r){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),r){var a=t(r);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var u=a.path.lastIndexOf("/");u>=0&&(a.path=a.path.substring(0,u+1))}n=s(o(a),n)}return i(n)}n.getArg=r;var v=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,y=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||v.test(e)},n.relative=a;var C=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=C?u:l,n.fromSetString=C?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d,n.parseSourceMapInput=m,n.computeSourceURL=_},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e,n){var r=e;return"string"==typeof e&&(r=a.parseSourceMapInput(e)),null!=r.sections?new s(r,n):new o(r,n)}function o(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var t=a.getArg(r,"version"),o=a.getArg(r,"sources"),i=a.getArg(r,"names",[]),s=a.getArg(r,"sourceRoot",null),u=a.getArg(r,"sourcesContent",null),c=a.getArg(r,"mappings"),g=a.getArg(r,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);s&&(s=a.normalize(s)),o=o.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return a.computeSourceURL(s,e,n)}),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=n,this.file=g}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var o=a.getArg(r,"version"),i=a.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=a.getArg(e,"offset"),o=a.getArg(r,"line"),i=a.getArg(r,"column");if(o=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.prototype._findSourceIndex=function(e){var n=e;if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),A.push(r),"number"==typeof r.originalLine&&S.push(r)}g(A,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,g(S,a.compareByOriginalPositions),this.__originalMappings=S},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=a.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var t=e;null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t));var o;if(null!=this.sourceRoot&&(o=a.urlParse(this.sourceRoot))){var i=t.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!o.path||"/"==o.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(n)return null;throw new Error('"'+t+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 === null) {\n\t return 1; // aStr2 !== null\n\t }\n\t\n\t if (aStr2 === null) {\n\t return -1; // aStr1 !== null\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t\n\t/**\n\t * Strip any JSON XSSI avoidance prefix from the string (as documented\n\t * in the source maps specification), and then parse the string as\n\t * JSON.\n\t */\n\tfunction parseSourceMapInput(str) {\n\t return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n\t}\n\texports.parseSourceMapInput = parseSourceMapInput;\n\t\n\t/**\n\t * Compute the URL of a source given the the source root, the source's\n\t * URL, and the source map's URL.\n\t */\n\tfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n\t sourceURL = sourceURL || '';\n\t\n\t if (sourceRoot) {\n\t // This follows what Chrome does.\n\t if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n\t sourceRoot += '/';\n\t }\n\t // The spec says:\n\t // Line 4: An optional source root, useful for relocating source\n\t // files on a server or removing repeated values in the\n\t // “sources” entry. This value is prepended to the individual\n\t // entries in the “source” field.\n\t sourceURL = sourceRoot + sourceURL;\n\t }\n\t\n\t // Historically, SourceMapConsumer did not take the sourceMapURL as\n\t // a parameter. This mode is still somewhat supported, which is why\n\t // this code block is conditional. However, it's preferable to pass\n\t // the source map URL to SourceMapConsumer, so that this function\n\t // can implement the source URL resolution algorithm as outlined in\n\t // the spec. This block is basically the equivalent of:\n\t // new URL(sourceURL, sourceMapURL).toString()\n\t // ... except it avoids using URL, which wasn't available in the\n\t // older releases of node still supported by this library.\n\t //\n\t // The spec says:\n\t // If the sources are not absolute URLs after prepending of the\n\t // “sourceRoot”, the sources are resolved relative to the\n\t // SourceMap (like resolving script src in a html document).\n\t if (sourceMapURL) {\n\t var parsed = urlParse(sourceMapURL);\n\t if (!parsed) {\n\t throw new Error(\"sourceMapURL could not be parsed\");\n\t }\n\t if (parsed.path) {\n\t // Strip the last path component, but keep the \"/\".\n\t var index = parsed.path.lastIndexOf('/');\n\t if (index >= 0) {\n\t parsed.path = parsed.path.substring(0, index + 1);\n\t }\n\t }\n\t sourceURL = join(urlGenerate(parsed), sourceURL);\n\t }\n\t\n\t return normalize(sourceURL);\n\t}\n\texports.computeSourceURL = computeSourceURL;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n\t : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number is 1-based.\n\t * - column: Optional. the column number in the original source.\n\t * The column number is 0-based.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t needle.source = this._findSourceIndex(needle.source);\n\t if (needle.source < 0) {\n\t return [];\n\t }\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The first parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t if (sourceRoot) {\n\t sourceRoot = util.normalize(sourceRoot);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this._absoluteSources = this._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this._sourceMapURL = aSourceMapURL;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Utility function to find the index of a source. Returns -1 if not\n\t * found.\n\t */\n\tBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t if (this._sources.has(relativeSource)) {\n\t return this._sources.indexOf(relativeSource);\n\t }\n\t\n\t // Maybe aSource is an absolute URL as returned by |sources|. In\n\t // this case we can't simply undo the transform.\n\t var i;\n\t for (i = 0; i < this._absoluteSources.length; ++i) {\n\t if (this._absoluteSources[i] == aSource) {\n\t return i;\n\t }\n\t }\n\t\n\t return -1;\n\t};\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @param String aSourceMapURL\n\t * The URL at which the source map can be found (optional)\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t smc._sourceMapURL = aSourceMapURL;\n\t smc._absoluteSources = smc._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._absoluteSources.slice();\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t var index = this._findSourceIndex(aSource);\n\t if (index >= 0) {\n\t return this.sourcesContent[index];\n\t }\n\t\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + relativeSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t source = this._findSourceIndex(source);\n\t if (source < 0) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The first parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based. \n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = null;\n\t if (mapping.name) {\n\t name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t }\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0fd5815da764db5fb9fe","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * 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\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/array-set.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81cae66fa6401f871ac7fb02e96fdb9c213..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/base64-vlq.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b404018ece911ab71fc0a8db326d16e6b1287..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/base64.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30264363990334a7df0aa0d0c9cc1aecfc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/binary-search.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941e1568d59c89b67cb649051a14608ee79..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/mapping-list.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a025a8a30879f31c9c6703a14f79f73b9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/quick-sort.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadbbdbea1865cfb947cb21fbf0c8da1289a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-map-consumer.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 7b99d1da7feac7c5345af8945ed047c7c054c0ba..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1145 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ -BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; -}; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-map-generator.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index 508bcfbbc936da21673108f7ace72a0af6081664..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,425 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-node.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-node.js deleted file mode 100644 index 8bcdbe385d2c0d333bcd62648ca700f13f9d3181..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/util.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/util.js deleted file mode 100644 index 3ca92e56f2a8cf086821031145ed60c53f8e9ab2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,488 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - -/** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ -function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); -} -exports.parseSourceMapInput = parseSourceMapInput; - -/** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ -function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); -} -exports.computeSourceURL = computeSourceURL; diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/package.json b/ThinFilm_Analyzer/frontend/node_modules/source-map/package.json deleted file mode 100644 index 24663417e7ac507877c002c77dc056757cc34ecc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "source-map", - "description": "Generates and consumes source maps", - "version": "0.6.1", - "homepage": "https://github.com/mozilla/source-map", - "author": "Nick Fitzgerald ", - "contributors": [ - "Tobias Koppers ", - "Duncan Beevers ", - "Stephen Crane ", - "Ryan Seddon ", - "Miles Elam ", - "Mihai Bazon ", - "Michael Ficarra ", - "Todd Wolfson ", - "Alexander Solovyov ", - "Felix Gnass ", - "Conrad Irwin ", - "usrbincc ", - "David Glasser ", - "Chase Douglas ", - "Evan Wallace ", - "Heather Arthur ", - "Hugh Kennedy ", - "David Glasser ", - "Simon Lydell ", - "Jmeas Smith ", - "Michael Z Goddard ", - "azu ", - "John Gozde ", - "Adam Kirkton ", - "Chris Montgomery ", - "J. Ryan Stinnett ", - "Jack Herrington ", - "Chris Truter ", - "Daniel Espeset ", - "Jamie Wong ", - "Eddy Bruël ", - "Hawken Rives ", - "Gilad Peleg ", - "djchie ", - "Gary Ye ", - "Nicolas Lalevée " - ], - "repository": { - "type": "git", - "url": "http://github.com/mozilla/source-map.git" - }, - "main": "./source-map.js", - "files": [ - "source-map.js", - "source-map.d.ts", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "engines": { - "node": ">=0.10.0" - }, - "license": "BSD-3-Clause", - "scripts": { - "test": "npm run build && node test/run-tests.js", - "build": "webpack --color", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "typings": "source-map" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/source-map.d.ts b/ThinFilm_Analyzer/frontend/node_modules/source-map/source-map.d.ts deleted file mode 100644 index 8f972b0cfbf389901ed4392a635f91d5cf2bf0e0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/source-map.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -export interface StartOfSourceMap { - file?: string; - sourceRoot?: string; -} - -export interface RawSourceMap extends StartOfSourceMap { - version: string; - sources: string[]; - names: string[]; - sourcesContent?: string[]; - mappings: string; -} - -export interface Position { - line: number; - column: number; -} - -export interface LineRange extends Position { - lastColumn: number; -} - -export interface FindPosition extends Position { - // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND - bias?: number; -} - -export interface SourceFindPosition extends FindPosition { - source: string; -} - -export interface MappedPosition extends Position { - source: string; - name?: string; -} - -export interface MappingItem { - source: string; - generatedLine: number; - generatedColumn: number; - originalLine: number; - originalColumn: number; - name: string; -} - -export class SourceMapConsumer { - static GENERATED_ORDER: number; - static ORIGINAL_ORDER: number; - - static GREATEST_LOWER_BOUND: number; - static LEAST_UPPER_BOUND: number; - - constructor(rawSourceMap: RawSourceMap); - computeColumnSpans(): void; - originalPositionFor(generatedPosition: FindPosition): MappedPosition; - generatedPositionFor(originalPosition: SourceFindPosition): LineRange; - allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; - hasContentsOfAllSources(): boolean; - sourceContentFor(source: string, returnNullOnMissing?: boolean): string; - eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; -} - -export interface Mapping { - generated: Position; - original: Position; - source: string; - name?: string; -} - -export class SourceMapGenerator { - constructor(startOfSourceMap?: StartOfSourceMap); - static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; - addMapping(mapping: Mapping): void; - setSourceContent(sourceFile: string, sourceContent: string): void; - applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; - toString(): string; -} - -export interface CodeWithSourceMap { - code: string; - map: SourceMapGenerator; -} - -export class SourceNode { - constructor(); - constructor(line: number, column: number, source: string); - constructor(line: number, column: number, source: string, chunk?: string, name?: string); - static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; - add(chunk: string): void; - prepend(chunk: string): void; - setSourceContent(sourceFile: string, sourceContent: string): void; - walk(fn: (chunk: string, mapping: MappedPosition) => void): void; - walkSourceContents(fn: (file: string, content: string) => void): void; - join(sep: string): SourceNode; - replaceRight(pattern: string, replacement: string): SourceNode; - toString(): string; - toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/source-map/source-map.js b/ThinFilm_Analyzer/frontend/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe820c87a217d27eb010281fe39b71163835..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/.npmignore b/ThinFilm_Analyzer/frontend/node_modules/stack-trace/.npmignore deleted file mode 100644 index b59f7e3a95a4d3f2b168d9c8e330be591fc49a6b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test/ \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/License b/ThinFilm_Analyzer/frontend/node_modules/stack-trace/License deleted file mode 100644 index 11ec094ea49ca3b81a6f3494fdc52dae74667c29..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/Makefile b/ThinFilm_Analyzer/frontend/node_modules/stack-trace/Makefile deleted file mode 100644 index a7ce31d3f4b3754f44d038df2d93fe2b6f294bee..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -release: - git push - git push --tags - npm publish . - -.PHONY: test diff --git a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/Readme.md b/ThinFilm_Analyzer/frontend/node_modules/stack-trace/Readme.md deleted file mode 100644 index fcd1b97c55c3e8257514c339ba802c2806461d72..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/Readme.md +++ /dev/null @@ -1,98 +0,0 @@ -# stack-trace - -Get v8 stack traces as an array of CallSite objects. - -## Install - -``` bash -npm install stack-trace -``` - -## Usage - -The stack-trace module makes it easy for you to capture the current stack: - -``` javascript -var stackTrace = require('stack-trace'); -var trace = stackTrace.get(); - -require('assert').strictEqual(trace[0].getFileName(), __filename); -``` - -However, sometimes you have already popped the stack you are interested in, -and all you have left is an `Error` object. This module can help: - -``` javascript -var stackTrace = require('stack-trace'); -var err = new Error('something went wrong'); -var trace = stackTrace.parse(err); - -require('assert').strictEqual(trace[0].getFileName(), __filename); -``` - -Please note that parsing the `Error#stack` property is not perfect, only -certain properties can be retrieved with it as noted in the API docs below. - -## Long stack traces - -stack-trace works great with [long-stack-traces][], when parsing an `err.stack` -that has crossed the event loop boundary, a `CallSite` object returning -`'----------------------------------------'` for `getFileName()` is created. -All other methods of the event loop boundary call site return `null`. - -[long-stack-traces]: https://github.com/tlrobinson/long-stack-traces - -## API - -### stackTrace.get([belowFn]) - -Returns an array of `CallSite` objects, where element `0` is the current call -site. - -When passing a function on the current stack as the `belowFn` parameter, the -returned array will only include `CallSite` objects below this function. - -### stackTrace.parse(err) - -Parses the `err.stack` property of an `Error` object into an array compatible -with those returned by `stackTrace.get()`. However, only the following methods -are implemented on the returned `CallSite` objects. - -* getTypeName -* getFunctionName -* getMethodName -* getFileName -* getLineNumber -* getColumnNumber -* isNative - -Note: Except `getFunctionName()`, all of the above methods return exactly the -same values as you would get from `stackTrace.get()`. `getFunctionName()` -is sometimes a little different, but still useful. - -### CallSite - -The official v8 CallSite object API can be found [here][v8stackapi]. A quick -excerpt: - -> A CallSite object defines the following methods: -> -> * **getThis**: returns the value of this -> * **getTypeName**: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property. -> * **getFunction**: returns the current function -> * **getFunctionName**: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context. -> * **getMethodName**: returns the name of the property of this or one of its prototypes that holds the current function -> * **getFileName**: if this function was defined in a script returns the name of the script -> * **getLineNumber**: if this function was defined in a script returns the current line number -> * **getColumnNumber**: if this function was defined in a script returns the current column number -> * **getEvalOrigin**: if this function was created using a call to eval returns a CallSite object representing the location where eval was called -> * **isToplevel**: is this a toplevel invocation, that is, is this the global object? -> * **isEval**: does this call take place in code defined by a call to eval? -> * **isNative**: is this call in native V8 code? -> * **isConstructor**: is this a constructor call? - -[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - -## License - -stack-trace is licensed under the MIT license. diff --git a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/lib/stack-trace.js b/ThinFilm_Analyzer/frontend/node_modules/stack-trace/lib/stack-trace.js deleted file mode 100644 index a7c38aa8f11381fd4809e2a426ab01b700cac95c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/lib/stack-trace.js +++ /dev/null @@ -1,111 +0,0 @@ -exports.get = function(belowFn) { - var oldLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Infinity; - - var dummyObject = {}; - - var v8Handler = Error.prepareStackTrace; - Error.prepareStackTrace = function(dummyObject, v8StackTrace) { - return v8StackTrace; - }; - Error.captureStackTrace(dummyObject, belowFn || exports.get); - - var v8StackTrace = dummyObject.stack; - Error.prepareStackTrace = v8Handler; - Error.stackTraceLimit = oldLimit; - - return v8StackTrace; -}; - -exports.parse = function(err) { - if (!err.stack) { - return []; - } - - var self = this; - var lines = err.stack.split('\n').slice(1); - - return lines - .map(function(line) { - if (line.match(/^\s*[-]{4,}$/)) { - return self._createParsedCallSite({ - fileName: line, - lineNumber: null, - functionName: null, - typeName: null, - methodName: null, - columnNumber: null, - 'native': null, - }); - } - - var lineMatch = line.match(/at (?:(.+)\s+)?\(?(?:(.+?):(\d+):(\d+)|([^)]+))\)?/); - if (!lineMatch) { - return; - } - - var object = null; - var method = null; - var functionName = null; - var typeName = null; - var methodName = null; - var isNative = (lineMatch[5] === 'native'); - - if (lineMatch[1]) { - var methodMatch = lineMatch[1].match(/([^\.]+)(?:\.(.+))?/); - object = methodMatch[1]; - method = methodMatch[2]; - functionName = lineMatch[1]; - typeName = 'Object'; - } - - if (method) { - typeName = object; - methodName = method; - } - - if (method === '') { - methodName = null; - functionName = ''; - } - - var properties = { - fileName: lineMatch[2] || null, - lineNumber: parseInt(lineMatch[3], 10) || null, - functionName: functionName, - typeName: typeName, - methodName: methodName, - columnNumber: parseInt(lineMatch[4], 10) || null, - 'native': isNative, - }; - - return self._createParsedCallSite(properties); - }) - .filter(function(callSite) { - return !!callSite; - }); -}; - -exports._createParsedCallSite = function(properties) { - var methods = {}; - for (var property in properties) { - var prefix = 'get'; - if (property === 'native') { - prefix = 'is'; - } - var method = prefix + property.substr(0, 1).toUpperCase() + property.substr(1); - - (function(property) { - methods[method] = function() { - return properties[property]; - } - })(property); - } - - var callSite = Object.create(methods); - for (var property in properties) { - callSite[property] = properties[property]; - } - - return callSite; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/package.json b/ThinFilm_Analyzer/frontend/node_modules/stack-trace/package.json deleted file mode 100644 index 65f4f1bae083f9d6aa87c804cb36639e8c1824a6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stack-trace/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "author": "Felix Geisendörfer (http://debuggable.com/)", - "name": "stack-trace", - "description": "Get v8 stack traces as an array of CallSite objects.", - "version": "0.0.9", - "homepage": "https://github.com/felixge/node-stack-trace", - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-stack-trace.git" - }, - "main": "./lib/stack-trace", - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": { - "far": "0.0.3", - "long-stack-traces": "0.1.2" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/static-eval/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/static-eval/.travis.yml deleted file mode 100644 index 6e35c0c48d257ce8ce5bfcf7610ff2b4dab86dc8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/static-eval/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js -os: linux -dist: bionic -before_install: - - "nvm install-latest-npm" -node_js: - - "0.8" - - "0.10" - - "0.12" - - "4" - - "6" - - "8" - - "9" - - "10" - - "11" - - "12" - - "13" - - "14" diff --git a/ThinFilm_Analyzer/frontend/node_modules/static-eval/CHANGELOG.md b/ThinFilm_Analyzer/frontend/node_modules/static-eval/CHANGELOG.md deleted file mode 100644 index 480c46eb0e1ab21e8ea3469709398cae6bbd7774..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/static-eval/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# static-eval Change Log -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - -## 2.1.1 -* Update `escodegen`. [@FabianWarnecke](https://github.com/FabianWarnecke) in [#43](https://github.com/browserify/static-eval/pull/43) - - escodegen doesn't officially support all the Node.js versions that `static-eval` supports, but so far it still works on them. - This has been the case for both v1.x and v2.1.0 of escodegen, so the upgrade doesn't change that situation. - -## 2.1.0 -* Add `allowAccessToMethodsOnFunctions` option to restore 1.x behaviour so that [cwise](https://github.com/scijs/cwise) can upgrade. ([@archmoj](https://github.com/archmoj) in [#31](https://github.com/browserify/static-eval/pull/31)) - - Do not use this option if you are not sure that you need it, as it had previously been removed for security reasons. There is a known exploit to execute arbitrary code. Only use it on trusted inputs, like the developer's JS files in a build system. - -## 2.0.5 -* Fix function bodies being invoked during declaration. ([@RoboPhred](https://github.com/RoboPhred) in [#30](https://github.com/browserify/static-eval/pull/30)) - -## 2.0.4 -* Short-circuit evaluation in `&&` and `||` expressions. ([@RoboPhred](https://github.com/RoboPhred) in [#28](https://github.com/browserify/static-eval/pull/28)) -* Start tracking changes. diff --git a/ThinFilm_Analyzer/frontend/node_modules/static-eval/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/static-eval/LICENSE deleted file mode 100644 index f52ee8c7249baebfc063b5284958105b199bc2c2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/static-eval/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -MIT License - -Copyright (c) 2013 James Halliday - -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/ThinFilm_Analyzer/frontend/node_modules/static-eval/example/eval.js b/ThinFilm_Analyzer/frontend/node_modules/static-eval/example/eval.js deleted file mode 100644 index 8a8cf4e8c1d33222ca615d34e0f611bff6baaa78..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/static-eval/example/eval.js +++ /dev/null @@ -1,7 +0,0 @@ -var evaluate = require('static-eval'); -var parse = require('esprima').parse; - -var src = process.argv.slice(2).join(' '); -var ast = parse(src).body[0].expression; - -console.log(evaluate(ast)); diff --git a/ThinFilm_Analyzer/frontend/node_modules/static-eval/example/vars.js b/ThinFilm_Analyzer/frontend/node_modules/static-eval/example/vars.js deleted file mode 100644 index 78198b078ec5c74533dc7dce7192535f14241e55..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/static-eval/example/vars.js +++ /dev/null @@ -1,11 +0,0 @@ -var evaluate = require('../'); -var parse = require('esprima').parse; - -var src = '[1,2,3+4*10+n,foo(3+5),obj[""+"x"].y]'; -var ast = parse(src).body[0].expression; - -console.log(evaluate(ast, { - n: 6, - foo: function (x) { return x * 100 }, - obj: { x: { y: 555 } } -})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/static-eval/index.js b/ThinFilm_Analyzer/frontend/node_modules/static-eval/index.js deleted file mode 100644 index 92f46872848fd09c286a27d1cf2f5c0e744d63db..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/static-eval/index.js +++ /dev/null @@ -1,209 +0,0 @@ -var unparse = require('escodegen').generate; - -module.exports = function (ast, vars, opts) { - if(!opts) opts = {}; - var rejectAccessToMethodsOnFunctions = !opts.allowAccessToMethodsOnFunctions; - - if (!vars) vars = {}; - var FAIL = {}; - - var result = (function walk (node, noExecute) { - if (node.type === 'Literal') { - return node.value; - } - else if (node.type === 'UnaryExpression'){ - var val = walk(node.argument, noExecute) - if (node.operator === '+') return +val - if (node.operator === '-') return -val - if (node.operator === '~') return ~val - if (node.operator === '!') return !val - return FAIL - } - else if (node.type === 'ArrayExpression') { - var xs = []; - for (var i = 0, l = node.elements.length; i < l; i++) { - var x = walk(node.elements[i], noExecute); - if (x === FAIL) return FAIL; - xs.push(x); - } - return xs; - } - else if (node.type === 'ObjectExpression') { - var obj = {}; - for (var i = 0; i < node.properties.length; i++) { - var prop = node.properties[i]; - var value = prop.value === null - ? prop.value - : walk(prop.value, noExecute) - ; - if (value === FAIL) return FAIL; - obj[prop.key.value || prop.key.name] = value; - } - return obj; - } - else if (node.type === 'BinaryExpression' || - node.type === 'LogicalExpression') { - var op = node.operator; - - if (op === '&&') { - var l = walk(node.left); - if (l === FAIL) return FAIL; - if (!l) return l; - var r = walk(node.right); - if (r === FAIL) return FAIL; - return r; - } - else if (op === '||') { - var l = walk(node.left); - if (l === FAIL) return FAIL; - if (l) return l; - var r = walk(node.right); - if (r === FAIL) return FAIL; - return r; - } - - var l = walk(node.left, noExecute); - if (l === FAIL) return FAIL; - var r = walk(node.right, noExecute); - if (r === FAIL) return FAIL; - - if (op === '==') return l == r; - if (op === '===') return l === r; - if (op === '!=') return l != r; - if (op === '!==') return l !== r; - if (op === '+') return l + r; - if (op === '-') return l - r; - if (op === '*') return l * r; - if (op === '/') return l / r; - if (op === '%') return l % r; - if (op === '<') return l < r; - if (op === '<=') return l <= r; - if (op === '>') return l > r; - if (op === '>=') return l >= r; - if (op === '|') return l | r; - if (op === '&') return l & r; - if (op === '^') return l ^ r; - - return FAIL; - } - else if (node.type === 'Identifier') { - if ({}.hasOwnProperty.call(vars, node.name)) { - return vars[node.name]; - } - else return FAIL; - } - else if (node.type === 'ThisExpression') { - if ({}.hasOwnProperty.call(vars, 'this')) { - return vars['this']; - } - else return FAIL; - } - else if (node.type === 'CallExpression') { - var callee = walk(node.callee, noExecute); - if (callee === FAIL) return FAIL; - if (typeof callee !== 'function') return FAIL; - - - var ctx = node.callee.object ? walk(node.callee.object, noExecute) : FAIL; - if (ctx === FAIL) ctx = null; - - var args = []; - for (var i = 0, l = node.arguments.length; i < l; i++) { - var x = walk(node.arguments[i], noExecute); - if (x === FAIL) return FAIL; - args.push(x); - } - - if (noExecute) { - return undefined; - } - - return callee.apply(ctx, args); - } - else if (node.type === 'MemberExpression') { - var obj = walk(node.object, noExecute); - if((obj === FAIL) || ( - (typeof obj == 'function') && rejectAccessToMethodsOnFunctions - )){ - return FAIL; - } - if (node.property.type === 'Identifier' && !node.computed) { - if (isUnsafeProperty(node.property.name)) return FAIL; - return obj[node.property.name]; - } - var prop = walk(node.property, noExecute); - if (prop === null || prop === FAIL) return FAIL; - if (isUnsafeProperty(prop)) return FAIL; - return obj[prop]; - } - else if (node.type === 'ConditionalExpression') { - var val = walk(node.test, noExecute) - if (val === FAIL) return FAIL; - return val ? walk(node.consequent) : walk(node.alternate, noExecute) - } - else if (node.type === 'ExpressionStatement') { - var val = walk(node.expression, noExecute) - if (val === FAIL) return FAIL; - return val; - } - else if (node.type === 'ReturnStatement') { - return walk(node.argument, noExecute) - } - else if (node.type === 'FunctionExpression') { - var bodies = node.body.body; - - // Create a "scope" for our arguments - var oldVars = {}; - Object.keys(vars).forEach(function(element){ - oldVars[element] = vars[element]; - }) - - for(var i=0; i - -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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/README.md b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/README.md deleted file mode 100644 index 2975cc74afb6a7bea73b4ce3493819c7526bf68b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/README.md +++ /dev/null @@ -1,137 +0,0 @@ -node-stream-parser -================== -### Generic interruptible "parser" mixin for Transform & Writable streams -[![Build Status](https://secure.travis-ci.org/TooTallNate/node-stream-parser.svg)](http://travis-ci.org/TooTallNate/node-stream-parser) - -This module offers the `stream-parser` mixin, which provides an easy-to-use API -for parsing bytes from `Writable` and/or `Transform` stream instances. This module -is great for implementing streaming parsers for standardized file formats. - -For `Writable` streams, the parser takes control over the `_write` callback -function. For `Transform` streams, the parser controls the `_transform` callback -function. - -Installation ------------- - -``` bash -$ npm install stream-parser -``` - - -Example -------- - -Let's create a quick `Transform` stream subclass that utilizes the parser's -`_bytes()` and `_passthrough()` functions to parse a theoretical file format that -has an 8-byte header we want to parse, and then pass through the rest of the data. - -``` javascript -var Parser = require('stream-parser'); -var inherits = require('util').inherits; -var Transform = require('stream').Transform; - -// create a Transform stream subclass -function MyParser () { - Transform.call(this); - - // buffer the first 8 bytes written - this._bytes(8, this.onheader); -} -inherits(MyParser, Transform); - -// mixin stream-parser into MyParser's `prototype` -Parser(MyParser.prototype); - -// invoked when the first 8 bytes have been received -MyParser.prototype.onheader = function (buffer, output) { - // parse the "buffer" into a useful "header" object - var header = {}; - header.type = buffer.readUInt32LE(0); - header.name = buffer.toString('utf8', 4); - this.emit('header', header); - - // it's usually a good idea to queue the next "piece" within the callback - this._passthrough(Infinity); -}; - - -// now we can *use* it! -var parser = new MyParser(); -parser.on('header', function (header) { - console.error('got "header"', header); -}); -process.stdin.pipe(parser).pipe(process.stdout); -``` - -Here's an example of manually creating a `Transform` stream and turning it into a -"pass through" stream equivalent to the one built into node core: - -``` javascript -var Parser = require('stream-parser'); -var Transform = require('stream').Transform; - -// create a Transform instance and extend it with "stream-parser" -var p = new Transform(); -Parser(p); - -// pass through `Infinity` bytes... forever... -p._passthrough(Infinity); - -// now `p` is equivalent to a stream.PassThrough instance -process.stdin.pipe(p).pipe(process.stdout); -``` - -See the `test` directory for some more example code in the test cases. - -A list of known concrete implementations is here (send pull requests for more!): - - * [node-icecast][] - * [node-throttle][] - * [node-flv][] - * [node-wav][] - -API ---- - - - [Parser()](#parser) - - [._bytes(n, cb)](#_bytesn-cb) - - [._skipBytes(n, cb)](#_skipbytesn-cb) - - [._passthrough(n, cb)](#_passthroughn-cb) - -## Parser() - - The `Parser` stream mixin works with either `Writable` or `Transform` stream - instances/subclasses. Provides a convenient generic "parsing" API: - -```js -_bytes(n, cb) - buffers "n" bytes and then calls "cb" with the "chunk" -_skipBytes(n, cb) - skips "n" bytes and then calls "cb" when done -``` - - If you extend a `Transform` stream, then the `_passthrough()` function is also - added: - -```js -_passthrough(n, cb) - passes through "n" bytes untouched and then calls "cb" -``` - -### ._bytes(n, cb) - - Buffers `n` bytes and then invokes `cb` once that amount has been collected. - -### ._skipBytes(n, cb) - - Skips over the next `n` bytes and then invokes `cb` once that amount has been - discarded. - -### ._passthrough(n, cb) - - Passes through `n` bytes to the readable side of this stream untouched, - then invokes `cb` once that amount has been passed through. This function is only defined - when stream-parser is extending a `Transform` stream. - -[node-icecast]: https://github.com/TooTallNate/node-icecast -[node-throttle]: https://github.com/TooTallNate/node-throttle -[node-flv]: https://github.com/TooTallNate/node-flv -[node-wav]: https://github.com/TooTallNate/node-wav diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/index.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/index.js deleted file mode 100644 index 9e4b7e61764afb0780d0a912e4fd5d2706cd9453..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/index.js +++ /dev/null @@ -1,299 +0,0 @@ - -/** - * Module dependencies. - */ - -var assert = require('assert'); -var debug = require('debug')('stream-parser'); - -/** - * Module exports. - */ - -module.exports = Parser; - -/** - * Parser states. - */ - -var INIT = -1; -var BUFFERING = 0; -var SKIPPING = 1; -var PASSTHROUGH = 2; - -/** - * The `Parser` stream mixin works with either `Writable` or `Transform` stream - * instances/subclasses. Provides a convenient generic "parsing" API: - * - * _bytes(n, cb) - buffers "n" bytes and then calls "cb" with the "chunk" - * _skipBytes(n, cb) - skips "n" bytes and then calls "cb" when done - * - * If you extend a `Transform` stream, then the `_passthrough()` function is also - * added: - * - * _passthrough(n, cb) - passes through "n" bytes untouched and then calls "cb" - * - * @param {Stream} stream Transform or Writable stream instance to extend - * @api public - */ - -function Parser (stream) { - var isTransform = stream && 'function' == typeof stream._transform; - var isWritable = stream && 'function' == typeof stream._write; - - if (!isTransform && !isWritable) throw new Error('must pass a Writable or Transform stream in'); - debug('extending Parser into stream'); - - // Transform streams and Writable streams get `_bytes()` and `_skipBytes()` - stream._bytes = _bytes; - stream._skipBytes = _skipBytes; - - // only Transform streams get the `_passthrough()` function - if (isTransform) stream._passthrough = _passthrough; - - // take control of the streams2 callback functions for this stream - if (isTransform) { - stream._transform = transform; - } else { - stream._write = write; - } -} - -function init (stream) { - debug('initializing parser stream'); - - // number of bytes left to parser for the next "chunk" - stream._parserBytesLeft = 0; - - // array of Buffer instances that make up the next "chunk" - stream._parserBuffers = []; - - // number of bytes parsed so far for the next "chunk" - stream._parserBuffered = 0; - - // flag that keeps track of if what the parser should do with bytes received - stream._parserState = INIT; - - // the callback for the next "chunk" - stream._parserCallback = null; - - // XXX: backwards compat with the old Transform API... remove at some point.. - if ('function' == typeof stream.push) { - stream._parserOutput = stream.push.bind(stream); - } - - stream._parserInit = true; -} - -/** - * Buffers `n` bytes and then invokes `fn` once that amount has been collected. - * - * @param {Number} n the number of bytes to buffer - * @param {Function} fn callback function to invoke when `n` bytes are buffered - * @api public - */ - -function _bytes (n, fn) { - assert(!this._parserCallback, 'there is already a "callback" set!'); - assert(isFinite(n) && n > 0, 'can only buffer a finite number of bytes > 0, got "' + n + '"'); - if (!this._parserInit) init(this); - debug('buffering %o bytes', n); - this._parserBytesLeft = n; - this._parserCallback = fn; - this._parserState = BUFFERING; -} - -/** - * Skips over the next `n` bytes, then invokes `fn` once that amount has - * been discarded. - * - * @param {Number} n the number of bytes to discard - * @param {Function} fn callback function to invoke when `n` bytes have been skipped - * @api public - */ - -function _skipBytes (n, fn) { - assert(!this._parserCallback, 'there is already a "callback" set!'); - assert(n > 0, 'can only skip > 0 bytes, got "' + n + '"'); - if (!this._parserInit) init(this); - debug('skipping %o bytes', n); - this._parserBytesLeft = n; - this._parserCallback = fn; - this._parserState = SKIPPING; -} - -/** - * Passes through `n` bytes to the readable side of this stream untouched, - * then invokes `fn` once that amount has been passed through. - * - * @param {Number} n the number of bytes to pass through - * @param {Function} fn callback function to invoke when `n` bytes have passed through - * @api public - */ - -function _passthrough (n, fn) { - assert(!this._parserCallback, 'There is already a "callback" set!'); - assert(n > 0, 'can only pass through > 0 bytes, got "' + n + '"'); - if (!this._parserInit) init(this); - debug('passing through %o bytes', n); - this._parserBytesLeft = n; - this._parserCallback = fn; - this._parserState = PASSTHROUGH; -} - -/** - * The `_write()` callback function implementation. - * - * @api private - */ - -function write (chunk, encoding, fn) { - if (!this._parserInit) init(this); - debug('write(%o bytes)', chunk.length); - - // XXX: old Writable stream API compat... remove at some point... - if ('function' == typeof encoding) fn = encoding; - - data(this, chunk, null, fn); -} - -/** - * The `_transform()` callback function implementation. - * - * @api private - */ - - -function transform (chunk, output, fn) { - if (!this._parserInit) init(this); - debug('transform(%o bytes)', chunk.length); - - // XXX: old Transform stream API compat... remove at some point... - if ('function' != typeof output) { - output = this._parserOutput; - } - - data(this, chunk, output, fn); -} - -/** - * The internal buffering/passthrough logic... - * - * This `_data` function get's "trampolined" to prevent stack overflows for tight - * loops. This technique requires us to return a "thunk" function for any - * synchronous action. Async stuff breaks the trampoline, but that's ok since it's - * working with a new stack at that point anyway. - * - * @api private - */ - -function _data (stream, chunk, output, fn) { - if (stream._parserBytesLeft <= 0) { - return fn(new Error('got data but not currently parsing anything')); - } - - if (chunk.length <= stream._parserBytesLeft) { - // small buffer fits within the "_parserBytesLeft" window - return function () { - return process(stream, chunk, output, fn); - }; - } else { - // large buffer needs to be sliced on "_parserBytesLeft" and processed - return function () { - var b = chunk.slice(0, stream._parserBytesLeft); - return process(stream, b, output, function (err) { - if (err) return fn(err); - if (chunk.length > b.length) { - return function () { - return _data(stream, chunk.slice(b.length), output, fn); - }; - } - }); - }; - } -} - -/** - * The internal `process` function gets called by the `data` function when - * something "interesting" happens. This function takes care of buffering the - * bytes when buffering, passing through the bytes when doing that, and invoking - * the user callback when the number of bytes has been reached. - * - * @api private - */ - -function process (stream, chunk, output, fn) { - stream._parserBytesLeft -= chunk.length; - debug('%o bytes left for stream piece', stream._parserBytesLeft); - - if (stream._parserState === BUFFERING) { - // buffer - stream._parserBuffers.push(chunk); - stream._parserBuffered += chunk.length; - } else if (stream._parserState === PASSTHROUGH) { - // passthrough - output(chunk); - } - // don't need to do anything for the SKIPPING case - - if (0 === stream._parserBytesLeft) { - // done with stream "piece", invoke the callback - var cb = stream._parserCallback; - if (cb && stream._parserState === BUFFERING && stream._parserBuffers.length > 1) { - chunk = Buffer.concat(stream._parserBuffers, stream._parserBuffered); - } - if (stream._parserState !== BUFFERING) { - chunk = null; - } - stream._parserCallback = null; - stream._parserBuffered = 0; - stream._parserState = INIT; - stream._parserBuffers.splice(0); // empty - - if (cb) { - var args = []; - if (chunk) { - // buffered - args.push(chunk); - } else { - // passthrough - } - if (output) { - // on a Transform stream, has "output" function - args.push(output); - } - var async = cb.length > args.length; - if (async) { - args.push(trampoline(fn)); - } - // invoke cb - var rtn = cb.apply(stream, args); - if (!async || fn === rtn) return fn; - } - } else { - // need more bytes - return fn; - } -} - -var data = trampoline(_data); - -/** - * Generic thunk-based "trampoline" helper function. - * - * @param {Function} input function - * @return {Function} "trampolined" function - * @api private - */ - -function trampoline (fn) { - return function () { - var result = fn.apply(this, arguments); - - while ('function' == typeof result) { - result = result(); - } - - return result; - }; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.coveralls.yml b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.coveralls.yml deleted file mode 100644 index 20a7068581791335487166ddc5001a2ca3a3b060..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.eslintrc b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.eslintrc deleted file mode 100644 index 8a37ae2c2e5a35db74b4607b4c74e0f4fe39a3e4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "rules": { - "no-console": 0, - "no-empty": [1, { "allowEmptyCatch": true }] - }, - "extends": "eslint:recommended" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.npmignore b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.npmignore deleted file mode 100644 index 5f60eecc84e219e52554407ad38d04abd1cf2111..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -support -test -examples -example -*.sock -dist -yarn.lock -coverage -bower.json diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.travis.yml deleted file mode 100644 index 6c6090c3b09f2e45d8c0a1dc77ff5f4a81e78a3c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ - -language: node_js -node_js: - - "6" - - "5" - - "4" - -install: - - make node_modules - -script: - - make lint - - make test - - make coveralls diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/CHANGELOG.md b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/CHANGELOG.md deleted file mode 100644 index eadaa189517bbcfb2a6784a48ac8d05d2edafe7c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,362 +0,0 @@ - -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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/LICENSE deleted file mode 100644 index 658c933d28255e8c716899789e8c0f846e5dc125..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/Makefile b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/Makefile deleted file mode 100644 index 584da8bf938e639ece3ba2bd4105c215c2b1ff51..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/README.md b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/README.md deleted file mode 100644 index f67be6b317c19952bb506a9e15e797615eea4533..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/README.md +++ /dev/null @@ -1,312 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny node.js debugging utility modelled after node core's debugging technique. - -**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -#### Windows note - - On Windows the environment variable is set using the `set` command. - - ```cmd - set DEBUG=*,-not_this - ``` - - Note that PowerShell uses different syntax to set environment variables. - - ```cmd - $env:DEBUG = "*,-not_this" - ``` - -Then, run the program to be debugged as usual. - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". - -## Environment Variables - - When running through Node.js, you can set a few environment variables that will - change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - - __Note:__ The environment variables beginning with `DEBUG_` end up being - converted into an Options object that gets used with `%o`/`%O` formatters. - See the Node.js documentation for - [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) - for the complete list. - -## Formatters - - - Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - -### Custom formatters - - You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - -## Browser support - You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), - or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), - if you don't want to build it yourself. - - Debug's enable state is currently persisted by `localStorage`. - Consider the situation shown below where you have `worker:a` and `worker:b`, - and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example _stdout.js_: - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/component.json b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/component.json deleted file mode 100644 index 9de26410f0d0bba2e48a07f094407d602eb5dd89..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/karma.conf.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/karma.conf.js deleted file mode 100644 index 103a82d15bd72b3cdf9ba4108272985f7e0bfdb3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/karma.conf.js +++ /dev/null @@ -1,70 +0,0 @@ -// 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/node.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe6dbecbfd41530c5a490cc738ec2968653..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/package.json b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/package.json deleted file mode 100644 index dc787ba76781de4c1d4721b69aa881a548365a90..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/browser.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/browser.js deleted file mode 100644 index 7106924934501fd4035efe78678281020328acc5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/browser.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/debug.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/debug.js deleted file mode 100644 index 6a5e3fc94c3ab80e123c3056b6c5dbe056d21658..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/debug.js +++ /dev/null @@ -1,202 +0,0 @@ - -/** - * 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/index.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/index.js deleted file mode 100644 index e12cf4d58c9f2d6d2d2e656f9cbb0f703cb5fa29..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/inspector-log.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/inspector-log.js deleted file mode 100644 index 60ea6c04aafd41d0ea3bcd78f58312ecf0eda436..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/inspector-log.js +++ /dev/null @@ -1,15 +0,0 @@ -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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/node.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/node.js deleted file mode 100644 index b15109c905a45bcb5db701cf37cf4e19385c3167..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/debug/src/node.js +++ /dev/null @@ -1,248 +0,0 @@ -/** - * 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/index.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/index.js deleted file mode 100644 index 6a522b16b3a3bf5e93aa5b8bf485f866ff71c5c2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/index.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/license.md b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/license.md deleted file mode 100644 index 69b61253a38926757b7de1d4df4880fc2105c2c9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/package.json b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/package.json deleted file mode 100644 index 6a31c81fac435ac31d4a802a275128f6a49c4c0c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/readme.md b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/readme.md deleted file mode 100644 index 84a9974cccd81f9296b7d3c77f2b0d2765dfe181..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/node_modules/ms/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# 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/ThinFilm_Analyzer/frontend/node_modules/stream-parser/package.json b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/package.json deleted file mode 100644 index 242b7b3f72b7d3c549fb325d2021ae33630e05d7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "stream-parser", - "version": "0.3.1", - "description": "Generic interruptible \"parser\" mixin for Transform & Writable streams", - "main": "index.js", - "scripts": { - "test": "mocha --reporter spec" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-stream-parser.git" - }, - "author": "Nathan Rajlich (http://tootallnate.net)", - "license": "MIT", - "dependencies": { - "debug": "2" - }, - "devDependencies": { - "mocha": "*", - "readable-stream": "1.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/test/transform.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/test/transform.js deleted file mode 100644 index ce233a9cc1cf01ee0314a223e9b64c5964f9ab40..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/test/transform.js +++ /dev/null @@ -1,205 +0,0 @@ - -/** - * Module dependencies. - */ - -var assert = require('assert'); -var Parser = require('../'); -var Transform = require('stream').Transform; - -// for node v0.6.x-v0.8.x support -if (!Transform) Transform = require('readable-stream/transform'); - -describe('Transform stream', function () { - - it('should have the `_bytes()` function', function () { - var t = new Transform(); - Parser(t); - assert.equal('function', typeof t._bytes); - }); - - it('should have the `_skipBytes()` function', function () { - var t = new Transform(); - Parser(t); - assert.equal('function', typeof t._skipBytes); - }); - - it('should have the `_passthrough()` function', function () { - var t = new Transform(); - Parser(t); - assert.equal('function', typeof t._passthrough); - }); - - it('should read 2 bytes, pass through 2 bytes', function (done) { - var t = new Transform(); - Parser(t); - var gotBytes = false; - var gotPassthrough = false; - var gotData = false; - - // read 2 bytes - t._bytes(2, read); - function read (chunk, output) { - assert.equal(2, chunk.length); - assert.equal(0, chunk[0]); - assert.equal(1, chunk[1]); - gotBytes = true; - t._passthrough(2, passthrough); - } - function passthrough (output) { - gotPassthrough = true; - } - - t.on('data', function (data) { - assert.equal(2, data.length); - assert.equal(2, data[0]); - assert.equal(3, data[1]); - gotData = true; - }); - - t.on('end', function () { - assert(gotBytes); - assert(gotPassthrough); - assert(gotData); - done(); - }); - - t.end(new Buffer([ 0, 1, 2, 3 ])); - }); - - it('should allow you to pass through Infinity bytes', function (done) { - var t = new Transform(); - Parser(t); - t._passthrough(Infinity); - var out = []; - t.on('data', function (data) { - out.push(data); - }); - t.on('end', function () { - assert.equal('hello world', Buffer.concat(out).toString()); - done(); - }); - t.end('hello world'); - }); - - it('should *not* allow you to buffer Infinity bytes', function () { - // buffering to Infinity would just be silly... - var t = new Transform(); - Parser(t); - assert.throws(function () { - t._bytes(Infinity); - }); - }); - - it('should not cause stack overflow', function (done) { - // this one does an admirable amount of CPU work... - this.test.slow(500); - this.test.timeout(1000); - - var t = new Transform(); - Parser(t); - - var bytes = 65536; - t._bytes(1, read); - function read() { - // Any downstream pipe consumer (writable) which doesn't do any async actions. - // e.g. console.log, or simply capturing data into an in-memory data-structure. - if (--bytes) { - t._bytes(1, read); - } else { - done(); - } - } - - var b = new Buffer(bytes); - b.fill('h'); - t.end(b); - }); - - describe('async', function () { - - it('should accept a callback function for `_passthrough()`', function (done) { - var t = new Transform(); - var data = 'test', _data; - Parser(t); - t._passthrough(data.length, function (output, fn) { - setTimeout(fn, 25); - }); - - t.on('data', function (data) { - _data = data; - }); - t.on('end', function () { - assert.equal(data, _data); - done(); - }); - t.end(data); - t.resume(); - }); - - it('should accept a callback function for `_bytes()`', function (done) { - var t = new Transform(); - var data = 'test'; - Parser(t); - t._bytes(data.length, function (chunk, output, fn) { - setTimeout(fn, 25); - }); - - t.on('end', function () { - done(); - }); - t.end(data); - t.resume(); - }); - - it('should work switching between async and sync callbacks', function (done) { - var firstCalled, secondCalled, thirdCalled; - - // create a 6 byte Buffer. The first 4 will be the int - // `1337`. The last 2 will be whatever... - var val = 1337; - var buf = new Buffer(6); - buf.writeUInt32LE(val, 0); - - var t = new Transform(); - Parser(t); - - // first read 4 bytes, with an async callback - function first (chunk, output, fn) { - firstCalled = true; - assert.equal(chunk.length, 4); - assert.equal(val, chunk.readUInt32LE(0)); - - t._bytes(1, second); - setTimeout(fn, 10); - } - - // second read 1 byte, sync callback - function second (chunk) { - secondCalled = true; - assert.equal(chunk.length, 1); - t._bytes(1, third); - } - - // third read 1 byte, async callback - function third (chunk, output, fn) { - thirdCalled = true; - assert.equal(chunk.length, 1); - setTimeout(fn, 10); - } - - t.on('finish', function () { - assert(firstCalled); - assert(secondCalled); - assert(thirdCalled); - done(); - }); - - t._bytes(4, first); - t.write(buf); - t.end(); - }); - - }); - -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/test/writable.js b/ThinFilm_Analyzer/frontend/node_modules/stream-parser/test/writable.js deleted file mode 100644 index 8e7e0043dfa2cd877b13ad66ba4c5842afbe718b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-parser/test/writable.js +++ /dev/null @@ -1,235 +0,0 @@ - -/** - * Module dependencies. - */ - -var Parser = require('../'); -var assert = require('assert'); -var inherits = require('util').inherits; -var Writable = require('stream').Writable; - -// for node v0.6.x-v0.8.x support -if (!Writable) Writable = require('readable-stream/writable'); - -describe('Writable streams', function () { - - var val = 1337; - var buf = new Buffer(4); - buf.writeUInt32LE(val, 0); - - it('should have the `_bytes()` function', function () { - var w = new Writable(); - Parser(w); - assert.equal('function', typeof w._bytes); - }); - - it('should have the `_skipBytes()` function', function () { - var w = new Writable(); - Parser(w); - assert.equal('function', typeof w._skipBytes); - }); - - it('should *not* have the `_passthrough()` function', function () { - var w = new Writable(); - Parser(w); - assert.notEqual('function', typeof w._passthrough); - }); - - it('should read 4 bytes in one chunk', function (done) { - var w = new Writable(); - Parser(w); - - // read 4 bytes - w._bytes(4, function (chunk) { - assert.equal(chunk.length, buf.length); - assert.equal(val, chunk.readUInt32LE(0)); - done(); - }); - - w.end(buf); - }); - - it('should read 4 bytes in multiple chunks', function (done) { - var w = new Writable(); - Parser(w); - - // read 4 bytes - w._bytes(4, function (chunk) { - assert.equal(chunk.length, buf.length); - assert.equal(val, chunk.readUInt32LE(0)); - done(); - }); - - for (var i = 0; i < buf.length; i++) { - w.write(new Buffer([ buf[i] ])); - } - w.end(); - }); - - it('should read 1 byte, 2 bytes, then 3 bytes', function (done) { - var w = new Writable(); - Parser(w); - - // read 1 byte - w._bytes(1, readone); - function readone (chunk) { - assert.equal(1, chunk.length); - assert.equal(0, chunk[0]); - w._bytes(2, readtwo); - } - function readtwo (chunk) { - assert.equal(2, chunk.length); - assert.equal(0, chunk[0]); - assert.equal(1, chunk[1]); - w._bytes(3, readthree); - } - function readthree (chunk) { - assert.equal(3, chunk.length); - assert.equal(0, chunk[0]); - assert.equal(1, chunk[1]); - assert.equal(2, chunk[2]); - done(); - } - - w.end(new Buffer([ 0, 0, 1, 0, 1, 2 ])); - }); - - it('should work when mixing in to a subclass\' `prototype`', function (done) { - function MyWritable () { - Writable.call(this); - this._bytes(2, this.onbytes); - } - inherits(MyWritable, Writable); - - // mixin to the `prototype` - Parser(MyWritable.prototype); - - var count = 2; - MyWritable.prototype.onbytes = function (buf) { - assert.equal(2, buf.length); - assert.equal(0, buf[0]); - assert.equal(1, buf[1]); - --count; - if (!count) done(); - }; - - var a = new MyWritable(); - var b = new MyWritable(); - - // interleave write()s - a.write(new Buffer([ 0 ])); - b.write(new Buffer([ 0 ])); - a.write(new Buffer([ 1 ])); - b.write(new Buffer([ 1 ])); - a.end(); - b.end(); - }); - - it('should *not* allow you to buffer Infinity bytes', function () { - // buffering to Infinity would just be silly... - var w = new Writable(); - Parser(w); - assert.throws(function () { - w._bytes(Infinity); - }); - }); - - it('should skip 3 bytes then buffer 3 bytes', function (done) { - var w = new Writable(); - Parser(w); - - w._skipBytes(3, function () { - assert.equal(arguments.length, 0); - w._bytes(3, function (data) { - assert.equal(arguments.length, 1); - assert.equal(data.toString('ascii'), 'lo\n'); - done(); - }); - }); - - w.end('hello\n'); - }); - - describe('async', function () { - - it('should accept a callback function for `_bytes()`', function (done) { - var w = new Writable(); - var data = 'test'; - Parser(w); - w._bytes(data.length, function (chunk, fn) { - setTimeout(fn, 25); - }); - w.on('finish', function () { - done(); - }); - w.end(data); - }); - - it('should emit an "error" event when data is written with no parsing function', function (done) { - var w = new Writable(); - Parser(w); - w.once('error', function (err) { - assert(err); - done(); - }); - w.write('a'); - }); - - }); - - describe('FrameParser', function () { - function FrameParser () { - Writable.call(this); - this._bytes(1, this.onsize); - } - inherits(FrameParser, Writable); - - // mixin to the `prototype` - Parser(FrameParser.prototype); - - FrameParser.prototype.onsize = function (buf) { - var size = buf.readUInt8(0); - this._bytes(size, this.onframe); - }; - - FrameParser.prototype.onframe = function (buf) { - this.emit('frame', buf.toString()); - - // begin parsing the next "frame" - this._bytes(1, this.onsize); - }; - - it('should emit 1 "frame" event', function (done) { - var p = new FrameParser(); - var s = 'a string'; - p.on('frame', function (frame) { - assert.equal(s, frame); - done(); - }); - p.write(new Buffer([ s.length ])); - p.write(new Buffer(s)); - p.end(); - }); - - it('should emit 2 "frame" events', function (done) { - var p = new FrameParser(); - var s = 'a string'; - var s2 = 'done'; - var count = 0; - p.on('frame', function (frame) { - count++; - if (s2 == frame) { - assert.equal(2, count); - done(); - } - }); - p.write(new Buffer([ s.length ])); - p.write(new Buffer(s)); - p.write(new Buffer([ s2.length ])); - p.write(new Buffer(s2)); - p.end(); - }); - - }); - -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/.github/workflows/test.yml b/ThinFilm_Analyzer/frontend/node_modules/stream-shift/.github/workflows/test.yml deleted file mode 100644 index 9b94272e0cdc616d6de20c52e256de151963be20..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Build Status -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - build: - strategy: - matrix: - node-version: [lts/*] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm test diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/stream-shift/LICENSE deleted file mode 100644 index bae9da7bfae2b5e22cfb0945b362b23ca822c8bb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Mathias Buus - -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/ThinFilm_Analyzer/frontend/node_modules/stream-shift/README.md b/ThinFilm_Analyzer/frontend/node_modules/stream-shift/README.md deleted file mode 100644 index d9cc2d945fa16191a7fb4b589a67c59372fc9dcd..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# stream-shift - -Returns the next buffer/object in a stream's readable queue - -``` -npm install stream-shift -``` - -[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift) - -## Usage - -``` js -var shift = require('stream-shift') - -console.log(shift(someStream)) // first item in its buffer -``` - -## Credit - -Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6 - -## License - -MIT diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/index.js b/ThinFilm_Analyzer/frontend/node_modules/stream-shift/index.js deleted file mode 100644 index 566df8880177be36ea1e854169aa2a37c42d1f63..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/index.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = shift - -function shift (stream) { - var rs = stream._readableState - if (!rs) return null - return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs)) -} - -function getStateLength (state) { - if (state.buffer.length) { - var idx = state.bufferIndex || 0 - // Since node 6.3.0 state.buffer is a BufferList not an array - if (state.buffer.head) { - return state.buffer.head.data.length - } else if (state.buffer.length - idx > 0 && state.buffer[idx]) { - return state.buffer[idx].length - } - } - - return state.length -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/package.json b/ThinFilm_Analyzer/frontend/node_modules/stream-shift/package.json deleted file mode 100644 index 8fe3301178137819ed17164ac9ebcd7e55e0b4c9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "stream-shift", - "version": "1.0.3", - "description": "Returns the next buffer/object in a stream's readable queue", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "standard": "^7.1.2", - "tape": "^4.6.0", - "through2": "^2.0.1" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/mafintosh/stream-shift.git" - }, - "author": "Mathias Buus (@mafintosh)", - "license": "MIT", - "bugs": { - "url": "https://github.com/mafintosh/stream-shift/issues" - }, - "homepage": "https://github.com/mafintosh/stream-shift" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/test.js b/ThinFilm_Analyzer/frontend/node_modules/stream-shift/test.js deleted file mode 100644 index bf4ed6681aa0c721f307099d5f5d85651e5e17e3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/stream-shift/test.js +++ /dev/null @@ -1,48 +0,0 @@ -var tape = require('tape') -var through = require('through2') -var stream = require('stream') -var shift = require('./') - -tape('shifts next', function (t) { - var passthrough = through() - - passthrough.write('hello') - passthrough.write('world') - - t.same(shift(passthrough), Buffer.from('hello')) - t.same(shift(passthrough), Buffer.from('world')) - t.end() -}) - -tape('shifts next with core', function (t) { - var passthrough = stream.PassThrough() - - passthrough.write('hello') - passthrough.write('world') - - t.same(shift(passthrough), Buffer.from('hello')) - t.same(shift(passthrough), Buffer.from('world')) - t.end() -}) - -tape('shifts next with object mode', function (t) { - var passthrough = through({objectMode: true}) - - passthrough.write({hello: 1}) - passthrough.write({world: 1}) - - t.same(shift(passthrough), {hello: 1}) - t.same(shift(passthrough), {world: 1}) - t.end() -}) - -tape('shifts next with object mode with core', function (t) { - var passthrough = stream.PassThrough({objectMode: true}) - - passthrough.write({hello: 1}) - passthrough.write({world: 1}) - - t.same(shift(passthrough), {hello: 1}) - t.same(shift(passthrough), {world: 1}) - t.end() -}) diff --git a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/.eslintrc.json b/ThinFilm_Analyzer/frontend/node_modules/string-split-by/.eslintrc.json deleted file mode 100644 index 1e5e08b37332379d194a6a5e8fd259d8de4f7fc9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/.eslintrc.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-magic-numbers": ["warn", { "ignore": [1, 0, -1], "ignoreArrayIndexes": true}], - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/string-split-by/.travis.yml deleted file mode 100644 index d4619bb9121302d84ab04eb2b68c512c6f5b5718..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - '6' - - '5' - - '4' diff --git a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/index.js b/ThinFilm_Analyzer/frontend/node_modules/string-split-by/index.js deleted file mode 100644 index 049e5655f6320483a7d9c06ca6522aab832ee8db..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' - -var paren = require('parenthesis') - -module.exports = function splitBy (string, separator, o) { - if (string == null) throw Error('First argument should be a string') - if (separator == null) throw Error('Separator should be a string or a RegExp') - - if (!o) o = {} - else if (typeof o === 'string' || Array.isArray(o)) { - o = {ignore: o} - } - - if (o.escape == null) o.escape = true - if (o.ignore == null) o.ignore = ['[]', '()', '{}', '<>', '""', "''", '``', '“”', '«»'] - else { - if (typeof o.ignore === 'string') {o.ignore = [o.ignore]} - - o.ignore = o.ignore.map(function (pair) { - // '"' → '""' - if (pair.length === 1) pair = pair + pair - return pair - }) - } - - var tokens = paren.parse(string, {flat: true, brackets: o.ignore}) - var str = tokens[0] - - var parts = str.split(separator) - - // join parts separated by escape - if (o.escape) { - var cleanParts = [] - for (var i = 0; i < parts.length; i++) { - var prev = parts[i] - var part = parts[i + 1] - - if (prev[prev.length - 1] === '\\' && prev[prev.length - 2] !== '\\') { - cleanParts.push(prev + separator + part) - i++ - } - else { - cleanParts.push(prev) - } - } - parts = cleanParts - } - - // open parens pack & apply unquotes, if any - for (var i = 0; i < parts.length; i++) { - tokens[0] = parts[i] - parts[i] = paren.stringify(tokens, {flat: true}) - } - - return parts -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/package.json b/ThinFilm_Analyzer/frontend/node_modules/string-split-by/package.json deleted file mode 100644 index 378596e9d9d56c1e8415dc02fb9917bc97cdacb6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "string-split-by", - "version": "1.0.0", - "description": "Split string by any separator excluding brackets, quotes and escaped characters", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dy/string-split-by.git" - }, - "keywords": [ - "split-string", - "string-split", - "split-stirng-words", - "space", - "string", - "split" - ], - "author": "Dmitry Yv ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dy/string-split-by/issues" - }, - "homepage": "https://github.com/dy/string-split-by#readme", - "dependencies": { - "parenthesis": "^3.1.5" - }, - "devDependencies": { - "tape": "^4.9.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/readme.md b/ThinFilm_Analyzer/frontend/node_modules/string-split-by/readme.md deleted file mode 100644 index 883ca51da20669fe78053e466094fb8d7642ec6e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# string-split-by [![unstable](https://img.shields.io/badge/stability-unstable-orange.svg)](http://github.com/badges/stability-badges) [![Build Status](https://img.shields.io/travis/dy/string-split-by.svg)](https://travis-ci.org/dy/string-split-by) - -Split string by a separator with respect to brackets, quotes and escape markers. Optimized version of [string-split](https://github.com/jonschlinkert/split-string). - -## Usage - -[![npm install string-split-by](https://nodei.co/npm/string-split-by.png?mini=true)](https://npmjs.org/package/string-split-by/) - - -```js -var split = require('string-split-by') - -split('a."b.c".d.{.e.f.g.}.h', '.') -// ['a', '"b.c"', 'd', '{.e.f.g.}', 'h'] - -split('a."b.c".d.{.e.f.g.}.h', '.', {ignore: '""'}) -// ['a', '"b.c"', 'd', '{', 'e', 'f', 'g', '}', 'h'] -``` - -## API - -### parts = splitBy(string, separator, options?) - -Return array with parts split from string by a separator, which can be whether _String_ or _RegExp_. Options can define: - -Option | Default | Meaning ----|---|--- -`ignore` | ``['"', "'", '`', '“”', '«»', '[]', '()', '{}']`` | Avoid splitting content enclosed in the character pairs. Can be a string or a list of strings. -`escape` | `true` | Avoid splitting at the escaped separator, eg. `\.` won't be separated by `'.'` separator. - - -## Related - -* [parenthesis](http://npmjs.org/package/parenthesis) - -## License - -© 2018 Dmitry Yv. MIT License diff --git a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/test.js b/ThinFilm_Analyzer/frontend/node_modules/string-split-by/test.js deleted file mode 100644 index f518d75960fea4ba6d60b1081ae542ad30781376..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string-split-by/test.js +++ /dev/null @@ -1,175 +0,0 @@ -'use strict'; - -var t = require('tape') -var split = require('.'); - -t('should throw an error when arguments are invalid', t => { - t.throws(() => split()); - t.end() -}); - -t('readme', t => { - - t.deepEqual( - split('a."b.c".d.{.e.f.g.}.h', '.'), - ['a', '"b.c"', 'd', '{.e.f.g.}', 'h'] - ) - - t.deepEqual( - split('a."b.c".d.{.e.f.g.}.h', '.', {ignore: '""'}), - ['a', '"b.c"', 'd', '{', 'e', 'f', 'g', '}', 'h'] - ) - t.end() -}) - -t('should not split on escaped dots:', t => { - t.deepEqual(split('a.b.c\\.d', '.'), ['a', 'b', 'c\\.d']); - t.deepEqual(split('a.b.c\\.d.e', '.'), ['a', 'b', 'c\\.d', 'e']); - t.end() -}); - -t('should keep escaping when followed by a backslash:', t => { - t.deepEqual(split('a.b.c\\\\.d', '.'), ['a', 'b', 'c\\\\', 'd']); - t.deepEqual(split('a.b.c\\\\d', '.'), ['a', 'b', 'c\\\\d']); - t.end() -}); - -t('should split a string on dots by default:', t => { - t.deepEqual(split('a.b.c', '.'), ['a', 'b', 'c']); - t.end() -}); - -t('should respect double-quoted strings', t => { - t.deepEqual(split('"b.c"', '.'), ['"b.c"']); - t.deepEqual(split('a."b.c"', '.'), ['a', '"b.c"']); - t.deepEqual(split('a".b.c"', '.'), ['a".b.c"']); - t.deepEqual(split('a."b.c".d', '.'), ['a', '"b.c"', 'd']); - t.deepEqual(split('a."b.c".d.".e.f.g.".h', '.'), ['a', '"b.c"', 'd', '".e.f.g."', 'h']); - t.end() -}); - -t('should respect singlequoted strings', t => { - t.deepEqual(split('\'b.c\'', '.'), ['\'b.c\'']); - t.deepEqual(split('a.\'b.c\'', '.'), ['a', '\'b.c\'']); - t.deepEqual(split('a.\'b.c\'.d', '.'), ['a', '\'b.c\'', 'd']); - t.deepEqual(split('a.\'b.c\'.d.\'.e.f.g.\'.h', '.'), ['a', '\'b.c\'', 'd', '\'.e.f.g.\'', 'h']); - t.end() -}); - -t('should respect strings in backticks', t => { - t.deepEqual(split('`b.c`', '.'), ['`b.c`']); - t.deepEqual(split('a.`b.c`', '.'), ['a', '`b.c`']); - t.deepEqual(split('a.`b.c`.d', '.'), ['a', '`b.c`', 'd']); - t.deepEqual(split('a.`b.c`.d.`.e.f.g.`.h', '.'), ['a', '`b.c`', 'd', '`.e.f.g.`', 'h']); - t.end() -}); - -t('should respect strings in double smart-quotes: “”', t => { - t.deepEqual(split('“b.c”', '.'), ['“b.c”']); - t.deepEqual(split('a.“b.c”', '.'), ['a', '“b.c”']); - t.deepEqual(split('a.“b.c”.d', '.'), ['a', '“b.c”', 'd']); - t.deepEqual(split('a.“b.c”.d.“.e.f.g.”.h', '.'), ['a', '“b.c”', 'd', '“.e.f.g.”', 'h']); - t.end() -}); - -t('should retain unclosed double quotes in the results', t => { - t.deepEqual(split('a."b.c', '.'), ['a', '"b', 'c']); - t.end() -}); - -t('should retain unclosed single quotes in the results', t => { - t.deepEqual(split('brian\'s', '.'), ['brian\'s']); - t.deepEqual(split('a.\'b.c', '.'), ['a', '\'b', 'c']); - t.end() -}); - - - -t('should split on a custom separator', t => { - t.deepEqual(split('a/b/c', '/'), ['a', 'b', 'c']); - t.deepEqual(split('a,b,c', ','), ['a', 'b', 'c']); - t.end() -}); - -t('should not split on an escaped custom separator:', t => { - t.deepEqual(split('a/b/c\\/d', '/'), ['a', 'b', 'c\\/d']); - t.end() -}); - -t('should disable quotes support', t => { - t.deepEqual(split('a.\'b.c\'."d"', '.', {ignore: '"'}), ['a', '\'b', 'c\'', '"d"']); - t.end() -}); - -t('should keep single quotes', t => { - t.deepEqual(split('a.\'b.c\'."d"', '.', {ignore: '\''}), ['a', '\'b.c\'', '"d"']); - t.end() -}); - -t('should keep double quotes', t => { - t.deepEqual(split('a."b.c".d', '.', '"'), ['a', '"b.c"', 'd']); - t.end() -}); - -t('should keep “” double quotes', t => { - t.deepEqual(split('a.“b.c”.d', '.', '“”'), ['a', '“b.c”', 'd']); - t.end() -}); - -t('should keep backticks', t => { - t.deepEqual(split('a.`b.c`.d', '.', {ignore: '`'}), ['a', '`b.c`', 'd']); - t.end() -}); - -t('should allow custom quotes object', t => { - t.deepEqual(split('a.^b.c$', '.', {ignore: '^$'}), ['a', '^b.c$']); - t.deepEqual(split('a.^b.c^', '.', {ignore: '^^'}), ['a', '^b.c^']); - t.deepEqual(split('a.~b.c~', '.', {ignore: '~~'}), ['a', '~b.c~']); - t.end() -}); - -t('should keep escape characters', t => { - t.deepEqual(split('a.b\\.c', '.', {escape: true}), ['a', 'b\\.c']); - t.end() -}); - -t.skip('should throw when brackets are unclosed', t => { - t.throws(function() { - }, /unclosed/); - t.end() -}); - -t('should not split inside brackets', t => { - t.deepEqual(split('a.(b.c).d', '.'), ['a', '(b.c)', 'd']); - t.deepEqual(split('a.[(b.c)].d', '.'), ['a', '[(b.c)]', 'd']); - t.deepEqual(split('a.[b.c].d', '.'), ['a', '[b.c]', 'd']); - t.deepEqual(split('a.{b.c}.d', '.'), ['a', '{b.c}', 'd']); - t.deepEqual(split('a..d', '.'), ['a', '', 'd']); - t.end() -}); - -t('should support nested brackets', t => { - t.deepEqual(split('a.{b.{c}.d}.e', '.'), ['a', '{b.{c}.d}', 'e']); - t.deepEqual(split('a.{b.{c.d}.e}.f', '.'), ['a', '{b.{c.d}.e}', 'f']); - t.deepEqual(split('a.{[b.{{c.d}}.e]}.f', '.'), ['a', '{[b.{{c.d}}.e]}', 'f']); - t.end() -}); - -t.skip('should support escaped brackets', t => { - t.deepEqual(split('a.\\{b.{c.c}.d}.e', '.'), ['a', '{b', '{c.c}', 'd}', 'e']); - t.deepEqual(split('a.{b.c}.\\{d.e}.f', '.'), ['a', '{b.c}', '{d', 'e}', 'f']); - t.end() -}); - -t('should support quoted brackets', t => { - t.deepEqual(split('a.{b.c}."{d.e}".f', '.'), ['a', '{b.c}', '"{d.e}"', 'f']); - t.deepEqual(split('a.{b.c}.{"d.e"}.f', '.'), ['a', '{b.c}', '{"d.e"}', 'f']); - t.end() -}); - -t('should ignore imbalanced brackets', t => { - t.deepEqual(split('a.{b.c', '.'), ['a', '{b', 'c']); - t.deepEqual(split('a.{a.{b.c}.d', '.'), ['a', '{a', '{b.c}', 'd']); - t.end() -}); - diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/.travis.yml deleted file mode 100644 index 3347a7254650582da5339323466f84fe079fc270..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -language: node_js -before_install: - - npm install -g npm@2 - - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g -notifications: - email: false -matrix: - fast_finish: true - include: - - node_js: '0.8' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.10' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.11' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: '0.12' - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 1 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 2 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 3 - env: - - TASK=test - - NPM_LEGACY=true - - node_js: 4 - env: TASK=test - - node_js: 5 - env: TASK=test - - node_js: 6 - env: TASK=test - - node_js: 7 - env: TASK=test - - node_js: 8 - env: TASK=test - - node_js: 9 - env: TASK=test diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/LICENSE deleted file mode 100644 index 778edb20730ef48c01002248f4d51e7752c13487..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/README.md b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/README.md deleted file mode 100644 index 5fd58315ed588027742dde690a31cd0a2610649d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# string_decoder - -***Node-core v8.9.4 string_decoder for userland*** - - -[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) -[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) - - -```bash -npm install --save string_decoder -``` - -***Node-core string_decoder for userland*** - -This package is a mirror of the string_decoder implementation in Node-core. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). - -As of version 1.0.0 **string_decoder** uses semantic versioning. - -## Previous versions - -Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. - -## Update - -The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. - -## Streams Working Group - -`string_decoder` 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. - -See [readable-stream](https://github.com/nodejs/readable-stream) for -more details. diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/lib/string_decoder.js b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/lib/string_decoder.js deleted file mode 100644 index 2e89e63f7933e42b8ba543ede35d2a8fa3e4f100..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/lib/string_decoder.js +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -/**/ - -var Buffer = require('safe-buffer').Buffer; -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ceecbd48fc4e8279e6451793fec2bf12178..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -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/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/README.md b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81afd0406f030ba21169f0c7a1dba70b3a93b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts deleted file mode 100644 index e9fed809a5ab515658d6e71f7ba5f631be769be4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -declare module "safe-buffer" { - export class Buffer { - length: number - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - constructor (str: string, encoding?: string); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - constructor (size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - constructor (arrayBuffer: ArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - constructor (array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - constructor (buffer: Buffer); - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - static from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - static from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - static from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - } -} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/index.js b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438dabbbceef6954a1a7a68038f8c440a90c79..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/package.json b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/package.json deleted file mode 100644 index 623fbc3f6b0c480fb0b3257fc666b1db827378bf..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "safe-buffer", - "description": "Safer Node.js Buffer API", - "version": "5.1.2", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "devDependencies": { - "standard": "*", - "tape": "^4.0.0" - }, - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/package.json b/ThinFilm_Analyzer/frontend/node_modules/string_decoder/package.json deleted file mode 100644 index 518c3eb9fb1ffbf72bfdf6fed252117b73164673..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/string_decoder/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "string_decoder", - "version": "1.1.1", - "description": "The string_decoder module from Node core", - "main": "lib/string_decoder.js", - "dependencies": { - "safe-buffer": "~5.1.0" - }, - "devDependencies": { - "babel-polyfill": "^6.23.0", - "core-util-is": "^1.0.2", - "inherits": "^2.0.3", - "tap": "~0.4.8" - }, - "scripts": { - "test": "tap test/parallel/*.js && node test/verify-dependencies", - "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/string_decoder.git" - }, - "homepage": "https://github.com/nodejs/string_decoder", - "keywords": [ - "string", - "decoder", - "browser", - "browserify" - ], - "license": "MIT" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/index.d.ts b/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/index.d.ts deleted file mode 100644 index 28ba3c8a80210203ea53b095dbcc90408e87c3c8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -declare namespace stripJsonComments { - interface Options { - /** - Replace comments with whitespace instead of stripping them entirely. - - @default true - */ - readonly whitespace?: boolean; - } -} - -/** -Strip comments from JSON. Lets you use comments in your JSON files! - -It will replace single-line comments `//` and multi-line comments `/**\/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. - -@param jsonString - Accepts a string with JSON. -@returns A JSON string without comments. - -@example -``` -const json = `{ - // Rainbows - "unicorn": "cake" -}`; - -JSON.parse(stripJsonComments(json)); -//=> {unicorn: 'cake'} -``` -*/ -declare function stripJsonComments( - jsonString: string, - options?: stripJsonComments.Options -): string; - -export = stripJsonComments; diff --git a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/index.js b/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/index.js deleted file mode 100644 index bb00b38bafe41552cc60d825516f479122e86e86..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/index.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -const singleComment = Symbol('singleComment'); -const multiComment = Symbol('multiComment'); -const stripWithoutWhitespace = () => ''; -const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/\S/g, ' '); - -const isEscaped = (jsonString, quotePosition) => { - let index = quotePosition - 1; - let backslashCount = 0; - - while (jsonString[index] === '\\') { - index -= 1; - backslashCount += 1; - } - - return Boolean(backslashCount % 2); -}; - -module.exports = (jsonString, options = {}) => { - if (typeof jsonString !== 'string') { - throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``); - } - - const strip = options.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; - - let insideString = false; - let insideComment = false; - let offset = 0; - let result = ''; - - for (let i = 0; i < jsonString.length; i++) { - const currentCharacter = jsonString[i]; - const nextCharacter = jsonString[i + 1]; - - if (!insideComment && currentCharacter === '"') { - const escaped = isEscaped(jsonString, i); - if (!escaped) { - insideString = !insideString; - } - } - - if (insideString) { - continue; - } - - if (!insideComment && currentCharacter + nextCharacter === '//') { - result += jsonString.slice(offset, i); - offset = i; - insideComment = singleComment; - i++; - } else if (insideComment === singleComment && currentCharacter + nextCharacter === '\r\n') { - i++; - insideComment = false; - result += strip(jsonString, offset, i); - offset = i; - continue; - } else if (insideComment === singleComment && currentCharacter === '\n') { - insideComment = false; - result += strip(jsonString, offset, i); - offset = i; - } else if (!insideComment && currentCharacter + nextCharacter === '/*') { - result += jsonString.slice(offset, i); - offset = i; - insideComment = multiComment; - i++; - continue; - } else if (insideComment === multiComment && currentCharacter + nextCharacter === '*/') { - i++; - insideComment = false; - result += strip(jsonString, offset, i + 1); - offset = i + 1; - continue; - } - } - - return result + (insideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset)); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/license b/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/license deleted file mode 100644 index fa7ceba3eb4a9657a9db7f3ffca4e4e97a9019de..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/package.json b/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/package.json deleted file mode 100644 index ce7875aa0d1963cc7b61f349d6062159af6555f1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "strip-json-comments", - "version": "3.1.1", - "description": "Strip comments from JSON. Lets you use comments in your JSON files!", - "license": "MIT", - "repository": "sindresorhus/strip-json-comments", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "bench": "matcha benchmark.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "json", - "strip", - "comments", - "remove", - "delete", - "trim", - "multiline", - "parse", - "config", - "configuration", - "settings", - "util", - "env", - "environment", - "jsonc" - ], - "devDependencies": { - "ava": "^1.4.1", - "matcha": "^0.7.0", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/readme.md b/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/readme.md deleted file mode 100644 index cc542e50cf10fb29a610af736a312a246acf775a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strip-json-comments/readme.md +++ /dev/null @@ -1,78 +0,0 @@ -# strip-json-comments [![Build Status](https://travis-ci.com/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.com/github/sindresorhus/strip-json-comments) - -> Strip comments from JSON. Lets you use comments in your JSON files! - -This is now possible: - -```js -{ - // Rainbows - "unicorn": /* ❤ */ "cake" -} -``` - -It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. - -Also available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[Grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[Broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. - -## Install - -``` -$ npm install strip-json-comments -``` - -## Usage - -```js -const json = `{ - // Rainbows - "unicorn": /* ❤ */ "cake" -}`; - -JSON.parse(stripJsonComments(json)); -//=> {unicorn: 'cake'} -``` - -## API - -### stripJsonComments(jsonString, options?) - -#### jsonString - -Type: `string` - -Accepts a string with JSON and returns a string without comments. - -#### options - -Type: `object` - -##### whitespace - -Type: `boolean`\ -Default: `true` - -Replace comments with whitespace instead of stripping them entirely. - -## Benchmark - -``` -$ npm run bench -``` - -## Related - -- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module -- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/.npmignore b/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/.npmignore deleted file mode 100644 index ddc9ab330c2a9e77591abb3effd1b9ebf278a988..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules/* -*.DS_Store \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/LICENSE deleted file mode 100644 index 8ce206a84544ae1623a4c94db88c18c2d9ed8009..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2013 Mikola Lysenko - -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/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/README.md b/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/README.md deleted file mode 100644 index 38cbb76b30050f8dbc1b83442af4d8265cbf39ad..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/README.md +++ /dev/null @@ -1,41 +0,0 @@ -strongly-connected-components -============================= -Given a directed graph, splits it into [strongly connected components](http://en.wikipedia.org/wiki/Strongly_connected_component). - -## Example - -```javascript -var scc = require("strongly-connected-components") - -var adjacencyList = [ - [4], // 0 - [0,2], // 1 - [1,3], // 2 - [2], // 3 - [1], // 4 - [4,6], // 5 - [5,2], // 6 - [7,6,3], // 7 -] - -console.log(scc(adjacencyList)) -``` - -## Install - - npm install strongly-connected-components - -## API - -### `require("strongly-connected-components")(adjacencyList)` -Computes the strongly connected components of a graph using Tarjan's algorithm. - -* `adjacencyList` is an array of lists representing the directed edges of the graph - -**Returns** An object containing: - -* `components`: an array of arrays representing the partitioning of the vertices in the graph into connected components. -* `adjacencyList`: an array lists representing the directed edges of the directed acyclic graph between the strongly connected components - -## Credits -(c) 2013 Mikola Lysenko. MIT License. Based on the [implementation of Tarjan's algorithm on Wikipedia.](http://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm) diff --git a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/package.json b/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/package.json deleted file mode 100644 index 2e54dbeb65cb20b00463947938a69c2e37be35a3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "strongly-connected-components", - "version": "1.0.1", - "description": "Computes strongly connected components of a directed graph", - "main": "scc.js", - "directories": { - "test": "test" - }, - "dependencies": { - }, - "devDependencies": { - "tape": "~2.1.0", - "tap": "~0.4.4" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/mikolalysenko/strongly-connected-components.git" - }, - "keywords": [ - "strongly", - "connected", - "component", - "directed", - "graph", - "tarjan" - ], - "author": "Mikola Lysenko", - "license": "MIT", - "bugs": { - "url": "https://github.com/mikolalysenko/strongly-connected-components/issues" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/scc.js b/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/scc.js deleted file mode 100644 index 4c1124ea6227fcb15076f2f7cae73e710267ea45..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/strongly-connected-components/scc.js +++ /dev/null @@ -1,114 +0,0 @@ -"use strict" - -module.exports = stronglyConnectedComponents - -function stronglyConnectedComponents(adjList) { - var numVertices = adjList.length; - var index = new Array(numVertices) - var lowValue = new Array(numVertices) - var active = new Array(numVertices) - var child = new Array(numVertices) - var scc = new Array(numVertices) - var sccLinks = new Array(numVertices) - - //Initialize tables - for(var i=0; i 0) { - v = T[T.length-1] - var e = adjList[v] - if (child[v] < e.length) { // If we're not done iterating over the children, first try finishing that. - for(var i=child[v]; i= 0) { - // Node v is not yet assigned an scc, but once it is that scc can apparently reach scc[u]. - sccLinks[v].push(scc[u]) - } - } - child[v] = i // Remember where we left off. - } else { // If we're done iterating over the children, check whether we have an scc. - if(lowValue[v] === index[v]) { // TODO: It /might/ be true that T is always a prefix of S (at this point!!!), and if so, this could be used here. - var component = [] - var links = [], linkCount = 0 - for(var i=S.length-1; i>=0; --i) { - var w = S[i] - active[w] = false - component.push(w) - links.push(sccLinks[w]) - linkCount += sccLinks[w].length - scc[w] = components.length - if(w === v) { - S.length = i - break - } - } - components.push(component) - var allLinks = new Array(linkCount) - for(var i=0; i 4 -> 1 -> 0, 1 -> 2 -> 1, 2 -> 3 -> 2 - // B: 5 -> 6 -> 5 - // C: 7 -> 7 - // graph on SCCs: - // B -> A - // C -> A, B - - var sccRet = scc(g) - console.log(sccRet) - t.equal(sccRet.components.length, 3) - - t.end() -}) diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/supercluster/LICENSE deleted file mode 100644 index 631921c40afa67e575bfbdf0d812b54426946cec..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2021, Mapbox - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/README.md b/ThinFilm_Analyzer/frontend/node_modules/supercluster/README.md deleted file mode 100644 index df5dbb65e9f199fd5f1b4abe372c7694eef5dcc8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# supercluster [![Simply Awesome](https://img.shields.io/badge/simply-awesome-brightgreen.svg)](https://github.com/mourner/projects) [![Build Status](https://travis-ci.org/mapbox/supercluster.svg?branch=main)](https://travis-ci.org/mapbox/supercluster) - -A very fast JavaScript library for geospatial point clustering for browsers and Node. - -```html - -``` - -```js -const index = new Supercluster({ - radius: 40, - maxZoom: 16 -}); -index.load(points); -index.getClusters([-180, -85, 180, 85], 2); -``` - -Clustering 6 million points in Leaflet: - -![clusters2](https://cloud.githubusercontent.com/assets/25395/11857351/43407b46-a40c-11e5-8662-e99ab1cd2cb7.gif) - -## Install - -Install using NPM (`npm install supercluster`) or Yarn (`yarn add supercluster`), then: - -```js -// import as a ES module -import Supercluster from 'supercluster'; - -// or require in Node / Browserify -const Supercluster = require('supercluster'); -``` - -Or use a browser build directly: - -```html - -``` - -## Methods - -#### `load(points)` - -Loads an array of [GeoJSON Feature](https://tools.ietf.org/html/rfc7946#section-3.2) objects. Each feature's `geometry` must be a [GeoJSON Point](https://tools.ietf.org/html/rfc7946#section-3.1.2). Once loaded, index is immutable. - -#### `getClusters(bbox, zoom)` - -For the given `bbox` array (`[westLng, southLat, eastLng, northLat]`) and integer `zoom`, returns an array of clusters and points as [GeoJSON Feature](https://tools.ietf.org/html/rfc7946#section-3.2) objects. - -#### `getTile(z, x, y)` - -For a given zoom and x/y coordinates, returns a [geojson-vt](https://github.com/mapbox/geojson-vt)-compatible JSON tile object with cluster/point features. - -#### `getChildren(clusterId)` - -Returns the children of a cluster (on the next zoom level) given its id (`cluster_id` value from feature properties). - -#### `getLeaves(clusterId, limit = 10, offset = 0)` - -Returns all the points of a cluster (given its `cluster_id`), with pagination support: -`limit` is the number of points to return (set to `Infinity` for all points), -and `offset` is the amount of points to skip (for pagination). - -#### `getClusterExpansionZoom(clusterId)` - -Returns the zoom on which the cluster expands into several children (useful for "click to zoom" feature) given the cluster's `cluster_id`. - -## Options - -| Option | Default | Description | -|------------|---------|-------------------------------------------------------------------| -| minZoom | 0 | Minimum zoom level at which clusters are generated. | -| maxZoom | 16 | Maximum zoom level at which clusters are generated. | -| minPoints | 2 | Minimum number of points to form a cluster. | -| radius | 40 | Cluster radius, in pixels. | -| extent | 512 | (Tiles) Tile extent. Radius is calculated relative to this value. | -| nodeSize | 64 | Size of the KD-tree leaf node. Affects performance. | -| log | false | Whether timing info should be logged. | -| generateId | false | Whether to generate ids for input features in vector tiles. | - -### Property map/reduce options - -In addition to the options above, Supercluster supports property aggregation with the following two options: - -- `map`: a function that returns cluster properties corresponding to a single point. -- `reduce`: a reduce function that merges properties of two clusters into one. - -Example of setting up a `sum` cluster property that accumulates the sum of `myValue` property values: - -```js -const index = new Supercluster({ - map: (props) => ({sum: props.myValue}), - reduce: (accumulated, props) => { accumulated.sum += props.sum; } -}); -``` - -The `map`/`reduce` options must satisfy these conditions to work correctly: - -- `map` must return a new object, not existing `properties` of a point, otherwise it will get overwritten. -- `reduce` must not mutate the second argument (`props`). - -## Developing Supercluster - -``` -npm install # install dependencies -npm run build # generate dist/supercluster.js and dist/supercluster.min.js -npm test # run tests -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/dist/supercluster.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/dist/supercluster.js deleted file mode 100644 index 30357ce9078c408ffb86c1819f51719afce4a8c6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/dist/supercluster.js +++ /dev/null @@ -1,635 +0,0 @@ -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : -typeof define === 'function' && define.amd ? define(factory) : -(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Supercluster = factory()); -})(this, (function () { 'use strict'; - -function sortKD(ids, coords, nodeSize, left, right, depth) { - if (right - left <= nodeSize) { return; } - - var m = (left + right) >> 1; - - select(ids, coords, m, left, right, depth % 2); - - sortKD(ids, coords, nodeSize, left, m - 1, depth + 1); - sortKD(ids, coords, nodeSize, m + 1, right, depth + 1); -} - -function select(ids, coords, k, left, right, inc) { - - while (right > left) { - if (right - left > 600) { - var n = right - left + 1; - var m = k - left + 1; - var z = Math.log(n); - var s = 0.5 * Math.exp(2 * z / 3); - var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); - var newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); - var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); - select(ids, coords, k, newLeft, newRight, inc); - } - - var t = coords[2 * k + inc]; - var i = left; - var j = right; - - swapItem(ids, coords, left, k); - if (coords[2 * right + inc] > t) { swapItem(ids, coords, left, right); } - - while (i < j) { - swapItem(ids, coords, i, j); - i++; - j--; - while (coords[2 * i + inc] < t) { i++; } - while (coords[2 * j + inc] > t) { j--; } - } - - if (coords[2 * left + inc] === t) { swapItem(ids, coords, left, j); } - else { - j++; - swapItem(ids, coords, j, right); - } - - if (j <= k) { left = j + 1; } - if (k <= j) { right = j - 1; } - } -} - -function swapItem(ids, coords, i, j) { - swap(ids, i, j); - swap(coords, 2 * i, 2 * j); - swap(coords, 2 * i + 1, 2 * j + 1); -} - -function swap(arr, i, j) { - var tmp = arr[i]; - arr[i] = arr[j]; - arr[j] = tmp; -} - -function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { - var stack = [0, ids.length - 1, 0]; - var result = []; - var x, y; - - while (stack.length) { - var axis = stack.pop(); - var right = stack.pop(); - var left = stack.pop(); - - if (right - left <= nodeSize) { - for (var i = left; i <= right; i++) { - x = coords[2 * i]; - y = coords[2 * i + 1]; - if (x >= minX && x <= maxX && y >= minY && y <= maxY) { result.push(ids[i]); } - } - continue; - } - - var m = Math.floor((left + right) / 2); - - x = coords[2 * m]; - y = coords[2 * m + 1]; - - if (x >= minX && x <= maxX && y >= minY && y <= maxY) { result.push(ids[m]); } - - var nextAxis = (axis + 1) % 2; - - if (axis === 0 ? minX <= x : minY <= y) { - stack.push(left); - stack.push(m - 1); - stack.push(nextAxis); - } - if (axis === 0 ? maxX >= x : maxY >= y) { - stack.push(m + 1); - stack.push(right); - stack.push(nextAxis); - } - } - - return result; -} - -function within(ids, coords, qx, qy, r, nodeSize) { - var stack = [0, ids.length - 1, 0]; - var result = []; - var r2 = r * r; - - while (stack.length) { - var axis = stack.pop(); - var right = stack.pop(); - var left = stack.pop(); - - if (right - left <= nodeSize) { - for (var i = left; i <= right; i++) { - if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) { result.push(ids[i]); } - } - continue; - } - - var m = Math.floor((left + right) / 2); - - var x = coords[2 * m]; - var y = coords[2 * m + 1]; - - if (sqDist(x, y, qx, qy) <= r2) { result.push(ids[m]); } - - var nextAxis = (axis + 1) % 2; - - if (axis === 0 ? qx - r <= x : qy - r <= y) { - stack.push(left); - stack.push(m - 1); - stack.push(nextAxis); - } - if (axis === 0 ? qx + r >= x : qy + r >= y) { - stack.push(m + 1); - stack.push(right); - stack.push(nextAxis); - } - } - - return result; -} - -function sqDist(ax, ay, bx, by) { - var dx = ax - bx; - var dy = ay - by; - return dx * dx + dy * dy; -} - -var defaultGetX = function (p) { return p[0]; }; -var defaultGetY = function (p) { return p[1]; }; - -var KDBush = function KDBush(points, getX, getY, nodeSize, ArrayType) { - if ( getX === void 0 ) getX = defaultGetX; - if ( getY === void 0 ) getY = defaultGetY; - if ( nodeSize === void 0 ) nodeSize = 64; - if ( ArrayType === void 0 ) ArrayType = Float64Array; - - this.nodeSize = nodeSize; - this.points = points; - - var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array; - - var ids = this.ids = new IndexArrayType(points.length); - var coords = this.coords = new ArrayType(points.length * 2); - - for (var i = 0; i < points.length; i++) { - ids[i] = i; - coords[2 * i] = getX(points[i]); - coords[2 * i + 1] = getY(points[i]); - } - - sortKD(ids, coords, nodeSize, 0, ids.length - 1, 0); -}; - -KDBush.prototype.range = function range$1 (minX, minY, maxX, maxY) { - return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize); -}; - -KDBush.prototype.within = function within$1 (x, y, r) { - return within(this.ids, this.coords, x, y, r, this.nodeSize); -}; - -var defaultOptions = { - minZoom: 0, // min zoom to generate clusters on - maxZoom: 16, // max zoom level to cluster the points on - minPoints: 2, // minimum points to form a cluster - radius: 40, // cluster radius in pixels - extent: 512, // tile extent (radius is calculated relative to it) - nodeSize: 64, // size of the KD-tree leaf node, affects performance - log: false, // whether to log timing info - - // whether to generate numeric ids for input features (in vector tiles) - generateId: false, - - // a reduce function for calculating custom cluster properties - reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; } - - // properties to use for individual points when running the reducer - map: function (props) { return props; } // props => ({sum: props.my_value}) -}; - -var fround = Math.fround || (function (tmp) { return (function (x) { tmp[0] = +x; return tmp[0]; }); })(new Float32Array(1)); - -var Supercluster = function Supercluster(options) { - this.options = extend(Object.create(defaultOptions), options); - this.trees = new Array(this.options.maxZoom + 1); -}; - -Supercluster.prototype.load = function load (points) { - var ref = this.options; - var log = ref.log; - var minZoom = ref.minZoom; - var maxZoom = ref.maxZoom; - var nodeSize = ref.nodeSize; - - if (log) { console.time('total time'); } - - var timerId = "prepare " + (points.length) + " points"; - if (log) { console.time(timerId); } - - this.points = points; - - // generate a cluster object for each point and index input points into a KD-tree - var clusters = []; - for (var i = 0; i < points.length; i++) { - if (!points[i].geometry) { continue; } - clusters.push(createPointCluster(points[i], i)); - } - this.trees[maxZoom + 1] = new KDBush(clusters, getX, getY, nodeSize, Float32Array); - - if (log) { console.timeEnd(timerId); } - - // cluster points on max zoom, then cluster the results on previous zoom, etc.; - // results in a cluster hierarchy across zoom levels - for (var z = maxZoom; z >= minZoom; z--) { - var now = +Date.now(); - - // create a new set of clusters for the zoom and index them with a KD-tree - clusters = this._cluster(clusters, z); - this.trees[z] = new KDBush(clusters, getX, getY, nodeSize, Float32Array); - - if (log) { console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now); } - } - - if (log) { console.timeEnd('total time'); } - - return this; -}; - -Supercluster.prototype.getClusters = function getClusters (bbox, zoom) { - var minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180; - var minLat = Math.max(-90, Math.min(90, bbox[1])); - var maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180; - var maxLat = Math.max(-90, Math.min(90, bbox[3])); - - if (bbox[2] - bbox[0] >= 360) { - minLng = -180; - maxLng = 180; - } else if (minLng > maxLng) { - var easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom); - var westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom); - return easternHem.concat(westernHem); - } - - var tree = this.trees[this._limitZoom(zoom)]; - var ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat)); - var clusters = []; - for (var i = 0, list = ids; i < list.length; i += 1) { - var id = list[i]; - - var c = tree.points[id]; - clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]); - } - return clusters; -}; - -Supercluster.prototype.getChildren = function getChildren (clusterId) { - var originId = this._getOriginId(clusterId); - var originZoom = this._getOriginZoom(clusterId); - var errorMsg = 'No cluster with the specified id.'; - - var index = this.trees[originZoom]; - if (!index) { throw new Error(errorMsg); } - - var origin = index.points[originId]; - if (!origin) { throw new Error(errorMsg); } - - var r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1)); - var ids = index.within(origin.x, origin.y, r); - var children = []; - for (var i = 0, list = ids; i < list.length; i += 1) { - var id = list[i]; - - var c = index.points[id]; - if (c.parentId === clusterId) { - children.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]); - } - } - - if (children.length === 0) { throw new Error(errorMsg); } - - return children; -}; - -Supercluster.prototype.getLeaves = function getLeaves (clusterId, limit, offset) { - limit = limit || 10; - offset = offset || 0; - - var leaves = []; - this._appendLeaves(leaves, clusterId, limit, offset, 0); - - return leaves; -}; - -Supercluster.prototype.getTile = function getTile (z, x, y) { - var tree = this.trees[this._limitZoom(z)]; - var z2 = Math.pow(2, z); - var ref = this.options; - var extent = ref.extent; - var radius = ref.radius; - var p = radius / extent; - var top = (y - p) / z2; - var bottom = (y + 1 + p) / z2; - - var tile = { - features: [] - }; - - this._addTileFeatures( - tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), - tree.points, x, y, z2, tile); - - if (x === 0) { - this._addTileFeatures( - tree.range(1 - p / z2, top, 1, bottom), - tree.points, z2, y, z2, tile); - } - if (x === z2 - 1) { - this._addTileFeatures( - tree.range(0, top, p / z2, bottom), - tree.points, -1, y, z2, tile); - } - - return tile.features.length ? tile : null; -}; - -Supercluster.prototype.getClusterExpansionZoom = function getClusterExpansionZoom (clusterId) { - var expansionZoom = this._getOriginZoom(clusterId) - 1; - while (expansionZoom <= this.options.maxZoom) { - var children = this.getChildren(clusterId); - expansionZoom++; - if (children.length !== 1) { break; } - clusterId = children[0].properties.cluster_id; - } - return expansionZoom; -}; - -Supercluster.prototype._appendLeaves = function _appendLeaves (result, clusterId, limit, offset, skipped) { - var children = this.getChildren(clusterId); - - for (var i = 0, list = children; i < list.length; i += 1) { - var child = list[i]; - - var props = child.properties; - - if (props && props.cluster) { - if (skipped + props.point_count <= offset) { - // skip the whole cluster - skipped += props.point_count; - } else { - // enter the cluster - skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped); - // exit the cluster - } - } else if (skipped < offset) { - // skip a single point - skipped++; - } else { - // add a single point - result.push(child); - } - if (result.length === limit) { break; } - } - - return skipped; -}; - -Supercluster.prototype._addTileFeatures = function _addTileFeatures (ids, points, x, y, z2, tile) { - for (var i$1 = 0, list = ids; i$1 < list.length; i$1 += 1) { - var i = list[i$1]; - - var c = points[i]; - var isCluster = c.numPoints; - - var tags = (void 0), px = (void 0), py = (void 0); - if (isCluster) { - tags = getClusterProperties(c); - px = c.x; - py = c.y; - } else { - var p = this.points[c.index]; - tags = p.properties; - px = lngX(p.geometry.coordinates[0]); - py = latY(p.geometry.coordinates[1]); - } - - var f = { - type: 1, - geometry: [[ - Math.round(this.options.extent * (px * z2 - x)), - Math.round(this.options.extent * (py * z2 - y)) - ]], - tags: tags - }; - - // assign id - var id = (void 0); - if (isCluster) { - id = c.id; - } else if (this.options.generateId) { - // optionally generate id - id = c.index; - } else if (this.points[c.index].id) { - // keep id if already assigned - id = this.points[c.index].id; - } - - if (id !== undefined) { f.id = id; } - - tile.features.push(f); - } -}; - -Supercluster.prototype._limitZoom = function _limitZoom (z) { - return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1)); -}; - -Supercluster.prototype._cluster = function _cluster (points, zoom) { - var clusters = []; - var ref = this.options; - var radius = ref.radius; - var extent = ref.extent; - var reduce = ref.reduce; - var minPoints = ref.minPoints; - var r = radius / (extent * Math.pow(2, zoom)); - - // loop through each point - for (var i = 0; i < points.length; i++) { - var p = points[i]; - // if we've already visited the point at this zoom level, skip it - if (p.zoom <= zoom) { continue; } - p.zoom = zoom; - - // find all nearby points - var tree = this.trees[zoom + 1]; - var neighborIds = tree.within(p.x, p.y, r); - - var numPointsOrigin = p.numPoints || 1; - var numPoints = numPointsOrigin; - - // count the number of points in a potential cluster - for (var i$1 = 0, list = neighborIds; i$1 < list.length; i$1 += 1) { - var neighborId = list[i$1]; - - var b = tree.points[neighborId]; - // filter out neighbors that are already processed - if (b.zoom > zoom) { numPoints += b.numPoints || 1; } - } - - // if there were neighbors to merge, and there are enough points to form a cluster - if (numPoints > numPointsOrigin && numPoints >= minPoints) { - var wx = p.x * numPointsOrigin; - var wy = p.y * numPointsOrigin; - - var clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null; - - // encode both zoom and point index on which the cluster originated -- offset by total length of features - var id = (i << 5) + (zoom + 1) + this.points.length; - - for (var i$2 = 0, list$1 = neighborIds; i$2 < list$1.length; i$2 += 1) { - var neighborId$1 = list$1[i$2]; - - var b$1 = tree.points[neighborId$1]; - - if (b$1.zoom <= zoom) { continue; } - b$1.zoom = zoom; // save the zoom (so it doesn't get processed twice) - - var numPoints2 = b$1.numPoints || 1; - wx += b$1.x * numPoints2; // accumulate coordinates for calculating weighted center - wy += b$1.y * numPoints2; - - b$1.parentId = id; - - if (reduce) { - if (!clusterProperties) { clusterProperties = this._map(p, true); } - reduce(clusterProperties, this._map(b$1)); - } - } - - p.parentId = id; - clusters.push(createCluster(wx / numPoints, wy / numPoints, id, numPoints, clusterProperties)); - - } else { // left points as unclustered - clusters.push(p); - - if (numPoints > 1) { - for (var i$3 = 0, list$2 = neighborIds; i$3 < list$2.length; i$3 += 1) { - var neighborId$2 = list$2[i$3]; - - var b$2 = tree.points[neighborId$2]; - if (b$2.zoom <= zoom) { continue; } - b$2.zoom = zoom; - clusters.push(b$2); - } - } - } - } - - return clusters; -}; - -// get index of the point from which the cluster originated -Supercluster.prototype._getOriginId = function _getOriginId (clusterId) { - return (clusterId - this.points.length) >> 5; -}; - -// get zoom of the point from which the cluster originated -Supercluster.prototype._getOriginZoom = function _getOriginZoom (clusterId) { - return (clusterId - this.points.length) % 32; -}; - -Supercluster.prototype._map = function _map (point, clone) { - if (point.numPoints) { - return clone ? extend({}, point.properties) : point.properties; - } - var original = this.points[point.index].properties; - var result = this.options.map(original); - return clone && result === original ? extend({}, result) : result; -}; - -function createCluster(x, y, id, numPoints, properties) { - return { - x: fround(x), // weighted cluster center; round for consistency with Float32Array index - y: fround(y), - zoom: Infinity, // the last zoom the cluster was processed at - id: id, // encodes index of the first child of the cluster and its zoom level - parentId: -1, // parent cluster id - numPoints: numPoints, - properties: properties - }; -} - -function createPointCluster(p, id) { - var ref = p.geometry.coordinates; - var x = ref[0]; - var y = ref[1]; - return { - x: fround(lngX(x)), // projected point coordinates - y: fround(latY(y)), - zoom: Infinity, // the last zoom the point was processed at - index: id, // index of the source feature in the original input array, - parentId: -1 // parent cluster id - }; -} - -function getClusterJSON(cluster) { - return { - type: 'Feature', - id: cluster.id, - properties: getClusterProperties(cluster), - geometry: { - type: 'Point', - coordinates: [xLng(cluster.x), yLat(cluster.y)] - } - }; -} - -function getClusterProperties(cluster) { - var count = cluster.numPoints; - var abbrev = - count >= 10000 ? ((Math.round(count / 1000)) + "k") : - count >= 1000 ? ((Math.round(count / 100) / 10) + "k") : count; - return extend(extend({}, cluster.properties), { - cluster: true, - cluster_id: cluster.id, - point_count: count, - point_count_abbreviated: abbrev - }); -} - -// longitude/latitude to spherical mercator in [0..1] range -function lngX(lng) { - return lng / 360 + 0.5; -} -function latY(lat) { - var sin = Math.sin(lat * Math.PI / 180); - var y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI); - return y < 0 ? 0 : y > 1 ? 1 : y; -} - -// spherical mercator to longitude/latitude -function xLng(x) { - return (x - 0.5) * 360; -} -function yLat(y) { - var y2 = (180 - y * 360) * Math.PI / 180; - return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90; -} - -function extend(dest, src) { - for (var id in src) { dest[id] = src[id]; } - return dest; -} - -function getX(p) { - return p.x; -} -function getY(p) { - return p.y; -} - -return Supercluster; - -})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/dist/supercluster.min.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/dist/supercluster.min.js deleted file mode 100644 index c664984df048d1697a28e1de01244dc6cfb96735..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/dist/supercluster.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(t="undefined"!=typeof globalThis?globalThis:t||self).Supercluster=o()}(this,(function(){"use strict";function t(e,n,r,i,s,a){if(!(s-i<=r)){var p=i+s>>1;o(e,n,p,i,s,a%2),t(e,n,r,i,p-1,a+1),t(e,n,r,p+1,s,a+1)}}function o(t,n,r,i,s,a){for(;s>i;){if(s-i>600){var p=s-i+1,h=r-i+1,u=Math.log(p),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(p-f)/p)*(h-p/2<0?-1:1);o(t,n,r,Math.max(i,Math.floor(r-h*f/p+d)),Math.min(s,Math.floor(r+(p-h)*f/p+d)),a)}var l=n[2*r+a],m=i,c=s;for(e(t,n,i,r),n[2*s+a]>l&&e(t,n,i,s);ml;)c--}n[2*i+a]===l?e(t,n,i,c):e(t,n,++c,s),c<=r&&(i=c+1),r<=c&&(s=c-1)}}function e(t,o,e,r){n(t,e,r),n(o,2*e,2*r),n(o,2*e+1,2*r+1)}function n(t,o,e){var n=t[o];t[o]=t[e],t[e]=n}function r(t,o,e,n){var r=t-e,i=o-n;return r*r+i*i}var i=function(t){return t[0]},s=function(t){return t[1]},a=function(o,e,n,r,a){void 0===e&&(e=i),void 0===n&&(n=s),void 0===r&&(r=64),void 0===a&&(a=Float64Array),this.nodeSize=r,this.points=o;for(var p=o.length<65536?Uint16Array:Uint32Array,h=this.ids=new p(o.length),u=this.coords=new a(2*o.length),f=0;f=e&&a<=r&&p>=n&&p<=i&&u.push(t[m]);else{var c=Math.floor((l+d)/2);a=o[2*c],p=o[2*c+1],a>=e&&a<=r&&p>=n&&p<=i&&u.push(t[c]);var v=(f+1)%2;(0===f?e<=a:n<=p)&&(h.push(l),h.push(c-1),h.push(v)),(0===f?r>=a:i>=p)&&(h.push(c+1),h.push(d),h.push(v))}}return u}(this.ids,this.coords,t,o,e,n,this.nodeSize)},a.prototype.within=function(t,o,e){return function(t,o,e,n,i,s){for(var a=[0,t.length-1,0],p=[],h=i*i;a.length;){var u=a.pop(),f=a.pop(),d=a.pop();if(f-d<=s)for(var l=d;l<=f;l++)r(o[2*l],o[2*l+1],e,n)<=h&&p.push(t[l]);else{var m=Math.floor((d+f)/2),c=o[2*m],v=o[2*m+1];r(c,v,e,n)<=h&&p.push(t[m]);var g=(u+1)%2;(0===u?e-i<=c:n-i<=v)&&(a.push(d),a.push(m-1),a.push(g)),(0===u?e+i>=c:n+i>=v)&&(a.push(m+1),a.push(f),a.push(g))}}return p}(this.ids,this.coords,t,o,e,this.nodeSize)};var p,h={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},u=Math.fround||(p=new Float32Array(1),function(t){return p[0]=+t,p[0]}),f=function(t){this.options=y(Object.create(h),t),this.trees=new Array(this.options.maxZoom+1)};function d(t,o,e,n,r){return{x:u(t),y:u(o),zoom:1/0,id:e,parentId:-1,numPoints:n,properties:r}}function l(t,o){var e=t.geometry.coordinates,n=e[0],r=e[1];return{x:u(v(n)),y:u(g(r)),zoom:1/0,index:o,parentId:-1}}function m(t){return{type:"Feature",id:t.id,properties:c(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(o=t.y,e=(180-360*o)*Math.PI/180,360*Math.atan(Math.exp(e))/Math.PI-90)]}};var o,e,n}function c(t){var o=t.numPoints,e=o>=1e4?Math.round(o/1e3)+"k":o>=1e3?Math.round(o/100)/10+"k":o;return y(y({},t.properties),{cluster:!0,cluster_id:t.id,point_count:o,point_count_abbreviated:e})}function v(t){return t/360+.5}function g(t){var o=Math.sin(t*Math.PI/180),e=.5-.25*Math.log((1+o)/(1-o))/Math.PI;return e<0?0:e>1?1:e}function y(t,o){for(var e in o)t[e]=o[e];return t}function x(t){return t.x}function M(t){return t.y}return f.prototype.load=function(t){var o=this.options,e=o.log,n=o.minZoom,r=o.maxZoom,i=o.nodeSize;e&&console.time("total time");var s="prepare "+t.length+" points";e&&console.time(s),this.points=t;for(var p=[],h=0;h=n;u--){var f=+Date.now();p=this._cluster(p,u),this.trees[u]=new a(p,x,M,i,Float32Array),e&&console.log("z%d: %d clusters in %dms",u,p.length,+Date.now()-f)}return e&&console.timeEnd("total time"),this},f.prototype.getClusters=function(t,o){var e=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),r=180===t[2]?180:((t[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)e=-180,r=180;else if(e>r){var s=this.getClusters([e,n,180,i],o),a=this.getClusters([-180,n,r,i],o);return s.concat(a)}for(var p=this.trees[this._limitZoom(o)],h=[],u=0,f=p.range(v(e),g(i),v(r),g(n));uo&&(c+=x.numPoints||1)}if(c>m&&c>=a){for(var M=u.x*m,_=u.y*m,w=s&&m>1?this._map(u,!0):null,P=(h<<5)+(o+1)+this.points.length,z=0,Z=l;z1)for(var A=0,C=l;A>5},f.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},f.prototype._map=function(t,o){if(t.numPoints)return o?y({},t.properties):t.properties;var e=this.points[t.index].properties,n=this.options.map(e);return o&&n===e?y({},n):n},f})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/index.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/index.js deleted file mode 100644 index dc2601ba936d9a9948c236305eee346508f82a71..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/index.js +++ /dev/null @@ -1,417 +0,0 @@ - -import KDBush from 'kdbush'; - -const defaultOptions = { - minZoom: 0, // min zoom to generate clusters on - maxZoom: 16, // max zoom level to cluster the points on - minPoints: 2, // minimum points to form a cluster - radius: 40, // cluster radius in pixels - extent: 512, // tile extent (radius is calculated relative to it) - nodeSize: 64, // size of the KD-tree leaf node, affects performance - log: false, // whether to log timing info - - // whether to generate numeric ids for input features (in vector tiles) - generateId: false, - - // a reduce function for calculating custom cluster properties - reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; } - - // properties to use for individual points when running the reducer - map: props => props // props => ({sum: props.my_value}) -}; - -const fround = Math.fround || (tmp => ((x) => { tmp[0] = +x; return tmp[0]; }))(new Float32Array(1)); - -export default class Supercluster { - constructor(options) { - this.options = extend(Object.create(defaultOptions), options); - this.trees = new Array(this.options.maxZoom + 1); - } - - load(points) { - const {log, minZoom, maxZoom, nodeSize} = this.options; - - if (log) console.time('total time'); - - const timerId = `prepare ${ points.length } points`; - if (log) console.time(timerId); - - this.points = points; - - // generate a cluster object for each point and index input points into a KD-tree - let clusters = []; - for (let i = 0; i < points.length; i++) { - if (!points[i].geometry) continue; - clusters.push(createPointCluster(points[i], i)); - } - this.trees[maxZoom + 1] = new KDBush(clusters, getX, getY, nodeSize, Float32Array); - - if (log) console.timeEnd(timerId); - - // cluster points on max zoom, then cluster the results on previous zoom, etc.; - // results in a cluster hierarchy across zoom levels - for (let z = maxZoom; z >= minZoom; z--) { - const now = +Date.now(); - - // create a new set of clusters for the zoom and index them with a KD-tree - clusters = this._cluster(clusters, z); - this.trees[z] = new KDBush(clusters, getX, getY, nodeSize, Float32Array); - - if (log) console.log('z%d: %d clusters in %dms', z, clusters.length, +Date.now() - now); - } - - if (log) console.timeEnd('total time'); - - return this; - } - - getClusters(bbox, zoom) { - let minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180; - const minLat = Math.max(-90, Math.min(90, bbox[1])); - let maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180; - const maxLat = Math.max(-90, Math.min(90, bbox[3])); - - if (bbox[2] - bbox[0] >= 360) { - minLng = -180; - maxLng = 180; - } else if (minLng > maxLng) { - const easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom); - const westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom); - return easternHem.concat(westernHem); - } - - const tree = this.trees[this._limitZoom(zoom)]; - const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat)); - const clusters = []; - for (const id of ids) { - const c = tree.points[id]; - clusters.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]); - } - return clusters; - } - - getChildren(clusterId) { - const originId = this._getOriginId(clusterId); - const originZoom = this._getOriginZoom(clusterId); - const errorMsg = 'No cluster with the specified id.'; - - const index = this.trees[originZoom]; - if (!index) throw new Error(errorMsg); - - const origin = index.points[originId]; - if (!origin) throw new Error(errorMsg); - - const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1)); - const ids = index.within(origin.x, origin.y, r); - const children = []; - for (const id of ids) { - const c = index.points[id]; - if (c.parentId === clusterId) { - children.push(c.numPoints ? getClusterJSON(c) : this.points[c.index]); - } - } - - if (children.length === 0) throw new Error(errorMsg); - - return children; - } - - getLeaves(clusterId, limit, offset) { - limit = limit || 10; - offset = offset || 0; - - const leaves = []; - this._appendLeaves(leaves, clusterId, limit, offset, 0); - - return leaves; - } - - getTile(z, x, y) { - const tree = this.trees[this._limitZoom(z)]; - const z2 = Math.pow(2, z); - const {extent, radius} = this.options; - const p = radius / extent; - const top = (y - p) / z2; - const bottom = (y + 1 + p) / z2; - - const tile = { - features: [] - }; - - this._addTileFeatures( - tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom), - tree.points, x, y, z2, tile); - - if (x === 0) { - this._addTileFeatures( - tree.range(1 - p / z2, top, 1, bottom), - tree.points, z2, y, z2, tile); - } - if (x === z2 - 1) { - this._addTileFeatures( - tree.range(0, top, p / z2, bottom), - tree.points, -1, y, z2, tile); - } - - return tile.features.length ? tile : null; - } - - getClusterExpansionZoom(clusterId) { - let expansionZoom = this._getOriginZoom(clusterId) - 1; - while (expansionZoom <= this.options.maxZoom) { - const children = this.getChildren(clusterId); - expansionZoom++; - if (children.length !== 1) break; - clusterId = children[0].properties.cluster_id; - } - return expansionZoom; - } - - _appendLeaves(result, clusterId, limit, offset, skipped) { - const children = this.getChildren(clusterId); - - for (const child of children) { - const props = child.properties; - - if (props && props.cluster) { - if (skipped + props.point_count <= offset) { - // skip the whole cluster - skipped += props.point_count; - } else { - // enter the cluster - skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped); - // exit the cluster - } - } else if (skipped < offset) { - // skip a single point - skipped++; - } else { - // add a single point - result.push(child); - } - if (result.length === limit) break; - } - - return skipped; - } - - _addTileFeatures(ids, points, x, y, z2, tile) { - for (const i of ids) { - const c = points[i]; - const isCluster = c.numPoints; - - let tags, px, py; - if (isCluster) { - tags = getClusterProperties(c); - px = c.x; - py = c.y; - } else { - const p = this.points[c.index]; - tags = p.properties; - px = lngX(p.geometry.coordinates[0]); - py = latY(p.geometry.coordinates[1]); - } - - const f = { - type: 1, - geometry: [[ - Math.round(this.options.extent * (px * z2 - x)), - Math.round(this.options.extent * (py * z2 - y)) - ]], - tags - }; - - // assign id - let id; - if (isCluster) { - id = c.id; - } else if (this.options.generateId) { - // optionally generate id - id = c.index; - } else if (this.points[c.index].id) { - // keep id if already assigned - id = this.points[c.index].id; - } - - if (id !== undefined) f.id = id; - - tile.features.push(f); - } - } - - _limitZoom(z) { - return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1)); - } - - _cluster(points, zoom) { - const clusters = []; - const {radius, extent, reduce, minPoints} = this.options; - const r = radius / (extent * Math.pow(2, zoom)); - - // loop through each point - for (let i = 0; i < points.length; i++) { - const p = points[i]; - // if we've already visited the point at this zoom level, skip it - if (p.zoom <= zoom) continue; - p.zoom = zoom; - - // find all nearby points - const tree = this.trees[zoom + 1]; - const neighborIds = tree.within(p.x, p.y, r); - - const numPointsOrigin = p.numPoints || 1; - let numPoints = numPointsOrigin; - - // count the number of points in a potential cluster - for (const neighborId of neighborIds) { - const b = tree.points[neighborId]; - // filter out neighbors that are already processed - if (b.zoom > zoom) numPoints += b.numPoints || 1; - } - - // if there were neighbors to merge, and there are enough points to form a cluster - if (numPoints > numPointsOrigin && numPoints >= minPoints) { - let wx = p.x * numPointsOrigin; - let wy = p.y * numPointsOrigin; - - let clusterProperties = reduce && numPointsOrigin > 1 ? this._map(p, true) : null; - - // encode both zoom and point index on which the cluster originated -- offset by total length of features - const id = (i << 5) + (zoom + 1) + this.points.length; - - for (const neighborId of neighborIds) { - const b = tree.points[neighborId]; - - if (b.zoom <= zoom) continue; - b.zoom = zoom; // save the zoom (so it doesn't get processed twice) - - const numPoints2 = b.numPoints || 1; - wx += b.x * numPoints2; // accumulate coordinates for calculating weighted center - wy += b.y * numPoints2; - - b.parentId = id; - - if (reduce) { - if (!clusterProperties) clusterProperties = this._map(p, true); - reduce(clusterProperties, this._map(b)); - } - } - - p.parentId = id; - clusters.push(createCluster(wx / numPoints, wy / numPoints, id, numPoints, clusterProperties)); - - } else { // left points as unclustered - clusters.push(p); - - if (numPoints > 1) { - for (const neighborId of neighborIds) { - const b = tree.points[neighborId]; - if (b.zoom <= zoom) continue; - b.zoom = zoom; - clusters.push(b); - } - } - } - } - - return clusters; - } - - // get index of the point from which the cluster originated - _getOriginId(clusterId) { - return (clusterId - this.points.length) >> 5; - } - - // get zoom of the point from which the cluster originated - _getOriginZoom(clusterId) { - return (clusterId - this.points.length) % 32; - } - - _map(point, clone) { - if (point.numPoints) { - return clone ? extend({}, point.properties) : point.properties; - } - const original = this.points[point.index].properties; - const result = this.options.map(original); - return clone && result === original ? extend({}, result) : result; - } -} - -function createCluster(x, y, id, numPoints, properties) { - return { - x: fround(x), // weighted cluster center; round for consistency with Float32Array index - y: fround(y), - zoom: Infinity, // the last zoom the cluster was processed at - id, // encodes index of the first child of the cluster and its zoom level - parentId: -1, // parent cluster id - numPoints, - properties - }; -} - -function createPointCluster(p, id) { - const [x, y] = p.geometry.coordinates; - return { - x: fround(lngX(x)), // projected point coordinates - y: fround(latY(y)), - zoom: Infinity, // the last zoom the point was processed at - index: id, // index of the source feature in the original input array, - parentId: -1 // parent cluster id - }; -} - -function getClusterJSON(cluster) { - return { - type: 'Feature', - id: cluster.id, - properties: getClusterProperties(cluster), - geometry: { - type: 'Point', - coordinates: [xLng(cluster.x), yLat(cluster.y)] - } - }; -} - -function getClusterProperties(cluster) { - const count = cluster.numPoints; - const abbrev = - count >= 10000 ? `${Math.round(count / 1000) }k` : - count >= 1000 ? `${Math.round(count / 100) / 10 }k` : count; - return extend(extend({}, cluster.properties), { - cluster: true, - cluster_id: cluster.id, - point_count: count, - point_count_abbreviated: abbrev - }); -} - -// longitude/latitude to spherical mercator in [0..1] range -function lngX(lng) { - return lng / 360 + 0.5; -} -function latY(lat) { - const sin = Math.sin(lat * Math.PI / 180); - const y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI); - return y < 0 ? 0 : y > 1 ? 1 : y; -} - -// spherical mercator to longitude/latitude -function xLng(x) { - return (x - 0.5) * 360; -} -function yLat(y) { - const y2 = (180 - y * 360) * Math.PI / 180; - return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90; -} - -function extend(dest, src) { - for (const id in src) dest[id] = src[id]; - return dest; -} - -function getX(p) { - return p.x; -} -function getY(p) { - return p.y; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/LICENSE deleted file mode 100644 index ef7627df44d2176cd9aa1f293a01268cf464ccf8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2018, Vladimir Agafonkin - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/README.md b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/README.md deleted file mode 100644 index 62d49daecdd09c205df987ec2bf09bceefc489be..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/README.md +++ /dev/null @@ -1,63 +0,0 @@ -## KDBush [![Build Status](https://travis-ci.org/mourner/kdbush.svg?branch=master)](https://travis-ci.org/mourner/kdbush) [![Simply Awesome](https://img.shields.io/badge/simply-awesome-brightgreen.svg)](https://github.com/mourner/projects) - -A very fast static spatial index for 2D points based on a flat KD-tree. -Compared to [RBush](https://github.com/mourner/rbush): - -- points only — no rectangles -- static — you can't add/remove items -- indexing is 5-8 times faster - -```js -const index = new KDBush(points); // make an index -const ids1 = index.range(10, 10, 20, 20); // bbox search - minX, minY, maxX, maxY -const ids2 = index.within(10, 10, 5); // radius search - x, y, radius -``` - -## Install - -Install using NPM (`npm install kdbush`) or Yarn (`yarn add kdbush`), then: - -```js -// import as a ES module -import KDBush from 'kdbush'; - -// or require in Node / Browserify -const KDBush = require('kdbush'); -``` - -Or use a browser build directly: - -```html - -``` - -## API - -#### new KDBush(points[, getX, getY, nodeSize, arrayType]) - -Creates an index from the given points. - -- `points`: Input array of points. -- `getX`, `getY`: Functions to get `x` and `y` from an input point. By default, it assumes `[x, y]` format. -- `nodeSize`: Size of the KD-tree node, `64` by default. Higher means faster indexing but slower search, and vise versa. -- `arrayType`: Array type to use for storing coordinate values. `Float64Array` by default, but if your coordinates are integer values, `Int32Array` makes things a bit faster. - -```js -const index = kdbush(points, p => p.x, p => p.y, 64, Int32Array); -``` - -#### index.range(minX, minY, maxX, maxY) - -Finds all items within the given bounding box and returns an array of indices that refer to the items in the original `points` input array. - -```js -const results = index.range(10, 10, 20, 20).map(id => points[id]); -``` - -#### index.within(x, y, radius) - -Finds all items within a given radius from the query point and returns an array of indices. - -```js -const results = index.within(10, 10, 5).map(id => points[id]); -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/kdbush.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/kdbush.js deleted file mode 100644 index 019de7e3e25a861319340fe9b4755dd736c81d9a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/kdbush.js +++ /dev/null @@ -1,196 +0,0 @@ -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : -typeof define === 'function' && define.amd ? define(factory) : -(global.KDBush = factory()); -}(this, (function () { 'use strict'; - -function sortKD(ids, coords, nodeSize, left, right, depth) { - if (right - left <= nodeSize) { return; } - - var m = (left + right) >> 1; - - select(ids, coords, m, left, right, depth % 2); - - sortKD(ids, coords, nodeSize, left, m - 1, depth + 1); - sortKD(ids, coords, nodeSize, m + 1, right, depth + 1); -} - -function select(ids, coords, k, left, right, inc) { - - while (right > left) { - if (right - left > 600) { - var n = right - left + 1; - var m = k - left + 1; - var z = Math.log(n); - var s = 0.5 * Math.exp(2 * z / 3); - var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); - var newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); - var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); - select(ids, coords, k, newLeft, newRight, inc); - } - - var t = coords[2 * k + inc]; - var i = left; - var j = right; - - swapItem(ids, coords, left, k); - if (coords[2 * right + inc] > t) { swapItem(ids, coords, left, right); } - - while (i < j) { - swapItem(ids, coords, i, j); - i++; - j--; - while (coords[2 * i + inc] < t) { i++; } - while (coords[2 * j + inc] > t) { j--; } - } - - if (coords[2 * left + inc] === t) { swapItem(ids, coords, left, j); } - else { - j++; - swapItem(ids, coords, j, right); - } - - if (j <= k) { left = j + 1; } - if (k <= j) { right = j - 1; } - } -} - -function swapItem(ids, coords, i, j) { - swap(ids, i, j); - swap(coords, 2 * i, 2 * j); - swap(coords, 2 * i + 1, 2 * j + 1); -} - -function swap(arr, i, j) { - var tmp = arr[i]; - arr[i] = arr[j]; - arr[j] = tmp; -} - -function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { - var stack = [0, ids.length - 1, 0]; - var result = []; - var x, y; - - while (stack.length) { - var axis = stack.pop(); - var right = stack.pop(); - var left = stack.pop(); - - if (right - left <= nodeSize) { - for (var i = left; i <= right; i++) { - x = coords[2 * i]; - y = coords[2 * i + 1]; - if (x >= minX && x <= maxX && y >= minY && y <= maxY) { result.push(ids[i]); } - } - continue; - } - - var m = Math.floor((left + right) / 2); - - x = coords[2 * m]; - y = coords[2 * m + 1]; - - if (x >= minX && x <= maxX && y >= minY && y <= maxY) { result.push(ids[m]); } - - var nextAxis = (axis + 1) % 2; - - if (axis === 0 ? minX <= x : minY <= y) { - stack.push(left); - stack.push(m - 1); - stack.push(nextAxis); - } - if (axis === 0 ? maxX >= x : maxY >= y) { - stack.push(m + 1); - stack.push(right); - stack.push(nextAxis); - } - } - - return result; -} - -function within(ids, coords, qx, qy, r, nodeSize) { - var stack = [0, ids.length - 1, 0]; - var result = []; - var r2 = r * r; - - while (stack.length) { - var axis = stack.pop(); - var right = stack.pop(); - var left = stack.pop(); - - if (right - left <= nodeSize) { - for (var i = left; i <= right; i++) { - if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) { result.push(ids[i]); } - } - continue; - } - - var m = Math.floor((left + right) / 2); - - var x = coords[2 * m]; - var y = coords[2 * m + 1]; - - if (sqDist(x, y, qx, qy) <= r2) { result.push(ids[m]); } - - var nextAxis = (axis + 1) % 2; - - if (axis === 0 ? qx - r <= x : qy - r <= y) { - stack.push(left); - stack.push(m - 1); - stack.push(nextAxis); - } - if (axis === 0 ? qx + r >= x : qy + r >= y) { - stack.push(m + 1); - stack.push(right); - stack.push(nextAxis); - } - } - - return result; -} - -function sqDist(ax, ay, bx, by) { - var dx = ax - bx; - var dy = ay - by; - return dx * dx + dy * dy; -} - -var defaultGetX = function (p) { return p[0]; }; -var defaultGetY = function (p) { return p[1]; }; - -var KDBush = function KDBush(points, getX, getY, nodeSize, ArrayType) { - if ( getX === void 0 ) getX = defaultGetX; - if ( getY === void 0 ) getY = defaultGetY; - if ( nodeSize === void 0 ) nodeSize = 64; - if ( ArrayType === void 0 ) ArrayType = Float64Array; - - this.nodeSize = nodeSize; - this.points = points; - - var IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array; - - var ids = this.ids = new IndexArrayType(points.length); - var coords = this.coords = new ArrayType(points.length * 2); - - for (var i = 0; i < points.length; i++) { - ids[i] = i; - coords[2 * i] = getX(points[i]); - coords[2 * i + 1] = getY(points[i]); - } - - sortKD(ids, coords, nodeSize, 0, ids.length - 1, 0); -}; - -KDBush.prototype.range = function range$1 (minX, minY, maxX, maxY) { - return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize); -}; - -KDBush.prototype.within = function within$1 (x, y, r) { - return within(this.ids, this.coords, x, y, r, this.nodeSize); -}; - -return KDBush; - -}))); diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/kdbush.min.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/kdbush.min.js deleted file mode 100644 index fe329c5a3f690f6f47847affc945a6fc1ba0f723..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/kdbush.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):t.KDBush=o()}(this,function(){"use strict";function t(n,r,i,e,h,u){if(!(h-e<=i)){var s=e+h>>1;!function t(n,r,i,e,h,u){for(;h>e;){if(h-e>600){var s=h-e+1,f=i-e+1,p=Math.log(s),a=.5*Math.exp(2*p/3),d=.5*Math.sqrt(p*a*(s-a)/s)*(f-s/2<0?-1:1),v=Math.max(e,Math.floor(i-f*a/s+d)),c=Math.min(h,Math.floor(i+(s-f)*a/s+d));t(n,r,i,v,c,u)}var l=r[2*i+u],g=e,M=h;for(o(n,r,e,i),r[2*h+u]>l&&o(n,r,e,h);gl;)M--}r[2*e+u]===l?o(n,r,e,M):o(n,r,++M,h),M<=i&&(e=M+1),i<=M&&(h=M-1)}}(n,r,s,e,h,u%2),t(n,r,i,e,s-1,u+1),t(n,r,i,s+1,h,u+1)}}function o(t,o,r,i){n(t,r,i),n(o,2*r,2*i),n(o,2*r+1,2*i+1)}function n(t,o,n){var r=t[o];t[o]=t[n],t[n]=r}function r(t,o,n,r){var i=t-n,e=o-r;return i*i+e*e}var i=function(t){return t[0]},e=function(t){return t[1]},h=function(o,n,r,h,u){void 0===n&&(n=i),void 0===r&&(r=e),void 0===h&&(h=64),void 0===u&&(u=Float64Array),this.nodeSize=h,this.points=o;for(var s=o.length<65536?Uint16Array:Uint32Array,f=this.ids=new s(o.length),p=this.coords=new u(2*o.length),a=0;a=n&&u<=i&&s>=r&&s<=e&&p.push(t[c]);else{var l=Math.floor((v+d)/2);u=o[2*l],s=o[2*l+1],u>=n&&u<=i&&s>=r&&s<=e&&p.push(t[l]);var g=(a+1)%2;(0===a?n<=u:r<=s)&&(f.push(v),f.push(l-1),f.push(g)),(0===a?i>=u:e>=s)&&(f.push(l+1),f.push(d),f.push(g))}}return p}(this.ids,this.coords,t,o,n,r,this.nodeSize)},h.prototype.within=function(t,o,n){return function(t,o,n,i,e,h){for(var u=[0,t.length-1,0],s=[],f=e*e;u.length;){var p=u.pop(),a=u.pop(),d=u.pop();if(a-d<=h)for(var v=d;v<=a;v++)r(o[2*v],o[2*v+1],n,i)<=f&&s.push(t[v]);else{var c=Math.floor((d+a)/2),l=o[2*c],g=o[2*c+1];r(l,g,n,i)<=f&&s.push(t[c]);var M=(p+1)%2;(0===p?n-e<=l:i-e<=g)&&(u.push(d),u.push(c-1),u.push(M)),(0===p?n+e>=l:i+e>=g)&&(u.push(c+1),u.push(a),u.push(M))}}return s}(this.ids,this.coords,t,o,n,this.nodeSize)},h}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/package.json b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/package.json deleted file mode 100644 index 4539d0de81cc93f5be02dda04ee54fd6d19d84e9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "kdbush", - "version": "3.0.0", - "description": "A very fast static 2D index for points based on kd-tree.", - "module": "src/index.js", - "main": "kdbush.js", - "jsdelivr": "kdbush.min.js", - "unpkg": "kdbush.min.js", - "repository": { - "type": "git", - "url": "git://github.com/mourner/kdbush.git" - }, - "devDependencies": { - "eslint": "^5.5.0", - "eslint-config-mourner": "^3.0.0", - "esm": "^3.0.82", - "rollup": "^0.65.2", - "rollup-plugin-buble": "^0.19.2", - "rollup-plugin-terser": "^2.0.2", - "tape": "^4.9.1" - }, - "scripts": { - "pretest": "eslint src test.js bench.js rollup.config.js", - "test": "tape -r esm test.js", - "bench": "node -r esm bench.js", - "build": "rollup -c", - "prepublishOnly": "npm run build" - }, - "eslintConfig": { - "extends": "mourner" - }, - "keywords": [ - "index", - "points", - "kd-tree", - "data structures", - "algorithms", - "spatial", - "geometry" - ], - "files": [ - "kdbush.js", - "kdbush.min.js", - "src" - ], - "author": "Vladimir Agafonkin", - "license": "ISC" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/index.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/index.js deleted file mode 100644 index bba48085e100799c86395273959c16aabe0a73bb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/index.js +++ /dev/null @@ -1,35 +0,0 @@ - -import sort from './sort'; -import range from './range'; -import within from './within'; - -const defaultGetX = p => p[0]; -const defaultGetY = p => p[1]; - -export default class KDBush { - constructor(points, getX = defaultGetX, getY = defaultGetY, nodeSize = 64, ArrayType = Float64Array) { - this.nodeSize = nodeSize; - this.points = points; - - const IndexArrayType = points.length < 65536 ? Uint16Array : Uint32Array; - - const ids = this.ids = new IndexArrayType(points.length); - const coords = this.coords = new ArrayType(points.length * 2); - - for (let i = 0; i < points.length; i++) { - ids[i] = i; - coords[2 * i] = getX(points[i]); - coords[2 * i + 1] = getY(points[i]); - } - - sort(ids, coords, nodeSize, 0, ids.length - 1, 0); - } - - range(minX, minY, maxX, maxY) { - return range(this.ids, this.coords, minX, minY, maxX, maxY, this.nodeSize); - } - - within(x, y, r) { - return within(this.ids, this.coords, x, y, r, this.nodeSize); - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/range.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/range.js deleted file mode 100644 index 7aeda478935d0805980c502b7383c7eb2ee13aa3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/range.js +++ /dev/null @@ -1,43 +0,0 @@ - -export default function range(ids, coords, minX, minY, maxX, maxY, nodeSize) { - const stack = [0, ids.length - 1, 0]; - const result = []; - let x, y; - - while (stack.length) { - const axis = stack.pop(); - const right = stack.pop(); - const left = stack.pop(); - - if (right - left <= nodeSize) { - for (let i = left; i <= right; i++) { - x = coords[2 * i]; - y = coords[2 * i + 1]; - if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]); - } - continue; - } - - const m = Math.floor((left + right) / 2); - - x = coords[2 * m]; - y = coords[2 * m + 1]; - - if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]); - - const nextAxis = (axis + 1) % 2; - - if (axis === 0 ? minX <= x : minY <= y) { - stack.push(left); - stack.push(m - 1); - stack.push(nextAxis); - } - if (axis === 0 ? maxX >= x : maxY >= y) { - stack.push(m + 1); - stack.push(right); - stack.push(nextAxis); - } - } - - return result; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/sort.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/sort.js deleted file mode 100644 index d9bddc14ea82467dda460eb1d33c5b229ad641cb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/sort.js +++ /dev/null @@ -1,63 +0,0 @@ - -export default function sortKD(ids, coords, nodeSize, left, right, depth) { - if (right - left <= nodeSize) return; - - const m = (left + right) >> 1; - - select(ids, coords, m, left, right, depth % 2); - - sortKD(ids, coords, nodeSize, left, m - 1, depth + 1); - sortKD(ids, coords, nodeSize, m + 1, right, depth + 1); -} - -function select(ids, coords, k, left, right, inc) { - - while (right > left) { - if (right - left > 600) { - const n = right - left + 1; - const m = k - left + 1; - const z = Math.log(n); - const s = 0.5 * Math.exp(2 * z / 3); - const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); - const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); - const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); - select(ids, coords, k, newLeft, newRight, inc); - } - - const t = coords[2 * k + inc]; - let i = left; - let j = right; - - swapItem(ids, coords, left, k); - if (coords[2 * right + inc] > t) swapItem(ids, coords, left, right); - - while (i < j) { - swapItem(ids, coords, i, j); - i++; - j--; - while (coords[2 * i + inc] < t) i++; - while (coords[2 * j + inc] > t) j--; - } - - if (coords[2 * left + inc] === t) swapItem(ids, coords, left, j); - else { - j++; - swapItem(ids, coords, j, right); - } - - if (j <= k) left = j + 1; - if (k <= j) right = j - 1; - } -} - -function swapItem(ids, coords, i, j) { - swap(ids, i, j); - swap(coords, 2 * i, 2 * j); - swap(coords, 2 * i + 1, 2 * j + 1); -} - -function swap(arr, i, j) { - const tmp = arr[i]; - arr[i] = arr[j]; - arr[j] = tmp; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/within.js b/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/within.js deleted file mode 100644 index e86d381c847c7a93a9b6fe43fbb9d4d873ce37b8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/node_modules/kdbush/src/within.js +++ /dev/null @@ -1,47 +0,0 @@ - -export default function within(ids, coords, qx, qy, r, nodeSize) { - const stack = [0, ids.length - 1, 0]; - const result = []; - const r2 = r * r; - - while (stack.length) { - const axis = stack.pop(); - const right = stack.pop(); - const left = stack.pop(); - - if (right - left <= nodeSize) { - for (let i = left; i <= right; i++) { - if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]); - } - continue; - } - - const m = Math.floor((left + right) / 2); - - const x = coords[2 * m]; - const y = coords[2 * m + 1]; - - if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]); - - const nextAxis = (axis + 1) % 2; - - if (axis === 0 ? qx - r <= x : qy - r <= y) { - stack.push(left); - stack.push(m - 1); - stack.push(nextAxis); - } - if (axis === 0 ? qx + r >= x : qy + r >= y) { - stack.push(m + 1); - stack.push(right); - stack.push(nextAxis); - } - } - - return result; -} - -function sqDist(ax, ay, bx, by) { - const dx = ax - bx; - const dy = ay - by; - return dx * dx + dy * dy; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supercluster/package.json b/ThinFilm_Analyzer/frontend/node_modules/supercluster/package.json deleted file mode 100644 index 48fe15c67fff93efb1e6a9a74760dc7e36e5f334..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supercluster/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "supercluster", - "version": "7.1.5", - "description": "A very fast geospatial point clustering library.", - "main": "dist/supercluster.js", - "module": "index.js", - "jsdelivr": "dist/supercluster.min.js", - "unpkg": "dist/supercluster.min.js", - "scripts": { - "pretest": "eslint index.js bench.js test/test.js demo/index.js demo/worker.js", - "test": "tape -r esm test/test.js", - "cov": "c8 npm run test", - "bench": "node --expose-gc -r esm bench.js", - "build": "mkdirp dist && rollup -c", - "prepublishOnly": "npm run test && npm run build" - }, - "files": [ - "index.js", - "dist/supercluster.js", - "dist/supercluster.min.js" - ], - "repository": { - "type": "git", - "url": "git://github.com/mapbox/supercluster.git" - }, - "keywords": [ - "clustering", - "geospatial", - "markers" - ], - "author": "Vladimir Agafonkin", - "license": "ISC", - "dependencies": { - "kdbush": "^3.0.0" - }, - "devDependencies": { - "@rollup/plugin-buble": "^0.21.3", - "@rollup/plugin-node-resolve": "^13.1.3", - "c8": "^7.11.0", - "eslint": "^8.12.0", - "eslint-config-mourner": "^3.0.0", - "esm": "^3.2.25", - "mkdirp": "^1.0.4", - "rollup": "^2.70.1", - "rollup-plugin-terser": "^7.0.2", - "tape": "^5.5.2" - }, - "eslintConfig": { - "extends": "mourner", - "rules": { - "camelcase": 0 - } - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/.npmignore b/ThinFilm_Analyzer/frontend/node_modules/superscript-text/.npmignore deleted file mode 100644 index ddc9ab330c2a9e77591abb3effd1b9ebf278a988..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules/* -*.DS_Store \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/superscript-text/LICENSE deleted file mode 100644 index 1815ddd61d61d007ca9c832c7d69ffc8a4f9f86a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2015 Mikola Lysenko - -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/ThinFilm_Analyzer/frontend/node_modules/superscript-text/README.md b/ThinFilm_Analyzer/frontend/node_modules/superscript-text/README.md deleted file mode 100644 index e05764e46d8a162a9f63f0b495e132fb63985b63..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/README.md +++ /dev/null @@ -1,35 +0,0 @@ -superscript-text -================ -Converts text into super script unicode characters. - -# Example - -```javascript -var raise = require('superscript-text') - -console.log(raise('hello world')) -``` - -Output: - -``` -ʰᵉˡˡᵒ ʷᵒʳˡᵈ -``` - -# Install - -``` -npm i superscript-text -``` - -# API - -#### `require('superscript-text')(str)` -Converts `str` into unicode super script - -* `str` is a string containing english chracters and numbers - -**Returns** A super script version of `str` - -# License -(c) 2015 Mikola Lysenko. MIT License diff --git a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/package.json b/ThinFilm_Analyzer/frontend/node_modules/superscript-text/package.json deleted file mode 100644 index fb7e0f8ff04a4992653ea0feb0f0158d871629fe..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "superscript-text", - "version": "1.0.0", - "description": "Converts text to superscript unicode", - "main": "superscript.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/mikolalysenko/superscript-text.git" - }, - "keywords": [ - "superscript", - "super", - "sup", - "unicode", - "ascii" - ], - "author": "Mikola Lysenko", - "license": "MIT", - "bugs": { - "url": "https://github.com/mikolalysenko/superscript-text/issues" - }, - "homepage": "https://github.com/mikolalysenko/superscript-text" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/superscript.js b/ThinFilm_Analyzer/frontend/node_modules/superscript-text/superscript.js deleted file mode 100644 index b794fe998331268020af9abb633a91bf942c6218..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/superscript-text/superscript.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict' - -module.exports = toSuperScript - -var SUPERSCRIPTS = { - ' ': ' ', - '0': '⁰', - '1': '¹', - '2': '²', - '3': '³', - '4': '⁴', - '5': '⁵', - '6': '⁶', - '7': '⁷', - '8': '⁸', - '9': '⁹', - '+': '⁺', - '-': '⁻', - 'a': 'ᵃ', - 'b': 'ᵇ', - 'c': 'ᶜ', - 'd': 'ᵈ', - 'e': 'ᵉ', - 'f': 'ᶠ', - 'g': 'ᵍ', - 'h': 'ʰ', - 'i': 'ⁱ', - 'j': 'ʲ', - 'k': 'ᵏ', - 'l': 'ˡ', - 'm': 'ᵐ', - 'n': 'ⁿ', - 'o': 'ᵒ', - 'p': 'ᵖ', - 'r': 'ʳ', - 's': 'ˢ', - 't': 'ᵗ', - 'u': 'ᵘ', - 'v': 'ᵛ', - 'w': 'ʷ', - 'x': 'ˣ', - 'y': 'ʸ', - 'z': 'ᶻ' -} - -function toSuperScript(x) { - return x.split('').map(function(c) { - if(c in SUPERSCRIPTS) { - return SUPERSCRIPTS[c] - } - return '' - }).join('') -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-color/browser.js b/ThinFilm_Analyzer/frontend/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a7425dc6a1eeafd1333afc15d429c5d10d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-color/index.js b/ThinFilm_Analyzer/frontend/node_modules/supports-color/index.js deleted file mode 100644 index 6fada390fb88d8e1dae3454216aa3995141a1785..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-color/index.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; -const os = require('os'); -const tty = require('tty'); -const hasFlag = require('has-flag'); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-color/license b/ThinFilm_Analyzer/frontend/node_modules/supports-color/license deleted file mode 100644 index e7af2f77107d73046421ef56c4684cbfdd3c1e89..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-color/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-color/package.json b/ThinFilm_Analyzer/frontend/node_modules/supports-color/package.json deleted file mode 100644 index f7182edcea2baa8778219d4aab2c0c1b21f1a30a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-color/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "supports-color", - "version": "7.2.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js", - "browser.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "dependencies": { - "has-flag": "^4.0.0" - }, - "devDependencies": { - "ava": "^1.4.1", - "import-fresh": "^3.0.0", - "xo": "^0.24.0" - }, - "browser": "browser.js" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-color/readme.md b/ThinFilm_Analyzer/frontend/node_modules/supports-color/readme.md deleted file mode 100644 index 36542285863330887923979b4c00579738907d49..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-color/readme.md +++ /dev/null @@ -1,76 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install supports-color -``` - - -## Usage - -```js -const supportsColor = require('supports-color'); - -if (supportsColor.stdout) { - console.log('Terminal stdout supports color'); -} - -if (supportsColor.stdout.has256) { - console.log('Terminal stdout supports 256 colors'); -} - -if (supportsColor.stderr.has16m) { - console.log('Terminal stderr supports 16 million colors (truecolor)'); -} -``` - - -## API - -Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. - -The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: - -- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) -- `.level = 2` and `.has256 = true`: 256 color support -- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) - - -## Info - -It obeys the `--color` and `--no-color` CLI flags. - -For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.eslintrc b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.eslintrc deleted file mode 100644 index 346ffeca87d3784723773d39f9e52b8c6d12f8c3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "env": { - "browser": true, - "node": true, - }, - - "rules": { - "id-length": "off", - }, -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml deleted file mode 100644 index e8d64f37e5fc43885727dc3d086050af7dcc4bb1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/supports-preserve-symlink-flag -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.nycrc b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.nycrc deleted file mode 100644 index bdd626ce91477abbdd489b79988baebadbd3c897..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md deleted file mode 100644 index 61f607f4894beba4e0693c72a6446bf3497bb318..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## v1.0.0 - 2022-01-02 - -### Commits - -- Tests [`e2f59ad`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/e2f59ad74e2ae0f5f4899fcde6a6f693ab7cc074) -- Initial commit [`dc222aa`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/dc222aad3c0b940d8d3af1ca9937d108bd2dc4b9) -- [meta] do not publish workflow files [`5ef77f7`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/5ef77f7cb6946d16ee38672be9ec0f1bbdf63262) -- npm init [`992b068`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/992b068503a461f7e8676f40ca2aab255fd8d6ff) -- read me [`6c9afa9`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c9afa9fabc8eaf0814aaed6dd01e6df0931b76d) -- Initial implementation [`2f98925`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2f9892546396d4ab0ad9f1ff83e76c3f01234ae8) -- [meta] add `auto-changelog` [`6c476ae`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/6c476ae1ed7ce68b0480344f090ac2844f35509d) -- [Dev Deps] add `eslint`, `@ljharb/eslint-config` [`d0fffc8`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/d0fffc886d25fba119355520750a909d64da0087) -- Only apps should have lockfiles [`ab318ed`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/ab318ed7ae62f6c2c0e80a50398d40912afd8f69) -- [meta] add `safe-publish-latest` [`2bb23b3`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/2bb23b3ebab02dc4135c4cdf0217db82835b9fca) -- [meta] add `sideEffects` flag [`600223b`](https://github.com/inspect-js/node-supports-preserve-symlinks-flag/commit/600223ba24f30779f209d9097721eff35ed62741) diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/LICENSE deleted file mode 100644 index 2e7b9a3eacf263cb418f4c16b087290ef78c39b2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Inspect JS - -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/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/README.md b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/README.md deleted file mode 100644 index eb05b124ca68ba0312c98834f282a2cd6ce568b5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# node-supports-preserve-symlinks-flag [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Determine if the current node version supports the `--preserve-symlinks` flag. - -## Example - -```js -var supportsPreserveSymlinks = require('node-supports-preserve-symlinks-flag'); -var assert = require('assert'); - -assert.equal(supportsPreserveSymlinks, null); // in a browser -assert.equal(supportsPreserveSymlinks, false); // in node < v6.2 -assert.equal(supportsPreserveSymlinks, true); // in node v6.2+ -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/node-supports-preserve-symlinks-flag -[npm-version-svg]: https://versionbadg.es/inspect-js/node-supports-preserve-symlinks-flag.svg -[deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag.svg -[deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag -[dev-deps-svg]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag/dev-status.svg -[dev-deps-url]: https://david-dm.org/inspect-js/node-supports-preserve-symlinks-flag#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/node-supports-preserve-symlinks-flag.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/node-supports-preserve-symlinks-flag.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/node-supports-preserve-symlinks-flag.svg -[downloads-url]: https://npm-stat.com/charts.html?package=node-supports-preserve-symlinks-flag -[codecov-image]: https://codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/inspect-js/node-supports-preserve-symlinks-flag/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-supports-preserve-symlinks-flag -[actions-url]: https://github.com/inspect-js/node-supports-preserve-symlinks-flag/actions diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/browser.js b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/browser.js deleted file mode 100644 index 087be1fe9fda8930ca66a68204bd0112b9d8710b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/browser.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = null; diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/index.js b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/index.js deleted file mode 100644 index 86fd5d331c4a4d44e9a92d46fbb637165cea78d5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -module.exports = ( -// node 12+ - process.allowedNodeEnvironmentFlags && process.allowedNodeEnvironmentFlags.has('--preserve-symlinks') -) || ( -// node v6.2 - v11 - String(module.constructor._findPath).indexOf('preserveSymlinks') >= 0 // eslint-disable-line no-underscore-dangle -); diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/package.json b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/package.json deleted file mode 100644 index 56edadcaad850fa1f348aeb0988e98d16eb14a84..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "supports-preserve-symlinks-flag", - "version": "1.0.0", - "description": "Determine if the current node version supports the `--preserve-symlinks` flag.", - "main": "./index.js", - "browser": "./browser.js", - "exports": { - ".": [ - { - "browser": "./browser.js", - "default": "./index.js" - }, - "./index.js" - ], - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "lint": "eslint --ext=js,mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/node-supports-preserve-symlinks-flag.git" - }, - "keywords": [ - "node", - "flag", - "symlink", - "symlinks", - "preserve-symlinks" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag/issues" - }, - "homepage": "https://github.com/inspect-js/node-supports-preserve-symlinks-flag#readme", - "devDependencies": { - "@ljharb/eslint-config": "^20.1.0", - "aud": "^1.1.5", - "auto-changelog": "^2.3.0", - "eslint": "^8.6.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "semver": "^6.3.0", - "tape": "^5.4.0" - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/test/index.js b/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/test/index.js deleted file mode 100644 index 9938d671691790a75bacefc6100b39d6e4ab937a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/supports-preserve-symlinks-flag/test/index.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var test = require('tape'); -var semver = require('semver'); - -var supportsPreserveSymlinks = require('../'); -var browser = require('../browser'); - -test('supportsPreserveSymlinks', function (t) { - t.equal(typeof supportsPreserveSymlinks, 'boolean', 'is a boolean'); - - t.equal(browser, null, 'browser file is `null`'); - t.equal( - supportsPreserveSymlinks, - null, - 'in a browser, is null', - { skip: typeof window === 'undefined' } - ); - - var expected = semver.satisfies(process.version, '>= 6.2'); - t.equal( - supportsPreserveSymlinks, - expected, - 'is true in node v6.2+, false otherwise (actual: ' + supportsPreserveSymlinks + ', expected ' + expected + ')', - { skip: typeof window !== 'undefined' } - ); - - t.end(); -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/LICENSE.md b/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/LICENSE.md deleted file mode 100644 index 6e59fa5a817cc1ae3e3aff73b2cc63fdb8175905..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/LICENSE.md +++ /dev/null @@ -1,16 +0,0 @@ -Internet Systems Consortium license -=================================== - -Copyright (c) `2017`, `Colin Meinke` - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/README.md b/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/README.md deleted file mode 100644 index f4d8f8192d17bce665d547a9ae6ac498b22b30d1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# SVG arc to cubic bezier - -A function that takes an SVG arc curve as input, and maps it to -one or more cubic bezier curves. - -I extracted the `a2c` function from -[SVG path](https://github.com/fontello/svgpath), as I wanted to use it on its own. - -All credit, thanks and respect goes to: - -- Sergey Batishchev – [@snb2013](https://github.com/snb2013) -- Vitaly Puzrin – [@puzrin](https://github.com/puzrin) -- Alex Kocharin – [@rlidwka](https://github.com/rlidwka) - -It blew my mind. Thank you! - -## Installation - -``` -npm install svg-arc-to-cubic-bezier -``` - -## Usage - -```js -import arcToBezier from 'svg-arc-to-cubic-bezier'; - -const previousPoint = { x: 100, y: 100 } - -const currentPoint = { - x: 700, - y: 100, - curve: { - type: 'arc', - rx: 300, - ry: 200, - largeArcFlag: 30, - sweepFlag: 0, - xAxisRotation: 0, - }, -}; - -const curves = arcToBezier({ - px: previousPoint.x, - py: previousPoint.y, - cx: currentPoint.x, - cy: currentPoint.y, - rx: currentPoint.curve.rx, - ry: currentPoint.curve.ry, - xAxisRotation: currentPoint.curve.xAxisRotation, - largeArcFlag: currentPoint.curve.largeArcFlag, - sweepFlag: currentPoint.curve.sweepFlag, -}); - -curves.forEach( c => console.log( c )); - -// [ -// { -// x1: 159.7865795437111, -// y1: 244.97474575043722, -// x2: 342.5677510865157, -// y2: 362.49999701503634, -// x: 508.253174689854, -// y: 362.4999967447917, -// }, -// { -// x1: 673.9385982931924, -// y1: 362.49999647454695, -// x2: 759.7865756485664, -// y2: 244.97474477179443, -// x: 699.9999995964145, -// y: 99.99999902135724, -// }, -// ] -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/cjs/index.js b/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/cjs/index.js deleted file mode 100644 index 11bcabc67c03cca97f9c8f108d9d6ed0bf6e0f13..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/cjs/index.js +++ /dev/null @@ -1,190 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var TAU = Math.PI * 2; - -var mapToEllipse = function mapToEllipse(_ref, rx, ry, cosphi, sinphi, centerx, centery) { - var x = _ref.x, - y = _ref.y; - - x *= rx; - y *= ry; - - var xp = cosphi * x - sinphi * y; - var yp = sinphi * x + cosphi * y; - - return { - x: xp + centerx, - y: yp + centery - }; -}; - -var approxUnitArc = function approxUnitArc(ang1, ang2) { - // If 90 degree circular arc, use a constant - // as derived from http://spencermortensen.com/articles/bezier-circle - var a = ang2 === 1.5707963267948966 ? 0.551915024494 : ang2 === -1.5707963267948966 ? -0.551915024494 : 4 / 3 * Math.tan(ang2 / 4); - - var x1 = Math.cos(ang1); - var y1 = Math.sin(ang1); - var x2 = Math.cos(ang1 + ang2); - var y2 = Math.sin(ang1 + ang2); - - return [{ - x: x1 - y1 * a, - y: y1 + x1 * a - }, { - x: x2 + y2 * a, - y: y2 - x2 * a - }, { - x: x2, - y: y2 - }]; -}; - -var vectorAngle = function vectorAngle(ux, uy, vx, vy) { - var sign = ux * vy - uy * vx < 0 ? -1 : 1; - - var dot = ux * vx + uy * vy; - - if (dot > 1) { - dot = 1; - } - - if (dot < -1) { - dot = -1; - } - - return sign * Math.acos(dot); -}; - -var getArcCenter = function getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp) { - var rxsq = Math.pow(rx, 2); - var rysq = Math.pow(ry, 2); - var pxpsq = Math.pow(pxp, 2); - var pypsq = Math.pow(pyp, 2); - - var radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq; - - if (radicant < 0) { - radicant = 0; - } - - radicant /= rxsq * pypsq + rysq * pxpsq; - radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1); - - var centerxp = radicant * rx / ry * pyp; - var centeryp = radicant * -ry / rx * pxp; - - var centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2; - var centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2; - - var vx1 = (pxp - centerxp) / rx; - var vy1 = (pyp - centeryp) / ry; - var vx2 = (-pxp - centerxp) / rx; - var vy2 = (-pyp - centeryp) / ry; - - var ang1 = vectorAngle(1, 0, vx1, vy1); - var ang2 = vectorAngle(vx1, vy1, vx2, vy2); - - if (sweepFlag === 0 && ang2 > 0) { - ang2 -= TAU; - } - - if (sweepFlag === 1 && ang2 < 0) { - ang2 += TAU; - } - - return [centerx, centery, ang1, ang2]; -}; - -var arcToBezier = function arcToBezier(_ref2) { - var px = _ref2.px, - py = _ref2.py, - cx = _ref2.cx, - cy = _ref2.cy, - rx = _ref2.rx, - ry = _ref2.ry, - _ref2$xAxisRotation = _ref2.xAxisRotation, - xAxisRotation = _ref2$xAxisRotation === undefined ? 0 : _ref2$xAxisRotation, - _ref2$largeArcFlag = _ref2.largeArcFlag, - largeArcFlag = _ref2$largeArcFlag === undefined ? 0 : _ref2$largeArcFlag, - _ref2$sweepFlag = _ref2.sweepFlag, - sweepFlag = _ref2$sweepFlag === undefined ? 0 : _ref2$sweepFlag; - - var curves = []; - - if (rx === 0 || ry === 0) { - return []; - } - - var sinphi = Math.sin(xAxisRotation * TAU / 360); - var cosphi = Math.cos(xAxisRotation * TAU / 360); - - var pxp = cosphi * (px - cx) / 2 + sinphi * (py - cy) / 2; - var pyp = -sinphi * (px - cx) / 2 + cosphi * (py - cy) / 2; - - if (pxp === 0 && pyp === 0) { - return []; - } - - rx = Math.abs(rx); - ry = Math.abs(ry); - - var lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2); - - if (lambda > 1) { - rx *= Math.sqrt(lambda); - ry *= Math.sqrt(lambda); - } - - var _getArcCenter = getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp), - _getArcCenter2 = _slicedToArray(_getArcCenter, 4), - centerx = _getArcCenter2[0], - centery = _getArcCenter2[1], - ang1 = _getArcCenter2[2], - ang2 = _getArcCenter2[3]; - - // If 'ang2' == 90.0000000001, then `ratio` will evaluate to - // 1.0000000001. This causes `segments` to be greater than one, which is an - // unecessary split, and adds extra points to the bezier curve. To alleviate - // this issue, we round to 1.0 when the ratio is close to 1.0. - - - var ratio = Math.abs(ang2) / (TAU / 4); - if (Math.abs(1.0 - ratio) < 0.0000001) { - ratio = 1.0; - } - - var segments = Math.max(Math.ceil(ratio), 1); - - ang2 /= segments; - - for (var i = 0; i < segments; i++) { - curves.push(approxUnitArc(ang1, ang2)); - ang1 += ang2; - } - - return curves.map(function (curve) { - var _mapToEllipse = mapToEllipse(curve[0], rx, ry, cosphi, sinphi, centerx, centery), - x1 = _mapToEllipse.x, - y1 = _mapToEllipse.y; - - var _mapToEllipse2 = mapToEllipse(curve[1], rx, ry, cosphi, sinphi, centerx, centery), - x2 = _mapToEllipse2.x, - y2 = _mapToEllipse2.y; - - var _mapToEllipse3 = mapToEllipse(curve[2], rx, ry, cosphi, sinphi, centerx, centery), - x = _mapToEllipse3.x, - y = _mapToEllipse3.y; - - return { x1: x1, y1: y1, x2: x2, y2: y2, x: x, y: y }; - }); -}; - -exports.default = arcToBezier; -module.exports = exports.default; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/dist/svg-points-to-cubic-bezier.js b/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/dist/svg-points-to-cubic-bezier.js deleted file mode 100644 index 84da0686a1f305d93919a8aa13ee01f7583e4856..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/dist/svg-points-to-cubic-bezier.js +++ /dev/null @@ -1,191 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.SVGArcToCubicBezier = factory()); -}(this, function () { 'use strict'; - - var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - - var TAU = Math.PI * 2; - - var mapToEllipse = function mapToEllipse(_ref, rx, ry, cosphi, sinphi, centerx, centery) { - var x = _ref.x, - y = _ref.y; - - x *= rx; - y *= ry; - - var xp = cosphi * x - sinphi * y; - var yp = sinphi * x + cosphi * y; - - return { - x: xp + centerx, - y: yp + centery - }; - }; - - var approxUnitArc = function approxUnitArc(ang1, ang2) { - // If 90 degree circular arc, use a constant - // as derived from http://spencermortensen.com/articles/bezier-circle - var a = ang2 === 1.5707963267948966 ? 0.551915024494 : ang2 === -1.5707963267948966 ? -0.551915024494 : 4 / 3 * Math.tan(ang2 / 4); - - var x1 = Math.cos(ang1); - var y1 = Math.sin(ang1); - var x2 = Math.cos(ang1 + ang2); - var y2 = Math.sin(ang1 + ang2); - - return [{ - x: x1 - y1 * a, - y: y1 + x1 * a - }, { - x: x2 + y2 * a, - y: y2 - x2 * a - }, { - x: x2, - y: y2 - }]; - }; - - var vectorAngle = function vectorAngle(ux, uy, vx, vy) { - var sign = ux * vy - uy * vx < 0 ? -1 : 1; - - var dot = ux * vx + uy * vy; - - if (dot > 1) { - dot = 1; - } - - if (dot < -1) { - dot = -1; - } - - return sign * Math.acos(dot); - }; - - var getArcCenter = function getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp) { - var rxsq = Math.pow(rx, 2); - var rysq = Math.pow(ry, 2); - var pxpsq = Math.pow(pxp, 2); - var pypsq = Math.pow(pyp, 2); - - var radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq; - - if (radicant < 0) { - radicant = 0; - } - - radicant /= rxsq * pypsq + rysq * pxpsq; - radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1); - - var centerxp = radicant * rx / ry * pyp; - var centeryp = radicant * -ry / rx * pxp; - - var centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2; - var centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2; - - var vx1 = (pxp - centerxp) / rx; - var vy1 = (pyp - centeryp) / ry; - var vx2 = (-pxp - centerxp) / rx; - var vy2 = (-pyp - centeryp) / ry; - - var ang1 = vectorAngle(1, 0, vx1, vy1); - var ang2 = vectorAngle(vx1, vy1, vx2, vy2); - - if (sweepFlag === 0 && ang2 > 0) { - ang2 -= TAU; - } - - if (sweepFlag === 1 && ang2 < 0) { - ang2 += TAU; - } - - return [centerx, centery, ang1, ang2]; - }; - - var arcToBezier = function arcToBezier(_ref2) { - var px = _ref2.px, - py = _ref2.py, - cx = _ref2.cx, - cy = _ref2.cy, - rx = _ref2.rx, - ry = _ref2.ry, - _ref2$xAxisRotation = _ref2.xAxisRotation, - xAxisRotation = _ref2$xAxisRotation === undefined ? 0 : _ref2$xAxisRotation, - _ref2$largeArcFlag = _ref2.largeArcFlag, - largeArcFlag = _ref2$largeArcFlag === undefined ? 0 : _ref2$largeArcFlag, - _ref2$sweepFlag = _ref2.sweepFlag, - sweepFlag = _ref2$sweepFlag === undefined ? 0 : _ref2$sweepFlag; - - var curves = []; - - if (rx === 0 || ry === 0) { - return []; - } - - var sinphi = Math.sin(xAxisRotation * TAU / 360); - var cosphi = Math.cos(xAxisRotation * TAU / 360); - - var pxp = cosphi * (px - cx) / 2 + sinphi * (py - cy) / 2; - var pyp = -sinphi * (px - cx) / 2 + cosphi * (py - cy) / 2; - - if (pxp === 0 && pyp === 0) { - return []; - } - - rx = Math.abs(rx); - ry = Math.abs(ry); - - var lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2); - - if (lambda > 1) { - rx *= Math.sqrt(lambda); - ry *= Math.sqrt(lambda); - } - - var _getArcCenter = getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp), - _getArcCenter2 = _slicedToArray(_getArcCenter, 4), - centerx = _getArcCenter2[0], - centery = _getArcCenter2[1], - ang1 = _getArcCenter2[2], - ang2 = _getArcCenter2[3]; - - // If 'ang2' == 90.0000000001, then `ratio` will evaluate to - // 1.0000000001. This causes `segments` to be greater than one, which is an - // unecessary split, and adds extra points to the bezier curve. To alleviate - // this issue, we round to 1.0 when the ratio is close to 1.0. - - - var ratio = Math.abs(ang2) / (TAU / 4); - if (Math.abs(1.0 - ratio) < 0.0000001) { - ratio = 1.0; - } - - var segments = Math.max(Math.ceil(ratio), 1); - - ang2 /= segments; - - for (var i = 0; i < segments; i++) { - curves.push(approxUnitArc(ang1, ang2)); - ang1 += ang2; - } - - return curves.map(function (curve) { - var _mapToEllipse = mapToEllipse(curve[0], rx, ry, cosphi, sinphi, centerx, centery), - x1 = _mapToEllipse.x, - y1 = _mapToEllipse.y; - - var _mapToEllipse2 = mapToEllipse(curve[1], rx, ry, cosphi, sinphi, centerx, centery), - x2 = _mapToEllipse2.x, - y2 = _mapToEllipse2.y; - - var _mapToEllipse3 = mapToEllipse(curve[2], rx, ry, cosphi, sinphi, centerx, centery), - x = _mapToEllipse3.x, - y = _mapToEllipse3.y; - - return { x1: x1, y1: y1, x2: x2, y2: y2, x: x, y: y }; - }); - }; - - return arcToBezier; - -})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/dist/svg-points-to-cubic-bezier.min.js b/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/dist/svg-points-to-cubic-bezier.min.js deleted file mode 100644 index 2f2b289b44138b9f5c503d4deec3d6b04aa5b5d6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/dist/svg-points-to-cubic-bezier.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t=t||self).SVGArcToCubicBezier=r()}(this,function(){"use strict";function O(t,r,a,n,e,o,i){var h=t.x,u=t.y;return{x:n*(h*=r)-e*(u*=a)+o,y:e*h+n*u+i}}function P(t,r,a,n){var e=t*a+r*n;return 1 1) { - dot = 1; - } - - if (dot < -1) { - dot = -1; - } - - return sign * Math.acos(dot); -}; - -var getArcCenter = function getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp) { - var rxsq = Math.pow(rx, 2); - var rysq = Math.pow(ry, 2); - var pxpsq = Math.pow(pxp, 2); - var pypsq = Math.pow(pyp, 2); - - var radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq; - - if (radicant < 0) { - radicant = 0; - } - - radicant /= rxsq * pypsq + rysq * pxpsq; - radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1); - - var centerxp = radicant * rx / ry * pyp; - var centeryp = radicant * -ry / rx * pxp; - - var centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2; - var centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2; - - var vx1 = (pxp - centerxp) / rx; - var vy1 = (pyp - centeryp) / ry; - var vx2 = (-pxp - centerxp) / rx; - var vy2 = (-pyp - centeryp) / ry; - - var ang1 = vectorAngle(1, 0, vx1, vy1); - var ang2 = vectorAngle(vx1, vy1, vx2, vy2); - - if (sweepFlag === 0 && ang2 > 0) { - ang2 -= TAU; - } - - if (sweepFlag === 1 && ang2 < 0) { - ang2 += TAU; - } - - return [centerx, centery, ang1, ang2]; -}; - -var arcToBezier = function arcToBezier(_ref2) { - var px = _ref2.px, - py = _ref2.py, - cx = _ref2.cx, - cy = _ref2.cy, - rx = _ref2.rx, - ry = _ref2.ry, - _ref2$xAxisRotation = _ref2.xAxisRotation, - xAxisRotation = _ref2$xAxisRotation === undefined ? 0 : _ref2$xAxisRotation, - _ref2$largeArcFlag = _ref2.largeArcFlag, - largeArcFlag = _ref2$largeArcFlag === undefined ? 0 : _ref2$largeArcFlag, - _ref2$sweepFlag = _ref2.sweepFlag, - sweepFlag = _ref2$sweepFlag === undefined ? 0 : _ref2$sweepFlag; - - var curves = []; - - if (rx === 0 || ry === 0) { - return []; - } - - var sinphi = Math.sin(xAxisRotation * TAU / 360); - var cosphi = Math.cos(xAxisRotation * TAU / 360); - - var pxp = cosphi * (px - cx) / 2 + sinphi * (py - cy) / 2; - var pyp = -sinphi * (px - cx) / 2 + cosphi * (py - cy) / 2; - - if (pxp === 0 && pyp === 0) { - return []; - } - - rx = Math.abs(rx); - ry = Math.abs(ry); - - var lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2); - - if (lambda > 1) { - rx *= Math.sqrt(lambda); - ry *= Math.sqrt(lambda); - } - - var _getArcCenter = getArcCenter(px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp), - _getArcCenter2 = _slicedToArray(_getArcCenter, 4), - centerx = _getArcCenter2[0], - centery = _getArcCenter2[1], - ang1 = _getArcCenter2[2], - ang2 = _getArcCenter2[3]; - - // If 'ang2' == 90.0000000001, then `ratio` will evaluate to - // 1.0000000001. This causes `segments` to be greater than one, which is an - // unecessary split, and adds extra points to the bezier curve. To alleviate - // this issue, we round to 1.0 when the ratio is close to 1.0. - - - var ratio = Math.abs(ang2) / (TAU / 4); - if (Math.abs(1.0 - ratio) < 0.0000001) { - ratio = 1.0; - } - - var segments = Math.max(Math.ceil(ratio), 1); - - ang2 /= segments; - - for (var i = 0; i < segments; i++) { - curves.push(approxUnitArc(ang1, ang2)); - ang1 += ang2; - } - - return curves.map(function (curve) { - var _mapToEllipse = mapToEllipse(curve[0], rx, ry, cosphi, sinphi, centerx, centery), - x1 = _mapToEllipse.x, - y1 = _mapToEllipse.y; - - var _mapToEllipse2 = mapToEllipse(curve[1], rx, ry, cosphi, sinphi, centerx, centery), - x2 = _mapToEllipse2.x, - y2 = _mapToEllipse2.y; - - var _mapToEllipse3 = mapToEllipse(curve[2], rx, ry, cosphi, sinphi, centerx, centery), - x = _mapToEllipse3.x, - y = _mapToEllipse3.y; - - return { x1: x1, y1: y1, x2: x2, y2: y2, x: x, y: y }; - }); -}; - -export default arcToBezier; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/package.json b/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/package.json deleted file mode 100644 index dfe75de54df748d5422645f087d6a5171f8c62b4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "author": { - "name": "Colin Meinke", - "email": "hello@colinmeinke.com", - "url": "https://colinmeinke.com" - }, - "babel": { - "env": { - "cjs": { - "plugins": [ - "transform-object-rest-spread", - "add-module-exports" - ], - "presets": [ - "es2015" - ] - }, - "modules": { - "plugins": [ - "transform-object-rest-spread" - ], - "presets": [ - [ - "es2015", - { - "modules": false - } - ] - ] - }, - "umd": { - "plugins": [ - "transform-object-rest-spread" - ], - "presets": [ - [ - "es2015", - { - "modules": false - } - ] - ] - } - } - }, - "bugs": { - "url": "https://github.com/colinmeinke/svg-arc-to-cubic-bezier/issues" - }, - "config": { - "commitizen": { - "path": "node_modules/cz-conventional-changelog" - } - }, - "description": "A function that takes an SVG arc curve as input, and maps it to one or more cubic bezier curves", - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-core": "^6.26.3", - "babel-plugin-add-module-exports": "^0.3.3", - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-preset-es2015": "^6.24.1", - "commitizen": "^3.1.1", - "cz-conventional-changelog": "^2.1.0", - "rimraf": "^2.6.3", - "rollup": "^1.16.6", - "rollup-plugin-babel": "^3.0.7", - "rollup-plugin-commonjs": "^10.0.1", - "rollup-plugin-uglify": "^6.0.2", - "snazzy": "^8.0.0", - "standard": "^12.0.1", - "travis-deploy-once": "^5.0.11", - "semantic-release": "^15.13.18" - }, - "keywords": [ - "arc", - "bezier", - "convert", - "cubic", - "curve", - "path", - "svg" - ], - "license": "ISC", - "main": "cjs/index.js", - "module": "modules/index.js", - "name": "svg-arc-to-cubic-bezier", - "repository": { - "type": "git", - "url": "https://github.com/colinmeinke/svg-arc-to-cubic-bezier" - }, - "scripts": { - "build": "npm run build:modules && npm run build:cjs && npm run build:umd", - "build:cjs": "BABEL_ENV=cjs babel src --out-dir cjs", - "build:modules": "BABEL_ENV=modules babel src --out-dir modules", - "build:umd": "npm run build:umd:dev && npm run build:umd:pro", - "build:umd:dev": "BABEL_ENV=umd rollup -c", - "build:umd:pro": "NODE_ENV=production BABEL_ENV=umd rollup -c", - "commit": "git-cz", - "fix": "standard --fix", - "lint": "standard --verbose | snazzy", - "prepublish": "npm run tidy && npm run build", - "semantic-release": "semantic-release", - "tidy": "rimraf modules cjs dist", - "travis-deploy-once": "travis-deploy-once" - }, - "version": "3.2.0" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/src/index.js b/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/src/index.js deleted file mode 100644 index fb3219838ecf0ad211a2dde8b1ced51a165e83fa..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-arc-to-cubic-bezier/src/index.js +++ /dev/null @@ -1,196 +0,0 @@ -const TAU = Math.PI * 2 - -const mapToEllipse = ({ x, y }, rx, ry, cosphi, sinphi, centerx, centery) => { - x *= rx - y *= ry - - const xp = cosphi * x - sinphi * y - const yp = sinphi * x + cosphi * y - - return { - x: xp + centerx, - y: yp + centery - } -} - -const approxUnitArc = (ang1, ang2) => { - // If 90 degree circular arc, use a constant - // as derived from http://spencermortensen.com/articles/bezier-circle - const a = ang2 === 1.5707963267948966 - ? 0.551915024494 - : ang2 === -1.5707963267948966 - ? -0.551915024494 - : 4 / 3 * Math.tan(ang2 / 4) - - const x1 = Math.cos(ang1) - const y1 = Math.sin(ang1) - const x2 = Math.cos(ang1 + ang2) - const y2 = Math.sin(ang1 + ang2) - - return [ - { - x: x1 - y1 * a, - y: y1 + x1 * a - }, - { - x: x2 + y2 * a, - y: y2 - x2 * a - }, - { - x: x2, - y: y2 - } - ] -} - -const vectorAngle = (ux, uy, vx, vy) => { - const sign = (ux * vy - uy * vx < 0) ? -1 : 1 - - let dot = ux * vx + uy * vy - - if (dot > 1) { - dot = 1 - } - - if (dot < -1) { - dot = -1 - } - - return sign * Math.acos(dot) -} - -const getArcCenter = ( - px, - py, - cx, - cy, - rx, - ry, - largeArcFlag, - sweepFlag, - sinphi, - cosphi, - pxp, - pyp -) => { - const rxsq = Math.pow(rx, 2) - const rysq = Math.pow(ry, 2) - const pxpsq = Math.pow(pxp, 2) - const pypsq = Math.pow(pyp, 2) - - let radicant = (rxsq * rysq) - (rxsq * pypsq) - (rysq * pxpsq) - - if (radicant < 0) { - radicant = 0 - } - - radicant /= (rxsq * pypsq) + (rysq * pxpsq) - radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1) - - const centerxp = radicant * rx / ry * pyp - const centeryp = radicant * -ry / rx * pxp - - const centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2 - const centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2 - - const vx1 = (pxp - centerxp) / rx - const vy1 = (pyp - centeryp) / ry - const vx2 = (-pxp - centerxp) / rx - const vy2 = (-pyp - centeryp) / ry - - let ang1 = vectorAngle(1, 0, vx1, vy1) - let ang2 = vectorAngle(vx1, vy1, vx2, vy2) - - if (sweepFlag === 0 && ang2 > 0) { - ang2 -= TAU - } - - if (sweepFlag === 1 && ang2 < 0) { - ang2 += TAU - } - - return [ centerx, centery, ang1, ang2 ] -} - -const arcToBezier = ({ - px, - py, - cx, - cy, - rx, - ry, - xAxisRotation = 0, - largeArcFlag = 0, - sweepFlag = 0 -}) => { - const curves = [] - - if (rx === 0 || ry === 0) { - return [] - } - - const sinphi = Math.sin(xAxisRotation * TAU / 360) - const cosphi = Math.cos(xAxisRotation * TAU / 360) - - const pxp = cosphi * (px - cx) / 2 + sinphi * (py - cy) / 2 - const pyp = -sinphi * (px - cx) / 2 + cosphi * (py - cy) / 2 - - if (pxp === 0 && pyp === 0) { - return [] - } - - rx = Math.abs(rx) - ry = Math.abs(ry) - - const lambda = - Math.pow(pxp, 2) / Math.pow(rx, 2) + - Math.pow(pyp, 2) / Math.pow(ry, 2) - - if (lambda > 1) { - rx *= Math.sqrt(lambda) - ry *= Math.sqrt(lambda) - } - - let [ centerx, centery, ang1, ang2 ] = getArcCenter( - px, - py, - cx, - cy, - rx, - ry, - largeArcFlag, - sweepFlag, - sinphi, - cosphi, - pxp, - pyp - ) - - // If 'ang2' == 90.0000000001, then `ratio` will evaluate to - // 1.0000000001. This causes `segments` to be greater than one, which is an - // unecessary split, and adds extra points to the bezier curve. To alleviate - // this issue, we round to 1.0 when the ratio is close to 1.0. - let ratio = Math.abs(ang2) / (TAU / 4) - if (Math.abs(1.0 - ratio) < 0.0000001) { - ratio = 1.0 - } - - const segments = Math.max(Math.ceil(ratio), 1) - - ang2 /= segments - - for (let i = 0; i < segments; i++) { - curves.push(approxUnitArc(ang1, ang2)) - ang1 += ang2 - } - - return curves.map(curve => { - const { x: x1, y: y1 } = mapToEllipse(curve[ 0 ], rx, ry, cosphi, sinphi, centerx, centery) - const { x: x2, y: y2 } = mapToEllipse(curve[ 1 ], rx, ry, cosphi, sinphi, centerx, centery) - const { x, y } = mapToEllipse(curve[ 2 ], rx, ry, cosphi, sinphi, centerx, centery) - - return { x1, y1, x2, y2, x, y } - }) -} - -export default arcToBezier diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/.eslintrc.json b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/.eslintrc.json deleted file mode 100644 index c50c250446ee6d06a87a590ecbf3905696b0871d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/.eslintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/.travis.yml deleted file mode 100644 index 4909f83cab4e49493ebb2c085ececeecfd41df8e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "6" diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/index.js b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/index.js deleted file mode 100644 index 45c02b54ed65f9a5915f9c05e0be7c337684a2c0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -var parse = require('parse-svg-path') -var abs = require('abs-svg-path') -var normalize = require('normalize-svg-path') -var isSvgPath = require('is-svg-path') - -module.exports = pathBounds - - -function pathBounds(path) { - // ES6 string tpl call - if (Array.isArray(path) && path.length === 1 && typeof path[0] === 'string') path = path[0] - - // svg path string - if (typeof path === 'string') { - if (!isSvgPath(path)) throw Error('String is not an SVG path.') - path = parse(path) - } - - if (!Array.isArray(path)) throw Error('Argument should be a string or an array of path segments.') - - path = abs(path) - path = normalize(path) - - if (!path.length) return [0, 0, 0, 0] - - var bounds = [Infinity, Infinity, -Infinity, -Infinity] - - for (var i = 0, l = path.length; i < l; i++) { - var points = path[i].slice(1) - - for (var j = 0; j < points.length; j += 2) { - if (points[j + 0] < bounds[0]) bounds[0] = points[j + 0] - if (points[j + 1] < bounds[1]) bounds[1] = points[j + 1] - if (points[j + 0] > bounds[2]) bounds[2] = points[j + 0] - if (points[j + 1] > bounds[3]) bounds[3] = points[j + 1] - } - } - - return bounds -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/.eslintrc.json b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/.eslintrc.json deleted file mode 100644 index c50c250446ee6d06a87a590ecbf3905696b0871d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/.eslintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/.travis.yml deleted file mode 100644 index 7a56d2a537a12c2dd7b68dfd2651eea4ed1577e9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "stable" diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/Readme.md b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/Readme.md deleted file mode 100644 index 1172c8fe4ca70c817403d177fcbe4400b896274c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/Readme.md +++ /dev/null @@ -1,26 +0,0 @@ -# normalize-svg-path [![build](https://travis-ci.org/jkroso/normalize-svg-path.svg?branch=master)](https://travis-ci.org/jkroso/normalize-svg-path) - - - Convert all segments in a path to curves. Usefull if you intend to animate one shape to another. By defining all segments with curves instead of a mix of lines, arcs, and curves tweening becomes much simpler. It could also help you rewrite your SVG code according to the principles of [narcissistic design](//vimeo.com/77199361). - -## Usage - -[![npm install normalize-svg-path](https://nodei.co/npm/normalize-svg-path.png?mini=true)](https://npmjs.org/package/normalize-svg-path/) - -```js -var parse = require('parse-svg-path') -var abs = require('abs-svg-path') -var normalize = require('normalize-svg-path') - -var segments = normalize(abs(parse('M0 0L10 10A10 10 0 0 0 20 20Z'))) -``` - -## API - -### normalize(path) - - Translate each segment in `path` to an equivalent cubic bézier curve. The input `path` must be [absolute](//github.com/jkroso/abs-svg-path). - -```js -normalize([['L',1,2]]) // => [['C',0,0,1,2,1,2]] -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js deleted file mode 100644 index a63a38444ca71806e8c907d9b7ceb0d61cb11587..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict' - -module.exports = normalize - -var arcToCurve = require('svg-arc-to-cubic-bezier') - -function normalize(path){ - // init state - var prev - var result = [] - var bezierX = 0 - var bezierY = 0 - var startX = 0 - var startY = 0 - var quadX = null - var quadY = null - var x = 0 - var y = 0 - - for (var i = 0, len = path.length; i < len; i++) { - var seg = path[i] - var command = seg[0] - - switch (command) { - case 'M': - startX = seg[1] - startY = seg[2] - break - case 'A': - var curves = arcToCurve({ - px: x, - py: y, - cx: seg[6], - cy: seg[7], - rx: seg[1], - ry: seg[2], - xAxisRotation: seg[3], - largeArcFlag: seg[4], - sweepFlag: seg[5] - }) - - // null-curves - if (!curves.length) continue - - for (var j = 0, c; j < curves.length; j++) { - c = curves[j] - seg = ['C', c.x1, c.y1, c.x2, c.y2, c.x, c.y] - if (j < curves.length - 1) result.push(seg) - } - - break - case 'S': - // default control point - var cx = x - var cy = y - if (prev == 'C' || prev == 'S') { - cx += cx - bezierX // reflect the previous command's control - cy += cy - bezierY // point relative to the current point - } - seg = ['C', cx, cy, seg[1], seg[2], seg[3], seg[4]] - break - case 'T': - if (prev == 'Q' || prev == 'T') { - quadX = x * 2 - quadX // as with 'S' reflect previous control point - quadY = y * 2 - quadY - } else { - quadX = x - quadY = y - } - seg = quadratic(x, y, quadX, quadY, seg[1], seg[2]) - break - case 'Q': - quadX = seg[1] - quadY = seg[2] - seg = quadratic(x, y, seg[1], seg[2], seg[3], seg[4]) - break - case 'L': - seg = line(x, y, seg[1], seg[2]) - break - case 'H': - seg = line(x, y, seg[1], y) - break - case 'V': - seg = line(x, y, x, seg[1]) - break - case 'Z': - seg = line(x, y, startX, startY) - break - } - - // update state - prev = command - x = seg[seg.length - 2] - y = seg[seg.length - 1] - if (seg.length > 4) { - bezierX = seg[seg.length - 4] - bezierY = seg[seg.length - 3] - } else { - bezierX = x - bezierY = y - } - result.push(seg) - } - - return result -} - -function line(x1, y1, x2, y2){ - return ['C', x1, y1, x2, y2, x2, y2] -} - -function quadratic(x1, y1, cx, cy, x2, y2){ - return [ - 'C', - x1/3 + (2/3) * cx, - y1/3 + (2/3) * cy, - x2/3 + (2/3) * cx, - y2/3 + (2/3) * cy, - x2, - y2 - ] -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.mjs b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.mjs deleted file mode 100644 index bed83625e82f7bd055b56c105b7470d38dce700f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.mjs +++ /dev/null @@ -1,118 +0,0 @@ -import arcToCurve from 'svg-arc-to-cubic-bezier' - -export default function normalize(path){ - // init state - var prev - var result = [] - var bezierX = 0 - var bezierY = 0 - var startX = 0 - var startY = 0 - var quadX = null - var quadY = null - var x = 0 - var y = 0 - - for (var i = 0, len = path.length; i < len; i++) { - var seg = path[i] - var command = seg[0] - - switch (command) { - case 'M': - startX = seg[1] - startY = seg[2] - break - case 'A': - var curves = arcToCurve({ - px: x, - py: y, - cx: seg[6], - cy: seg[7], - rx: seg[1], - ry: seg[2], - xAxisRotation: seg[3], - largeArcFlag: seg[4], - sweepFlag: seg[5] - }) - - // null-curves - if (!curves.length) continue - - for (var j = 0, c; j < curves.length; j++) { - c = curves[j] - seg = ['C', c.x1, c.y1, c.x2, c.y2, c.x, c.y] - if (j < curves.length - 1) result.push(seg) - } - - break - case 'S': - // default control point - var cx = x - var cy = y - if (prev == 'C' || prev == 'S') { - cx += cx - bezierX // reflect the previous command's control - cy += cy - bezierY // point relative to the current point - } - seg = ['C', cx, cy, seg[1], seg[2], seg[3], seg[4]] - break - case 'T': - if (prev == 'Q' || prev == 'T') { - quadX = x * 2 - quadX // as with 'S' reflect previous control point - quadY = y * 2 - quadY - } else { - quadX = x - quadY = y - } - seg = quadratic(x, y, quadX, quadY, seg[1], seg[2]) - break - case 'Q': - quadX = seg[1] - quadY = seg[2] - seg = quadratic(x, y, seg[1], seg[2], seg[3], seg[4]) - break - case 'L': - seg = line(x, y, seg[1], seg[2]) - break - case 'H': - seg = line(x, y, seg[1], y) - break - case 'V': - seg = line(x, y, x, seg[1]) - break - case 'Z': - seg = line(x, y, startX, startY) - break - } - - // update state - prev = command - x = seg[seg.length - 2] - y = seg[seg.length - 1] - if (seg.length > 4) { - bezierX = seg[seg.length - 4] - bezierY = seg[seg.length - 3] - } else { - bezierX = x - bezierY = y - } - result.push(seg) - } - - return result -} - -function line(x1, y1, x2, y2){ - return ['C', x1, y1, x2, y2, x2, y2] -} - -function quadratic(x1, y1, cx, cy, x2, y2){ - return [ - 'C', - x1/3 + (2/3) * cx, - y1/3 + (2/3) * cy, - x2/3 + (2/3) * cx, - y2/3 + (2/3) * cy, - x2, - y2 - ] -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/license.md b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/license.md deleted file mode 100644 index ff6a5535383e5cc569a4f50eea2d343d6377f619..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/license.md +++ /dev/null @@ -1,25 +0,0 @@ - -The MIT License - -Copyright © 2008-2013 Dmitry Baranovskiy (http://raphaeljs.com) -Copyright © 2008-2013 Sencha Labs (http://sencha.com) -Copyright © 2013 Jake Rosoman - -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/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/package.json b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/package.json deleted file mode 100644 index cef6e369c53fa0dda40b13f53f305868ebb891d9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "normalize-svg-path", - "version": "1.1.0", - "description": "Convert all segments in a path to curves", - "keywords": [ - "svg", - "path", - "normalize" - ], - "module": "./index.mjs", - "main": "./index.js", - "exports": { - "require": "./index.js", - "import": "./index.mjs" - }, - "dependencies": { - "svg-arc-to-cubic-bezier": "^3.0.0" - }, - "devDependencies": { - "parse-svg-path": "^0.1.2", - "tape": "^4.7.0" - }, - "scripts": { - "test": "node test.mjs" - }, - "repository": "git://github.com/jkroso/normalize-svg-path.git", - "bugs": "https://github.com/jkroso/normalize-svg-path/issues", - "author": "Jake Rosoman", - "license": "MIT" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/test.mjs b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/test.mjs deleted file mode 100644 index b69c5105223b6708452a0406768f09d04b2fa681..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/node_modules/normalize-svg-path/test.mjs +++ /dev/null @@ -1,131 +0,0 @@ -import t from 'tape' -import normalize from './index.mjs' -import parse from 'parse-svg-path' - - -t('line-to', t => { - t.deepEqual( - normalize(parse('L100 100')), - parse('C0,0 100,100 100,100') - ) - - t.deepEqual( - normalize(parse('L50 50 100 0')), - parse('C0,0 50,50 50,50 C50,50 100,0 100,0') - ) - - t.deepEqual( - normalize(parse('H50 100')), - parse('C0,0 50,0 50,0 C50,0 100,0 100,0') - ) - - t.deepEqual( - normalize(parse('V50 100')), - parse('C0,0 0,50 0,50 C0,50 0,100 0,100') - ) - - t.end() -}) - -t('curve-to', t => { - t.deepEqual( - normalize(parse('M10 150 C10 10 150 10 150 150')), - parse('M10,150C10,10,150,10,150,150') - ) - - t.deepEqual( - normalize(parse('M0 120 Q60 0 120 120')), - parse('M0,120C40,40,80,40,120,120') - ) - - t.deepEqual( - normalize(parse('M10 80 C10 10 75 10 75 80 S150 150 150 80')), - parse('M10,80C10,10,75,10,75,80C75,150,150,150,150,80') - ) - - t.deepEqual( - normalize(parse('M0 60 Q30 0 60 60 T120 60')), - parse('M0,60C20,20,40,20,60,60C80,100,100,100,120,60') - ) - - t.deepEqual( - normalize(parse('M30 30 Q50 50 84 50 S124 73 107 92 T127 122')), - parse('M30,30C43.33333333333333,43.33333333333333,61.33333333333333,50,84,50C84,50,124,73,107,92C107,92,113.66666666666666,102,127,122') - ) - - t.end() -}) - -t('close-path', t => { - t.deepEqual( - normalize(parse('L100 0 100 100Z')), - parse('C0,0,100,0,100,0C100,0,100,100,100,100C100,100,0,0,0,0') - ) - - t.end() -}) - - - - -t('arc-to', t => { - t.deepEqual( - r(normalize(parse('M10 80 A150 150 0 0 0 150 80'))), - r(parse('M 10 80C 53.80473794537901 103.1133445143787 106.19526205462094 103.1133445143787 149.99999999999997 80.00000000000003')) - ) - - // half circle clockwise - t.deepEqual( - r(normalize(parse('M10 80 A50 50 0 0 1 150 80'))), - r(parse('M 10 80C 10 41.340067511844474 41.34006751184445 10.000000000000014 79.99999999999999 10C 118.65993248815552 10 150 41.34006751184445 150 79.99999999999999')) - ) - - // half circle anticlockwise - t.deepEqual( - r(normalize(parse('M10 80 A50 50 0 1 0 150 80'))), - r(parse('M 10 80C 10.000000000000014 118.65993248815553 41.340067511844474 150 80 150C 118.65993248815553 150 150 118.65993248815553 150 80')) - ) - - // circle - t.deepEqual( - r(normalize(parse('M10 80 A50 50 0 0 1 150 80 A50 50 0 0 1 10 80'))), - r(parse('M 10 80C 10 41.340067511844474 41.34006751184445 10.000000000000014 79.99999999999999 10C 118.65993248815552 10 150 41.34006751184445 150 79.99999999999999C 150 118.65993248815553 118.65993248815553 150 80 150C 41.340067511844474 150 10.000000000000014 118.65993248815553 10 80.00000000000001')) - ) - - t.deepEqual( - normalize(parse('M10 80 A150 75 30 0 0 150 80')), - parse('M 10 80C 72.04149682761658 108.21761044823509 129.85079028483736 108.21761044823509 150 79.99999999999999') - ) - - // the null curve - t.deepEqual( - normalize(parse('M10 80 A50 50 0 0 1 10 80')), - parse('M10,80') - ) - - t.end() -}) - -function r(arr) { return arr.map(function (arr) { return [arr[0]].concat(arr.slice(1).map(round)) }) } -function round(v) { return Math.round(v) } - -//show parsed curve in the doc -function show(src) { - let path = src.map(seg => seg.join(' ')).join('') - - let el = document.body.appendChild(document.createElement('div')) - let svgNS = 'http://www.w3.org/2000/svg' - - el.innerHTML = `` - - let svg = el.firstChild - - let pathEl = svg.appendChild(document.createElementNS(svgNS, 'path')) - pathEl.setAttribute('d', path) - - pathEl.style.strokeWidth = '2px'; - pathEl.style.stroke = 'black'; - pathEl.style.fill = 'transparent'; - - return src -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/package.json b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/package.json deleted file mode 100644 index c30ac95fb4b8807dbe1054310490494802806079..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "svg-path-bounds", - "version": "1.0.2", - "description": "Get bounding box of an svg path data", - "main": "index.js", - "scripts": { - "test": "node test" - }, - "keywords": [ - "svg", - "boundaries", - "normalize", - "coordinate", - "range", - "clip", - "mask", - "svg path", - "path" - ], - "author": "Dima Yv ", - "license": "MIT", - "dependencies": { - "abs-svg-path": "^0.1.1", - "is-svg-path": "^1.0.1", - "normalize-svg-path": "^1.0.0", - "parse-svg-path": "^0.1.2" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dfcreative/svg-path-bounds.git" - }, - "bugs": { - "url": "https://github.com/dfcreative/svg-path-bounds/issues" - }, - "homepage": "https://github.com/dfcreative/svg-path-bounds#readme", - "devDependencies": { - "tape": "^4.7.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/readme.md b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/readme.md deleted file mode 100644 index c48ec50bdf170ca7fde92c30ccae8aac71f69b40..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# svg-path-bounds [![Build Status](https://travis-ci.org/dfcreative/svg-path-bounds.svg?branch=master)](https://travis-ci.org/dy/svg-path-bounds) - -Retrieve bounding box from svg path data. - -## Usage - -[![npm install svg-path-bounds](https://nodei.co/npm/svg-path-bounds.png?mini=true)](https://npmjs.org/package/svg-path-bounds/) - -```js -const getBounds = require('svg-path-bounds') - -let [left, top, right, bottom] = getBounds('M0 0L10 10 20 0Z') // [0, 0, 20, 10] -``` - -## API - -### bounds = getBounds(path|segments) - -Calculate bounding box for [svg path data](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d) string or [parsed path segments](https://www.npmjs.com/package/parse-svg-path) array. The box is detected by controlling points, not the real path. - -## Related - -* [parse-svg-path](https://npmjs.org/parse-svg-path) - return svg path data segments -* [abs-svg-path](https://npmjs.org/abs-svg-path) - convert svg path to absolute values -* [rel-svg-path](https://npmjs.org/abs-svg-path) - convert svg path to relative values -* [normalize-svg-path](https://npmjs.org/normalize-svg-path) - make path consist of only bezier curve segments -* [draw-svg-path](https://npmjs.org/draw-svg-path) - create canvas shape based on svg path data -* [normalize-svg-coords](https://npmjs.org/normalize-svg-coords) - bring svg path coordinates to any linear range - -## Similar - -* [svg-boundings](https://www.npmjs.com/package/svg-boundings) -* [svg-path-bounding-box](https://github.com/icons8/svg-path-bounding-box) - -## License - -MIT © Dima Yv diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/test.js b/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/test.js deleted file mode 100644 index 05a4501162ebae2036f339e93b438d07745f22b6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-bounds/test.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -const b = require('./') -const t = require('tape') - -t('a', t => { - t.deepEqual(b`M300,200 h-150 a150,150 0 1,0 150,-150 z`, [150, 50, 450, 350]) - - t.deepEqual(new Float32Array(b`M600,350 l 50,-25 a25,25 -30 0,1 50,-25 l 50,-25 a25,50 -30 0,1 50,-25 l 50,-25 a25,75 -30 0,1 50,-25 l 50,-25 a25,100 -30 0,1 50,-25 l 50,-25 - `), new Float32Array([600, 58.73647175569799, 1050, 350])) - - t.deepEqual(b`M100,200 C100,100 250,100 250,200 S400,300 400,200`, [100, 100, 400, 300]) - - t.deepEqual(b`M0 1665q0 38 29 64 27 27 65 27h627q41 0 72.5 30t31.5 73-31.5 74-72.5 31-73-32q-29-26-65-26-38 0-64 25.5t-26 63.5 26 64q85 85 202 85 118 0 201-83.5t83-201.5-83-202-201-84H94q-38 0-66 27.5T0 1665zm0-321q0 35 29 61 27 27 65 27h1170q118 0 201.5-83.5T1549 1147t-83-200-202-82q-121 0-201 81-25 26-25 65t24.5 63.5 63.5 24.5q38 0 66-25 30-30 72-30t72.5 30 30.5 73-30.5 74-72.5 31H94q-38 0-66 27.5T0 1344zm283-251q0 13 18 13h153q11 0 21-15 36-87 111.5-143.5T757 884l56-8q20 0 20-18l7-55q17-173 146-289t304-116q176 0 305.5 115.5T1743 803l7 62q0 19 19 19h174q144 0 245.5 100.5T2290 1227q0 143-101.5 244.5T1943 1573h-736q-20 0-20 19v146q0 18 20 18h736q143 0 264.5-71t192-193 70.5-265q0-118-45-216 121-159 121-353 0-150-75.5-279T2266 174.5 1987 99q-247 0-412 185-128-65-285-65-225 0-398 139.5T672 715q-136 32-240.5 131T286 1080v4q-3 5-3 9zM1155-83q0 37 29 64l65 69q26 26 65 26 40 0 65.5-24.5T1405-13q0-38-24-64l-70-69q-25-28-63-28t-65.5 27-27.5 64zm568 470q115-109 264-109 155 0 267.5 112T2367 658q0 104-55 195-153-153-369-153h-36q-38-173-184-313zm173-559q0 37 26.5 62.5T1987-84t65-25.5 27-62.5v-218q0-38-27-65t-65-27-64.5 27-26.5 65v218zm592 242q0 39 24 64 27 27 65 27.5t61-27.5l156-153q27-27 27-65 0-37-27-64t-65-27-64 26L2512 8q-24 25-24 62zm82 1262q0 37 27 64l68 69q32 26 66 26 31 0 63-26 27-27 27-64 0-35-27-65l-68-69q-26-26-62-26-40 0-67 26.5t-27 64.5zm161-674q0 38 27 63 24 28 61 28h216q38 0 65-27t27-64-27.5-64.5T3035 566h-216q-38 0-63 27t-25 65z`, [0, -482, 3127, 2144]) - - t.deepEqual(b`M0 753q0-150 96.5-267T343 334q36-178 181.5-293.5T857-75q180 0 320.5 110.5T1361 324h30q121 0 226 52t167.5 142.5T1847 715q0 180-138 305 0 56-34.5 128.5T1582 1280t-117 72q-20 99-92 167t-174 91q48 48 48 113 0 79-56 134.5t-135 55.5q-78 0-134-55.5T866 1723q0-9 4.5-28t4.5-29h-9q-94 0-161-67.5T638 1437q0-37 39-113-78-41-125-134H419q-175-15-297-138.5T0 753z`, [0, -75, 1847, 1913]) - - t.deepEqual(b`M0 1226q0 178 106 318t273 187l-68 179q-8 23 15 23h226l-111 447h30l423-600q6-7 1.5-15t-15.5-8H648l264-492q11-23-15-23H583q-14 0-24 15l-114 306q-114-28-188.5-122T182 1226q0-133 89.5-230.5T495 882l57-4q19 0 19-19l8-57q11-113 74-206.5T815.5 449t214.5-53q173 0 303 117t148 289l8 60q0 20 18 20h173q142 0 245.5 102t103.5 242q0 138-96 239.5T1701 1574q-21 0-21 19v143q0 18 21 18 139-4 256-76.5t184-192.5 67-259q0-117-45-214 125-148 125-353 0-113-44.5-216T2124 265t-178-119.5-216-44.5q-247 0-412 185-129-69-288-69-225 0-400 139.5T406 714q-176 41-291 184.5T0 1226zm846 1054q0 26 15.5 49t48.5 33q3 0 8.5 1t10 1.5 8.5.5q67 0 85-64l259-948q10-37-7-68.5t-52-42.5q-37-11-69.5 6.5T1110 1302l-261 949q-3 27-3 29zm442-324q0 64 66 85 27 3 28 3 18 0 37-8 32-14 45-59l175-624q10-37-8-68.5t-54-42.5q-37-11-69 6.5t-42 53.5l-173 628q-5 23-5 26zm178-1568q108-102 264-102 155 0 265 109t110 264q0 101-54 197-154-154-371-154h-34q-45-183-180-314z`, [0, 101, 2288, 2380]) - - t.end() -}) - diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/.eslintrc.json b/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/.eslintrc.json deleted file mode 100644 index c50c250446ee6d06a87a590ecbf3905696b0871d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/.eslintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/index.js b/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/index.js deleted file mode 100644 index 22ce518a6051010eba58efad1eceaa7296a821b4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/index.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict' - -var pathBounds = require('svg-path-bounds') -var parsePath = require('parse-svg-path') -var drawPath = require('draw-svg-path') -var isSvgPath = require('is-svg-path') -var bitmapSdf = require('bitmap-sdf') - -var canvas = document.createElement('canvas') -var ctx = canvas.getContext('2d') - - -module.exports = pathSdf - - -function pathSdf (path, options) { - if (!isSvgPath(path)) throw Error('Argument should be valid svg path string') - - if (!options) options = {} - - var w, h - if (options.shape) { - w = options.shape[0] - h = options.shape[1] - } - else { - w = canvas.width = options.w || options.width || 200 - h = canvas.height = options.h || options.height || 200 - } - var size = Math.min(w, h) - - var stroke = options.stroke || 0 - - var viewbox = options.viewbox || options.viewBox || pathBounds(path) - var scale = [w / (viewbox[2] - viewbox[0]), h / (viewbox[3] - viewbox[1])] - var maxScale = Math.min(scale[0] || 0, scale[1] || 0) / 2 - - //clear ctx - ctx.fillStyle = 'black' - ctx.fillRect(0, 0, w, h) - - ctx.fillStyle = 'white' - - if (stroke) { - if (typeof stroke != 'number') stroke = 1 - if (stroke > 0) { - ctx.strokeStyle = 'white' - } - else { - ctx.strokeStyle = 'black' - } - - ctx.lineWidth = Math.abs(stroke) - } - - ctx.translate(w * .5, h * .5) - ctx.scale(maxScale, maxScale) - - //if canvas svg paths api is available - if (isPath2DSupported()) { - var path2d = new Path2D(path) - ctx.fill(path2d) - stroke && ctx.stroke(path2d) - } - //fallback to bezier-curves - else { - var segments = parsePath(path) - drawPath(ctx, segments) - ctx.fill() - stroke && ctx.stroke() - } - - ctx.setTransform(1, 0, 0, 1, 0, 0); - - var data = bitmapSdf(ctx, { - cutoff: options.cutoff != null ? options.cutoff : .5, - radius: options.radius != null ? options.radius : size * .5 - }) - - return data -} - -var path2DSupported - -function isPath2DSupported () { - if (path2DSupported != null) return path2DSupported - - var ctx = document.createElement('canvas').getContext('2d') - ctx.canvas.width = ctx.canvas.height = 1 - - if (!window.Path2D) return path2DSupported = false - - var path = new Path2D('M0,0h1v1h-1v-1Z') - - ctx.fillStyle = 'black' - ctx.fill(path) - - var idata = ctx.getImageData(0,0,1,1) - - return path2DSupported = idata && idata.data && idata.data[3] === 255 -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/package.json b/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/package.json deleted file mode 100644 index b201fea6a2170ba7dffb2a3ff5cfc9639add32f3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "svg-path-sdf", - "version": "1.1.3", - "description": "Get signed distance field for a svg path", - "main": "index.js", - "scripts": { - "test": "budo test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dy/svg-path-sdf.git" - }, - "keywords": [ - "sdf", - "svg", - "path", - "signed", - "distance", - "webgl", - "gl", - "stackgl" - ], - "author": "Dima Yv ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dy/svg-path-sdf/issues" - }, - "homepage": "https://github.com/dy/svg-path-sdf#readme", - "dependencies": { - "bitmap-sdf": "^1.0.0", - "draw-svg-path": "^1.0.0", - "is-svg-path": "^1.0.1", - "parse-svg-path": "^0.1.2", - "svg-path-bounds": "^1.0.1" - }, - "devDependencies": { - "bubleify": "^1.2.0", - "enable-mobile": "^1.0.7", - "insert-styles": "^1.2.1", - "round-to": "^2.0.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/readme.md b/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/readme.md deleted file mode 100644 index b78e010ac7921c544beb8c0bf8209bd5ec07ef85..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/readme.md +++ /dev/null @@ -1,35 +0,0 @@ -# svg-path-sdf [![experimental](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) - -Create signed distance field for an svg path data. - -![svg-path-sdf](https://github.com/dy/svg-path-sdf/blob/master/preview.png?raw=true) - -## Usage - -[![npm install svg-path-sdf](https://nodei.co/npm/svg-path-sdf.png?mini=true)](https://npmjs.org/package/svg-path-sdf/) - -```js -let pathSdf = require('svg-path-sdf') - -let arr = pathSdf('M40,0A40,40 0 1,1 0,-40A40,40 0 0,1 40,0Z', { - width: 200, - height: 200 -}) -``` - -`arr` has `200×200` elements with value from `0..1` range, corresponding to distance. The path is drawn at the center of the sdf fitting to the minimum side. - -## distances = pathSdf(path, options|shape?) - -Option | Meaning ----|--- -`width`,`w`, `height`,`h` or `shape` | Output sdf size in px, defaults to `200×200`. -`cutoff`, `radius` | SDF parameters for [bitmap-sdf](https://github.com/dy/bitmap-sdf), by default detected from shape to fit min side. -`viewBox` | View box for the path data. If not defined, it is detected as path bounds via [svg-path-bounds](https://github.com/dy/svg-path-bounds). -`stroke` | Whether to stroke shape. Positive number will stroke outside the amount of pixels, negative number will stroke inside, `0`-ish will disable stroke. - -## License - -(c) 2017 Dima Yv. MIT License - -Development supported by plot.ly. diff --git a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/test.js b/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/test.js deleted file mode 100644 index 64f5db08c4b0e6e3114086d4ae2d8dbe1244af6d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/svg-path-sdf/test.js +++ /dev/null @@ -1,407 +0,0 @@ -'use strict' - -require('enable-mobile') -require('insert-styles')(` - canvas { - display: block; - float: left; - } -`) -let sdf = require('./') - -// polyfills -Number.isInteger = Number.isInteger || function(value) { - return typeof value === 'number' && - isFinite(value) && - Math.floor(value) === value; -} -Math.sign = Math.sign || function(x) { -return ((x > 0) - (x < 0)) || +x; -} - -let roundn = require('round-to') - - -let shapes = { - circle: function(r) { - var rs = roundn(r, 2); - return 'M' + rs + ',0A' + rs + ',' + rs + ' 0 1,1 0,-' + rs + - 'A' + rs + ',' + rs + ' 0 0,1 ' + rs + ',0Z'; - }, - - square: function(r) { - var rs = roundn(r, 2); - return 'M' + rs + ',' + rs + 'H-' + rs + 'V-' + rs + 'H' + rs + 'Z'; - }, - - diamond: function(r) { - var rd = roundn(r * 1.3, 2); - return 'M' + rd + ',0L0,' + rd + 'L-' + rd + ',0L0,-' + rd + 'Z'; - }, - - cross: function(r) { - var rc = roundn(r * 0.4, 2), - rc2 = roundn(r * 1.2, 2); - return 'M' + rc2 + ',' + rc + 'H' + rc + 'V' + rc2 + 'H-' + rc + - 'V' + rc + 'H-' + rc2 + 'V-' + rc + 'H-' + rc + 'V-' + rc2 + - 'H' + rc + 'V-' + rc + 'H' + rc2 + 'Z'; - }, - - x: function(r) { - var rx = roundn(r * 0.8 / Math.sqrt(2), 2), - ne = 'l' + rx + ',' + rx, - se = 'l' + rx + ',-' + rx, - sw = 'l-' + rx + ',-' + rx, - nw = 'l-' + rx + ',' + rx; - return 'M0,' + rx + ne + se + sw + se + sw + nw + sw + nw + ne + nw + ne + 'Z'; - }, - - 'triangle-up': function(r) { - var rt = roundn(r * 2 / Math.sqrt(3), 2), - r2 = roundn(r / 2, 2), - rs = roundn(r, 2); - return 'M-' + rt + ',' + r2 + 'H' + rt + 'L0,-' + rs + 'Z'; - }, - - 'triangle-down': function(r) { - var rt = roundn(r * 2 / Math.sqrt(3), 2), - r2 = roundn(r / 2, 2), - rs = roundn(r, 2); - return 'M-' + rt + ',-' + r2 + 'H' + rt + 'L0,' + rs + 'Z'; - }, - - 'triangle-left': function(r) { - var rt = roundn(r * 2 / Math.sqrt(3), 2), - r2 = roundn(r / 2, 2), - rs = roundn(r, 2); - return 'M' + r2 + ',-' + rt + 'V' + rt + 'L-' + rs + ',0Z'; - }, - - 'triangle-right': function(r) { - var rt = roundn(r * 2 / Math.sqrt(3), 2), - r2 = roundn(r / 2, 2), - rs = roundn(r, 2); - return 'M-' + r2 + ',-' + rt + 'V' + rt + 'L' + rs + ',0Z'; - }, - - 'triangle-ne': function(r) { - var r1 = roundn(r * 0.6, 2), - r2 = roundn(r * 1.2, 2); - return 'M-' + r2 + ',-' + r1 + 'H' + r1 + 'V' + r2 + 'Z'; - }, - - 'triangle-se': function(r) { - var r1 = roundn(r * 0.6, 2), - r2 = roundn(r * 1.2, 2); - return 'M' + r1 + ',-' + r2 + 'V' + r1 + 'H-' + r2 + 'Z'; - }, - - 'triangle-sw': function(r) { - var r1 = roundn(r * 0.6, 2), - r2 = roundn(r * 1.2, 2); - return 'M' + r2 + ',' + r1 + 'H-' + r1 + 'V-' + r2 + 'Z'; - }, - - 'triangle-nw': function(r) { - var r1 = roundn(r * 0.6, 2), - r2 = roundn(r * 1.2, 2); - return 'M-' + r1 + ',' + r2 + 'V-' + r1 + 'H' + r2 + 'Z'; - }, - - pentagon: function(r) { - var x1 = roundn(r * 0.951, 2), - x2 = roundn(r * 0.588, 2), - y0 = roundn(-r, 2), - y1 = roundn(r * -0.309, 2), - y2 = roundn(r * 0.809, 2); - return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2 + 'H-' + x2 + - 'L-' + x1 + ',' + y1 + 'L0,' + y0 + 'Z'; - }, - - hexagon: function(r) { - var y0 = roundn(r, 2), - y1 = roundn(r / 2, 2), - x = roundn(r * Math.sqrt(3) / 2, 2); - return 'M' + x + ',-' + y1 + 'V' + y1 + 'L0,' + y0 + - 'L-' + x + ',' + y1 + 'V-' + y1 + 'L0,-' + y0 + 'Z'; - }, - - hexagon2: function(r) { - var x0 = roundn(r, 2), - x1 = roundn(r / 2, 2), - y = roundn(r * Math.sqrt(3) / 2, 2); - return 'M-' + x1 + ',' + y + 'H' + x1 + 'L' + x0 + - ',0L' + x1 + ',-' + y + 'H-' + x1 + 'L-' + x0 + ',0Z'; - }, - - octagon: function(r) { - var a = roundn(r * 0.924, 2), - b = roundn(r * 0.383, 2); - return 'M-' + b + ',-' + a + 'H' + b + 'L' + a + ',-' + b + 'V' + b + - 'L' + b + ',' + a + 'H-' + b + 'L-' + a + ',' + b + 'V-' + b + 'Z'; - }, - - star: function(r) { - var rs = r * 1.4, - x1 = roundn(rs * 0.225, 2), - x2 = roundn(rs * 0.951, 2), - x3 = roundn(rs * 0.363, 2), - x4 = roundn(rs * 0.588, 2), - y0 = roundn(-rs, 2), - y1 = roundn(rs * -0.309, 2), - y3 = roundn(rs * 0.118, 2), - y4 = roundn(rs * 0.809, 2), - y5 = roundn(rs * 0.382, 2); - return 'M' + x1 + ',' + y1 + 'H' + x2 + 'L' + x3 + ',' + y3 + - 'L' + x4 + ',' + y4 + 'L0,' + y5 + 'L-' + x4 + ',' + y4 + - 'L-' + x3 + ',' + y3 + 'L-' + x2 + ',' + y1 + 'H-' + x1 + - 'L0,' + y0 + 'Z'; - }, - - hexagram: function(r) { - var y = roundn(r * 0.66, 2), - x1 = roundn(r * 0.38, 2), - x2 = roundn(r * 0.76, 2); - return 'M-' + x2 + ',0l-' + x1 + ',-' + y + 'h' + x2 + - 'l' + x1 + ',-' + y + 'l' + x1 + ',' + y + 'h' + x2 + - 'l-' + x1 + ',' + y + 'l' + x1 + ',' + y + 'h-' + x2 + - 'l-' + x1 + ',' + y + 'l-' + x1 + ',-' + y + 'h-' + x2 + 'Z'; - }, - - 'star-triangle-up': function(r) { - var x = roundn(r * Math.sqrt(3) * 0.8, 2), - y1 = roundn(r * 0.8, 2), - y2 = roundn(r * 1.6, 2), - rc = roundn(r * 4, 2), - aPart = 'A ' + rc + ',' + rc + ' 0 0 1 '; - return 'M-' + x + ',' + y1 + aPart + x + ',' + y1 + - aPart + '0,-' + y2 + aPart + '-' + x + ',' + y1 + 'Z'; - }, - - 'star-triangle-down': function(r) { - var x = roundn(r * Math.sqrt(3) * 0.8, 2), - y1 = roundn(r * 0.8, 2), - y2 = roundn(r * 1.6, 2), - rc = roundn(r * 4, 2), - aPart = 'A ' + rc + ',' + rc + ' 0 0 1 '; - return 'M' + x + ',-' + y1 + aPart + '-' + x + ',-' + y1 + - aPart + '0,' + y2 + aPart + x + ',-' + y1 + 'Z'; - }, - - 'star-square': function(r) { - var rp = roundn(r * 1.1, 2), - rc = roundn(r * 2, 2), - aPart = 'A ' + rc + ',' + rc + ' 0 0 1 '; - return 'M-' + rp + ',-' + rp + aPart + '-' + rp + ',' + rp + - aPart + rp + ',' + rp + aPart + rp + ',-' + rp + - aPart + '-' + rp + ',-' + rp + 'Z'; - }, - - 'star-diamond': function(r) { - var rp = roundn(r * 1.4, 2), - rc = roundn(r * 1.9, 2), - aPart = 'A ' + rc + ',' + rc + ' 0 0 1 '; - return 'M-' + rp + ',0' + aPart + '0,' + rp + - aPart + rp + ',0' + aPart + '0,-' + rp + - aPart + '-' + rp + ',0' + 'Z'; - }, - - 'diamond-tall': function(r) { - var x = roundn(r * 0.7, 2), - y = roundn(r * 1.4, 2); - return 'M0,' + y + 'L' + x + ',0L0,-' + y + 'L-' + x + ',0Z'; - }, - - 'diamond-wide': function(r) { - var x = roundn(r * 1.4, 2), - y = roundn(r * 0.7, 2); - return 'M0,' + y + 'L' + x + ',0L0,-' + y + 'L-' + x + ',0Z'; - }, - - hourglass: function(r) { - var rs = roundn(r, 2); - return 'M' + rs + ',' + rs + 'H-' + rs + 'L' + rs + ',-' + rs + 'H-' + rs + 'Z'; - }, - - bowtie: function(r) { - var rs = roundn(r, 2); - return 'M' + rs + ',' + rs + 'V-' + rs + 'L-' + rs + ',' + rs + 'V-' + rs + 'Z'; - }, - - 'circle-cross': function(r) { - var rs = roundn(r, 2); - return 'M0,' + rs + 'V-' + rs + 'M' + rs + ',0H-' + rs + - 'M' + rs + ',0A' + rs + ',' + rs + ' 0 1,1 0,-' + rs + - 'A' + rs + ',' + rs + ' 0 0,1 ' + rs + ',0Z'; - }, - - 'circle-x': function(r) { - var rs = roundn(r, 2), - rc = roundn(r / Math.sqrt(2), 2); - return 'M' + rc + ',' + rc + 'L-' + rc + ',-' + rc + - 'M' + rc + ',-' + rc + 'L-' + rc + ',' + rc + - 'M' + rs + ',0A' + rs + ',' + rs + ' 0 1,1 0,-' + rs + - 'A' + rs + ',' + rs + ' 0 0,1 ' + rs + ',0Z'; - }, - - 'square-cross': function(r) { - var rs = roundn(r, 2); - return 'M0,' + rs + 'V-' + rs + 'M' + rs + ',0H-' + rs + - 'M' + rs + ',' + rs + 'H-' + rs + 'V-' + rs + 'H' + rs + 'Z'; - }, - - 'square-x': function(r) { - var rs = roundn(r, 2); - return 'M' + rs + ',' + rs + 'L-' + rs + ',-' + rs + - 'M' + rs + ',-' + rs + 'L-' + rs + ',' + rs + - 'M' + rs + ',' + rs + 'H-' + rs + 'V-' + rs + 'H' + rs + 'Z'; - }, - - 'diamond-cross': function(r) { - var rd = roundn(r * 1.3, 2); - return 'M' + rd + ',0L0,' + rd + 'L-' + rd + ',0L0,-' + rd + 'Z' + - 'M0,-' + rd + 'V' + rd + 'M-' + rd + ',0H' + rd; - }, - - 'diamond-x': function(r) { - var rd = roundn(r * 1.3, 2), - r2 = roundn(r * 0.65, 2); - return 'M' + rd + ',0L0,' + rd + 'L-' + rd + ',0L0,-' + rd + 'Z' + - 'M-' + r2 + ',-' + r2 + 'L' + r2 + ',' + r2 + - 'M-' + r2 + ',' + r2 + 'L' + r2 + ',-' + r2; - }, - - 'cross-thin': function(r) { - var rc = roundn(r * 1.4, 2); - return 'M0,' + rc + 'V-' + rc + 'M' + rc + ',0H-' + rc; - }, - - 'x-thin': function(r) { - var rx = roundn(r, 2); - return 'M' + rx + ',' + rx + 'L-' + rx + ',-' + rx + - 'M' + rx + ',-' + rx + 'L-' + rx + ',' + rx; - }, - - asterisk: function(r) { - var rc = roundn(r * 1.2, 2); - var rs = roundn(r * 0.85, 2); - return 'M0,' + rc + 'V-' + rc + 'M' + rc + ',0H-' + rc + - 'M' + rs + ',' + rs + 'L-' + rs + ',-' + rs + - 'M' + rs + ',-' + rs + 'L-' + rs + ',' + rs; - }, - - hash: function(r) { - var r1 = roundn(r / 2, 2), - r2 = roundn(r, 2); - return 'M' + r1 + ',' + r2 + 'V-' + r2 + - 'm-' + r2 + ',0V' + r2 + - 'M' + r2 + ',' + r1 + 'H-' + r2 + - 'm0,-' + r2 + 'H' + r2; - }, - - 'y-up': function(r) { - var x = roundn(r * 1.2, 2), - y0 = roundn(r * 1.6, 2), - y1 = roundn(r * 0.8, 2); - return 'M-' + x + ',' + y1 + 'L0,0M' + x + ',' + y1 + 'L0,0M0,-' + y0 + 'L0,0'; - }, - - 'y-down': function(r) { - var x = roundn(r * 1.2, 2), - y0 = roundn(r * 1.6, 2), - y1 = roundn(r * 0.8, 2); - return 'M-' + x + ',-' + y1 + 'L0,0M' + x + ',-' + y1 + 'L0,0M0,' + y0 + 'L0,0'; - }, - - 'y-left': function(r) { - var y = roundn(r * 1.2, 2), - x0 = roundn(r * 1.6, 2), - x1 = roundn(r * 0.8, 2); - return 'M' + x1 + ',' + y + 'L0,0M' + x1 + ',-' + y + 'L0,0M-' + x0 + ',0L0,0'; - }, - - 'y-right': function(r) { - var y = roundn(r * 1.2, 2), - x0 = roundn(r * 1.6, 2), - x1 = roundn(r * 0.8, 2); - return 'M-' + x1 + ',' + y + 'L0,0M-' + x1 + ',-' + y + 'L0,0M' + x0 + ',0L0,0'; - }, - - 'line-ew': function(r) { - var rc = roundn(r * 1.4, 2); - return 'M' + rc + ',0H-' + rc; - }, - - 'line-ns': function(r) { - var rc = roundn(r * 1.4, 2); - return 'M0,' + rc + 'V-' + rc; - }, - - 'line-ne': function(r) { - var rx = roundn(r, 2); - return 'M' + rx + ',-' + rx + 'L-' + rx + ',' + rx; - }, - - 'line-nw': function(r) { - var rx = roundn(r, 2); - return 'M' + rx + ',' + rx + 'L-' + rx + ',-' + rx; - }, -}; - - -for (let name in shapes) { - let path = shapes[name](10) + shapes.circle(1) - // if (name != 'triangle-left') continue - - showPath(path) - showSdf(sdf(path, {w: 77, h: 77, viewBox: [-10, -10, 10, 10], stroke: -2})) -} - - -function showPath (path) { - let cnv = document.body.appendChild(document.createElement('canvas')) - let ctx = cnv.getContext('2d') - let w = cnv.width = 77 - let h = cnv.height = 77 - - ctx.fillStyle = 'black' - ctx.fillRect(0,0,w,h) - - ctx.fillStyle = 'rgb(0,100,100)' - ctx.strokeStyle = 'white' - ctx.lineWidth = 2 - - ctx.translate(77/2, 77/2) - - // IE fix - if (!window.Path2D) return; - - let path2d = new Path2D(path) - // ctx.fill(path2d) - ctx.stroke(path2d) - - ctx.setTransform(1, 0, 0, 1, 0, 0); -} - - - -function showSdf (arr) { - let dim = Math.sqrt(arr.length) - let cnv = document.body.appendChild(document.createElement('canvas')) - let ctx = cnv.getContext('2d') - let w = cnv.width = dim - let h = cnv.height = dim - let iData = ctx.createImageData(w, h) //new ImageData(w, h) - let data = iData.data - - for (let i = 0; i < w; i++) { - for (let j = 0; j < h; j++) { - data[i*w*4 + j*4 + 0] = arr[i*w + j] * 255 - data[i*w*4 + j*4 + 1] = arr[i*w + j] * 255 - data[i*w*4 + j*4 + 2] = arr[i*w + j] * 255 - data[i*w*4 + j*4 + 3] = 255 - } - } - - ctx.putImageData(iData, 0, 0) -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/through2/LICENSE.md b/ThinFilm_Analyzer/frontend/node_modules/through2/LICENSE.md deleted file mode 100644 index a2429b6385be26e4b2e4048c6359865d7429918a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/through2/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -# The MIT License (MIT) - -**Copyright (c) Rod Vagg (the "Original Author") and additional contributors** - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/through2/README.md b/ThinFilm_Analyzer/frontend/node_modules/through2/README.md deleted file mode 100644 index b5e44c7b178a8a075dd7bc7355efb2727bd6639b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/through2/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# through2 - -[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) - -**A tiny wrapper around Node streams.Transform (Streams2/3) to avoid explicit subclassing noise** - -Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. - -Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. - -```js -fs.createReadStream('ex.txt') - .pipe(through2(function (chunk, enc, callback) { - for (var i = 0; i < chunk.length; i++) - if (chunk[i] == 97) - chunk[i] = 122 // swap 'a' for 'z' - - this.push(chunk) - - callback() - })) - .pipe(fs.createWriteStream('out.txt')) - .on('finish', () => doSomethingSpecial()) -``` - -Or object streams: - -```js -var all = [] - -fs.createReadStream('data.csv') - .pipe(csv2()) - .pipe(through2.obj(function (chunk, enc, callback) { - var data = { - name : chunk[0] - , address : chunk[3] - , phone : chunk[10] - } - this.push(data) - - callback() - })) - .on('data', (data) => { - all.push(data) - }) - .on('end', () => { - doSomethingSpecial(all) - }) -``` - -Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. - -## API - -through2([ options, ] [ transformFunction ] [, flushFunction ]) - -Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). - -### options - -The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). - -The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2({ objectMode: true, allowHalfOpen: false }, - (chunk, enc, cb) => { - cb(null, 'wut?') // note we can use the second argument on the callback - // to provide data as an alternative to this.push('wut?') - } - ) - .pipe(fs.createWriteStream('/tmp/wut.txt')) -``` - -### transformFunction - -The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. - -To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. - -Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. - -If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. - -### flushFunction - -The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. - -```js -fs.createReadStream('/tmp/important.dat') - .pipe(through2( - (chunk, enc, cb) => cb(null, chunk), // transform is a noop - function (cb) { // flush function - this.push('tacking on an extra buffer to the end'); - cb(); - } - )) - .pipe(fs.createWriteStream('/tmp/wut.txt')); -``` - -through2.ctor([ options, ] transformFunction[, flushFunction ]) - -Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. - -```js -var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { - if (record.temp != null && record.unit == "F") { - record.temp = ( ( record.temp - 32 ) * 5 ) / 9 - record.unit = "C" - } - this.push(record) - callback() -}) - -// Create instances of FToC like so: -var converter = new FToC() -// Or: -var converter = FToC() -// Or specify/override options when you instantiate, if you prefer: -var converter = FToC({objectMode: true}) -``` - -## See Also - - - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. - - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. - - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. - - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. - - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one - -## License - -**through2** is Copyright (c) Rod Vagg [@rvagg](https://twitter.com/rvagg) and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/ThinFilm_Analyzer/frontend/node_modules/through2/package.json b/ThinFilm_Analyzer/frontend/node_modules/through2/package.json deleted file mode 100644 index 15960b638dc30ec535d6e91955449ee470790da9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/through2/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "through2", - "version": "2.0.5", - "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", - "main": "through2.js", - "scripts": { - "test": "node test/test.js | faucet" - }, - "repository": { - "type": "git", - "url": "https://github.com/rvagg/through2.git" - }, - "keywords": [ - "stream", - "streams2", - "through", - "transform" - ], - "author": "Rod Vagg (https://github.com/rvagg)", - "license": "MIT", - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "devDependencies": { - "bl": "~2.0.1", - "faucet": "0.0.1", - "nyc": "~13.1.0", - "safe-buffer": "~5.1.2", - "stream-spigot": "~3.0.6", - "tape": "~4.9.1" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/through2/through2.js b/ThinFilm_Analyzer/frontend/node_modules/through2/through2.js deleted file mode 100644 index 6baa6a1e8ff831ecc87a32ead711735acb6c4288..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/through2/through2.js +++ /dev/null @@ -1,96 +0,0 @@ -var Transform = require('readable-stream').Transform - , inherits = require('util').inherits - , xtend = require('xtend') - -function DestroyableTransform(opts) { - Transform.call(this, opts) - this._destroyed = false -} - -inherits(DestroyableTransform, Transform) - -DestroyableTransform.prototype.destroy = function(err) { - if (this._destroyed) return - this._destroyed = true - - var self = this - process.nextTick(function() { - if (err) - self.emit('error', err) - self.emit('close') - }) -} - -// a noop _transform function -function noop (chunk, enc, callback) { - callback(null, chunk) -} - - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return function (options, transform, flush) { - if (typeof options == 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform != 'function') - transform = noop - - if (typeof flush != 'function') - flush = null - - return construct(options, transform, flush) - } -} - - -// main export, just make me a transform stream! -module.exports = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(options) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) - - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -module.exports.ctor = through2(function (options, transform, flush) { - function Through2 (override) { - if (!(this instanceof Through2)) - return new Through2(override) - - this.options = xtend(options, override) - - DestroyableTransform.call(this, this.options) - } - - inherits(Through2, DestroyableTransform) - - Through2.prototype._transform = transform - - if (flush) - Through2.prototype._flush = flush - - return Through2 -}) - - -module.exports.obj = through2(function (options, transform, flush) { - var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) - t2._flush = flush - - return t2 -}) diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/LICENSE deleted file mode 100644 index b6424d8362292b516584860d3fb1a372f6d23dd2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c), Brian Grinstead, http://briangrinstead.com - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/README.md b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/README.md deleted file mode 100644 index 71b6d767013316ca5de65e227037ac3ed3d43eb3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/README.md +++ /dev/null @@ -1,492 +0,0 @@ -# TinyColor - -## JavaScript color tooling - -TinyColor is a small, fast library for color manipulation and conversion in JavaScript. It allows many forms of input, while providing color conversions and other color utility functions. It has no dependencies. - -## Including in node - -`tinycolor` can be installed from npm: - - npm install tinycolor2 - -Then it can be used in your script like so: - -```js -var tinycolor = require("tinycolor2"); -var color = tinycolor("red"); -``` - -Or in a module like so: - -```js -import tinycolor from "tinycolor2"; -var color = tinycolor("red"); -``` - -## Including in a browser - -The package can be bundled from npm, but if you prefer to download it locally you have two choices: - -### ESM - -It can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2. - -```html - -``` - -### UMD - -You can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js): - -```html - - -``` - -## Usage - -Call `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties. See Accepted String Input and Accepted Object Input below for more information about what is accepted. - -## Accepted String Input - -The string parsing is very permissive. It is meant to make typing a color as input as easy as possible. All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value). - -HSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties. The `H` (hue) can have values between 0%-100% or 0-360. - -RGB input requires either 0-255 or 0%-100%. - -If you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1. - -Here are some examples of string input: - -### Hex, 8-digit (RGBA) Hex -```js -tinycolor("#000"); -tinycolor("000"); -tinycolor("#369C"); -tinycolor("369C"); -tinycolor("#f0f0f6"); -tinycolor("f0f0f6"); -tinycolor("#f0f0f688"); -tinycolor("f0f0f688"); -``` -### RGB, RGBA -```js -tinycolor("rgb (255, 0, 0)"); -tinycolor("rgb 255 0 0"); -tinycolor("rgba (255, 0, 0, .5)"); -tinycolor({ r: 255, g: 0, b: 0 }); -tinycolor.fromRatio({ r: 1, g: 0, b: 0 }); -tinycolor.fromRatio({ r: .5, g: .5, b: .5 }); -``` -### HSL, HSLA -```js -tinycolor("hsl(0, 100%, 50%)"); -tinycolor("hsla(0, 100%, 50%, .5)"); -tinycolor("hsl(0, 100%, 50%)"); -tinycolor("hsl 0 1.0 0.5"); -tinycolor({ h: 0, s: 1, l: .5 }); -tinycolor.fromRatio({ h: 1, s: 0, l: 0 }); -tinycolor.fromRatio({ h: .5, s: .5, l: .5 }); -``` -### HSV, HSVA -```js -tinycolor("hsv(0, 100%, 100%)"); -tinycolor("hsva(0, 100%, 100%, .5)"); -tinycolor("hsv (0 100% 100%)"); -tinycolor("hsv 0 1 1"); -tinycolor({ h: 0, s: 100, v: 100 }); -tinycolor.fromRatio({ h: 1, s: 0, v: 0 }); -tinycolor.fromRatio({ h: .5, s: .5, v: .5 }); -``` -### Named - -Case insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors). - -```js -tinycolor("RED"); -tinycolor("blanchedalmond"); -tinycolor("darkblue"); -``` -### Accepted Object Input - -If you are calling this from code, you may want to use object input. Here are some examples of the different types of accepted object inputs: - - { r: 255, g: 0, b: 0 } - { r: 255, g: 0, b: 0, a: .5 } - { h: 0, s: 100, l: 50 } - { h: 0, s: 100, v: 100 } - -## Methods - -### getFormat - -Returns the format used to create the tinycolor instance -```js -var color = tinycolor("red"); -color.getFormat(); // "name" -color = tinycolor({r:255, g:255, b:255}); -color.getFormat(); // "rgb" -``` - -### getOriginalInput - -Returns the input passed into the constructor used to create the tinycolor instance -```js -var color = tinycolor("red"); -color.getOriginalInput(); // "red" -color = tinycolor({r:255, g:255, b:255}); -color.getOriginalInput(); // "{r: 255, g: 255, b: 255}" -``` - -### isValid - -Return a boolean indicating whether the color was successfully parsed. Note: if the color is not valid then it will act like `black` when being used with other methods. -```js -var color1 = tinycolor("red"); -color1.isValid(); // true -color1.toHexString(); // "#ff0000" - -var color2 = tinycolor("not a color"); -color2.isValid(); // false -color2.toString(); // "#000000" -``` -### getBrightness - -Returns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast). -```js -var color1 = tinycolor("#fff"); -color1.getBrightness(); // 255 - -var color2 = tinycolor("#000"); -color2.getBrightness(); // 0 -``` -### isLight - -Return a boolean indicating whether the color's perceived brightness is light. -```js -var color1 = tinycolor("#fff"); -color1.isLight(); // true - -var color2 = tinycolor("#000"); -color2.isLight(); // false -``` -### isDark - -Return a boolean indicating whether the color's perceived brightness is dark. -```js -var color1 = tinycolor("#fff"); -color1.isDark(); // false - -var color2 = tinycolor("#000"); -color2.isDark(); // true -``` -### getLuminance - -Returns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef) -```js -var color1 = tinycolor("#fff"); -color1.getLuminance(); // 1 - -var color2 = tinycolor("#000"); -color2.getLuminance(); // 0 -``` -### getAlpha - -Returns the alpha value of a color, from `0-1`. -```js -var color1 = tinycolor("rgba(255, 0, 0, .5)"); -color1.getAlpha(); // 0.5 - -var color2 = tinycolor("rgb(255, 0, 0)"); -color2.getAlpha(); // 1 - -var color3 = tinycolor("transparent"); -color3.getAlpha(); // 0 -``` -### setAlpha - -Sets the alpha value on a current color. Accepted range is in between `0-1`. -```js -var color = tinycolor("red"); -color.getAlpha(); // 1 -color.setAlpha(.5); -color.getAlpha(); // .5 -color.toRgbString(); // "rgba(255, 0, 0, .5)" -``` -### String Representations - -The following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb` - -### toHsv -```js -var color = tinycolor("red"); -color.toHsv(); // { h: 0, s: 1, v: 1, a: 1 } -``` -### toHsvString -```js -var color = tinycolor("red"); -color.toHsvString(); // "hsv(0, 100%, 100%)" -color.setAlpha(0.5); -color.toHsvString(); // "hsva(0, 100%, 100%, 0.5)" -``` -### toHsl -```js -var color = tinycolor("red"); -color.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 } -``` -### toHslString -```js -var color = tinycolor("red"); -color.toHslString(); // "hsl(0, 100%, 50%)" -color.setAlpha(0.5); -color.toHslString(); // "hsla(0, 100%, 50%, 0.5)" -``` -### toHex -```js -var color = tinycolor("red"); -color.toHex(); // "ff0000" -``` -### toHexString -```js -var color = tinycolor("red"); -color.toHexString(); // "#ff0000" -``` -### toHex8 -```js -var color = tinycolor("red"); -color.toHex8(); // "ff0000ff" -``` -### toHex8String -```js -var color = tinycolor("red"); -color.toHex8String(); // "#ff0000ff" -``` -### toRgb -```js -var color = tinycolor("red"); -color.toRgb(); // { r: 255, g: 0, b: 0, a: 1 } -``` -### toRgbString -```js -var color = tinycolor("red"); -color.toRgbString(); // "rgb(255, 0, 0)" -color.setAlpha(0.5); -color.toRgbString(); // "rgba(255, 0, 0, 0.5)" -``` -### toPercentageRgb -```js -var color = tinycolor("red"); -color.toPercentageRgb() // { r: "100%", g: "0%", b: "0%", a: 1 } -``` -### toPercentageRgbString -```js -var color = tinycolor("red"); -color.toPercentageRgbString(); // "rgb(100%, 0%, 0%)" -color.setAlpha(0.5); -color.toPercentageRgbString(); // "rgba(100%, 0%, 0%, 0.5)" -``` -### toName -```js -var color = tinycolor("red"); -color.toName(); // "red" -``` -### toFilter -``` -var color = tinycolor("red"); -color.toFilter(); // "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)" -``` -### toString - -Print to a string, depending on the input format. You can also override this by passing one of `"rgb", "prgb", "hex6", "hex3", "hex8", "name", "hsl", "hsv"` into the function. -```js -var color1 = tinycolor("red"); -color1.toString(); // "red" -color1.toString("hsv"); // "hsv(0, 100%, 100%)" - -var color2 = tinycolor("rgb(255, 0, 0)"); -color2.toString(); // "rgb(255, 0, 0)" -color2.setAlpha(.5); -color2.toString(); // "rgba(255, 0, 0, 0.5)" -``` -### Color Modification - -These methods manipulate the current color, and return it for chaining. For instance: -```js -tinycolor("red").lighten().desaturate().toHexString() // "#f53d3d" -``` -### lighten - -`lighten: function(amount = 10) -> TinyColor`. Lighten the color a given amount, from 0 to 100. Providing 100 will always return white. -```js -tinycolor("#f00").lighten().toString(); // "#ff3333" -tinycolor("#f00").lighten(100).toString(); // "#ffffff" -``` -### brighten - -`brighten: function(amount = 10) -> TinyColor`. Brighten the color a given amount, from 0 to 100. -```js -tinycolor("#f00").brighten().toString(); // "#ff1919" -``` -### darken - -`darken: function(amount = 10) -> TinyColor`. Darken the color a given amount, from 0 to 100. Providing 100 will always return black. -```js -tinycolor("#f00").darken().toString(); // "#cc0000" -tinycolor("#f00").darken(100).toString(); // "#000000" -``` -### desaturate - -`desaturate: function(amount = 10) -> TinyColor`. Desaturate the color a given amount, from 0 to 100. Providing 100 will is the same as calling `greyscale`. -```js -tinycolor("#f00").desaturate().toString(); // "#f20d0d" -tinycolor("#f00").desaturate(100).toString(); // "#808080" -``` -### saturate - -`saturate: function(amount = 10) -> TinyColor`. Saturate the color a given amount, from 0 to 100. -```js -tinycolor("hsl(0, 10%, 50%)").saturate().toString(); // "hsl(0, 20%, 50%)" -``` -### greyscale - -`greyscale: function() -> TinyColor`. Completely desaturates a color into greyscale. Same as calling `desaturate(100)`. -```js -tinycolor("#f00").greyscale().toString(); // "#808080" -``` -### spin - -`spin: function(amount = 0) -> TinyColor`. Spin the hue a given amount, from -360 to 360. Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before). -```js -tinycolor("#f00").spin(180).toString(); // "#00ffff" -tinycolor("#f00").spin(-90).toString(); // "#7f00ff" -tinycolor("#f00").spin(90).toString(); // "#80ff00" - -// spin(0) and spin(360) do nothing -tinycolor("#f00").spin(0).toString(); // "#ff0000" -tinycolor("#f00").spin(360).toString(); // "#ff0000" -``` -### Color Combinations - -Combination functions return an array of TinyColor objects unless otherwise noted. - -### analogous - -`analogous: function(, results = 6, slices = 30) -> array`. -```js -var colors = tinycolor("#f00").analogous(); - -colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#ff0066", "#ff0033", "#ff0000", "#ff3300", "#ff6600" ] -``` -### monochromatic - -`monochromatic: function(, results = 6) -> array`. -```js -var colors = tinycolor("#f00").monochromatic(); - -colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#2a0000", "#550000", "#800000", "#aa0000", "#d40000" ] -``` -### splitcomplement - -`splitcomplement: function() -> array`. -```js -var colors = tinycolor("#f00").splitcomplement(); - -colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#ccff00", "#0066ff" ] -``` -### triad - -`triad: function() -> array`. -```js -var colors = tinycolor("#f00").triad(); - -colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#00ff00", "#0000ff" ] -``` -### tetrad - -`tetrad: function() -> array`. -```js -var colors = tinycolor("#f00").tetrad(); - -colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#80ff00", "#00ffff", "#7f00ff" ] - -``` -### complement - -`complement: function() -> TinyColor`. -```js -tinycolor("#f00").complement().toHexString(); // "#00ffff" -``` -## Color Utilities -```js -tinycolor.equals(color1, color2) -tinycolor.mix(color1, color2, amount = 50) -``` -### random - -Returns a random color. -```js -var color = tinycolor.random(); -color.toRgb(); // "{r: 145, g: 40, b: 198, a: 1}" -``` - -### Readability - -TinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef). - -#### readability - -`readability: function(TinyColor, TinyColor) -> Object`. -Returns the contrast ratio between two colors. -```js -tinycolor.readability("#000", "#000"); // 1 -tinycolor.readability("#000", "#111"); // 1.1121078324840545 -tinycolor.readability("#000", "#fff"); // 21 -``` -Use the values in your own calculations, or use one of the convenience functions below. - -#### isReadable - -`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`. Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: "AA",size: "small"}`. `level` can be `"AA"` or "AAA" and `size` can be `"small"` or `"large"`. - -Here are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements. -```js -tinycolor.isReadable("#000", "#111", {}); // false -tinycolor.isReadable("#ff0088", "#5c1a72",{level:"AA",size:"small"}); //false -tinycolor.isReadable("#ff0088", "#5c1a72",{level:"AA",size:"large"}), //true -``` -#### mostReadable - -`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`. -Given a base color and a list of possible foreground or background colors for that base, returns the most readable color. -If none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`. -```js -tinycolor.mostReadable("#000", ["#f00", "#0f0", "#00f"]).toHexString(); // "#00ff00" -tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" -tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" -tinycolor.mostReadable("#ff0088", ["#2e0c3a"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString() // "#2e0c3a", -tinycolor.mostReadable("#ff0088", ["#2e0c3a"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString() // "#000000", -``` -See [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo. - -## Common operations - -### clone - -`clone: function() -> TinyColor`. -Instantiate a new TinyColor object with the same color. Any changes to the new one won't affect the old one. -```js -var color1 = tinycolor("#F00"); -var color2 = color1.clone(); -color2.setAlpha(.5); - -color1.toString(); // "#ff0000" -color2.toString(); // "rgba(255, 0, 0, 0.5)" -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/package.json b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/package.json deleted file mode 100644 index 5bbefffbabee392d1855491b84dc0a716b6a3bf2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/test.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/test.js deleted file mode 100644 index 40be5fddcb6c99a97dbf9938a7ae156dbd8e619c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/test.js +++ /dev/null @@ -1,2191 +0,0 @@ -// This file is autogenerated. -// Ideally it wouldn't exist, but it's here to test cjs in node -// Changes should go into ./test.js, and if new assertions are needed -// they'll need to be shimmed here as well -const tinycolor = require("./tinycolor.js"); -const { Deno, testDefinitions } = require("@deno/shim-deno-test"); -async function runDenoTests() { - for (const test of testDefinitions) { - if (test.ignore) { - console.log(`Ignoring ${test.name}`); - continue; - } - console.log(`Running ${test.name}`); - await test.fn(); - console.log(`> Passed ${test.name}`); - } -} -(async () => { - const { assertEquals, assert, assertThrows } = await import( - "../deno_asserts@0.168.0.mjs" - ); - - // TEST_BEGINS_HERE - -Deno.test("TinyColor initialization", function () { - assert( - typeof tinycolor != "undefined", - "tinycolor is initialized on the page" - ); - assert( - typeof tinycolor("red") == "object", - "tinycolor is able to be instantiated" - ); - - var r = tinycolor("red"); - assert( - tinycolor(r) === r, - "when given a tinycolor instance, tinycolor() returns it" - ); - assert( - new tinycolor(r) === r, - "when given a tinycolor instance, new tinycolor() returns it" - ); - assertEquals( - tinycolor("red", { format: "hex" }).toString(), - "#ff0000", - "tinycolor options are being parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0 }, { format: "hex" }).toString(), - "#ff0000", - "tinycolor options are being parsed" - ); - - var obj = { h: 180, s: 0.5, l: 0.5 }; - var color = tinycolor(obj); - assert( - obj.s === 0.5, - "when given an object, the original object is not modified" - ); -}); - -Deno.test("Original input", function () { - var colorRgbUp = "RGB(39, 39, 39)"; - var colorRgbLow = "rgb(39, 39, 39)"; - var colorRgbMix = "RgB(39, 39, 39)"; - var tinycolorObj = tinycolor(colorRgbMix); - var inputObj = { r: 100, g: 100, b: 100 }; - var r = tinycolor("red"); - - assert( - tinycolor(colorRgbLow).getOriginalInput() === colorRgbLow, - "original lowercase input is returned" - ); - assert( - tinycolor(colorRgbUp).getOriginalInput() === colorRgbUp, - "original uppercase input is returned" - ); - assert( - tinycolor(colorRgbMix).getOriginalInput() === colorRgbMix, - "original mixed input is returned" - ); - assert( - tinycolor(tinycolorObj).getOriginalInput() === colorRgbMix, - "when given a tinycolor instance, the color string is returned" - ); - assert( - tinycolor(inputObj).getOriginalInput() === inputObj, - "when given an object, the object is returned" - ); - assert( - new tinycolor("").getOriginalInput() === "", - "when given an empty string, an empty string is returned" - ); - assert( - new tinycolor(null).getOriginalInput() === "", - "when given a null value, an empty string is returned" - ); -}); - -Deno.test("Cloning color", function () { - var originalColor = tinycolor("red"); - var originalColorRgbString = originalColor.toRgbString(); - - var clonedColor = originalColor.clone(); - assert( - clonedColor.toRgbString() === originalColor.toRgbString(), - "cloned color is identical" - ); - - clonedColor.setAlpha(0.5); - assert( - clonedColor.toRgbString() !== originalColor.toRgbString(), - "cloned color is changing independently from original color" - ); - assert( - originalColorRgbString === originalColor.toRgbString(), - "original color was not changed by cloned color change" - ); -}); -Deno.test("Random color", function () { - var randomColor = tinycolor.random(); - assertEquals(randomColor.getAlpha(), 1); - assertEquals(randomColor.getFormat(), "prgb"); - - randomColor.setAlpha(0.5); - assertEquals(randomColor.toHex8String().slice(-2), "80"); -}); - -// Taken from convertWikipediaColors.html -var conversions = [ - { - hex: "#FFFFFF", - hex8: "#FFFFFFFF", - rgb: { r: "100.0%", g: "100.0%", b: "100.0%" }, - hsv: { h: "0", s: "0.000", v: "1.000" }, - hsl: { h: "0", s: "0.000", l: "1.000" }, - }, - { - hex: "#808080", - hex8: "#808080FF", - rgb: { r: "050.0%", g: "050.0%", b: "050.0%" }, - hsv: { h: "0", s: "0.000", v: "0.500" }, - hsl: { h: "0", s: "0.000", l: "0.500" }, - }, - { - hex: "#000000", - hex8: "#000000FF", - rgb: { r: "000.0%", g: "000.0%", b: "000.0%" }, - hsv: { h: "0", s: "0.000", v: "0.000" }, - hsl: { h: "0", s: "0.000", l: "0.000" }, - }, - { - hex: "#FF0000", - hex8: "#FF0000FF", - rgb: { r: "100.0%", g: "000.0%", b: "000.0%" }, - hsv: { h: "0.0", s: "1.000", v: "1.000" }, - hsl: { h: "0.0", s: "1.000", l: "0.500" }, - }, - { - hex: "#BFBF00", - hex8: "#BFBF00FF", - rgb: { r: "075.0%", g: "075.0%", b: "000.0%" }, - hsv: { h: "60.0", s: "1.000", v: "0.750" }, - hsl: { h: "60.0", s: "1.000", l: "0.375" }, - }, - { - hex: "#008000", - hex8: "#008000FF", - rgb: { r: "000.0%", g: "050.0%", b: "000.0%" }, - hsv: { h: "120.0", s: "1.000", v: "0.500" }, - hsl: { h: "120.0", s: "1.000", l: "0.250" }, - }, - { - hex: "#80FFFF", - hex8: "#80FFFFFF", - rgb: { r: "050.0%", g: "100.0%", b: "100.0%" }, - hsv: { h: "180.0", s: "0.500", v: "1.000" }, - hsl: { h: "180.0", s: "1.000", l: "0.750" }, - }, - { - hex: "#8080FF", - hex8: "#8080FFFF", - rgb: { r: "050.0%", g: "050.0%", b: "100.0%" }, - hsv: { h: "240.0", s: "0.500", v: "1.000" }, - hsl: { h: "240.0", s: "1.000", l: "0.750" }, - }, - { - hex: "#BF40BF", - hex8: "#BF40BFFF", - rgb: { r: "075.0%", g: "025.0%", b: "075.0%" }, - hsv: { h: "300.0", s: "0.667", v: "0.750" }, - hsl: { h: "300.0", s: "0.500", l: "0.500" }, - }, - { - hex: "#A0A424", - hex8: "#A0A424FF", - rgb: { r: "062.8%", g: "064.3%", b: "014.2%" }, - hsv: { h: "61.8", s: "0.779", v: "0.643" }, - hsl: { h: "61.8", s: "0.638", l: "0.393" }, - }, - { - hex: "#1EAC41", - hex8: "#1EAC41FF", - rgb: { r: "011.6%", g: "067.5%", b: "025.5%" }, - hsv: { h: "134.9", s: "0.828", v: "0.675" }, - hsl: { h: "134.9", s: "0.707", l: "0.396" }, - }, - { - hex: "#B430E5", - hex8: "#B430E5FF", - rgb: { r: "070.4%", g: "018.7%", b: "089.7%" }, - hsv: { h: "283.7", s: "0.792", v: "0.897" }, - hsl: { h: "283.7", s: "0.775", l: "0.542" }, - }, - { - hex: "#FEF888", - hex8: "#FEF888FF", - rgb: { r: "099.8%", g: "097.4%", b: "053.2%" }, - hsv: { h: "56.9", s: "0.467", v: "0.998" }, - hsl: { h: "56.9", s: "0.991", l: "0.765" }, - }, - { - hex: "#19CB97", - hex8: "#19CB97FF", - rgb: { r: "009.9%", g: "079.5%", b: "059.1%" }, - hsv: { h: "162.4", s: "0.875", v: "0.795" }, - hsl: { h: "162.4", s: "0.779", l: "0.447" }, - }, - { - hex: "#362698", - hex8: "#362698FF", - rgb: { r: "021.1%", g: "014.9%", b: "059.7%" }, - hsv: { h: "248.3", s: "0.750", v: "0.597" }, - hsl: { h: "248.3", s: "0.601", l: "0.373" }, - }, - { - hex: "#7E7EB8", - hex8: "#7E7EB8FF", - rgb: { r: "049.5%", g: "049.3%", b: "072.1%" }, - hsv: { h: "240.5", s: "0.316", v: "0.721" }, - hsl: { h: "240.5", s: "0.290", l: "0.607" }, - }, -]; - -Deno.test("Color Equality", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - - assert(true, tiny.isValid()); - assert( - true, - "Testing " + - c.hex + - ": " + - tiny.toRgbString() + - " " + - tiny.toPercentageRgbString() + - " " + - tiny.toHsvString() + - " " + - tiny.toHslString() + - " " + - tiny.toHexString() + - "Original: " + - JSON.stringify(c.rgb) + - " " + - JSON.stringify(c.hsv) + - " " + - JSON.stringify(c.hsl) - ); - assert(tinycolor.equals(c.rgb, c.hex), "RGB equals hex " + c.hex); - assert(tinycolor.equals(c.rgb, c.hex8), "RGB equals hex " + c.hex); - assert(tinycolor.equals(c.rgb, c.hsl), "RGB equals HSL " + c.hex); - assert(tinycolor.equals(c.rgb, c.hsv), "RGB equals HSV " + c.hex); - assert(tinycolor.equals(c.rgb, c.rgb), "RGB equals RGB " + c.hex); - - assert(tinycolor.equals(c.hex, c.hex), "hex equals hex " + c.hex); - assert(tinycolor.equals(c.hex, c.hex8), "hex equals hex8 " + c.hex); - assert(tinycolor.equals(c.hex, c.hsl), "hex equals HSL " + c.hex); - assert(tinycolor.equals(c.hex, c.hsv), "hex equals HSV " + c.hex); - - assert(tinycolor.equals(c.hsl, c.hsv), "HSL equals HSV " + c.hex); - } -}); - -Deno.test("With Ratio", function () { - assertEquals( - tinycolor.fromRatio({ r: 1, g: 1, b: 1 }).toHexString(), - "#ffffff", - "white" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 0.5 }).toRgbString(), - "rgba(255, 0, 0, 0.5)", - "alpha works when ratio is parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 1 }).toRgbString(), - "rgb(255, 0, 0)", - "alpha = 1 works when ratio is parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 10 }).toRgbString(), - "rgb(255, 0, 0)", - "alpha > 1 works when ratio is parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: -1 }).toRgbString(), - "rgb(255, 0, 0)", - "alpha < 1 works when ratio is parsed" - ); -}); - -Deno.test("Without Ratio", function () { - assertEquals( - tinycolor({ r: 1, g: 1, b: 1 }).toHexString(), - "#010101", - "010101" - ); - assertEquals( - tinycolor({ r: 0.1, g: 0.1, b: 0.1 }).toHexString(), - "#000000", - "000000" - ); - assertEquals(tinycolor("rgb .1 .1 .1").toHexString(), "#000000", "000000"); -}); - -Deno.test("RGB Text Parsing", function () { - assertEquals( - tinycolor("rgb 255 0 0").toHexString(), - "#ff0000", - "spaced input" - ); - assertEquals( - tinycolor("rgb(255, 0, 0)").toHexString(), - "#ff0000", - "parenthesized input" - ); - assertEquals( - tinycolor("rgb (255, 0, 0)").toHexString(), - "#ff0000", - "parenthesized spaced input" - ); - assertEquals( - tinycolor({ r: 255, g: 0, b: 0 }).toHexString(), - "#ff0000", - "object input" - ); - assertEquals( - tinycolor({ r: 255, g: 0, b: 0 }).toRgb(), - { - r: 255, - g: 0, - b: 0, - a: 1, - }, - "object input and compare" - ); - - assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb(200, 100, 0)")); - assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0")); - assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0")); - assert( - tinycolor.equals({ r: 200, g: 100, b: 0, a: 0.4 }, "rgba 200 100 0 .4") - ); - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgba 200 100 0 1")); - - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb(200, 100, 0)")); - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0")); - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0")); - - assert( - tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb(200, 100, 0)") - ); - assert( - tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0") - ); - assert( - tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0") - ); -}); - -Deno.test("Percentage RGB Text Parsing", function () { - assertEquals( - tinycolor("rgb 100% 0% 0%").toHexString(), - "#ff0000", - "spaced input" - ); - assertEquals( - tinycolor("rgb(100%, 0%, 0%)").toHexString(), - "#ff0000", - "parenthesized input" - ); - assertEquals( - tinycolor("rgb (100%, 0%, 0%)").toHexString(), - "#ff0000", - "parenthesized spaced input" - ); - assertEquals( - tinycolor({ r: "100%", g: "0%", b: "0%" }).toHexString(), - "#ff0000", - "object input" - ); - assertEquals( - tinycolor({ r: "100%", g: "0%", b: "0%" }).toRgb(), - { - r: 255, - g: 0, - b: 0, - a: 1, - }, - "object input and compare" - ); - - assert( - tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)") - ); - assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - assert( - tinycolor.equals( - { r: "90%", g: "45%", b: "0%", a: 0.4 }, - "rgba 90% 45% 0% .4" - ) - ); - assert( - !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgba 90% 45% 0% 1") - ); - - assert( - !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)") - ); - assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - - assert( - tinycolor.equals( - tinycolor({ r: "90%", g: "45%", b: "0%" }), - "rgb(90%, 45%, 0%)" - ) - ); - assert( - tinycolor.equals( - tinycolor({ r: "90%", g: "45%", b: "0%" }), - "rgb 90% 45% 0%" - ) - ); - assert( - tinycolor.equals( - tinycolor({ r: "90%", g: "45%", b: "0%" }), - "rgb 90% 45% 0%" - ) - ); -}); - -Deno.test("HSL parsing", function () { - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38 }).toHexString(), - "#2400c2", - "to hex" - ); - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38 }).toRgbString(), - "rgb(36, 0, 194)", - "to rgb" - ); - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38 }).toHslString(), - "hsl(251, 100%, 38%)", - "to hsl" - ); - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38, a: 0.5 }).toHslString(), - "hsla(251, 100%, 38%, 0.5)", - "to hsla" - ); - assertEquals( - tinycolor("hsl(251, 100, 38)").toHexString(), - "#2400c2", - "to hex" - ); - assertEquals( - tinycolor("hsl(251, 100%, 38%)").toRgbString(), - "rgb(36, 0, 194)", - "to rgb" - ); - assertEquals( - tinycolor("hsl(251, 100%, 38%)").toHslString(), - "hsl(251, 100%, 38%)", - "to hsl" - ); - assertEquals( - tinycolor("hsl 100 20 10").toHslString(), - "hsl(100, 20%, 10%)", - "problematic hsl" - ); -}); - -Deno.test("Hex Parsing", function () { - assertEquals(tinycolor("rgb 255 0 0").toHexString(), "#ff0000"); - assertEquals(tinycolor("rgb 255 0 0").toHexString(true), "#f00"); - - assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8String(), "#ff000080"); - assertEquals(tinycolor("rgba 255 0 0 0").toHex8String(), "#ff000000"); - assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(), "#ff0000ff"); - assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(true), "#f00f"); - - assertEquals(tinycolor("rgb 255 0 0").toHex(), "ff0000"); - assertEquals(tinycolor("rgb 255 0 0").toHex(true), "f00"); - assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8(), "ff000080"); -}); - -Deno.test("HSV Parsing", function () { - assertEquals( - tinycolor("hsv 251.1 0.887 .918").toHsvString(), - "hsv(251, 89%, 92%)" - ); - assertEquals( - tinycolor("hsv 251.1 0.887 0.918").toHsvString(), - "hsv(251, 89%, 92%)" - ); - assertEquals( - tinycolor("hsva 251.1 0.887 0.918 0.5").toHsvString(), - "hsva(251, 89%, 92%, 0.5)" - ); -}); - -Deno.test("Invalid Parsing", function () { - var invalidColor = tinycolor("this is not a color"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor("#red"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor(" #red"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor("##123456"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor(" ##123456"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor({ r: "invalid", g: "invalid", b: "invalid" }); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor({ h: "invalid", s: "invalid", l: "invalid" }); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor({ h: "invalid", s: "invalid", v: "invalid" }); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); -}); - -Deno.test("Named colors", function () { - assertEquals(tinycolor("aliceblue").toHex(), "f0f8ff"); - assertEquals(tinycolor("antiquewhite").toHex(), "faebd7"); - assertEquals(tinycolor("aqua").toHex(), "00ffff"); - assertEquals(tinycolor("aquamarine").toHex(), "7fffd4"); - assertEquals(tinycolor("azure").toHex(), "f0ffff"); - assertEquals(tinycolor("beige").toHex(), "f5f5dc"); - assertEquals(tinycolor("bisque").toHex(), "ffe4c4"); - assertEquals(tinycolor("black").toHex(), "000000"); - assertEquals(tinycolor("blanchedalmond").toHex(), "ffebcd"); - assertEquals(tinycolor("blue").toHex(), "0000ff"); - assertEquals(tinycolor("blueviolet").toHex(), "8a2be2"); - assertEquals(tinycolor("brown").toHex(), "a52a2a"); - assertEquals(tinycolor("burlywood").toHex(), "deb887"); - assertEquals(tinycolor("cadetblue").toHex(), "5f9ea0"); - assertEquals(tinycolor("chartreuse").toHex(), "7fff00"); - assertEquals(tinycolor("chocolate").toHex(), "d2691e"); - assertEquals(tinycolor("coral").toHex(), "ff7f50"); - assertEquals(tinycolor("cornflowerblue").toHex(), "6495ed"); - assertEquals(tinycolor("cornsilk").toHex(), "fff8dc"); - assertEquals(tinycolor("crimson").toHex(), "dc143c"); - assertEquals(tinycolor("cyan").toHex(), "00ffff"); - assertEquals(tinycolor("darkblue").toHex(), "00008b"); - assertEquals(tinycolor("darkcyan").toHex(), "008b8b"); - assertEquals(tinycolor("darkgoldenrod").toHex(), "b8860b"); - assertEquals(tinycolor("darkgray").toHex(), "a9a9a9"); - assertEquals(tinycolor("darkgreen").toHex(), "006400"); - assertEquals(tinycolor("darkkhaki").toHex(), "bdb76b"); - assertEquals(tinycolor("darkmagenta").toHex(), "8b008b"); - assertEquals(tinycolor("darkolivegreen").toHex(), "556b2f"); - assertEquals(tinycolor("darkorange").toHex(), "ff8c00"); - assertEquals(tinycolor("darkorchid").toHex(), "9932cc"); - assertEquals(tinycolor("darkred").toHex(), "8b0000"); - assertEquals(tinycolor("darksalmon").toHex(), "e9967a"); - assertEquals(tinycolor("darkseagreen").toHex(), "8fbc8f"); - assertEquals(tinycolor("darkslateblue").toHex(), "483d8b"); - assertEquals(tinycolor("darkslategray").toHex(), "2f4f4f"); - assertEquals(tinycolor("darkturquoise").toHex(), "00ced1"); - assertEquals(tinycolor("darkviolet").toHex(), "9400d3"); - assertEquals(tinycolor("deeppink").toHex(), "ff1493"); - assertEquals(tinycolor("deepskyblue").toHex(), "00bfff"); - assertEquals(tinycolor("dimgray").toHex(), "696969"); - assertEquals(tinycolor("dodgerblue").toHex(), "1e90ff"); - assertEquals(tinycolor("firebrick").toHex(), "b22222"); - assertEquals(tinycolor("floralwhite").toHex(), "fffaf0"); - assertEquals(tinycolor("forestgreen").toHex(), "228b22"); - assertEquals(tinycolor("fuchsia").toHex(), "ff00ff"); - assertEquals(tinycolor("gainsboro").toHex(), "dcdcdc"); - assertEquals(tinycolor("ghostwhite").toHex(), "f8f8ff"); - assertEquals(tinycolor("gold").toHex(), "ffd700"); - assertEquals(tinycolor("goldenrod").toHex(), "daa520"); - assertEquals(tinycolor("gray").toHex(), "808080"); - assertEquals(tinycolor("grey").toHex(), "808080"); - assertEquals(tinycolor("green").toHex(), "008000"); - assertEquals(tinycolor("greenyellow").toHex(), "adff2f"); - assertEquals(tinycolor("honeydew").toHex(), "f0fff0"); - assertEquals(tinycolor("hotpink").toHex(), "ff69b4"); - assertEquals(tinycolor("indianred ").toHex(), "cd5c5c"); - assertEquals(tinycolor("indigo ").toHex(), "4b0082"); - assertEquals(tinycolor("ivory").toHex(), "fffff0"); - assertEquals(tinycolor("khaki").toHex(), "f0e68c"); - assertEquals(tinycolor("lavender").toHex(), "e6e6fa"); - assertEquals(tinycolor("lavenderblush").toHex(), "fff0f5"); - assertEquals(tinycolor("lawngreen").toHex(), "7cfc00"); - assertEquals(tinycolor("lemonchiffon").toHex(), "fffacd"); - assertEquals(tinycolor("lightblue").toHex(), "add8e6"); - assertEquals(tinycolor("lightcoral").toHex(), "f08080"); - assertEquals(tinycolor("lightcyan").toHex(), "e0ffff"); - assertEquals(tinycolor("lightgoldenrodyellow").toHex(), "fafad2"); - assertEquals(tinycolor("lightgrey").toHex(), "d3d3d3"); - assertEquals(tinycolor("lightgreen").toHex(), "90ee90"); - assertEquals(tinycolor("lightpink").toHex(), "ffb6c1"); - assertEquals(tinycolor("lightsalmon").toHex(), "ffa07a"); - assertEquals(tinycolor("lightseagreen").toHex(), "20b2aa"); - assertEquals(tinycolor("lightskyblue").toHex(), "87cefa"); - assertEquals(tinycolor("lightslategray").toHex(), "778899"); - assertEquals(tinycolor("lightsteelblue").toHex(), "b0c4de"); - assertEquals(tinycolor("lightyellow").toHex(), "ffffe0"); - assertEquals(tinycolor("lime").toHex(), "00ff00"); - assertEquals(tinycolor("limegreen").toHex(), "32cd32"); - assertEquals(tinycolor("linen").toHex(), "faf0e6"); - assertEquals(tinycolor("magenta").toHex(), "ff00ff"); - assertEquals(tinycolor("maroon").toHex(), "800000"); - assertEquals(tinycolor("mediumaquamarine").toHex(), "66cdaa"); - assertEquals(tinycolor("mediumblue").toHex(), "0000cd"); - assertEquals(tinycolor("mediumorchid").toHex(), "ba55d3"); - assertEquals(tinycolor("mediumpurple").toHex(), "9370db"); - assertEquals(tinycolor("mediumseagreen").toHex(), "3cb371"); - assertEquals(tinycolor("mediumslateblue").toHex(), "7b68ee"); - assertEquals(tinycolor("mediumspringgreen").toHex(), "00fa9a"); - assertEquals(tinycolor("mediumturquoise").toHex(), "48d1cc"); - assertEquals(tinycolor("mediumvioletred").toHex(), "c71585"); - assertEquals(tinycolor("midnightblue").toHex(), "191970"); - assertEquals(tinycolor("mintcream").toHex(), "f5fffa"); - assertEquals(tinycolor("mistyrose").toHex(), "ffe4e1"); - assertEquals(tinycolor("moccasin").toHex(), "ffe4b5"); - assertEquals(tinycolor("navajowhite").toHex(), "ffdead"); - assertEquals(tinycolor("navy").toHex(), "000080"); - assertEquals(tinycolor("oldlace").toHex(), "fdf5e6"); - assertEquals(tinycolor("olive").toHex(), "808000"); - assertEquals(tinycolor("olivedrab").toHex(), "6b8e23"); - assertEquals(tinycolor("orange").toHex(), "ffa500"); - assertEquals(tinycolor("orangered").toHex(), "ff4500"); - assertEquals(tinycolor("orchid").toHex(), "da70d6"); - assertEquals(tinycolor("palegoldenrod").toHex(), "eee8aa"); - assertEquals(tinycolor("palegreen").toHex(), "98fb98"); - assertEquals(tinycolor("paleturquoise").toHex(), "afeeee"); - assertEquals(tinycolor("palevioletred").toHex(), "db7093"); - assertEquals(tinycolor("papayawhip").toHex(), "ffefd5"); - assertEquals(tinycolor("peachpuff").toHex(), "ffdab9"); - assertEquals(tinycolor("peru").toHex(), "cd853f"); - assertEquals(tinycolor("pink").toHex(), "ffc0cb"); - assertEquals(tinycolor("plum").toHex(), "dda0dd"); - assertEquals(tinycolor("powderblue").toHex(), "b0e0e6"); - assertEquals(tinycolor("purple").toHex(), "800080"); - assertEquals(tinycolor("rebeccapurple").toHex(), "663399"); - assertEquals(tinycolor("red").toHex(), "ff0000"); - assertEquals(tinycolor("rosybrown").toHex(), "bc8f8f"); - assertEquals(tinycolor("royalblue").toHex(), "4169e1"); - assertEquals(tinycolor("saddlebrown").toHex(), "8b4513"); - assertEquals(tinycolor("salmon").toHex(), "fa8072"); - assertEquals(tinycolor("sandybrown").toHex(), "f4a460"); - assertEquals(tinycolor("seagreen").toHex(), "2e8b57"); - assertEquals(tinycolor("seashell").toHex(), "fff5ee"); - assertEquals(tinycolor("sienna").toHex(), "a0522d"); - assertEquals(tinycolor("silver").toHex(), "c0c0c0"); - assertEquals(tinycolor("skyblue").toHex(), "87ceeb"); - assertEquals(tinycolor("slateblue").toHex(), "6a5acd"); - assertEquals(tinycolor("slategray").toHex(), "708090"); - assertEquals(tinycolor("snow").toHex(), "fffafa"); - assertEquals(tinycolor("springgreen").toHex(), "00ff7f"); - assertEquals(tinycolor("steelblue").toHex(), "4682b4"); - assertEquals(tinycolor("tan").toHex(), "d2b48c"); - assertEquals(tinycolor("teal").toHex(), "008080"); - assertEquals(tinycolor("thistle").toHex(), "d8bfd8"); - assertEquals(tinycolor("tomato").toHex(), "ff6347"); - assertEquals(tinycolor("turquoise").toHex(), "40e0d0"); - assertEquals(tinycolor("violet").toHex(), "ee82ee"); - assertEquals(tinycolor("wheat").toHex(), "f5deb3"); - assertEquals(tinycolor("white").toHex(), "ffffff"); - assertEquals(tinycolor("whitesmoke").toHex(), "f5f5f5"); - assertEquals(tinycolor("yellow").toHex(), "ffff00"); - assertEquals(tinycolor("yellowgreen").toHex(), "9acd32"); - - assertEquals(tinycolor("#f00").toName(), "red"); - assertEquals(tinycolor("#fa0a0a").toName(), false); -}); - -Deno.test("Invalid alpha should normalize to 1", function () { - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: -1 }).toRgbString(), - "rgb(255, 20, 10)", - "Negative value" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: -0 }).toRgbString(), - "rgba(255, 20, 10, 0)", - "Negative 0" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toRgbString(), - "rgba(255, 20, 10, 0)", - "0" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 0.5 }).toRgbString(), - "rgba(255, 20, 10, 0.5)", - ".5" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 1 }).toRgbString(), - "rgb(255, 20, 10)", - "1" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 100 }).toRgbString(), - "rgb(255, 20, 10)", - "Greater than 1" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: "asdfasd" }).toRgbString(), - "rgb(255, 20, 10)", - "Non Numeric" - ); - - assertEquals( - tinycolor("#fff").toRgbString(), - "rgb(255, 255, 255)", - "Hex should be 1" - ); - assertEquals( - tinycolor("rgba 255 0 0 100").toRgbString(), - "rgb(255, 0, 0)", - "Greater than 1 in string parsing" - ); -}); - -Deno.test("toString() with alpha set", function () { - var redNamed = tinycolor.fromRatio( - { r: 255, g: 0, b: 0, a: 0.6 }, - { - format: "name", - } - ); - var transparentNamed = tinycolor.fromRatio( - { r: 255, g: 0, b: 0, a: 0 }, - { - format: "name", - } - ); - var redHex = tinycolor.fromRatio( - { r: 255, g: 0, b: 0, a: 0.4 }, - { - format: "hex", - } - ); - - assertEquals(redNamed.getFormat(), "name", "getFormat() is correct"); - assertEquals(redHex.getFormat(), "hex", "getFormat() is correct"); - - assertEquals( - redNamed.toString(), - "rgba(255, 0, 0, 0.6)", - "Names should default to rgba if alpha is < 1" - ); - assertEquals( - redHex.toString(), - "rgba(255, 0, 0, 0.4)", - "Hex should default to rgba if alpha is < 1" - ); - - assertEquals( - redNamed.toString("hex"), - "#ff0000", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex6"), - "#ff0000", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex3"), - "#f00", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex8"), - "#ff000099", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex4"), - "#f009", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("name"), - "#ff0000", - "Semi transparent names should return hex in toString() if name format is specified" - ); - - assertEquals( - redNamed.toName(), - false, - "Semi transparent names should be false in toName()" - ); - - assertEquals( - redHex.toString(), - "rgba(255, 0, 0, 0.4)", - "Hex should default to rgba if alpha is < 1" - ); - assertEquals( - transparentNamed.toString(), - "transparent", - "Named color should equal transparent if alpha == 0" - ); - - redHex.setAlpha(0); - assertEquals( - redHex.toString(), - "rgba(255, 0, 0, 0)", - "Hex should default to rgba if alpha is = 0" - ); -}); - -Deno.test("setting alpha", function () { - var hexSetter = tinycolor("rgba(255, 0, 0, 1)"); - assertEquals(hexSetter.getAlpha(), 1, "Alpha should start as 1"); - var returnedFromSetAlpha = hexSetter.setAlpha(0.9); - assertEquals( - returnedFromSetAlpha, - hexSetter, - "setAlpha return value should be the color." - ); - assertEquals(hexSetter.getAlpha(), 0.9, "setAlpha should change alpha value"); - hexSetter.setAlpha(0.5); - assertEquals(hexSetter.getAlpha(), 0.5, "setAlpha should change alpha value"); - hexSetter.setAlpha(0); - assertEquals(hexSetter.getAlpha(), 0, "setAlpha should change alpha value"); - hexSetter.setAlpha(-1); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with value < 0 should be bound to 1" - ); - hexSetter.setAlpha(2); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with value > 1 should be bound to 1" - ); - hexSetter.setAlpha(); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with invalid value should be bound to 1" - ); - hexSetter.setAlpha(null); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with invalid value should be bound to 1" - ); - hexSetter.setAlpha("test"); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with invalid value should be bound to 1" - ); -}); - -Deno.test("Alpha = 0 should act differently on toName()", function () { - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toName(), - "transparent", - "0" - ); - assertEquals( - tinycolor("transparent").toString(), - "transparent", - "toString when passed" - ); - assertEquals(tinycolor("transparent").toHex(), "000000", "toHex"); -}); - -Deno.test("getBrightness", function () { - assertEquals(tinycolor("#000").getBrightness(), 0, "returns 0 for #000"); - assertEquals(tinycolor("#fff").getBrightness(), 255, "returns 255 for #fff"); -}); - -Deno.test("getLuminance", function () { - assertEquals(tinycolor("#000").getLuminance(), 0, "returns 0 for #000"); - assertEquals(tinycolor("#fff").getLuminance(), 1, "returns 1 for #fff"); -}); - -Deno.test("isDark returns true/false for dark/light colors", function () { - assertEquals(tinycolor("#000").isDark(), true, "#000 is dark"); - assertEquals(tinycolor("#111").isDark(), true, "#111 is dark"); - assertEquals(tinycolor("#222").isDark(), true, "#222 is dark"); - assertEquals(tinycolor("#333").isDark(), true, "#333 is dark"); - assertEquals(tinycolor("#444").isDark(), true, "#444 is dark"); - assertEquals(tinycolor("#555").isDark(), true, "#555 is dark"); - assertEquals(tinycolor("#666").isDark(), true, "#666 is dark"); - assertEquals(tinycolor("#777").isDark(), true, "#777 is dark"); - assertEquals(tinycolor("#888").isDark(), false, "#888 is not dark"); - assertEquals(tinycolor("#999").isDark(), false, "#999 is not dark"); - assertEquals(tinycolor("#aaa").isDark(), false, "#aaa is not dark"); - assertEquals(tinycolor("#bbb").isDark(), false, "#bbb is not dark"); - assertEquals(tinycolor("#ccc").isDark(), false, "#ccc is not dark"); - assertEquals(tinycolor("#ddd").isDark(), false, "#ddd is not dark"); - assertEquals(tinycolor("#eee").isDark(), false, "#eee is not dark"); - assertEquals(tinycolor("#fff").isDark(), false, "#fff is not dark"); -}); - -Deno.test("isLight returns true/false for light/dark colors", function () { - assertEquals(tinycolor("#000").isLight(), false, "#000 is not light"); - assertEquals(tinycolor("#111").isLight(), false, "#111 is not light"); - assertEquals(tinycolor("#222").isLight(), false, "#222 is not light"); - assertEquals(tinycolor("#333").isLight(), false, "#333 is not light"); - assertEquals(tinycolor("#444").isLight(), false, "#444 is not light"); - assertEquals(tinycolor("#555").isLight(), false, "#555 is not light"); - assertEquals(tinycolor("#666").isLight(), false, "#666 is not light"); - assertEquals(tinycolor("#777").isLight(), false, "#777 is not light"); - assertEquals(tinycolor("#888").isLight(), true, "#888 is light"); - assertEquals(tinycolor("#999").isLight(), true, "#999 is light"); - assertEquals(tinycolor("#aaa").isLight(), true, "#aaa is light"); - assertEquals(tinycolor("#bbb").isLight(), true, "#bbb is light"); - assertEquals(tinycolor("#ccc").isLight(), true, "#ccc is light"); - assertEquals(tinycolor("#ddd").isLight(), true, "#ddd is light"); - assertEquals(tinycolor("#eee").isLight(), true, "#eee is light"); - assertEquals(tinycolor("#fff").isLight(), true, "#fff is light"); -}); - -Deno.test("HSL Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toHsl()).toHexString(), - "HSL Object" - ); - } -}); - -Deno.test("HSL String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toHslString()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "toHslString red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "toHslString green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "toHslString blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("HSV String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toHsvString()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "toHsvString red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "toHsvString green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "toHsvString blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("HSV Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toHsv()).toHexString(), - "HSV Object" - ); - } -}); - -Deno.test("RGB Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toRgb()).toHexString(), - "RGB Object" - ); - } -}); - -Deno.test("RGB String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toRgbString()).toHexString(), - "RGB String" - ); - } -}); - -Deno.test("PRGB Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toPercentageRgb()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "Red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "Green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "Blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("PRGB String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toPercentageRgbString()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "Red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "Green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "Blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals(tiny.toHexString(), tinycolor(tiny).toHexString(), "Object"); - } -}); - -Deno.test("Color equality", function () { - assert(tinycolor.equals("#ff0000", "#ff0000"), "Same hex"); - assert(tinycolor.equals("#ff0000", "rgb(255, 0, 0)"), "Same alphas"); - assert( - !tinycolor.equals("#ff0000", "rgba(255, 0, 0, .1)"), - "Different alphas" - ); - assert(tinycolor.equals("#ff000066", "rgba(255, 0, 0, .4)"), "Same alphas"); - assert(tinycolor.equals("#f009", "rgba(255, 0, 0, .6)"), "Same alphas"); - assert(tinycolor.equals("#336699CC", "369C"), "Same hex"); - assert(tinycolor.equals("ff0000", "#ff0000"), "Same hex"); - assert(tinycolor.equals("#f00", "#ff0000"), "Same hex"); - assert(tinycolor.equals("#f00", "#ff0000"), "Same hex"); - assert(tinycolor.equals("f00", "#ff0000"), "Same hex"); - assertEquals(tinycolor("010101").toHexString(), "#010101"); - assert(!tinycolor.equals("#ff0000", "#00ff00"), "Different hex"); - assert( - tinycolor.equals("#ff8000", "rgb(100%, 50%, 0%)"), - "Percentage bounds checking" - ); -}); - -Deno.test("isReadable", function () { - // "#ff0088", "#8822aa" (values used in old WCAG1 tests) - assert( - tinycolor.isReadable("#000000", "#ffffff", { level: "AA", size: "small" }), - "white/black is readable" - ); - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", {}), - "not readable - empty wcag2 object" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "small" }), - "not readable - AA small" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "large" }), - "not readable - AA large" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { - level: "AAA", - size: "small", - }), - "not readable - AAA small" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { - level: "AAA", - size: "large", - }), - "not readable - AAA large" - ); - - // values derived from and validated using the calculators at http://www.dasplankton.de/ContrastA/ - // and http://webaim.org/resources/contrastchecker/ - - // "#ff0088", "#5c1a72": contrast ratio 3.04 - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "small" }), - "not readable - AA small" - ); - assert( - tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "large" }), - "readable - AA large" - ); - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", { - level: "AAA", - size: "small", - }), - "not readable - AAA small" - ); - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", { - level: "AAA", - size: "large", - }), - "not readable - AAA large" - ); - - // "#ff0088", "#2e0c3a": contrast ratio 4.56 - assert( - tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "small" }), - "readable - AA small" - ); - assert( - tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "large" }), - "readable - AA large" - ); - assert( - !tinycolor.isReadable("#ff0088", "#2e0c3a", { - level: "AAA", - size: "small", - }), - "not readable - AAA small" - ); - assert( - tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AAA", size: "large" }), - "readable - AAA large" - ); - - // "#db91b8", "#2e0c3a": contrast ratio 7.12 - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "small" }), - "readable - AA small" - ); - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "large" }), - "readable - AA large" - ); - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "small" }), - "readable - AAA small" - ); - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "large" }), - "readable - AAA large" - ); -}); - -Deno.test("readability", function () { - // check return values from readability function. See isReadable above for standards tests. - assertEquals( - tinycolor.readability("#000", "#000"), - 1, - "Readability function test 0" - ); - assertEquals( - tinycolor.readability("#000", "#111"), - 1.1121078324840545, - "Readability function test 1" - ); - assertEquals( - tinycolor.readability("#000", "#fff"), - 21, - "Readability function test 2" - ); -}); - -Deno.test("mostReadable", function () { - assertEquals( - tinycolor - .mostReadable("#000", ["#111", "#222", { wcag2: {} }]) - .toHexString(), - "#222222", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#f00", ["#d00", "#0d0"], { wcag2: {} }) - .toHexString(), - "#00dd00", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#fff", ["#fff", "#fff"], { wcag2: {} }) - .toHexString(), - "#ffffff", - "no different color in list" - ); - //includeFallbackColors - assertEquals( - tinycolor - .mostReadable("#fff", ["#fff", "#fff"], { - includeFallbackColors: true, - }) - .toHexString(), - "#000000", - "no different color in list" - ); - assertEquals( - tinycolor - .mostReadable("#123", ["#124", "#125"], { - includeFallbackColors: false, - }) - .toHexString(), - "#112255", - "no readable color in list" - ); - assertEquals( - tinycolor - .mostReadable("#123", ["#000", "#fff"], { - includeFallbackColors: false, - }) - .toHexString(), - "#ffffff", - "verify assumption" - ); - assertEquals( - tinycolor - .mostReadable("#123", ["#124", "#125"], { - includeFallbackColors: true, - }) - .toHexString(), - "#ffffff", - "no readable color in list" - ); - - assertEquals( - tinycolor - .mostReadable("#ff0088", ["#000", "#fff"], { - includeFallbackColors: false, - }) - .toHexString(), - "#000000", - "verify assumption" - ); - assertEquals( - tinycolor - .mostReadable("#ff0088", ["#2e0c3a"], { - includeFallbackColors: true, - level: "AAA", - size: "large", - }) - .toHexString(), - "#2e0c3a", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#ff0088", ["#2e0c3a"], { - includeFallbackColors: true, - level: "AAA", - size: "small", - }) - .toHexString(), - "#000000", - "no readable color in list" - ); - - assertEquals( - tinycolor - .mostReadable("#371b2c", ["#000", "#fff"], { - includeFallbackColors: false, - }) - .toHexString(), - "#ffffff", - "verify assumption" - ); - assertEquals( - tinycolor - .mostReadable("#371b2c", ["#a9acb6"], { - includeFallbackColors: true, - level: "AAA", - size: "large", - }) - .toHexString(), - "#a9acb6", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#371b2c", ["#a9acb6"], { - includeFallbackColors: true, - level: "AAA", - size: "small", - }) - .toHexString(), - "#ffffff", - "no readable color in list" - ); -}); - -Deno.test("Filters", function () { - assertEquals( - tinycolor("red").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)" - ); - assertEquals( - tinycolor("red").toFilter("blue"), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ff0000ff)" - ); - - assertEquals( - tinycolor("transparent").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#00000000)" - ); - assertEquals( - tinycolor("transparent").toFilter("red"), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#ffff0000)" - ); - - assertEquals( - tinycolor("#f0f0f0dd").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ddf0f0f0,endColorstr=#ddf0f0f0)" - ); - assertEquals( - tinycolor("rgba(0, 0, 255, .5").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#800000ff,endColorstr=#800000ff)" - ); -}); - -/* Originally generated with: -var results = []; -for (var i = 0; i <= 100; i++) results.push( tinycolor.saturate("red", i).toHex() ) -console.log(JSON.stringify(results)) -*/ -var DESATURATIONS = [ - "ff0000", - "fe0101", - "fc0303", - "fb0404", - "fa0505", - "f90606", - "f70808", - "f60909", - "f50a0a", - "f40b0b", - "f20d0d", - "f10e0e", - "f00f0f", - "ee1111", - "ed1212", - "ec1313", - "eb1414", - "e91616", - "e81717", - "e71818", - "e61919", - "e41b1b", - "e31c1c", - "e21d1d", - "e01f1f", - "df2020", - "de2121", - "dd2222", - "db2424", - "da2525", - "d92626", - "d72828", - "d62929", - "d52a2a", - "d42b2b", - "d22d2d", - "d12e2e", - "d02f2f", - "cf3030", - "cd3232", - "cc3333", - "cb3434", - "c93636", - "c83737", - "c73838", - "c63939", - "c43b3b", - "c33c3c", - "c23d3d", - "c13e3e", - "bf4040", - "be4141", - "bd4242", - "bb4444", - "ba4545", - "b94646", - "b84747", - "b64949", - "b54a4a", - "b44b4b", - "b34d4d", - "b14e4e", - "b04f4f", - "af5050", - "ad5252", - "ac5353", - "ab5454", - "aa5555", - "a85757", - "a75858", - "a65959", - "a45b5b", - "a35c5c", - "a25d5d", - "a15e5e", - "9f6060", - "9e6161", - "9d6262", - "9c6363", - "9a6565", - "996666", - "986767", - "966969", - "956a6a", - "946b6b", - "936c6c", - "916e6e", - "906f6f", - "8f7070", - "8e7171", - "8c7373", - "8b7474", - "8a7575", - "887777", - "877878", - "867979", - "857a7a", - "837c7c", - "827d7d", - "817e7e", - "808080", -]; -var SATURATIONS = [ - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", -]; -var LIGHTENS = [ - "ff0000", - "ff0505", - "ff0a0a", - "ff0f0f", - "ff1414", - "ff1a1a", - "ff1f1f", - "ff2424", - "ff2929", - "ff2e2e", - "ff3333", - "ff3838", - "ff3d3d", - "ff4242", - "ff4747", - "ff4d4d", - "ff5252", - "ff5757", - "ff5c5c", - "ff6161", - "ff6666", - "ff6b6b", - "ff7070", - "ff7575", - "ff7a7a", - "ff8080", - "ff8585", - "ff8a8a", - "ff8f8f", - "ff9494", - "ff9999", - "ff9e9e", - "ffa3a3", - "ffa8a8", - "ffadad", - "ffb3b3", - "ffb8b8", - "ffbdbd", - "ffc2c2", - "ffc7c7", - "ffcccc", - "ffd1d1", - "ffd6d6", - "ffdbdb", - "ffe0e0", - "ffe5e5", - "ffebeb", - "fff0f0", - "fff5f5", - "fffafa", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", -]; -var BRIGHTENS = [ - "ff0000", - "ff0303", - "ff0505", - "ff0808", - "ff0a0a", - "ff0d0d", - "ff0f0f", - "ff1212", - "ff1414", - "ff1717", - "ff1919", - "ff1c1c", - "ff1f1f", - "ff2121", - "ff2424", - "ff2626", - "ff2929", - "ff2b2b", - "ff2e2e", - "ff3030", - "ff3333", - "ff3636", - "ff3838", - "ff3b3b", - "ff3d3d", - "ff4040", - "ff4242", - "ff4545", - "ff4747", - "ff4a4a", - "ff4c4c", - "ff4f4f", - "ff5252", - "ff5454", - "ff5757", - "ff5959", - "ff5c5c", - "ff5e5e", - "ff6161", - "ff6363", - "ff6666", - "ff6969", - "ff6b6b", - "ff6e6e", - "ff7070", - "ff7373", - "ff7575", - "ff7878", - "ff7a7a", - "ff7d7d", - "ff7f7f", - "ff8282", - "ff8585", - "ff8787", - "ff8a8a", - "ff8c8c", - "ff8f8f", - "ff9191", - "ff9494", - "ff9696", - "ff9999", - "ff9c9c", - "ff9e9e", - "ffa1a1", - "ffa3a3", - "ffa6a6", - "ffa8a8", - "ffabab", - "ffadad", - "ffb0b0", - "ffb2b2", - "ffb5b5", - "ffb8b8", - "ffbaba", - "ffbdbd", - "ffbfbf", - "ffc2c2", - "ffc4c4", - "ffc7c7", - "ffc9c9", - "ffcccc", - "ffcfcf", - "ffd1d1", - "ffd4d4", - "ffd6d6", - "ffd9d9", - "ffdbdb", - "ffdede", - "ffe0e0", - "ffe3e3", - "ffe5e5", - "ffe8e8", - "ffebeb", - "ffeded", - "fff0f0", - "fff2f2", - "fff5f5", - "fff7f7", - "fffafa", - "fffcfc", - "ffffff", -]; -var DARKENS = [ - "ff0000", - "fa0000", - "f50000", - "f00000", - "eb0000", - "e60000", - "e00000", - "db0000", - "d60000", - "d10000", - "cc0000", - "c70000", - "c20000", - "bd0000", - "b80000", - "b30000", - "ad0000", - "a80000", - "a30000", - "9e0000", - "990000", - "940000", - "8f0000", - "8a0000", - "850000", - "800000", - "7a0000", - "750000", - "700000", - "6b0000", - "660000", - "610000", - "5c0000", - "570000", - "520000", - "4d0000", - "470000", - "420000", - "3d0000", - "380000", - "330000", - "2e0000", - "290000", - "240000", - "1f0000", - "190000", - "140000", - "0f0000", - "0a0000", - "050000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", -]; - -Deno.test("Modifications", function () { - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").desaturate(i).toHex(), - DESATURATIONS[i], - "Desaturation " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").saturate(i).toHex(), - SATURATIONS[i], - "Saturation " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").lighten(i).toHex(), - LIGHTENS[i], - "Lighten " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").brighten(i).toHex(), - BRIGHTENS[i], - "Brighter " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").darken(i).toHex(), - DARKENS[i], - "Darken " + i + " works" - ); - } - - assertEquals( - tinycolor("red").greyscale().toHex(), - "808080", - "Greyscale works" - ); -}); - -Deno.test("Spin", function () { - assertEquals( - Math.round(tinycolor("#f00").spin(-1234).toHsl().h), - 206, - "Spinning -1234 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(-360).toHsl().h), - 0, - "Spinning -360 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(-120).toHsl().h), - 240, - "Spinning -120 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(0).toHsl().h), - 0, - "Spinning 0 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(10).toHsl().h), - 10, - "Spinning 10 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(360).toHsl().h), - 0, - "Spinning 360 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(2345).toHsl().h), - 185, - "Spinning 2345 works" - ); - - [-360, 0, 360].forEach(function (delta) { - Object.keys(tinycolor.names).forEach(function (name) { - assertEquals( - tinycolor(name).toHex(), - tinycolor(name).spin(delta).toHex(), - "Spinning " + delta.toString() + " has no effect" - ); - }); - }); -}); - -Deno.test("Mix", function () { - // amount 0 or none - assertEquals( - tinycolor.mix("#000", "#fff").toHsl().l, - 0.5, - "Mixing without amount works" - ); - assertEquals( - tinycolor.mix("#f00", "#000", 0).toHex(), - "ff0000", - "Mixing with 0 amount works" - ); - // This case checks the the problem with floating point numbers (eg 255/90) - assertEquals( - tinycolor.mix("#fff", "#000", 90).toHex(), - "1a1a1a", - "Mixing with 90 amount works correctly" - ); - - // black and white - for (var i = 0; i < 100; i++) { - assertEquals( - Math.round(tinycolor.mix("#000", "#fff", i).toHsl().l * 100) / 100, - i / 100, - "Mixing black and white with " + i + " amount works" - ); - } - - // with colors - for (var i = 0; i < 100; i++) { - var new_hex = Math.round((255 * (100 - i)) / 100).toString(16); - - if (new_hex.length === 1) { - new_hex = "0" + new_hex; - } - - assertEquals( - tinycolor.mix("#f00", "#000", i).toHex(), - new_hex + "0000", - "Mixing " + i + " (red channel)" - ); - assertEquals( - tinycolor.mix("#0f0", "#000", i).toHex(), - "00" + new_hex + "00", - "Mixing " + i + " (green channel)" - ); - assertEquals( - tinycolor.mix("#00f", "#000", i).toHex(), - "0000" + new_hex, - "Mixing " + i + " (blue channel)" - ); - assertEquals( - tinycolor.mix(tinycolor("transparent"), "#000", i).toRgb().a, - i / 100, - "Mixing " + i + " (alpha channel)" - ); - } -}); - -// The combination tests need to be expanded furthe - -function colorsToHexString(colors) { - return colors - .map(function (c) { - return c.toHex(); - }) - .join(","); -} - -Deno.test("complement", function () { - var complementDoesntModifyInstance = tinycolor("red"); - assertEquals( - complementDoesntModifyInstance.complement().toHex(), - "00ffff", - "Complement works" - ); - assertEquals( - complementDoesntModifyInstance.toHex(), - "ff0000", - "Complement did not modify this color" - ); -}); - -Deno.test("analogous", function () { - var combination = tinycolor("red").analogous(); - assertEquals( - colorsToHexString(combination), - "ff0000,ff0066,ff0033,ff0000,ff3300,ff6600", - "Correct Combination" - ); -}); - -Deno.test("monochromatic", function () { - var combination = tinycolor("red").monochromatic(); - assertEquals( - colorsToHexString(combination), - "ff0000,2a0000,550000,800000,aa0000,d40000", - "Correct Combination" - ); -}); - -Deno.test("splitcomplement", function () { - var combination = tinycolor("red").splitcomplement(); - assertEquals( - colorsToHexString(combination), - "ff0000,ccff00,0066ff", - "Correct Combination" - ); -}); - -Deno.test("triad", function () { - var combination = tinycolor("red").triad(); - assertEquals( - colorsToHexString(combination), - "ff0000,00ff00,0000ff", - "Correct Combination" - ); -}); - -Deno.test("tetrad", function () { - var combination = tinycolor("red").tetrad(); - assertEquals( - colorsToHexString(combination), - "ff0000,80ff00,00ffff,7f00ff", - "Correct Combination" - ); -}); - -Deno.test({ - name: "polyad", - // Disabled until https://github.com/bgrins/TinyColor/issues/254 - ignore: true, - fn: function () { - assertThrows(() => { - tinycolor("red").polyad(); - }); - assertThrows(() => { - tinycolor("red").polyad(-1); - }); - assertThrows(() => { - tinycolor("red").polyad("invalid"); - }); - assertEquals(colorsToHexString(tinycolor("red").polyad(1)), "ff0000"); - assertEquals(colorsToHexString(tinycolor("red").polyad("1")), "ff0000"); - assertEquals( - colorsToHexString(tinycolor("red").polyad(2)), - "ff0000,00ffff" - ); - assertEquals( - colorsToHexString(tinycolor("red").polyad(3)), - "ff0000,00ff00,0000ff" - ); - assertEquals( - colorsToHexString(tinycolor("red").polyad(4)), - "ff0000,80ff00,00ffff,7f00ff" - ); - assertEquals( - colorsToHexString(tinycolor("red").polyad(5)), - "ff0000,ccff00,00ff66,0066ff,cc00ff" - ); - }, -}); - - runDenoTests(); -})(); diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/test_template.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/test_template.js deleted file mode 100644 index d170c2cd736e00f8ddfeb2e4b4464455613fa7ac..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/test_template.js +++ /dev/null @@ -1,26 +0,0 @@ -// This file is autogenerated. -// Ideally it wouldn't exist, but it's here to test cjs in node -// Changes should go into ./test.js, and if new assertions are needed -// they'll need to be shimmed here as well -const tinycolor = require("./tinycolor.js"); -const { Deno, testDefinitions } = require("@deno/shim-deno-test"); -async function runDenoTests() { - for (const test of testDefinitions) { - if (test.ignore) { - console.log(`Ignoring ${test.name}`); - continue; - } - console.log(`Running ${test.name}`); - await test.fn(); - console.log(`> Passed ${test.name}`); - } -} -(async () => { - const { assertEquals, assert, assertThrows } = await import( - "../deno_asserts@0.168.0.mjs" - ); - - // CONTENT_GOES_HERE - - runDenoTests(); -})(); diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/tinycolor.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/tinycolor.js deleted file mode 100644 index 4f584cab54d4a124cb17b47458c0e85fd141b0ca..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/cjs/tinycolor.js +++ /dev/null @@ -1,1188 +0,0 @@ -// This file is autogenerated. It's used to publish CJS to npm. -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory()); -})(this, (function () { 'use strict'; - - 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); - } - - // https://github.com/bgrins/TinyColor - // Brian Grinstead, MIT License - - var trimLeft = /^\s+/; - var trimRight = /\s+$/; - function tinycolor(color, opts) { - color = color ? color : ""; - opts = opts || {}; - - // If input is already a tinycolor, return itself - if (color instanceof tinycolor) { - return color; - } - // If we are called as a function, call using new instead - if (!(this instanceof tinycolor)) { - return new tinycolor(color, opts); - } - var rgb = inputToRGB(color); - this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format; - this._gradientType = opts.gradientType; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (this._r < 1) this._r = Math.round(this._r); - if (this._g < 1) this._g = Math.round(this._g); - if (this._b < 1) this._b = Math.round(this._b); - this._ok = rgb.ok; - } - tinycolor.prototype = { - isDark: function isDark() { - return this.getBrightness() < 128; - }, - isLight: function isLight() { - return !this.isDark(); - }, - isValid: function isValid() { - return this._ok; - }, - getOriginalInput: function getOriginalInput() { - return this._originalInput; - }, - getFormat: function getFormat() { - return this._format; - }, - getAlpha: function getAlpha() { - return this._a; - }, - getBrightness: function getBrightness() { - //http://www.w3.org/TR/AERT#color-contrast - var rgb = this.toRgb(); - return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; - }, - getLuminance: function getLuminance() { - //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef - var rgb = this.toRgb(); - var RsRGB, GsRGB, BsRGB, R, G, B; - RsRGB = rgb.r / 255; - GsRGB = rgb.g / 255; - BsRGB = rgb.b / 255; - if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); - return 0.2126 * R + 0.7152 * G + 0.0722 * B; - }, - setAlpha: function setAlpha(value) { - this._a = boundAlpha(value); - this._roundA = Math.round(100 * this._a) / 100; - return this; - }, - toHsv: function toHsv() { - var hsv = rgbToHsv(this._r, this._g, this._b); - return { - h: hsv.h * 360, - s: hsv.s, - v: hsv.v, - a: this._a - }; - }, - toHsvString: function toHsvString() { - var hsv = rgbToHsv(this._r, this._g, this._b); - var h = Math.round(hsv.h * 360), - s = Math.round(hsv.s * 100), - v = Math.round(hsv.v * 100); - return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; - }, - toHsl: function toHsl() { - var hsl = rgbToHsl(this._r, this._g, this._b); - return { - h: hsl.h * 360, - s: hsl.s, - l: hsl.l, - a: this._a - }; - }, - toHslString: function toHslString() { - var hsl = rgbToHsl(this._r, this._g, this._b); - var h = Math.round(hsl.h * 360), - s = Math.round(hsl.s * 100), - l = Math.round(hsl.l * 100); - return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; - }, - toHex: function toHex(allow3Char) { - return rgbToHex(this._r, this._g, this._b, allow3Char); - }, - toHexString: function toHexString(allow3Char) { - return "#" + this.toHex(allow3Char); - }, - toHex8: function toHex8(allow4Char) { - return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); - }, - toHex8String: function toHex8String(allow4Char) { - return "#" + this.toHex8(allow4Char); - }, - toRgb: function toRgb() { - return { - r: Math.round(this._r), - g: Math.round(this._g), - b: Math.round(this._b), - a: this._a - }; - }, - toRgbString: function toRgbString() { - return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; - }, - toPercentageRgb: function toPercentageRgb() { - return { - r: Math.round(bound01(this._r, 255) * 100) + "%", - g: Math.round(bound01(this._g, 255) * 100) + "%", - b: Math.round(bound01(this._b, 255) * 100) + "%", - a: this._a - }; - }, - toPercentageRgbString: function toPercentageRgbString() { - return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; - }, - toName: function toName() { - if (this._a === 0) { - return "transparent"; - } - if (this._a < 1) { - return false; - } - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; - }, - toFilter: function toFilter(secondColor) { - var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a); - var secondHex8String = hex8String; - var gradientType = this._gradientType ? "GradientType = 1, " : ""; - if (secondColor) { - var s = tinycolor(secondColor); - secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a); - } - return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; - }, - toString: function toString(format) { - var formatSet = !!format; - format = format || this._format; - var formattedString = false; - var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); - if (needsAlphaFormat) { - // Special case for "transparent", all other non-alpha formats - // will return rgba when there is transparency. - if (format === "name" && this._a === 0) { - return this.toName(); - } - return this.toRgbString(); - } - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "hex4") { - formattedString = this.toHex8String(true); - } - if (format === "hex8") { - formattedString = this.toHex8String(); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - return formattedString || this.toHexString(); - }, - clone: function clone() { - return tinycolor(this.toString()); - }, - _applyModification: function _applyModification(fn, args) { - var color = fn.apply(null, [this].concat([].slice.call(args))); - this._r = color._r; - this._g = color._g; - this._b = color._b; - this.setAlpha(color._a); - return this; - }, - lighten: function lighten() { - return this._applyModification(_lighten, arguments); - }, - brighten: function brighten() { - return this._applyModification(_brighten, arguments); - }, - darken: function darken() { - return this._applyModification(_darken, arguments); - }, - desaturate: function desaturate() { - return this._applyModification(_desaturate, arguments); - }, - saturate: function saturate() { - return this._applyModification(_saturate, arguments); - }, - greyscale: function greyscale() { - return this._applyModification(_greyscale, arguments); - }, - spin: function spin() { - return this._applyModification(_spin, arguments); - }, - _applyCombination: function _applyCombination(fn, args) { - return fn.apply(null, [this].concat([].slice.call(args))); - }, - analogous: function analogous() { - return this._applyCombination(_analogous, arguments); - }, - complement: function complement() { - return this._applyCombination(_complement, arguments); - }, - monochromatic: function monochromatic() { - return this._applyCombination(_monochromatic, arguments); - }, - splitcomplement: function splitcomplement() { - return this._applyCombination(_splitcomplement, arguments); - }, - // Disabled until https://github.com/bgrins/TinyColor/issues/254 - // polyad: function (number) { - // return this._applyCombination(polyad, [number]); - // }, - triad: function triad() { - return this._applyCombination(polyad, [3]); - }, - tetrad: function tetrad() { - return this._applyCombination(polyad, [4]); - } - }; - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function (color, opts) { - if (_typeof(color) == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "#ff000000" or "ff000000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - var rgb = { - r: 0, - g: 0, - b: 0 - }; - var a = 1; - var s = null; - var v = null; - var l = null; - var ok = false; - var format = false; - if (typeof color == "string") { - color = stringInputToObject(color); - } - if (_typeof(color) == "object") { - if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { - s = convertToPercentage(color.s); - v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, s, v); - ok = true; - format = "hsv"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { - s = convertToPercentage(color.s); - l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, s, l); - ok = true; - format = "hsl"; - } - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - a = boundAlpha(a); - return { - ok: ok, - format: color.format || format, - r: Math.min(255, Math.max(rgb.r, 0)), - g: Math.min(255, Math.max(rgb.g, 0)), - b: Math.min(255, Math.max(rgb.b, 0)), - a: a - }; - } - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b) { - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - var max = Math.max(r, g, b), - min = Math.min(r, g, b); - var h, - s, - l = (max + min) / 2; - if (max == min) { - h = s = 0; // achromatic - } else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch (max) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - h /= 6; - } - return { - h: h, - s: s, - l: l - }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - if (s === 0) { - r = g = b = l; // achromatic - } else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1 / 3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1 / 3); - } - return { - r: r * 255, - g: g * 255, - b: b * 255 - }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - var max = Math.max(r, g, b), - min = Math.min(r, g, b); - var h, - s, - v = max; - var d = max - min; - s = max === 0 ? 0 : d / max; - if (max == min) { - h = 0; // achromatic - } else { - switch (max) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - h /= 6; - } - return { - h: h, - s: s, - v: v - }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - var i = Math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - return { - r: r * 255, - g: g * 255, - b: b * 255 - }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - return hex.join(""); - } - - // `rgbaToHex` - // Converts an RGBA color plus alpha transparency to hex - // Assumes r, g, b are contained in the set [0, 255] and - // a in [0, 1]. Returns a 4 or 8 character rgba hex - function rgbaToHex(r, g, b, a, allow4Char) { - var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; - - // Return a 4 character hex if possible - if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); - } - return hex.join(""); - } - - // `rgbaToArgbHex` - // Converts an RGBA color to an ARGB Hex8 string - // Rarely used, but required for "toFilter()" - function rgbaToArgbHex(r, g, b, a) { - var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) return false; - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function () { - return tinycolor.fromRatio({ - r: Math.random(), - g: Math.random(), - b: Math.random() - }); - }; - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - function _desaturate(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - } - function _saturate(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - } - function _greyscale(color) { - return tinycolor(color).desaturate(100); - } - function _lighten(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - } - function _brighten(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var rgb = tinycolor(color).toRgb(); - rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); - rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100)))); - rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); - return tinycolor(rgb); - } - function _darken(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - } - - // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. - // Values outside of this range will be wrapped into this range. - function _spin(color, amount) { - var hsl = tinycolor(color).toHsl(); - var hue = (hsl.h + amount) % 360; - hsl.h = hue < 0 ? 360 + hue : hue; - return tinycolor(hsl); - } - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - function _complement(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - } - function polyad(color, number) { - if (isNaN(number) || number <= 0) { - throw new Error("Argument to polyad must be a positive number"); - } - var hsl = tinycolor(color).toHsl(); - var result = [tinycolor(color)]; - var step = 360 / number; - for (var i = 1; i < number; i++) { - result.push(tinycolor({ - h: (hsl.h + i * step) % 360, - s: hsl.s, - l: hsl.l - })); - } - return result; - } - function _splitcomplement(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [tinycolor(color), tinycolor({ - h: (h + 72) % 360, - s: hsl.s, - l: hsl.l - }), tinycolor({ - h: (h + 216) % 360, - s: hsl.s, - l: hsl.l - })]; - } - function _analogous(color, results, slices) { - results = results || 6; - slices = slices || 30; - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - } - function _monochromatic(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, - s = hsv.s, - v = hsv.v; - var ret = []; - var modification = 1 / results; - while (results--) { - ret.push(tinycolor({ - h: h, - s: s, - v: v - })); - v = (v + modification) % 1; - } - return ret; - } - - // Utility Functions - // --------------------- - - tinycolor.mix = function (color1, color2, amount) { - amount = amount === 0 ? 0 : amount || 50; - var rgb1 = tinycolor(color1).toRgb(); - var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; - var rgba = { - r: (rgb2.r - rgb1.r) * p + rgb1.r, - g: (rgb2.g - rgb1.g) * p + rgb1.g, - b: (rgb2.b - rgb1.b) * p + rgb1.b, - a: (rgb2.a - rgb1.a) * p + rgb1.a - }; - return tinycolor(rgba); - }; - - // Readability Functions - // --------------------- - // false - // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false - tinycolor.isReadable = function (color1, color2, wcag2) { - var readability = tinycolor.readability(color1, color2); - var wcag2Parms, out; - out = false; - wcag2Parms = validateWCAG2Parms(wcag2); - switch (wcag2Parms.level + wcag2Parms.size) { - case "AAsmall": - case "AAAlarge": - out = readability >= 4.5; - break; - case "AAlarge": - out = readability >= 3; - break; - case "AAAsmall": - out = readability >= 7; - break; - } - return out; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // Optionally returns Black or White if the most readable color is unreadable. - // *Example* - // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" - // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" - // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" - // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" - tinycolor.mostReadable = function (baseColor, colorList, args) { - var bestColor = null; - var bestScore = 0; - var readability; - var includeFallbackColors, level, size; - args = args || {}; - includeFallbackColors = args.includeFallbackColors; - level = args.level; - size = args.size; - for (var i = 0; i < colorList.length; i++) { - readability = tinycolor.readability(baseColor, colorList[i]); - if (readability > bestScore) { - bestScore = readability; - bestColor = tinycolor(colorList[i]); - } - } - if (tinycolor.isReadable(baseColor, bestColor, { - level: level, - size: size - }) || !includeFallbackColors) { - return bestColor; - } else { - args.includeFallbackColors = false; - return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args); - } - }; - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - rebeccapurple: "663399", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = {}; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) n = "100%"; - var processPercent = isPercentage(n); - n = Math.min(max, Math.max(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if (Math.abs(n - max) < 0.000001) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return n % max / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return Math.min(1, Math.max(0, val)); - } - - // Parse a base-16 hex value into a base-10 integer - function parseIntFromHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf("%") != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? "0" + c : "" + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = n * 100 + "%"; - } - return n; - } - - // Converts a decimal to a hex value - function convertDecimalToHex(d) { - return Math.round(parseFloat(d) * 255).toString(16); - } - // Converts a hex value to a decimal - function convertHexToDecimal(h) { - return parseIntFromHex(h) / 255; - } - var matchers = function () { - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - return { - CSS_UNIT: new RegExp(CSS_UNIT), - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), - hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, - hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - }(); - - // `isValidCSSUnit` - // Take in a single string / number and check to see if it looks like a CSS unit - // (see `matchers` above for definition). - function isValidCSSUnit(color) { - return !!matchers.CSS_UNIT.exec(color); - } - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } else if (color == "transparent") { - return { - r: 0, - g: 0, - b: 0, - a: 0, - format: "name" - }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if (match = matchers.rgb.exec(color)) { - return { - r: match[1], - g: match[2], - b: match[3] - }; - } - if (match = matchers.rgba.exec(color)) { - return { - r: match[1], - g: match[2], - b: match[3], - a: match[4] - }; - } - if (match = matchers.hsl.exec(color)) { - return { - h: match[1], - s: match[2], - l: match[3] - }; - } - if (match = matchers.hsla.exec(color)) { - return { - h: match[1], - s: match[2], - l: match[3], - a: match[4] - }; - } - if (match = matchers.hsv.exec(color)) { - return { - h: match[1], - s: match[2], - v: match[3] - }; - } - if (match = matchers.hsva.exec(color)) { - return { - h: match[1], - s: match[2], - v: match[3], - a: match[4] - }; - } - if (match = matchers.hex8.exec(color)) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8" - }; - } - if (match = matchers.hex6.exec(color)) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - format: named ? "name" : "hex" - }; - } - if (match = matchers.hex4.exec(color)) { - return { - r: parseIntFromHex(match[1] + "" + match[1]), - g: parseIntFromHex(match[2] + "" + match[2]), - b: parseIntFromHex(match[3] + "" + match[3]), - a: convertHexToDecimal(match[4] + "" + match[4]), - format: named ? "name" : "hex8" - }; - } - if (match = matchers.hex3.exec(color)) { - return { - r: parseIntFromHex(match[1] + "" + match[1]), - g: parseIntFromHex(match[2] + "" + match[2]), - b: parseIntFromHex(match[3] + "" + match[3]), - format: named ? "name" : "hex" - }; - } - return false; - } - function validateWCAG2Parms(parms) { - // return valid WCAG2 parms for isReadable. - // If input parms are invalid, return {"level":"AA", "size":"small"} - var level, size; - parms = parms || { - level: "AA", - size: "small" - }; - level = (parms.level || "AA").toUpperCase(); - size = (parms.size || "small").toLowerCase(); - if (level !== "AA" && level !== "AAA") { - level = "AA"; - } - if (size !== "small" && size !== "large") { - size = "small"; - } - return { - level: level, - size: size - }; - } - - return tinycolor; - -})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/deno_asserts@0.168.0.mjs b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/deno_asserts@0.168.0.mjs deleted file mode 100644 index 685fdd20acadd30a682cdd228ac15ce1aa46b205..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +++ /dev/null @@ -1,807 +0,0 @@ -// deno-fmt-ignore-file -// deno-lint-ignore-file -// This code was bundled using `deno bundle` and it's not recommended to edit it manually -// Using `deno bundle https://deno.land/std@0.168.0/testing/asserts.ts > npm/deno_asserts@0.168.0.mjs` - -const { Deno } = globalThis; -const noColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : true; -let enabled = !noColor; -function code(open, close) { - return { - open: `\x1b[${open.join(";")}m`, - close: `\x1b[${close}m`, - regexp: new RegExp(`\\x1b\\[${close}m`, "g") - }; -} -function run(str, code) { - return enabled ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}` : str; -} -function bold(str) { - return run(str, code([ - 1 - ], 22)); -} -function red(str) { - return run(str, code([ - 31 - ], 39)); -} -function green(str) { - return run(str, code([ - 32 - ], 39)); -} -function white(str) { - return run(str, code([ - 37 - ], 39)); -} -function gray(str) { - return brightBlack(str); -} -function brightBlack(str) { - return run(str, code([ - 90 - ], 39)); -} -function bgRed(str) { - return run(str, code([ - 41 - ], 49)); -} -function bgGreen(str) { - return run(str, code([ - 42 - ], 49)); -} -const ANSI_PATTERN = new RegExp([ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", - "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" -].join("|"), "g"); -function stripColor(string) { - return string.replace(ANSI_PATTERN, ""); -} -var DiffType; -(function(DiffType) { - DiffType["removed"] = "removed"; - DiffType["common"] = "common"; - DiffType["added"] = "added"; -})(DiffType || (DiffType = {})); -const REMOVED = 1; -const COMMON = 2; -const ADDED = 3; -function createCommon(A, B, reverse) { - const common = []; - if (A.length === 0 || B.length === 0) return []; - for(let i = 0; i < Math.min(A.length, B.length); i += 1){ - if (A[reverse ? A.length - i - 1 : i] === B[reverse ? B.length - i - 1 : i]) { - common.push(A[reverse ? A.length - i - 1 : i]); - } else { - return common; - } - } - return common; -} -function diff(A, B) { - const prefixCommon = createCommon(A, B); - const suffixCommon = createCommon(A.slice(prefixCommon.length), B.slice(prefixCommon.length), true).reverse(); - A = suffixCommon.length ? A.slice(prefixCommon.length, -suffixCommon.length) : A.slice(prefixCommon.length); - B = suffixCommon.length ? B.slice(prefixCommon.length, -suffixCommon.length) : B.slice(prefixCommon.length); - const swapped = B.length > A.length; - [A, B] = swapped ? [ - B, - A - ] : [ - A, - B - ]; - const M = A.length; - const N = B.length; - if (!M && !N && !suffixCommon.length && !prefixCommon.length) return []; - if (!N) { - return [ - ...prefixCommon.map((c)=>({ - type: DiffType.common, - value: c - })), - ...A.map((a)=>({ - type: swapped ? DiffType.added : DiffType.removed, - value: a - })), - ...suffixCommon.map((c)=>({ - type: DiffType.common, - value: c - })) - ]; - } - const offset = N; - const delta = M - N; - const size = M + N + 1; - const fp = Array.from({ - length: size - }, ()=>({ - y: -1, - id: -1 - })); - const routes = new Uint32Array((M * N + size + 1) * 2); - const diffTypesPtrOffset = routes.length / 2; - let ptr = 0; - let p = -1; - function backTrace(A, B, current, swapped) { - const M = A.length; - const N = B.length; - const result = []; - let a = M - 1; - let b = N - 1; - let j = routes[current.id]; - let type = routes[current.id + diffTypesPtrOffset]; - while(true){ - if (!j && !type) break; - const prev = j; - if (type === 1) { - result.unshift({ - type: swapped ? DiffType.removed : DiffType.added, - value: B[b] - }); - b -= 1; - } else if (type === 3) { - result.unshift({ - type: swapped ? DiffType.added : DiffType.removed, - value: A[a] - }); - a -= 1; - } else { - result.unshift({ - type: DiffType.common, - value: A[a] - }); - a -= 1; - b -= 1; - } - j = routes[prev]; - type = routes[prev + diffTypesPtrOffset]; - } - return result; - } - function createFP(slide, down, k, M) { - if (slide && slide.y === -1 && down && down.y === -1) { - return { - y: 0, - id: 0 - }; - } - if (down && down.y === -1 || k === M || (slide && slide.y) > (down && down.y) + 1) { - const prev = slide.id; - ptr++; - routes[ptr] = prev; - routes[ptr + diffTypesPtrOffset] = ADDED; - return { - y: slide.y, - id: ptr - }; - } else { - const prev1 = down.id; - ptr++; - routes[ptr] = prev1; - routes[ptr + diffTypesPtrOffset] = REMOVED; - return { - y: down.y + 1, - id: ptr - }; - } - } - function snake(k, slide, down, _offset, A, B) { - const M = A.length; - const N = B.length; - if (k < -N || M < k) return { - y: -1, - id: -1 - }; - const fp = createFP(slide, down, k, M); - while(fp.y + k < M && fp.y < N && A[fp.y + k] === B[fp.y]){ - const prev = fp.id; - ptr++; - fp.id = ptr; - fp.y += 1; - routes[ptr] = prev; - routes[ptr + diffTypesPtrOffset] = COMMON; - } - return fp; - } - while(fp[delta + offset].y < N){ - p = p + 1; - for(let k = -p; k < delta; ++k){ - fp[k + offset] = snake(k, fp[k - 1 + offset], fp[k + 1 + offset], offset, A, B); - } - for(let k1 = delta + p; k1 > delta; --k1){ - fp[k1 + offset] = snake(k1, fp[k1 - 1 + offset], fp[k1 + 1 + offset], offset, A, B); - } - fp[delta + offset] = snake(delta, fp[delta - 1 + offset], fp[delta + 1 + offset], offset, A, B); - } - return [ - ...prefixCommon.map((c)=>({ - type: DiffType.common, - value: c - })), - ...backTrace(A, B, fp[delta + offset], swapped), - ...suffixCommon.map((c)=>({ - type: DiffType.common, - value: c - })) - ]; -} -function diffstr(A, B) { - function unescape(string) { - return string.replaceAll("\b", "\\b").replaceAll("\f", "\\f").replaceAll("\t", "\\t").replaceAll("\v", "\\v").replaceAll(/\r\n|\r|\n/g, (str)=>str === "\r" ? "\\r" : str === "\n" ? "\\n\n" : "\\r\\n\r\n"); - } - function tokenize(string, { wordDiff =false } = {}) { - if (wordDiff) { - const tokens = string.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); - const words = /^[a-zA-Z\u{C0}-\u{FF}\u{D8}-\u{F6}\u{F8}-\u{2C6}\u{2C8}-\u{2D7}\u{2DE}-\u{2FF}\u{1E00}-\u{1EFF}]+$/u; - for(let i = 0; i < tokens.length - 1; i++){ - if (!tokens[i + 1] && tokens[i + 2] && words.test(tokens[i]) && words.test(tokens[i + 2])) { - tokens[i] += tokens[i + 2]; - tokens.splice(i + 1, 2); - i--; - } - } - return tokens.filter((token)=>token); - } else { - const tokens1 = [], lines = string.split(/(\n|\r\n)/); - if (!lines[lines.length - 1]) { - lines.pop(); - } - for(let i1 = 0; i1 < lines.length; i1++){ - if (i1 % 2) { - tokens1[tokens1.length - 1] += lines[i1]; - } else { - tokens1.push(lines[i1]); - } - } - return tokens1; - } - } - function createDetails(line, tokens) { - return tokens.filter(({ type })=>type === line.type || type === DiffType.common).map((result, i, t)=>{ - if (result.type === DiffType.common && t[i - 1] && t[i - 1]?.type === t[i + 1]?.type && /\s+/.test(result.value)) { - result.type = t[i - 1].type; - } - return result; - }); - } - const diffResult = diff(tokenize(`${unescape(A)}\n`), tokenize(`${unescape(B)}\n`)); - const added = [], removed = []; - for (const result of diffResult){ - if (result.type === DiffType.added) { - added.push(result); - } - if (result.type === DiffType.removed) { - removed.push(result); - } - } - const aLines = added.length < removed.length ? added : removed; - const bLines = aLines === removed ? added : removed; - for (const a of aLines){ - let tokens = [], b; - while(bLines.length){ - b = bLines.shift(); - tokens = diff(tokenize(a.value, { - wordDiff: true - }), tokenize(b?.value ?? "", { - wordDiff: true - })); - if (tokens.some(({ type , value })=>type === DiffType.common && value.trim().length)) { - break; - } - } - a.details = createDetails(a, tokens); - if (b) { - b.details = createDetails(b, tokens); - } - } - return diffResult; -} -function createColor(diffType, { background =false } = {}) { - background = false; - switch(diffType){ - case DiffType.added: - return (s)=>background ? bgGreen(white(s)) : green(bold(s)); - case DiffType.removed: - return (s)=>background ? bgRed(white(s)) : red(bold(s)); - default: - return white; - } -} -function createSign(diffType) { - switch(diffType){ - case DiffType.added: - return "+ "; - case DiffType.removed: - return "- "; - default: - return " "; - } -} -function buildMessage(diffResult, { stringDiff =false } = {}) { - const messages = [], diffMessages = []; - messages.push(""); - messages.push(""); - messages.push(` ${gray(bold("[Diff]"))} ${red(bold("Actual"))} / ${green(bold("Expected"))}`); - messages.push(""); - messages.push(""); - diffResult.forEach((result)=>{ - const c = createColor(result.type); - const line = result.details?.map((detail)=>detail.type !== DiffType.common ? createColor(detail.type, { - background: true - })(detail.value) : detail.value).join("") ?? result.value; - diffMessages.push(c(`${createSign(result.type)}${line}`)); - }); - messages.push(...stringDiff ? [ - diffMessages.join("") - ] : diffMessages); - messages.push(""); - return messages; -} -function format(v) { - const { Deno } = globalThis; - return typeof Deno?.inspect === "function" ? Deno.inspect(v, { - depth: Infinity, - sorted: true, - trailingComma: true, - compact: false, - iterableLimit: Infinity, - getters: true - }) : `"${String(v).replace(/(?=["\\])/g, "\\")}"`; -} -const CAN_NOT_DISPLAY = "[Cannot display]"; -class AssertionError extends Error { - name = "AssertionError"; - constructor(message){ - super(message); - } -} -function isKeyedCollection(x) { - return [ - Symbol.iterator, - "size" - ].every((k)=>k in x); -} -function equal(c, d) { - const seen = new Map(); - return function compare(a, b) { - if (a && b && (a instanceof RegExp && b instanceof RegExp || a instanceof URL && b instanceof URL)) { - return String(a) === String(b); - } - if (a instanceof Date && b instanceof Date) { - const aTime = a.getTime(); - const bTime = b.getTime(); - if (Number.isNaN(aTime) && Number.isNaN(bTime)) { - return true; - } - return aTime === bTime; - } - if (typeof a === "number" && typeof b === "number") { - return Number.isNaN(a) && Number.isNaN(b) || a === b; - } - if (Object.is(a, b)) { - return true; - } - if (a && typeof a === "object" && b && typeof b === "object") { - if (a && b && !constructorsEqual(a, b)) { - return false; - } - if (a instanceof WeakMap || b instanceof WeakMap) { - if (!(a instanceof WeakMap && b instanceof WeakMap)) return false; - throw new TypeError("cannot compare WeakMap instances"); - } - if (a instanceof WeakSet || b instanceof WeakSet) { - if (!(a instanceof WeakSet && b instanceof WeakSet)) return false; - throw new TypeError("cannot compare WeakSet instances"); - } - if (seen.get(a) === b) { - return true; - } - if (Object.keys(a || {}).length !== Object.keys(b || {}).length) { - return false; - } - seen.set(a, b); - if (isKeyedCollection(a) && isKeyedCollection(b)) { - if (a.size !== b.size) { - return false; - } - let unmatchedEntries = a.size; - for (const [aKey, aValue] of a.entries()){ - for (const [bKey, bValue] of b.entries()){ - if (aKey === aValue && bKey === bValue && compare(aKey, bKey) || compare(aKey, bKey) && compare(aValue, bValue)) { - unmatchedEntries--; - break; - } - } - } - return unmatchedEntries === 0; - } - const merged = { - ...a, - ...b - }; - for (const key of [ - ...Object.getOwnPropertyNames(merged), - ...Object.getOwnPropertySymbols(merged) - ]){ - if (!compare(a && a[key], b && b[key])) { - return false; - } - if (key in a && !(key in b) || key in b && !(key in a)) { - return false; - } - } - if (a instanceof WeakRef || b instanceof WeakRef) { - if (!(a instanceof WeakRef && b instanceof WeakRef)) return false; - return compare(a.deref(), b.deref()); - } - return true; - } - return false; - }(c, d); -} -function constructorsEqual(a, b) { - return a.constructor === b.constructor || a.constructor === Object && !b.constructor || !a.constructor && b.constructor === Object; -} -function assert(expr, msg = "") { - if (!expr) { - throw new AssertionError(msg); - } -} -function assertFalse(expr, msg = "") { - if (expr) { - throw new AssertionError(msg); - } -} -function assertEquals(actual, expected, msg) { - if (equal(actual, expected)) { - return; - } - let message = ""; - const actualString = format(actual); - const expectedString = format(expected); - try { - const stringDiff = typeof actual === "string" && typeof expected === "string"; - const diffResult = stringDiff ? diffstr(actual, expected) : diff(actualString.split("\n"), expectedString.split("\n")); - const diffMsg = buildMessage(diffResult, { - stringDiff - }).join("\n"); - message = `Values are not equal:\n${diffMsg}`; - } catch { - message = `\n${red(CAN_NOT_DISPLAY)} + \n\n`; - } - if (msg) { - message = msg; - } - throw new AssertionError(message); -} -function assertNotEquals(actual, expected, msg) { - if (!equal(actual, expected)) { - return; - } - let actualString; - let expectedString; - try { - actualString = String(actual); - } catch { - actualString = "[Cannot display]"; - } - try { - expectedString = String(expected); - } catch { - expectedString = "[Cannot display]"; - } - if (!msg) { - msg = `actual: ${actualString} expected not to be: ${expectedString}`; - } - throw new AssertionError(msg); -} -function assertStrictEquals(actual, expected, msg) { - if (Object.is(actual, expected)) { - return; - } - let message; - if (msg) { - message = msg; - } else { - const actualString = format(actual); - const expectedString = format(expected); - if (actualString === expectedString) { - const withOffset = actualString.split("\n").map((l)=>` ${l}`).join("\n"); - message = `Values have the same structure but are not reference-equal:\n\n${red(withOffset)}\n`; - } else { - try { - const stringDiff = typeof actual === "string" && typeof expected === "string"; - const diffResult = stringDiff ? diffstr(actual, expected) : diff(actualString.split("\n"), expectedString.split("\n")); - const diffMsg = buildMessage(diffResult, { - stringDiff - }).join("\n"); - message = `Values are not strictly equal:\n${diffMsg}`; - } catch { - message = `\n${red(CAN_NOT_DISPLAY)} + \n\n`; - } - } - } - throw new AssertionError(message); -} -function assertNotStrictEquals(actual, expected, msg) { - if (!Object.is(actual, expected)) { - return; - } - throw new AssertionError(msg ?? `Expected "actual" to be strictly unequal to: ${format(actual)}\n`); -} -function assertAlmostEquals(actual, expected, tolerance = 1e-7, msg) { - if (Object.is(actual, expected)) { - return; - } - const delta = Math.abs(expected - actual); - if (delta <= tolerance) { - return; - } - const f = (n)=>Number.isInteger(n) ? n : n.toExponential(); - throw new AssertionError(msg ?? `actual: "${f(actual)}" expected to be close to "${f(expected)}": \ -delta "${f(delta)}" is greater than "${f(tolerance)}"`); -} -function assertInstanceOf(actual, expectedType, msg = "") { - if (!msg) { - const expectedTypeStr = expectedType.name; - let actualTypeStr = ""; - if (actual === null) { - actualTypeStr = "null"; - } else if (actual === undefined) { - actualTypeStr = "undefined"; - } else if (typeof actual === "object") { - actualTypeStr = actual.constructor?.name ?? "Object"; - } else { - actualTypeStr = typeof actual; - } - if (expectedTypeStr == actualTypeStr) { - msg = `Expected object to be an instance of "${expectedTypeStr}".`; - } else if (actualTypeStr == "function") { - msg = `Expected object to be an instance of "${expectedTypeStr}" but was not an instanced object.`; - } else { - msg = `Expected object to be an instance of "${expectedTypeStr}" but was "${actualTypeStr}".`; - } - } - assert(actual instanceof expectedType, msg); -} -function assertNotInstanceOf(actual, unexpectedType, msg = `Expected object to not be an instance of "${typeof unexpectedType}"`) { - assertFalse(actual instanceof unexpectedType, msg); -} -function assertExists(actual, msg) { - if (actual === undefined || actual === null) { - if (!msg) { - msg = `actual: "${actual}" expected to not be null or undefined`; - } - throw new AssertionError(msg); - } -} -function assertStringIncludes(actual, expected, msg) { - if (!actual.includes(expected)) { - if (!msg) { - msg = `actual: "${actual}" expected to contain: "${expected}"`; - } - throw new AssertionError(msg); - } -} -function assertArrayIncludes(actual, expected, msg) { - const missing = []; - for(let i = 0; i < expected.length; i++){ - let found = false; - for(let j = 0; j < actual.length; j++){ - if (equal(expected[i], actual[j])) { - found = true; - break; - } - } - if (!found) { - missing.push(expected[i]); - } - } - if (missing.length === 0) { - return; - } - if (!msg) { - msg = `actual: "${format(actual)}" expected to include: "${format(expected)}"\nmissing: ${format(missing)}`; - } - throw new AssertionError(msg); -} -function assertMatch(actual, expected, msg) { - if (!expected.test(actual)) { - if (!msg) { - msg = `actual: "${actual}" expected to match: "${expected}"`; - } - throw new AssertionError(msg); - } -} -function assertNotMatch(actual, expected, msg) { - if (expected.test(actual)) { - if (!msg) { - msg = `actual: "${actual}" expected to not match: "${expected}"`; - } - throw new AssertionError(msg); - } -} -function assertObjectMatch(actual, expected) { - function filter(a, b) { - const seen = new WeakMap(); - return fn(a, b); - function fn(a, b) { - if (seen.has(a) && seen.get(a) === b) { - return a; - } - seen.set(a, b); - const filtered = {}; - const entries = [ - ...Object.getOwnPropertyNames(a), - ...Object.getOwnPropertySymbols(a) - ].filter((key)=>key in b).map((key)=>[ - key, - a[key] - ]); - for (const [key, value] of entries){ - if (Array.isArray(value)) { - const subset = b[key]; - if (Array.isArray(subset)) { - filtered[key] = fn({ - ...value - }, { - ...subset - }); - continue; - } - } else if (value instanceof RegExp) { - filtered[key] = value; - continue; - } else if (typeof value === "object") { - const subset1 = b[key]; - if (typeof subset1 === "object" && subset1) { - if (value instanceof Map && subset1 instanceof Map) { - filtered[key] = new Map([ - ...value - ].filter(([k])=>subset1.has(k)).map(([k, v])=>[ - k, - typeof v === "object" ? fn(v, subset1.get(k)) : v - ])); - continue; - } - if (value instanceof Set && subset1 instanceof Set) { - filtered[key] = new Set([ - ...value - ].filter((v)=>subset1.has(v))); - continue; - } - filtered[key] = fn(value, subset1); - continue; - } - } - filtered[key] = value; - } - return filtered; - } - } - return assertEquals(filter(actual, expected), filter(expected, expected)); -} -function fail(msg) { - assert(false, `Failed assertion${msg ? `: ${msg}` : "."}`); -} -function assertIsError(error, ErrorClass, msgIncludes, msg) { - if (error instanceof Error === false) { - throw new AssertionError(`Expected "error" to be an Error object.`); - } - if (ErrorClass && !(error instanceof ErrorClass)) { - msg = `Expected error to be instance of "${ErrorClass.name}", but was "${typeof error === "object" ? error?.constructor?.name : "[not an object]"}"${msg ? `: ${msg}` : "."}`; - throw new AssertionError(msg); - } - if (msgIncludes && (!(error instanceof Error) || !stripColor(error.message).includes(stripColor(msgIncludes)))) { - msg = `Expected error message to include "${msgIncludes}", but got "${error instanceof Error ? error.message : "[not an Error]"}"${msg ? `: ${msg}` : "."}`; - throw new AssertionError(msg); - } -} -function assertThrows(fn, errorClassOrMsg, msgIncludesOrMsg, msg) { - let ErrorClass = undefined; - let msgIncludes = undefined; - let err; - if (typeof errorClassOrMsg !== "string") { - if (errorClassOrMsg === undefined || errorClassOrMsg.prototype instanceof Error || errorClassOrMsg.prototype === Error.prototype) { - ErrorClass = errorClassOrMsg; - msgIncludes = msgIncludesOrMsg; - } else { - msg = msgIncludesOrMsg; - } - } else { - msg = errorClassOrMsg; - } - let doesThrow = false; - const msgToAppendToError = msg ? `: ${msg}` : "."; - try { - fn(); - } catch (error) { - if (ErrorClass) { - if (error instanceof Error === false) { - throw new AssertionError("A non-Error object was thrown."); - } - assertIsError(error, ErrorClass, msgIncludes, msg); - } - err = error; - doesThrow = true; - } - if (!doesThrow) { - msg = `Expected function to throw${msgToAppendToError}`; - throw new AssertionError(msg); - } - return err; -} -async function assertRejects(fn, errorClassOrMsg, msgIncludesOrMsg, msg) { - let ErrorClass = undefined; - let msgIncludes = undefined; - let err; - if (typeof errorClassOrMsg !== "string") { - if (errorClassOrMsg === undefined || errorClassOrMsg.prototype instanceof Error || errorClassOrMsg.prototype === Error.prototype) { - ErrorClass = errorClassOrMsg; - msgIncludes = msgIncludesOrMsg; - } - } else { - msg = errorClassOrMsg; - } - let doesThrow = false; - let isPromiseReturned = false; - const msgToAppendToError = msg ? `: ${msg}` : "."; - try { - const possiblePromise = fn(); - if (possiblePromise && typeof possiblePromise === "object" && typeof possiblePromise.then === "function") { - isPromiseReturned = true; - await possiblePromise; - } - } catch (error) { - if (!isPromiseReturned) { - throw new AssertionError(`Function throws when expected to reject${msgToAppendToError}`); - } - if (ErrorClass) { - if (error instanceof Error === false) { - throw new AssertionError("A non-Error object was rejected."); - } - assertIsError(error, ErrorClass, msgIncludes, msg); - } - err = error; - doesThrow = true; - } - if (!doesThrow) { - throw new AssertionError(`Expected function to reject${msgToAppendToError}`); - } - return err; -} -function unimplemented(msg) { - throw new AssertionError(msg || "unimplemented"); -} -function unreachable() { - throw new AssertionError("unreachable"); -} -export { AssertionError as AssertionError }; -export { equal as equal }; -export { assert as assert }; -export { assertFalse as assertFalse }; -export { assertEquals as assertEquals }; -export { assertNotEquals as assertNotEquals }; -export { assertStrictEquals as assertStrictEquals }; -export { assertNotStrictEquals as assertNotStrictEquals }; -export { assertAlmostEquals as assertAlmostEquals }; -export { assertInstanceOf as assertInstanceOf }; -export { assertNotInstanceOf as assertNotInstanceOf }; -export { assertExists as assertExists }; -export { assertStringIncludes as assertStringIncludes }; -export { assertArrayIncludes as assertArrayIncludes }; -export { assertMatch as assertMatch }; -export { assertNotMatch as assertNotMatch }; -export { assertObjectMatch as assertObjectMatch }; -export { fail as fail }; -export { assertIsError as assertIsError }; -export { assertThrows as assertThrows }; -export { assertRejects as assertRejects }; -export { unimplemented as unimplemented }; -export { unreachable as unreachable }; - diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/dist/tinycolor-min.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/dist/tinycolor-min.js deleted file mode 100644 index 14389aa181f3dd58f338ea2c53c92cc9f01ea629..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/dist/tinycolor-min.js +++ /dev/null @@ -1,5 +0,0 @@ -// This file is autogenerated. -// It's here at this path for backwards compatibility for links to it -// but the npm package now exports both CJS and ESM. -// See https://github.com/bgrins/TinyColor/ for instructions. - !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).tinycolor=r()}(this,(function(){"use strict";function t(r){return t="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(r)}var r=/^\s+/,e=/\s+$/;function n(a,i){if(i=i||{},(a=a||"")instanceof n)return a;if(!(this instanceof n))return new n(a,i);var o=function(n){var a={r:0,g:0,b:0},i=1,o=null,h=null,s=null,f=!1,u=!1;"string"==typeof n&&(n=function(t){t=t.replace(r,"").replace(e,"").toLowerCase();var n,a=!1;if(y[t])t=y[t],a=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(n=T.rgb.exec(t))return{r:n[1],g:n[2],b:n[3]};if(n=T.rgba.exec(t))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=T.hsl.exec(t))return{h:n[1],s:n[2],l:n[3]};if(n=T.hsla.exec(t))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=T.hsv.exec(t))return{h:n[1],s:n[2],v:n[3]};if(n=T.hsva.exec(t))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=T.hex8.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),a:F(n[4]),format:a?"name":"hex8"};if(n=T.hex6.exec(t))return{r:w(n[1]),g:w(n[2]),b:w(n[3]),format:a?"name":"hex"};if(n=T.hex4.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),a:F(n[4]+""+n[4]),format:a?"name":"hex8"};if(n=T.hex3.exec(t))return{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),format:a?"name":"hex"};return!1}(n));"object"==t(n)&&(E(n.r)&&E(n.g)&&E(n.b)?(l=n.r,c=n.g,d=n.b,a={r:255*A(l,255),g:255*A(c,255),b:255*A(d,255)},f=!0,u="%"===String(n.r).substr(-1)?"prgb":"rgb"):E(n.h)&&E(n.s)&&E(n.v)?(o=H(n.s),h=H(n.v),a=function(t,r,e){t=6*A(t,360),r=A(r,100),e=A(e,100);var n=Math.floor(t),a=t-n,i=e*(1-r),o=e*(1-a*r),h=e*(1-(1-a)*r),s=n%6,f=[e,o,i,i,h,e][s],u=[h,e,e,o,i,i][s],l=[i,i,h,e,e,o][s];return{r:255*f,g:255*u,b:255*l}}(n.h,o,h),f=!0,u="hsv"):E(n.h)&&E(n.s)&&E(n.l)&&(o=H(n.s),s=H(n.l),a=function(t,r,e){var n,a,i;function o(t,r,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(r-t)*e:e<.5?r:e<2/3?t+(r-t)*(2/3-e)*6:t}if(t=A(t,360),r=A(r,100),e=A(e,100),0===r)n=a=i=e;else{var h=e<.5?e*(1+r):e+r-e*r,s=2*e-h;n=o(s,h,t+1/3),a=o(s,h,t),i=o(s,h,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(n.h,o,s),f=!0,u="hsl"),n.hasOwnProperty("a")&&(i=n.a));var l,c,d;return i=x(i),{ok:f,format:n.format||u,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:i}}(a);this._originalInput=a,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||o.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function a(t,r,e){t=A(t,255),r=A(r,255),e=A(e,255);var n,a,i=Math.max(t,r,e),o=Math.min(t,r,e),h=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=h>.5?s/(2-i-o):s/(i+o),i){case t:n=(r-e)/s+(r>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(n(a));return o}function v(t,r){r=r||6;for(var e=n(t).toHsv(),a=e.h,i=e.s,o=e.v,h=[],s=1/r;r--;)h.push(n({h:a,s:i,v:o})),o=(o+s)%1;return h}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,r,e,n=this.toRgb();return t=n.r/255,r=n.g/255,e=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))},setAlpha:function(t){return this._a=x(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+r+", "+e+"%, "+n+"%)":"hsva("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=a(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=a(this._r,this._g,this._b),r=Math.round(360*t.h),e=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+r+", "+e+"%, "+n+"%)":"hsla("+r+", "+e+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,r,e,n,a){var i=[S(Math.round(t).toString(16)),S(Math.round(r).toString(16)),S(Math.round(e).toString(16)),S(R(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*A(this._r,255))+"%",g:Math.round(100*A(this._g,255))+"%",b:Math.round(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%)":"rgba("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[o(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var r="#"+h(this._r,this._g,this._b,this._a),e=r,a=this._gradientType?"GradientType = 1, ":"";if(t){var i=n(t);e="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+e+")"},toString:function(t){var r=!!t;t=t||this._format;var e=!1,n=this._a<1&&this._a>=0;return r||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return n(this.toString())},_applyModification:function(t,r){var e=t.apply(null,[this].concat([].slice.call(r)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,r){return t.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(v,arguments)},splitcomplement:function(){return this._applyCombination(p,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},n.fromRatio=function(r,e){if("object"==t(r)){var a={};for(var i in r)r.hasOwnProperty(i)&&(a[i]="a"===i?r[i]:H(r[i]));r=a}return n(r,e)},n.equals=function(t,r){return!(!t||!r)&&n(t).toRgbString()==n(r).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},n.mix=function(t,r,e){e=0===e?0:e||50;var a=n(t).toRgb(),i=n(r).toRgb(),o=e/100;return n({r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a})},n.readability=function(t,r){var e=n(t),a=n(r);return(Math.max(e.getLuminance(),a.getLuminance())+.05)/(Math.min(e.getLuminance(),a.getLuminance())+.05)},n.isReadable=function(t,r,e){var a,i,o=n.readability(t,r);switch(i=!1,(a=function(t){var r,e;r=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA");"small"!==e&&"large"!==e&&(e="small");return{level:r,size:e}}(e)).level+a.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},n.mostReadable=function(t,r,e){var a,i,o,h,s=null,f=0;i=(e=e||{}).includeFallbackColors,o=e.level,h=e.size;for(var u=0;uf&&(f=a,s=n(r[u]));return n.isReadable(t,s,{level:o,size:h})||!i?s:(e.includeFallbackColors=!1,n.mostReadable(t,["#fff","#000"],e))};var y=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=n.hexNames=function(t){var r={};for(var e in t)t.hasOwnProperty(e)&&(r[t[e]]=e);return r}(y);function x(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var e=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(r,Math.max(0,parseFloat(t))),e&&(t=parseInt(t*r,10)/100),Math.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function k(t){return Math.min(1,Math.max(0,t))}function w(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function H(t){return t<=1&&(t=100*t+"%"),t}function R(t){return Math.round(255*parseFloat(t)).toString(16)}function F(t){return w(t)/255}var C,q,N,T=(q="[\\s|\\(]+("+(C="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",N="[\\s|\\(]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")[,|\\s]+("+C+")\\s*\\)?",{CSS_UNIT:new RegExp(C),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function E(t){return!!T.CSS_UNIT.exec(t)}return n})); \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/package.json b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/package.json deleted file mode 100644 index 3dbc1ca591c0557e35b6004aeba250e6a70b56e3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/test.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/test.js deleted file mode 100644 index 4f02b0ce91a1732670f34f6f231f1f9b2adbac3a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/test.js +++ /dev/null @@ -1,2189 +0,0 @@ -// This file is autogenerated. -// Ideally it wouldn't exist, but it's here to test cjs in node -// Changes should go into ./test.js, and if new assertions are needed -// they'll need to be shimmed here as well -import tinycolor from "./tinycolor.js"; -import { Deno, testDefinitions } from "@deno/shim-deno-test"; -const { assertEquals, assert, assertThrows } = await import( - "../deno_asserts@0.168.0.mjs" -); -async function runDenoTests() { - for (const test of testDefinitions) { - if (test.ignore) { - console.log(`Ignoring ${test.name}`); - continue; - } - console.log(`Running ${test.name}`); - await test.fn(); - console.log(`> Passed ${test.name}`); - } -} - -// TEST_BEGINS_HERE - -Deno.test("TinyColor initialization", function () { - assert( - typeof tinycolor != "undefined", - "tinycolor is initialized on the page" - ); - assert( - typeof tinycolor("red") == "object", - "tinycolor is able to be instantiated" - ); - - var r = tinycolor("red"); - assert( - tinycolor(r) === r, - "when given a tinycolor instance, tinycolor() returns it" - ); - assert( - new tinycolor(r) === r, - "when given a tinycolor instance, new tinycolor() returns it" - ); - assertEquals( - tinycolor("red", { format: "hex" }).toString(), - "#ff0000", - "tinycolor options are being parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0 }, { format: "hex" }).toString(), - "#ff0000", - "tinycolor options are being parsed" - ); - - var obj = { h: 180, s: 0.5, l: 0.5 }; - var color = tinycolor(obj); - assert( - obj.s === 0.5, - "when given an object, the original object is not modified" - ); -}); - -Deno.test("Original input", function () { - var colorRgbUp = "RGB(39, 39, 39)"; - var colorRgbLow = "rgb(39, 39, 39)"; - var colorRgbMix = "RgB(39, 39, 39)"; - var tinycolorObj = tinycolor(colorRgbMix); - var inputObj = { r: 100, g: 100, b: 100 }; - var r = tinycolor("red"); - - assert( - tinycolor(colorRgbLow).getOriginalInput() === colorRgbLow, - "original lowercase input is returned" - ); - assert( - tinycolor(colorRgbUp).getOriginalInput() === colorRgbUp, - "original uppercase input is returned" - ); - assert( - tinycolor(colorRgbMix).getOriginalInput() === colorRgbMix, - "original mixed input is returned" - ); - assert( - tinycolor(tinycolorObj).getOriginalInput() === colorRgbMix, - "when given a tinycolor instance, the color string is returned" - ); - assert( - tinycolor(inputObj).getOriginalInput() === inputObj, - "when given an object, the object is returned" - ); - assert( - new tinycolor("").getOriginalInput() === "", - "when given an empty string, an empty string is returned" - ); - assert( - new tinycolor(null).getOriginalInput() === "", - "when given a null value, an empty string is returned" - ); -}); - -Deno.test("Cloning color", function () { - var originalColor = tinycolor("red"); - var originalColorRgbString = originalColor.toRgbString(); - - var clonedColor = originalColor.clone(); - assert( - clonedColor.toRgbString() === originalColor.toRgbString(), - "cloned color is identical" - ); - - clonedColor.setAlpha(0.5); - assert( - clonedColor.toRgbString() !== originalColor.toRgbString(), - "cloned color is changing independently from original color" - ); - assert( - originalColorRgbString === originalColor.toRgbString(), - "original color was not changed by cloned color change" - ); -}); -Deno.test("Random color", function () { - var randomColor = tinycolor.random(); - assertEquals(randomColor.getAlpha(), 1); - assertEquals(randomColor.getFormat(), "prgb"); - - randomColor.setAlpha(0.5); - assertEquals(randomColor.toHex8String().slice(-2), "80"); -}); - -// Taken from convertWikipediaColors.html -var conversions = [ - { - hex: "#FFFFFF", - hex8: "#FFFFFFFF", - rgb: { r: "100.0%", g: "100.0%", b: "100.0%" }, - hsv: { h: "0", s: "0.000", v: "1.000" }, - hsl: { h: "0", s: "0.000", l: "1.000" }, - }, - { - hex: "#808080", - hex8: "#808080FF", - rgb: { r: "050.0%", g: "050.0%", b: "050.0%" }, - hsv: { h: "0", s: "0.000", v: "0.500" }, - hsl: { h: "0", s: "0.000", l: "0.500" }, - }, - { - hex: "#000000", - hex8: "#000000FF", - rgb: { r: "000.0%", g: "000.0%", b: "000.0%" }, - hsv: { h: "0", s: "0.000", v: "0.000" }, - hsl: { h: "0", s: "0.000", l: "0.000" }, - }, - { - hex: "#FF0000", - hex8: "#FF0000FF", - rgb: { r: "100.0%", g: "000.0%", b: "000.0%" }, - hsv: { h: "0.0", s: "1.000", v: "1.000" }, - hsl: { h: "0.0", s: "1.000", l: "0.500" }, - }, - { - hex: "#BFBF00", - hex8: "#BFBF00FF", - rgb: { r: "075.0%", g: "075.0%", b: "000.0%" }, - hsv: { h: "60.0", s: "1.000", v: "0.750" }, - hsl: { h: "60.0", s: "1.000", l: "0.375" }, - }, - { - hex: "#008000", - hex8: "#008000FF", - rgb: { r: "000.0%", g: "050.0%", b: "000.0%" }, - hsv: { h: "120.0", s: "1.000", v: "0.500" }, - hsl: { h: "120.0", s: "1.000", l: "0.250" }, - }, - { - hex: "#80FFFF", - hex8: "#80FFFFFF", - rgb: { r: "050.0%", g: "100.0%", b: "100.0%" }, - hsv: { h: "180.0", s: "0.500", v: "1.000" }, - hsl: { h: "180.0", s: "1.000", l: "0.750" }, - }, - { - hex: "#8080FF", - hex8: "#8080FFFF", - rgb: { r: "050.0%", g: "050.0%", b: "100.0%" }, - hsv: { h: "240.0", s: "0.500", v: "1.000" }, - hsl: { h: "240.0", s: "1.000", l: "0.750" }, - }, - { - hex: "#BF40BF", - hex8: "#BF40BFFF", - rgb: { r: "075.0%", g: "025.0%", b: "075.0%" }, - hsv: { h: "300.0", s: "0.667", v: "0.750" }, - hsl: { h: "300.0", s: "0.500", l: "0.500" }, - }, - { - hex: "#A0A424", - hex8: "#A0A424FF", - rgb: { r: "062.8%", g: "064.3%", b: "014.2%" }, - hsv: { h: "61.8", s: "0.779", v: "0.643" }, - hsl: { h: "61.8", s: "0.638", l: "0.393" }, - }, - { - hex: "#1EAC41", - hex8: "#1EAC41FF", - rgb: { r: "011.6%", g: "067.5%", b: "025.5%" }, - hsv: { h: "134.9", s: "0.828", v: "0.675" }, - hsl: { h: "134.9", s: "0.707", l: "0.396" }, - }, - { - hex: "#B430E5", - hex8: "#B430E5FF", - rgb: { r: "070.4%", g: "018.7%", b: "089.7%" }, - hsv: { h: "283.7", s: "0.792", v: "0.897" }, - hsl: { h: "283.7", s: "0.775", l: "0.542" }, - }, - { - hex: "#FEF888", - hex8: "#FEF888FF", - rgb: { r: "099.8%", g: "097.4%", b: "053.2%" }, - hsv: { h: "56.9", s: "0.467", v: "0.998" }, - hsl: { h: "56.9", s: "0.991", l: "0.765" }, - }, - { - hex: "#19CB97", - hex8: "#19CB97FF", - rgb: { r: "009.9%", g: "079.5%", b: "059.1%" }, - hsv: { h: "162.4", s: "0.875", v: "0.795" }, - hsl: { h: "162.4", s: "0.779", l: "0.447" }, - }, - { - hex: "#362698", - hex8: "#362698FF", - rgb: { r: "021.1%", g: "014.9%", b: "059.7%" }, - hsv: { h: "248.3", s: "0.750", v: "0.597" }, - hsl: { h: "248.3", s: "0.601", l: "0.373" }, - }, - { - hex: "#7E7EB8", - hex8: "#7E7EB8FF", - rgb: { r: "049.5%", g: "049.3%", b: "072.1%" }, - hsv: { h: "240.5", s: "0.316", v: "0.721" }, - hsl: { h: "240.5", s: "0.290", l: "0.607" }, - }, -]; - -Deno.test("Color Equality", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - - assert(true, tiny.isValid()); - assert( - true, - "Testing " + - c.hex + - ": " + - tiny.toRgbString() + - " " + - tiny.toPercentageRgbString() + - " " + - tiny.toHsvString() + - " " + - tiny.toHslString() + - " " + - tiny.toHexString() + - "Original: " + - JSON.stringify(c.rgb) + - " " + - JSON.stringify(c.hsv) + - " " + - JSON.stringify(c.hsl) - ); - assert(tinycolor.equals(c.rgb, c.hex), "RGB equals hex " + c.hex); - assert(tinycolor.equals(c.rgb, c.hex8), "RGB equals hex " + c.hex); - assert(tinycolor.equals(c.rgb, c.hsl), "RGB equals HSL " + c.hex); - assert(tinycolor.equals(c.rgb, c.hsv), "RGB equals HSV " + c.hex); - assert(tinycolor.equals(c.rgb, c.rgb), "RGB equals RGB " + c.hex); - - assert(tinycolor.equals(c.hex, c.hex), "hex equals hex " + c.hex); - assert(tinycolor.equals(c.hex, c.hex8), "hex equals hex8 " + c.hex); - assert(tinycolor.equals(c.hex, c.hsl), "hex equals HSL " + c.hex); - assert(tinycolor.equals(c.hex, c.hsv), "hex equals HSV " + c.hex); - - assert(tinycolor.equals(c.hsl, c.hsv), "HSL equals HSV " + c.hex); - } -}); - -Deno.test("With Ratio", function () { - assertEquals( - tinycolor.fromRatio({ r: 1, g: 1, b: 1 }).toHexString(), - "#ffffff", - "white" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 0.5 }).toRgbString(), - "rgba(255, 0, 0, 0.5)", - "alpha works when ratio is parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 1 }).toRgbString(), - "rgb(255, 0, 0)", - "alpha = 1 works when ratio is parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: 10 }).toRgbString(), - "rgb(255, 0, 0)", - "alpha > 1 works when ratio is parsed" - ); - assertEquals( - tinycolor.fromRatio({ r: 1, g: 0, b: 0, a: -1 }).toRgbString(), - "rgb(255, 0, 0)", - "alpha < 1 works when ratio is parsed" - ); -}); - -Deno.test("Without Ratio", function () { - assertEquals( - tinycolor({ r: 1, g: 1, b: 1 }).toHexString(), - "#010101", - "010101" - ); - assertEquals( - tinycolor({ r: 0.1, g: 0.1, b: 0.1 }).toHexString(), - "#000000", - "000000" - ); - assertEquals(tinycolor("rgb .1 .1 .1").toHexString(), "#000000", "000000"); -}); - -Deno.test("RGB Text Parsing", function () { - assertEquals( - tinycolor("rgb 255 0 0").toHexString(), - "#ff0000", - "spaced input" - ); - assertEquals( - tinycolor("rgb(255, 0, 0)").toHexString(), - "#ff0000", - "parenthesized input" - ); - assertEquals( - tinycolor("rgb (255, 0, 0)").toHexString(), - "#ff0000", - "parenthesized spaced input" - ); - assertEquals( - tinycolor({ r: 255, g: 0, b: 0 }).toHexString(), - "#ff0000", - "object input" - ); - assertEquals( - tinycolor({ r: 255, g: 0, b: 0 }).toRgb(), - { - r: 255, - g: 0, - b: 0, - a: 1, - }, - "object input and compare" - ); - - assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb(200, 100, 0)")); - assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0")); - assert(tinycolor.equals({ r: 200, g: 100, b: 0 }, "rgb 200 100 0")); - assert( - tinycolor.equals({ r: 200, g: 100, b: 0, a: 0.4 }, "rgba 200 100 0 .4") - ); - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgba 200 100 0 1")); - - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb(200, 100, 0)")); - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0")); - assert(!tinycolor.equals({ r: 199, g: 100, b: 0 }, "rgb 200 100 0")); - - assert( - tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb(200, 100, 0)") - ); - assert( - tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0") - ); - assert( - tinycolor.equals(tinycolor({ r: 200, g: 100, b: 0 }), "rgb 200 100 0") - ); -}); - -Deno.test("Percentage RGB Text Parsing", function () { - assertEquals( - tinycolor("rgb 100% 0% 0%").toHexString(), - "#ff0000", - "spaced input" - ); - assertEquals( - tinycolor("rgb(100%, 0%, 0%)").toHexString(), - "#ff0000", - "parenthesized input" - ); - assertEquals( - tinycolor("rgb (100%, 0%, 0%)").toHexString(), - "#ff0000", - "parenthesized spaced input" - ); - assertEquals( - tinycolor({ r: "100%", g: "0%", b: "0%" }).toHexString(), - "#ff0000", - "object input" - ); - assertEquals( - tinycolor({ r: "100%", g: "0%", b: "0%" }).toRgb(), - { - r: 255, - g: 0, - b: 0, - a: 1, - }, - "object input and compare" - ); - - assert( - tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)") - ); - assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - assert(tinycolor.equals({ r: "90%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - assert( - tinycolor.equals( - { r: "90%", g: "45%", b: "0%", a: 0.4 }, - "rgba 90% 45% 0% .4" - ) - ); - assert( - !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgba 90% 45% 0% 1") - ); - - assert( - !tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb(90%, 45%, 0%)") - ); - assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - assert(!tinycolor.equals({ r: "89%", g: "45%", b: "0%" }, "rgb 90% 45% 0%")); - - assert( - tinycolor.equals( - tinycolor({ r: "90%", g: "45%", b: "0%" }), - "rgb(90%, 45%, 0%)" - ) - ); - assert( - tinycolor.equals( - tinycolor({ r: "90%", g: "45%", b: "0%" }), - "rgb 90% 45% 0%" - ) - ); - assert( - tinycolor.equals( - tinycolor({ r: "90%", g: "45%", b: "0%" }), - "rgb 90% 45% 0%" - ) - ); -}); - -Deno.test("HSL parsing", function () { - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38 }).toHexString(), - "#2400c2", - "to hex" - ); - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38 }).toRgbString(), - "rgb(36, 0, 194)", - "to rgb" - ); - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38 }).toHslString(), - "hsl(251, 100%, 38%)", - "to hsl" - ); - assertEquals( - tinycolor({ h: 251, s: 100, l: 0.38, a: 0.5 }).toHslString(), - "hsla(251, 100%, 38%, 0.5)", - "to hsla" - ); - assertEquals( - tinycolor("hsl(251, 100, 38)").toHexString(), - "#2400c2", - "to hex" - ); - assertEquals( - tinycolor("hsl(251, 100%, 38%)").toRgbString(), - "rgb(36, 0, 194)", - "to rgb" - ); - assertEquals( - tinycolor("hsl(251, 100%, 38%)").toHslString(), - "hsl(251, 100%, 38%)", - "to hsl" - ); - assertEquals( - tinycolor("hsl 100 20 10").toHslString(), - "hsl(100, 20%, 10%)", - "problematic hsl" - ); -}); - -Deno.test("Hex Parsing", function () { - assertEquals(tinycolor("rgb 255 0 0").toHexString(), "#ff0000"); - assertEquals(tinycolor("rgb 255 0 0").toHexString(true), "#f00"); - - assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8String(), "#ff000080"); - assertEquals(tinycolor("rgba 255 0 0 0").toHex8String(), "#ff000000"); - assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(), "#ff0000ff"); - assertEquals(tinycolor("rgba 255 0 0 1").toHex8String(true), "#f00f"); - - assertEquals(tinycolor("rgb 255 0 0").toHex(), "ff0000"); - assertEquals(tinycolor("rgb 255 0 0").toHex(true), "f00"); - assertEquals(tinycolor("rgba 255 0 0 0.5").toHex8(), "ff000080"); -}); - -Deno.test("HSV Parsing", function () { - assertEquals( - tinycolor("hsv 251.1 0.887 .918").toHsvString(), - "hsv(251, 89%, 92%)" - ); - assertEquals( - tinycolor("hsv 251.1 0.887 0.918").toHsvString(), - "hsv(251, 89%, 92%)" - ); - assertEquals( - tinycolor("hsva 251.1 0.887 0.918 0.5").toHsvString(), - "hsva(251, 89%, 92%, 0.5)" - ); -}); - -Deno.test("Invalid Parsing", function () { - var invalidColor = tinycolor("this is not a color"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor("#red"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor(" #red"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor("##123456"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor(" ##123456"); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor({ r: "invalid", g: "invalid", b: "invalid" }); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor({ h: "invalid", s: "invalid", l: "invalid" }); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); - - invalidColor = tinycolor({ h: "invalid", s: "invalid", v: "invalid" }); - assertEquals(invalidColor.toHexString(), "#000000"); - assertEquals(false, invalidColor.isValid()); -}); - -Deno.test("Named colors", function () { - assertEquals(tinycolor("aliceblue").toHex(), "f0f8ff"); - assertEquals(tinycolor("antiquewhite").toHex(), "faebd7"); - assertEquals(tinycolor("aqua").toHex(), "00ffff"); - assertEquals(tinycolor("aquamarine").toHex(), "7fffd4"); - assertEquals(tinycolor("azure").toHex(), "f0ffff"); - assertEquals(tinycolor("beige").toHex(), "f5f5dc"); - assertEquals(tinycolor("bisque").toHex(), "ffe4c4"); - assertEquals(tinycolor("black").toHex(), "000000"); - assertEquals(tinycolor("blanchedalmond").toHex(), "ffebcd"); - assertEquals(tinycolor("blue").toHex(), "0000ff"); - assertEquals(tinycolor("blueviolet").toHex(), "8a2be2"); - assertEquals(tinycolor("brown").toHex(), "a52a2a"); - assertEquals(tinycolor("burlywood").toHex(), "deb887"); - assertEquals(tinycolor("cadetblue").toHex(), "5f9ea0"); - assertEquals(tinycolor("chartreuse").toHex(), "7fff00"); - assertEquals(tinycolor("chocolate").toHex(), "d2691e"); - assertEquals(tinycolor("coral").toHex(), "ff7f50"); - assertEquals(tinycolor("cornflowerblue").toHex(), "6495ed"); - assertEquals(tinycolor("cornsilk").toHex(), "fff8dc"); - assertEquals(tinycolor("crimson").toHex(), "dc143c"); - assertEquals(tinycolor("cyan").toHex(), "00ffff"); - assertEquals(tinycolor("darkblue").toHex(), "00008b"); - assertEquals(tinycolor("darkcyan").toHex(), "008b8b"); - assertEquals(tinycolor("darkgoldenrod").toHex(), "b8860b"); - assertEquals(tinycolor("darkgray").toHex(), "a9a9a9"); - assertEquals(tinycolor("darkgreen").toHex(), "006400"); - assertEquals(tinycolor("darkkhaki").toHex(), "bdb76b"); - assertEquals(tinycolor("darkmagenta").toHex(), "8b008b"); - assertEquals(tinycolor("darkolivegreen").toHex(), "556b2f"); - assertEquals(tinycolor("darkorange").toHex(), "ff8c00"); - assertEquals(tinycolor("darkorchid").toHex(), "9932cc"); - assertEquals(tinycolor("darkred").toHex(), "8b0000"); - assertEquals(tinycolor("darksalmon").toHex(), "e9967a"); - assertEquals(tinycolor("darkseagreen").toHex(), "8fbc8f"); - assertEquals(tinycolor("darkslateblue").toHex(), "483d8b"); - assertEquals(tinycolor("darkslategray").toHex(), "2f4f4f"); - assertEquals(tinycolor("darkturquoise").toHex(), "00ced1"); - assertEquals(tinycolor("darkviolet").toHex(), "9400d3"); - assertEquals(tinycolor("deeppink").toHex(), "ff1493"); - assertEquals(tinycolor("deepskyblue").toHex(), "00bfff"); - assertEquals(tinycolor("dimgray").toHex(), "696969"); - assertEquals(tinycolor("dodgerblue").toHex(), "1e90ff"); - assertEquals(tinycolor("firebrick").toHex(), "b22222"); - assertEquals(tinycolor("floralwhite").toHex(), "fffaf0"); - assertEquals(tinycolor("forestgreen").toHex(), "228b22"); - assertEquals(tinycolor("fuchsia").toHex(), "ff00ff"); - assertEquals(tinycolor("gainsboro").toHex(), "dcdcdc"); - assertEquals(tinycolor("ghostwhite").toHex(), "f8f8ff"); - assertEquals(tinycolor("gold").toHex(), "ffd700"); - assertEquals(tinycolor("goldenrod").toHex(), "daa520"); - assertEquals(tinycolor("gray").toHex(), "808080"); - assertEquals(tinycolor("grey").toHex(), "808080"); - assertEquals(tinycolor("green").toHex(), "008000"); - assertEquals(tinycolor("greenyellow").toHex(), "adff2f"); - assertEquals(tinycolor("honeydew").toHex(), "f0fff0"); - assertEquals(tinycolor("hotpink").toHex(), "ff69b4"); - assertEquals(tinycolor("indianred ").toHex(), "cd5c5c"); - assertEquals(tinycolor("indigo ").toHex(), "4b0082"); - assertEquals(tinycolor("ivory").toHex(), "fffff0"); - assertEquals(tinycolor("khaki").toHex(), "f0e68c"); - assertEquals(tinycolor("lavender").toHex(), "e6e6fa"); - assertEquals(tinycolor("lavenderblush").toHex(), "fff0f5"); - assertEquals(tinycolor("lawngreen").toHex(), "7cfc00"); - assertEquals(tinycolor("lemonchiffon").toHex(), "fffacd"); - assertEquals(tinycolor("lightblue").toHex(), "add8e6"); - assertEquals(tinycolor("lightcoral").toHex(), "f08080"); - assertEquals(tinycolor("lightcyan").toHex(), "e0ffff"); - assertEquals(tinycolor("lightgoldenrodyellow").toHex(), "fafad2"); - assertEquals(tinycolor("lightgrey").toHex(), "d3d3d3"); - assertEquals(tinycolor("lightgreen").toHex(), "90ee90"); - assertEquals(tinycolor("lightpink").toHex(), "ffb6c1"); - assertEquals(tinycolor("lightsalmon").toHex(), "ffa07a"); - assertEquals(tinycolor("lightseagreen").toHex(), "20b2aa"); - assertEquals(tinycolor("lightskyblue").toHex(), "87cefa"); - assertEquals(tinycolor("lightslategray").toHex(), "778899"); - assertEquals(tinycolor("lightsteelblue").toHex(), "b0c4de"); - assertEquals(tinycolor("lightyellow").toHex(), "ffffe0"); - assertEquals(tinycolor("lime").toHex(), "00ff00"); - assertEquals(tinycolor("limegreen").toHex(), "32cd32"); - assertEquals(tinycolor("linen").toHex(), "faf0e6"); - assertEquals(tinycolor("magenta").toHex(), "ff00ff"); - assertEquals(tinycolor("maroon").toHex(), "800000"); - assertEquals(tinycolor("mediumaquamarine").toHex(), "66cdaa"); - assertEquals(tinycolor("mediumblue").toHex(), "0000cd"); - assertEquals(tinycolor("mediumorchid").toHex(), "ba55d3"); - assertEquals(tinycolor("mediumpurple").toHex(), "9370db"); - assertEquals(tinycolor("mediumseagreen").toHex(), "3cb371"); - assertEquals(tinycolor("mediumslateblue").toHex(), "7b68ee"); - assertEquals(tinycolor("mediumspringgreen").toHex(), "00fa9a"); - assertEquals(tinycolor("mediumturquoise").toHex(), "48d1cc"); - assertEquals(tinycolor("mediumvioletred").toHex(), "c71585"); - assertEquals(tinycolor("midnightblue").toHex(), "191970"); - assertEquals(tinycolor("mintcream").toHex(), "f5fffa"); - assertEquals(tinycolor("mistyrose").toHex(), "ffe4e1"); - assertEquals(tinycolor("moccasin").toHex(), "ffe4b5"); - assertEquals(tinycolor("navajowhite").toHex(), "ffdead"); - assertEquals(tinycolor("navy").toHex(), "000080"); - assertEquals(tinycolor("oldlace").toHex(), "fdf5e6"); - assertEquals(tinycolor("olive").toHex(), "808000"); - assertEquals(tinycolor("olivedrab").toHex(), "6b8e23"); - assertEquals(tinycolor("orange").toHex(), "ffa500"); - assertEquals(tinycolor("orangered").toHex(), "ff4500"); - assertEquals(tinycolor("orchid").toHex(), "da70d6"); - assertEquals(tinycolor("palegoldenrod").toHex(), "eee8aa"); - assertEquals(tinycolor("palegreen").toHex(), "98fb98"); - assertEquals(tinycolor("paleturquoise").toHex(), "afeeee"); - assertEquals(tinycolor("palevioletred").toHex(), "db7093"); - assertEquals(tinycolor("papayawhip").toHex(), "ffefd5"); - assertEquals(tinycolor("peachpuff").toHex(), "ffdab9"); - assertEquals(tinycolor("peru").toHex(), "cd853f"); - assertEquals(tinycolor("pink").toHex(), "ffc0cb"); - assertEquals(tinycolor("plum").toHex(), "dda0dd"); - assertEquals(tinycolor("powderblue").toHex(), "b0e0e6"); - assertEquals(tinycolor("purple").toHex(), "800080"); - assertEquals(tinycolor("rebeccapurple").toHex(), "663399"); - assertEquals(tinycolor("red").toHex(), "ff0000"); - assertEquals(tinycolor("rosybrown").toHex(), "bc8f8f"); - assertEquals(tinycolor("royalblue").toHex(), "4169e1"); - assertEquals(tinycolor("saddlebrown").toHex(), "8b4513"); - assertEquals(tinycolor("salmon").toHex(), "fa8072"); - assertEquals(tinycolor("sandybrown").toHex(), "f4a460"); - assertEquals(tinycolor("seagreen").toHex(), "2e8b57"); - assertEquals(tinycolor("seashell").toHex(), "fff5ee"); - assertEquals(tinycolor("sienna").toHex(), "a0522d"); - assertEquals(tinycolor("silver").toHex(), "c0c0c0"); - assertEquals(tinycolor("skyblue").toHex(), "87ceeb"); - assertEquals(tinycolor("slateblue").toHex(), "6a5acd"); - assertEquals(tinycolor("slategray").toHex(), "708090"); - assertEquals(tinycolor("snow").toHex(), "fffafa"); - assertEquals(tinycolor("springgreen").toHex(), "00ff7f"); - assertEquals(tinycolor("steelblue").toHex(), "4682b4"); - assertEquals(tinycolor("tan").toHex(), "d2b48c"); - assertEquals(tinycolor("teal").toHex(), "008080"); - assertEquals(tinycolor("thistle").toHex(), "d8bfd8"); - assertEquals(tinycolor("tomato").toHex(), "ff6347"); - assertEquals(tinycolor("turquoise").toHex(), "40e0d0"); - assertEquals(tinycolor("violet").toHex(), "ee82ee"); - assertEquals(tinycolor("wheat").toHex(), "f5deb3"); - assertEquals(tinycolor("white").toHex(), "ffffff"); - assertEquals(tinycolor("whitesmoke").toHex(), "f5f5f5"); - assertEquals(tinycolor("yellow").toHex(), "ffff00"); - assertEquals(tinycolor("yellowgreen").toHex(), "9acd32"); - - assertEquals(tinycolor("#f00").toName(), "red"); - assertEquals(tinycolor("#fa0a0a").toName(), false); -}); - -Deno.test("Invalid alpha should normalize to 1", function () { - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: -1 }).toRgbString(), - "rgb(255, 20, 10)", - "Negative value" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: -0 }).toRgbString(), - "rgba(255, 20, 10, 0)", - "Negative 0" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toRgbString(), - "rgba(255, 20, 10, 0)", - "0" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 0.5 }).toRgbString(), - "rgba(255, 20, 10, 0.5)", - ".5" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 1 }).toRgbString(), - "rgb(255, 20, 10)", - "1" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 100 }).toRgbString(), - "rgb(255, 20, 10)", - "Greater than 1" - ); - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: "asdfasd" }).toRgbString(), - "rgb(255, 20, 10)", - "Non Numeric" - ); - - assertEquals( - tinycolor("#fff").toRgbString(), - "rgb(255, 255, 255)", - "Hex should be 1" - ); - assertEquals( - tinycolor("rgba 255 0 0 100").toRgbString(), - "rgb(255, 0, 0)", - "Greater than 1 in string parsing" - ); -}); - -Deno.test("toString() with alpha set", function () { - var redNamed = tinycolor.fromRatio( - { r: 255, g: 0, b: 0, a: 0.6 }, - { - format: "name", - } - ); - var transparentNamed = tinycolor.fromRatio( - { r: 255, g: 0, b: 0, a: 0 }, - { - format: "name", - } - ); - var redHex = tinycolor.fromRatio( - { r: 255, g: 0, b: 0, a: 0.4 }, - { - format: "hex", - } - ); - - assertEquals(redNamed.getFormat(), "name", "getFormat() is correct"); - assertEquals(redHex.getFormat(), "hex", "getFormat() is correct"); - - assertEquals( - redNamed.toString(), - "rgba(255, 0, 0, 0.6)", - "Names should default to rgba if alpha is < 1" - ); - assertEquals( - redHex.toString(), - "rgba(255, 0, 0, 0.4)", - "Hex should default to rgba if alpha is < 1" - ); - - assertEquals( - redNamed.toString("hex"), - "#ff0000", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex6"), - "#ff0000", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex3"), - "#f00", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex8"), - "#ff000099", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("hex4"), - "#f009", - "Names should not be returned as rgba if format is specified" - ); - assertEquals( - redNamed.toString("name"), - "#ff0000", - "Semi transparent names should return hex in toString() if name format is specified" - ); - - assertEquals( - redNamed.toName(), - false, - "Semi transparent names should be false in toName()" - ); - - assertEquals( - redHex.toString(), - "rgba(255, 0, 0, 0.4)", - "Hex should default to rgba if alpha is < 1" - ); - assertEquals( - transparentNamed.toString(), - "transparent", - "Named color should equal transparent if alpha == 0" - ); - - redHex.setAlpha(0); - assertEquals( - redHex.toString(), - "rgba(255, 0, 0, 0)", - "Hex should default to rgba if alpha is = 0" - ); -}); - -Deno.test("setting alpha", function () { - var hexSetter = tinycolor("rgba(255, 0, 0, 1)"); - assertEquals(hexSetter.getAlpha(), 1, "Alpha should start as 1"); - var returnedFromSetAlpha = hexSetter.setAlpha(0.9); - assertEquals( - returnedFromSetAlpha, - hexSetter, - "setAlpha return value should be the color." - ); - assertEquals(hexSetter.getAlpha(), 0.9, "setAlpha should change alpha value"); - hexSetter.setAlpha(0.5); - assertEquals(hexSetter.getAlpha(), 0.5, "setAlpha should change alpha value"); - hexSetter.setAlpha(0); - assertEquals(hexSetter.getAlpha(), 0, "setAlpha should change alpha value"); - hexSetter.setAlpha(-1); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with value < 0 should be bound to 1" - ); - hexSetter.setAlpha(2); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with value > 1 should be bound to 1" - ); - hexSetter.setAlpha(); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with invalid value should be bound to 1" - ); - hexSetter.setAlpha(null); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with invalid value should be bound to 1" - ); - hexSetter.setAlpha("test"); - assertEquals( - hexSetter.getAlpha(), - 1, - "setAlpha with invalid value should be bound to 1" - ); -}); - -Deno.test("Alpha = 0 should act differently on toName()", function () { - assertEquals( - tinycolor({ r: 255, g: 20, b: 10, a: 0 }).toName(), - "transparent", - "0" - ); - assertEquals( - tinycolor("transparent").toString(), - "transparent", - "toString when passed" - ); - assertEquals(tinycolor("transparent").toHex(), "000000", "toHex"); -}); - -Deno.test("getBrightness", function () { - assertEquals(tinycolor("#000").getBrightness(), 0, "returns 0 for #000"); - assertEquals(tinycolor("#fff").getBrightness(), 255, "returns 255 for #fff"); -}); - -Deno.test("getLuminance", function () { - assertEquals(tinycolor("#000").getLuminance(), 0, "returns 0 for #000"); - assertEquals(tinycolor("#fff").getLuminance(), 1, "returns 1 for #fff"); -}); - -Deno.test("isDark returns true/false for dark/light colors", function () { - assertEquals(tinycolor("#000").isDark(), true, "#000 is dark"); - assertEquals(tinycolor("#111").isDark(), true, "#111 is dark"); - assertEquals(tinycolor("#222").isDark(), true, "#222 is dark"); - assertEquals(tinycolor("#333").isDark(), true, "#333 is dark"); - assertEquals(tinycolor("#444").isDark(), true, "#444 is dark"); - assertEquals(tinycolor("#555").isDark(), true, "#555 is dark"); - assertEquals(tinycolor("#666").isDark(), true, "#666 is dark"); - assertEquals(tinycolor("#777").isDark(), true, "#777 is dark"); - assertEquals(tinycolor("#888").isDark(), false, "#888 is not dark"); - assertEquals(tinycolor("#999").isDark(), false, "#999 is not dark"); - assertEquals(tinycolor("#aaa").isDark(), false, "#aaa is not dark"); - assertEquals(tinycolor("#bbb").isDark(), false, "#bbb is not dark"); - assertEquals(tinycolor("#ccc").isDark(), false, "#ccc is not dark"); - assertEquals(tinycolor("#ddd").isDark(), false, "#ddd is not dark"); - assertEquals(tinycolor("#eee").isDark(), false, "#eee is not dark"); - assertEquals(tinycolor("#fff").isDark(), false, "#fff is not dark"); -}); - -Deno.test("isLight returns true/false for light/dark colors", function () { - assertEquals(tinycolor("#000").isLight(), false, "#000 is not light"); - assertEquals(tinycolor("#111").isLight(), false, "#111 is not light"); - assertEquals(tinycolor("#222").isLight(), false, "#222 is not light"); - assertEquals(tinycolor("#333").isLight(), false, "#333 is not light"); - assertEquals(tinycolor("#444").isLight(), false, "#444 is not light"); - assertEquals(tinycolor("#555").isLight(), false, "#555 is not light"); - assertEquals(tinycolor("#666").isLight(), false, "#666 is not light"); - assertEquals(tinycolor("#777").isLight(), false, "#777 is not light"); - assertEquals(tinycolor("#888").isLight(), true, "#888 is light"); - assertEquals(tinycolor("#999").isLight(), true, "#999 is light"); - assertEquals(tinycolor("#aaa").isLight(), true, "#aaa is light"); - assertEquals(tinycolor("#bbb").isLight(), true, "#bbb is light"); - assertEquals(tinycolor("#ccc").isLight(), true, "#ccc is light"); - assertEquals(tinycolor("#ddd").isLight(), true, "#ddd is light"); - assertEquals(tinycolor("#eee").isLight(), true, "#eee is light"); - assertEquals(tinycolor("#fff").isLight(), true, "#fff is light"); -}); - -Deno.test("HSL Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toHsl()).toHexString(), - "HSL Object" - ); - } -}); - -Deno.test("HSL String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toHslString()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "toHslString red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "toHslString green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "toHslString blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("HSV String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toHsvString()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "toHsvString red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "toHsvString green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "toHsvString blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("HSV Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toHsv()).toHexString(), - "HSV Object" - ); - } -}); - -Deno.test("RGB Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toRgb()).toHexString(), - "RGB Object" - ); - } -}); - -Deno.test("RGB String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals( - tiny.toHexString(), - tinycolor(tiny.toRgbString()).toHexString(), - "RGB String" - ); - } -}); - -Deno.test("PRGB Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toPercentageRgb()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "Red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "Green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "Blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("PRGB String", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - var input = tiny.toRgb(); - var output = tinycolor(tiny.toPercentageRgbString()).toRgb(); - var maxDiff = 2; - - assertEquals( - Math.abs(input.r - output.r) <= maxDiff, - true, - "Red value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.g - output.g) <= maxDiff, - true, - "Green value difference <= " + maxDiff - ); - assertEquals( - Math.abs(input.b - output.b) <= maxDiff, - true, - "Blue value difference <= " + maxDiff - ); - } -}); - -Deno.test("Object", function () { - for (var i = 0; i < conversions.length; i++) { - var c = conversions[i]; - var tiny = tinycolor(c.hex); - assertEquals(tiny.toHexString(), tinycolor(tiny).toHexString(), "Object"); - } -}); - -Deno.test("Color equality", function () { - assert(tinycolor.equals("#ff0000", "#ff0000"), "Same hex"); - assert(tinycolor.equals("#ff0000", "rgb(255, 0, 0)"), "Same alphas"); - assert( - !tinycolor.equals("#ff0000", "rgba(255, 0, 0, .1)"), - "Different alphas" - ); - assert(tinycolor.equals("#ff000066", "rgba(255, 0, 0, .4)"), "Same alphas"); - assert(tinycolor.equals("#f009", "rgba(255, 0, 0, .6)"), "Same alphas"); - assert(tinycolor.equals("#336699CC", "369C"), "Same hex"); - assert(tinycolor.equals("ff0000", "#ff0000"), "Same hex"); - assert(tinycolor.equals("#f00", "#ff0000"), "Same hex"); - assert(tinycolor.equals("#f00", "#ff0000"), "Same hex"); - assert(tinycolor.equals("f00", "#ff0000"), "Same hex"); - assertEquals(tinycolor("010101").toHexString(), "#010101"); - assert(!tinycolor.equals("#ff0000", "#00ff00"), "Different hex"); - assert( - tinycolor.equals("#ff8000", "rgb(100%, 50%, 0%)"), - "Percentage bounds checking" - ); -}); - -Deno.test("isReadable", function () { - // "#ff0088", "#8822aa" (values used in old WCAG1 tests) - assert( - tinycolor.isReadable("#000000", "#ffffff", { level: "AA", size: "small" }), - "white/black is readable" - ); - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", {}), - "not readable - empty wcag2 object" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "small" }), - "not readable - AA small" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { level: "AA", size: "large" }), - "not readable - AA large" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { - level: "AAA", - size: "small", - }), - "not readable - AAA small" - ); - assert( - !tinycolor.isReadable("#ff0088", "#8822aa", { - level: "AAA", - size: "large", - }), - "not readable - AAA large" - ); - - // values derived from and validated using the calculators at http://www.dasplankton.de/ContrastA/ - // and http://webaim.org/resources/contrastchecker/ - - // "#ff0088", "#5c1a72": contrast ratio 3.04 - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "small" }), - "not readable - AA small" - ); - assert( - tinycolor.isReadable("#ff0088", "#5c1a72", { level: "AA", size: "large" }), - "readable - AA large" - ); - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", { - level: "AAA", - size: "small", - }), - "not readable - AAA small" - ); - assert( - !tinycolor.isReadable("#ff0088", "#5c1a72", { - level: "AAA", - size: "large", - }), - "not readable - AAA large" - ); - - // "#ff0088", "#2e0c3a": contrast ratio 4.56 - assert( - tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "small" }), - "readable - AA small" - ); - assert( - tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AA", size: "large" }), - "readable - AA large" - ); - assert( - !tinycolor.isReadable("#ff0088", "#2e0c3a", { - level: "AAA", - size: "small", - }), - "not readable - AAA small" - ); - assert( - tinycolor.isReadable("#ff0088", "#2e0c3a", { level: "AAA", size: "large" }), - "readable - AAA large" - ); - - // "#db91b8", "#2e0c3a": contrast ratio 7.12 - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "small" }), - "readable - AA small" - ); - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AA", size: "large" }), - "readable - AA large" - ); - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "small" }), - "readable - AAA small" - ); - assert( - tinycolor.isReadable("#db91b8", "#2e0c3a", { level: "AAA", size: "large" }), - "readable - AAA large" - ); -}); - -Deno.test("readability", function () { - // check return values from readability function. See isReadable above for standards tests. - assertEquals( - tinycolor.readability("#000", "#000"), - 1, - "Readability function test 0" - ); - assertEquals( - tinycolor.readability("#000", "#111"), - 1.1121078324840545, - "Readability function test 1" - ); - assertEquals( - tinycolor.readability("#000", "#fff"), - 21, - "Readability function test 2" - ); -}); - -Deno.test("mostReadable", function () { - assertEquals( - tinycolor - .mostReadable("#000", ["#111", "#222", { wcag2: {} }]) - .toHexString(), - "#222222", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#f00", ["#d00", "#0d0"], { wcag2: {} }) - .toHexString(), - "#00dd00", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#fff", ["#fff", "#fff"], { wcag2: {} }) - .toHexString(), - "#ffffff", - "no different color in list" - ); - //includeFallbackColors - assertEquals( - tinycolor - .mostReadable("#fff", ["#fff", "#fff"], { - includeFallbackColors: true, - }) - .toHexString(), - "#000000", - "no different color in list" - ); - assertEquals( - tinycolor - .mostReadable("#123", ["#124", "#125"], { - includeFallbackColors: false, - }) - .toHexString(), - "#112255", - "no readable color in list" - ); - assertEquals( - tinycolor - .mostReadable("#123", ["#000", "#fff"], { - includeFallbackColors: false, - }) - .toHexString(), - "#ffffff", - "verify assumption" - ); - assertEquals( - tinycolor - .mostReadable("#123", ["#124", "#125"], { - includeFallbackColors: true, - }) - .toHexString(), - "#ffffff", - "no readable color in list" - ); - - assertEquals( - tinycolor - .mostReadable("#ff0088", ["#000", "#fff"], { - includeFallbackColors: false, - }) - .toHexString(), - "#000000", - "verify assumption" - ); - assertEquals( - tinycolor - .mostReadable("#ff0088", ["#2e0c3a"], { - includeFallbackColors: true, - level: "AAA", - size: "large", - }) - .toHexString(), - "#2e0c3a", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#ff0088", ["#2e0c3a"], { - includeFallbackColors: true, - level: "AAA", - size: "small", - }) - .toHexString(), - "#000000", - "no readable color in list" - ); - - assertEquals( - tinycolor - .mostReadable("#371b2c", ["#000", "#fff"], { - includeFallbackColors: false, - }) - .toHexString(), - "#ffffff", - "verify assumption" - ); - assertEquals( - tinycolor - .mostReadable("#371b2c", ["#a9acb6"], { - includeFallbackColors: true, - level: "AAA", - size: "large", - }) - .toHexString(), - "#a9acb6", - "readable color present" - ); - assertEquals( - tinycolor - .mostReadable("#371b2c", ["#a9acb6"], { - includeFallbackColors: true, - level: "AAA", - size: "small", - }) - .toHexString(), - "#ffffff", - "no readable color in list" - ); -}); - -Deno.test("Filters", function () { - assertEquals( - tinycolor("red").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)" - ); - assertEquals( - tinycolor("red").toFilter("blue"), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ff0000ff)" - ); - - assertEquals( - tinycolor("transparent").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#00000000)" - ); - assertEquals( - tinycolor("transparent").toFilter("red"), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#ffff0000)" - ); - - assertEquals( - tinycolor("#f0f0f0dd").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ddf0f0f0,endColorstr=#ddf0f0f0)" - ); - assertEquals( - tinycolor("rgba(0, 0, 255, .5").toFilter(), - "progid:DXImageTransform.Microsoft.gradient(startColorstr=#800000ff,endColorstr=#800000ff)" - ); -}); - -/* Originally generated with: -var results = []; -for (var i = 0; i <= 100; i++) results.push( tinycolor.saturate("red", i).toHex() ) -console.log(JSON.stringify(results)) -*/ -var DESATURATIONS = [ - "ff0000", - "fe0101", - "fc0303", - "fb0404", - "fa0505", - "f90606", - "f70808", - "f60909", - "f50a0a", - "f40b0b", - "f20d0d", - "f10e0e", - "f00f0f", - "ee1111", - "ed1212", - "ec1313", - "eb1414", - "e91616", - "e81717", - "e71818", - "e61919", - "e41b1b", - "e31c1c", - "e21d1d", - "e01f1f", - "df2020", - "de2121", - "dd2222", - "db2424", - "da2525", - "d92626", - "d72828", - "d62929", - "d52a2a", - "d42b2b", - "d22d2d", - "d12e2e", - "d02f2f", - "cf3030", - "cd3232", - "cc3333", - "cb3434", - "c93636", - "c83737", - "c73838", - "c63939", - "c43b3b", - "c33c3c", - "c23d3d", - "c13e3e", - "bf4040", - "be4141", - "bd4242", - "bb4444", - "ba4545", - "b94646", - "b84747", - "b64949", - "b54a4a", - "b44b4b", - "b34d4d", - "b14e4e", - "b04f4f", - "af5050", - "ad5252", - "ac5353", - "ab5454", - "aa5555", - "a85757", - "a75858", - "a65959", - "a45b5b", - "a35c5c", - "a25d5d", - "a15e5e", - "9f6060", - "9e6161", - "9d6262", - "9c6363", - "9a6565", - "996666", - "986767", - "966969", - "956a6a", - "946b6b", - "936c6c", - "916e6e", - "906f6f", - "8f7070", - "8e7171", - "8c7373", - "8b7474", - "8a7575", - "887777", - "877878", - "867979", - "857a7a", - "837c7c", - "827d7d", - "817e7e", - "808080", -]; -var SATURATIONS = [ - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", - "ff0000", -]; -var LIGHTENS = [ - "ff0000", - "ff0505", - "ff0a0a", - "ff0f0f", - "ff1414", - "ff1a1a", - "ff1f1f", - "ff2424", - "ff2929", - "ff2e2e", - "ff3333", - "ff3838", - "ff3d3d", - "ff4242", - "ff4747", - "ff4d4d", - "ff5252", - "ff5757", - "ff5c5c", - "ff6161", - "ff6666", - "ff6b6b", - "ff7070", - "ff7575", - "ff7a7a", - "ff8080", - "ff8585", - "ff8a8a", - "ff8f8f", - "ff9494", - "ff9999", - "ff9e9e", - "ffa3a3", - "ffa8a8", - "ffadad", - "ffb3b3", - "ffb8b8", - "ffbdbd", - "ffc2c2", - "ffc7c7", - "ffcccc", - "ffd1d1", - "ffd6d6", - "ffdbdb", - "ffe0e0", - "ffe5e5", - "ffebeb", - "fff0f0", - "fff5f5", - "fffafa", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", - "ffffff", -]; -var BRIGHTENS = [ - "ff0000", - "ff0303", - "ff0505", - "ff0808", - "ff0a0a", - "ff0d0d", - "ff0f0f", - "ff1212", - "ff1414", - "ff1717", - "ff1919", - "ff1c1c", - "ff1f1f", - "ff2121", - "ff2424", - "ff2626", - "ff2929", - "ff2b2b", - "ff2e2e", - "ff3030", - "ff3333", - "ff3636", - "ff3838", - "ff3b3b", - "ff3d3d", - "ff4040", - "ff4242", - "ff4545", - "ff4747", - "ff4a4a", - "ff4c4c", - "ff4f4f", - "ff5252", - "ff5454", - "ff5757", - "ff5959", - "ff5c5c", - "ff5e5e", - "ff6161", - "ff6363", - "ff6666", - "ff6969", - "ff6b6b", - "ff6e6e", - "ff7070", - "ff7373", - "ff7575", - "ff7878", - "ff7a7a", - "ff7d7d", - "ff7f7f", - "ff8282", - "ff8585", - "ff8787", - "ff8a8a", - "ff8c8c", - "ff8f8f", - "ff9191", - "ff9494", - "ff9696", - "ff9999", - "ff9c9c", - "ff9e9e", - "ffa1a1", - "ffa3a3", - "ffa6a6", - "ffa8a8", - "ffabab", - "ffadad", - "ffb0b0", - "ffb2b2", - "ffb5b5", - "ffb8b8", - "ffbaba", - "ffbdbd", - "ffbfbf", - "ffc2c2", - "ffc4c4", - "ffc7c7", - "ffc9c9", - "ffcccc", - "ffcfcf", - "ffd1d1", - "ffd4d4", - "ffd6d6", - "ffd9d9", - "ffdbdb", - "ffdede", - "ffe0e0", - "ffe3e3", - "ffe5e5", - "ffe8e8", - "ffebeb", - "ffeded", - "fff0f0", - "fff2f2", - "fff5f5", - "fff7f7", - "fffafa", - "fffcfc", - "ffffff", -]; -var DARKENS = [ - "ff0000", - "fa0000", - "f50000", - "f00000", - "eb0000", - "e60000", - "e00000", - "db0000", - "d60000", - "d10000", - "cc0000", - "c70000", - "c20000", - "bd0000", - "b80000", - "b30000", - "ad0000", - "a80000", - "a30000", - "9e0000", - "990000", - "940000", - "8f0000", - "8a0000", - "850000", - "800000", - "7a0000", - "750000", - "700000", - "6b0000", - "660000", - "610000", - "5c0000", - "570000", - "520000", - "4d0000", - "470000", - "420000", - "3d0000", - "380000", - "330000", - "2e0000", - "290000", - "240000", - "1f0000", - "190000", - "140000", - "0f0000", - "0a0000", - "050000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", - "000000", -]; - -Deno.test("Modifications", function () { - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").desaturate(i).toHex(), - DESATURATIONS[i], - "Desaturation " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").saturate(i).toHex(), - SATURATIONS[i], - "Saturation " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").lighten(i).toHex(), - LIGHTENS[i], - "Lighten " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").brighten(i).toHex(), - BRIGHTENS[i], - "Brighter " + i + " works" - ); - } - for (var i = 0; i <= 100; i++) { - assertEquals( - tinycolor("red").darken(i).toHex(), - DARKENS[i], - "Darken " + i + " works" - ); - } - - assertEquals( - tinycolor("red").greyscale().toHex(), - "808080", - "Greyscale works" - ); -}); - -Deno.test("Spin", function () { - assertEquals( - Math.round(tinycolor("#f00").spin(-1234).toHsl().h), - 206, - "Spinning -1234 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(-360).toHsl().h), - 0, - "Spinning -360 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(-120).toHsl().h), - 240, - "Spinning -120 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(0).toHsl().h), - 0, - "Spinning 0 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(10).toHsl().h), - 10, - "Spinning 10 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(360).toHsl().h), - 0, - "Spinning 360 works" - ); - assertEquals( - Math.round(tinycolor("#f00").spin(2345).toHsl().h), - 185, - "Spinning 2345 works" - ); - - [-360, 0, 360].forEach(function (delta) { - Object.keys(tinycolor.names).forEach(function (name) { - assertEquals( - tinycolor(name).toHex(), - tinycolor(name).spin(delta).toHex(), - "Spinning " + delta.toString() + " has no effect" - ); - }); - }); -}); - -Deno.test("Mix", function () { - // amount 0 or none - assertEquals( - tinycolor.mix("#000", "#fff").toHsl().l, - 0.5, - "Mixing without amount works" - ); - assertEquals( - tinycolor.mix("#f00", "#000", 0).toHex(), - "ff0000", - "Mixing with 0 amount works" - ); - // This case checks the the problem with floating point numbers (eg 255/90) - assertEquals( - tinycolor.mix("#fff", "#000", 90).toHex(), - "1a1a1a", - "Mixing with 90 amount works correctly" - ); - - // black and white - for (var i = 0; i < 100; i++) { - assertEquals( - Math.round(tinycolor.mix("#000", "#fff", i).toHsl().l * 100) / 100, - i / 100, - "Mixing black and white with " + i + " amount works" - ); - } - - // with colors - for (var i = 0; i < 100; i++) { - var new_hex = Math.round((255 * (100 - i)) / 100).toString(16); - - if (new_hex.length === 1) { - new_hex = "0" + new_hex; - } - - assertEquals( - tinycolor.mix("#f00", "#000", i).toHex(), - new_hex + "0000", - "Mixing " + i + " (red channel)" - ); - assertEquals( - tinycolor.mix("#0f0", "#000", i).toHex(), - "00" + new_hex + "00", - "Mixing " + i + " (green channel)" - ); - assertEquals( - tinycolor.mix("#00f", "#000", i).toHex(), - "0000" + new_hex, - "Mixing " + i + " (blue channel)" - ); - assertEquals( - tinycolor.mix(tinycolor("transparent"), "#000", i).toRgb().a, - i / 100, - "Mixing " + i + " (alpha channel)" - ); - } -}); - -// The combination tests need to be expanded furthe - -function colorsToHexString(colors) { - return colors - .map(function (c) { - return c.toHex(); - }) - .join(","); -} - -Deno.test("complement", function () { - var complementDoesntModifyInstance = tinycolor("red"); - assertEquals( - complementDoesntModifyInstance.complement().toHex(), - "00ffff", - "Complement works" - ); - assertEquals( - complementDoesntModifyInstance.toHex(), - "ff0000", - "Complement did not modify this color" - ); -}); - -Deno.test("analogous", function () { - var combination = tinycolor("red").analogous(); - assertEquals( - colorsToHexString(combination), - "ff0000,ff0066,ff0033,ff0000,ff3300,ff6600", - "Correct Combination" - ); -}); - -Deno.test("monochromatic", function () { - var combination = tinycolor("red").monochromatic(); - assertEquals( - colorsToHexString(combination), - "ff0000,2a0000,550000,800000,aa0000,d40000", - "Correct Combination" - ); -}); - -Deno.test("splitcomplement", function () { - var combination = tinycolor("red").splitcomplement(); - assertEquals( - colorsToHexString(combination), - "ff0000,ccff00,0066ff", - "Correct Combination" - ); -}); - -Deno.test("triad", function () { - var combination = tinycolor("red").triad(); - assertEquals( - colorsToHexString(combination), - "ff0000,00ff00,0000ff", - "Correct Combination" - ); -}); - -Deno.test("tetrad", function () { - var combination = tinycolor("red").tetrad(); - assertEquals( - colorsToHexString(combination), - "ff0000,80ff00,00ffff,7f00ff", - "Correct Combination" - ); -}); - -Deno.test({ - name: "polyad", - // Disabled until https://github.com/bgrins/TinyColor/issues/254 - ignore: true, - fn: function () { - assertThrows(() => { - tinycolor("red").polyad(); - }); - assertThrows(() => { - tinycolor("red").polyad(-1); - }); - assertThrows(() => { - tinycolor("red").polyad("invalid"); - }); - assertEquals(colorsToHexString(tinycolor("red").polyad(1)), "ff0000"); - assertEquals(colorsToHexString(tinycolor("red").polyad("1")), "ff0000"); - assertEquals( - colorsToHexString(tinycolor("red").polyad(2)), - "ff0000,00ffff" - ); - assertEquals( - colorsToHexString(tinycolor("red").polyad(3)), - "ff0000,00ff00,0000ff" - ); - assertEquals( - colorsToHexString(tinycolor("red").polyad(4)), - "ff0000,80ff00,00ffff,7f00ff" - ); - assertEquals( - colorsToHexString(tinycolor("red").polyad(5)), - "ff0000,ccff00,00ff66,0066ff,cc00ff" - ); - }, -}); - -runDenoTests(); diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/test_template.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/test_template.js deleted file mode 100644 index 84914f76ac7680cf960ab38e5ea1204b2b76c70c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/test_template.js +++ /dev/null @@ -1,24 +0,0 @@ -// This file is autogenerated. -// Ideally it wouldn't exist, but it's here to test cjs in node -// Changes should go into ./test.js, and if new assertions are needed -// they'll need to be shimmed here as well -import tinycolor from "./tinycolor.js"; -import { Deno, testDefinitions } from "@deno/shim-deno-test"; -const { assertEquals, assert, assertThrows } = await import( - "../deno_asserts@0.168.0.mjs" -); -async function runDenoTests() { - for (const test of testDefinitions) { - if (test.ignore) { - console.log(`Ignoring ${test.name}`); - continue; - } - console.log(`Running ${test.name}`); - await test.fn(); - console.log(`> Passed ${test.name}`); - } -} - -// CONTENT_GOES_HERE - -runDenoTests(); diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/tinycolor.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/tinycolor.js deleted file mode 100644 index 374f5ea993d2c069e0c103fc0e192779201b7e17..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/esm/tinycolor.js +++ /dev/null @@ -1,1180 +0,0 @@ -// This file is autogenerated. It's used to publish ESM to npm. -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); -} - -// https://github.com/bgrins/TinyColor -// Brian Grinstead, MIT License - -var trimLeft = /^\s+/; -var trimRight = /\s+$/; -function tinycolor(color, opts) { - color = color ? color : ""; - opts = opts || {}; - - // If input is already a tinycolor, return itself - if (color instanceof tinycolor) { - return color; - } - // If we are called as a function, call using new instead - if (!(this instanceof tinycolor)) { - return new tinycolor(color, opts); - } - var rgb = inputToRGB(color); - this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format; - this._gradientType = opts.gradientType; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (this._r < 1) this._r = Math.round(this._r); - if (this._g < 1) this._g = Math.round(this._g); - if (this._b < 1) this._b = Math.round(this._b); - this._ok = rgb.ok; -} -tinycolor.prototype = { - isDark: function isDark() { - return this.getBrightness() < 128; - }, - isLight: function isLight() { - return !this.isDark(); - }, - isValid: function isValid() { - return this._ok; - }, - getOriginalInput: function getOriginalInput() { - return this._originalInput; - }, - getFormat: function getFormat() { - return this._format; - }, - getAlpha: function getAlpha() { - return this._a; - }, - getBrightness: function getBrightness() { - //http://www.w3.org/TR/AERT#color-contrast - var rgb = this.toRgb(); - return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; - }, - getLuminance: function getLuminance() { - //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef - var rgb = this.toRgb(); - var RsRGB, GsRGB, BsRGB, R, G, B; - RsRGB = rgb.r / 255; - GsRGB = rgb.g / 255; - BsRGB = rgb.b / 255; - if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); - return 0.2126 * R + 0.7152 * G + 0.0722 * B; - }, - setAlpha: function setAlpha(value) { - this._a = boundAlpha(value); - this._roundA = Math.round(100 * this._a) / 100; - return this; - }, - toHsv: function toHsv() { - var hsv = rgbToHsv(this._r, this._g, this._b); - return { - h: hsv.h * 360, - s: hsv.s, - v: hsv.v, - a: this._a - }; - }, - toHsvString: function toHsvString() { - var hsv = rgbToHsv(this._r, this._g, this._b); - var h = Math.round(hsv.h * 360), - s = Math.round(hsv.s * 100), - v = Math.round(hsv.v * 100); - return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; - }, - toHsl: function toHsl() { - var hsl = rgbToHsl(this._r, this._g, this._b); - return { - h: hsl.h * 360, - s: hsl.s, - l: hsl.l, - a: this._a - }; - }, - toHslString: function toHslString() { - var hsl = rgbToHsl(this._r, this._g, this._b); - var h = Math.round(hsl.h * 360), - s = Math.round(hsl.s * 100), - l = Math.round(hsl.l * 100); - return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; - }, - toHex: function toHex(allow3Char) { - return rgbToHex(this._r, this._g, this._b, allow3Char); - }, - toHexString: function toHexString(allow3Char) { - return "#" + this.toHex(allow3Char); - }, - toHex8: function toHex8(allow4Char) { - return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); - }, - toHex8String: function toHex8String(allow4Char) { - return "#" + this.toHex8(allow4Char); - }, - toRgb: function toRgb() { - return { - r: Math.round(this._r), - g: Math.round(this._g), - b: Math.round(this._b), - a: this._a - }; - }, - toRgbString: function toRgbString() { - return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; - }, - toPercentageRgb: function toPercentageRgb() { - return { - r: Math.round(bound01(this._r, 255) * 100) + "%", - g: Math.round(bound01(this._g, 255) * 100) + "%", - b: Math.round(bound01(this._b, 255) * 100) + "%", - a: this._a - }; - }, - toPercentageRgbString: function toPercentageRgbString() { - return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; - }, - toName: function toName() { - if (this._a === 0) { - return "transparent"; - } - if (this._a < 1) { - return false; - } - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; - }, - toFilter: function toFilter(secondColor) { - var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a); - var secondHex8String = hex8String; - var gradientType = this._gradientType ? "GradientType = 1, " : ""; - if (secondColor) { - var s = tinycolor(secondColor); - secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a); - } - return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; - }, - toString: function toString(format) { - var formatSet = !!format; - format = format || this._format; - var formattedString = false; - var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); - if (needsAlphaFormat) { - // Special case for "transparent", all other non-alpha formats - // will return rgba when there is transparency. - if (format === "name" && this._a === 0) { - return this.toName(); - } - return this.toRgbString(); - } - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "hex4") { - formattedString = this.toHex8String(true); - } - if (format === "hex8") { - formattedString = this.toHex8String(); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - return formattedString || this.toHexString(); - }, - clone: function clone() { - return tinycolor(this.toString()); - }, - _applyModification: function _applyModification(fn, args) { - var color = fn.apply(null, [this].concat([].slice.call(args))); - this._r = color._r; - this._g = color._g; - this._b = color._b; - this.setAlpha(color._a); - return this; - }, - lighten: function lighten() { - return this._applyModification(_lighten, arguments); - }, - brighten: function brighten() { - return this._applyModification(_brighten, arguments); - }, - darken: function darken() { - return this._applyModification(_darken, arguments); - }, - desaturate: function desaturate() { - return this._applyModification(_desaturate, arguments); - }, - saturate: function saturate() { - return this._applyModification(_saturate, arguments); - }, - greyscale: function greyscale() { - return this._applyModification(_greyscale, arguments); - }, - spin: function spin() { - return this._applyModification(_spin, arguments); - }, - _applyCombination: function _applyCombination(fn, args) { - return fn.apply(null, [this].concat([].slice.call(args))); - }, - analogous: function analogous() { - return this._applyCombination(_analogous, arguments); - }, - complement: function complement() { - return this._applyCombination(_complement, arguments); - }, - monochromatic: function monochromatic() { - return this._applyCombination(_monochromatic, arguments); - }, - splitcomplement: function splitcomplement() { - return this._applyCombination(_splitcomplement, arguments); - }, - // Disabled until https://github.com/bgrins/TinyColor/issues/254 - // polyad: function (number) { - // return this._applyCombination(polyad, [number]); - // }, - triad: function triad() { - return this._applyCombination(polyad, [3]); - }, - tetrad: function tetrad() { - return this._applyCombination(polyad, [4]); - } -}; - -// If input is an object, force 1 into "1.0" to handle ratios properly -// String input requires "1.0" as input, so 1 will be treated as 1 -tinycolor.fromRatio = function (color, opts) { - if (_typeof(color) == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - return tinycolor(color, opts); -}; - -// Given a string or object, convert that input to RGB -// Possible string inputs: -// -// "red" -// "#f00" or "f00" -// "#ff0000" or "ff0000" -// "#ff000000" or "ff000000" -// "rgb 255 0 0" or "rgb (255, 0, 0)" -// "rgb 1.0 0 0" or "rgb (1, 0, 0)" -// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" -// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" -// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" -// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" -// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" -// -function inputToRGB(color) { - var rgb = { - r: 0, - g: 0, - b: 0 - }; - var a = 1; - var s = null; - var v = null; - var l = null; - var ok = false; - var format = false; - if (typeof color == "string") { - color = stringInputToObject(color); - } - if (_typeof(color) == "object") { - if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { - s = convertToPercentage(color.s); - v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, s, v); - ok = true; - format = "hsv"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { - s = convertToPercentage(color.s); - l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, s, l); - ok = true; - format = "hsl"; - } - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - a = boundAlpha(a); - return { - ok: ok, - format: color.format || format, - r: Math.min(255, Math.max(rgb.r, 0)), - g: Math.min(255, Math.max(rgb.g, 0)), - b: Math.min(255, Math.max(rgb.b, 0)), - a: a - }; -} - -// Conversion Functions -// -------------------- - -// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: -// - -// `rgbToRgb` -// Handle bounds / percentage checking to conform to CSS color spec -// -// *Assumes:* r, g, b in [0, 255] or [0, 1] -// *Returns:* { r, g, b } in [0, 255] -function rgbToRgb(r, g, b) { - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; -} - -// `rgbToHsl` -// Converts an RGB color value to HSL. -// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] -// *Returns:* { h, s, l } in [0,1] -function rgbToHsl(r, g, b) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - var max = Math.max(r, g, b), - min = Math.min(r, g, b); - var h, - s, - l = (max + min) / 2; - if (max == min) { - h = s = 0; // achromatic - } else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch (max) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - h /= 6; - } - return { - h: h, - s: s, - l: l - }; -} - -// `hslToRgb` -// Converts an HSL color value to RGB. -// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] -// *Returns:* { r, g, b } in the set [0, 255] -function hslToRgb(h, s, l) { - var r, g, b; - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - if (s === 0) { - r = g = b = l; // achromatic - } else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1 / 3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1 / 3); - } - return { - r: r * 255, - g: g * 255, - b: b * 255 - }; -} - -// `rgbToHsv` -// Converts an RGB color value to HSV -// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] -// *Returns:* { h, s, v } in [0,1] -function rgbToHsv(r, g, b) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - var max = Math.max(r, g, b), - min = Math.min(r, g, b); - var h, - s, - v = max; - var d = max - min; - s = max === 0 ? 0 : d / max; - if (max == min) { - h = 0; // achromatic - } else { - switch (max) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - h /= 6; - } - return { - h: h, - s: s, - v: v - }; -} - -// `hsvToRgb` -// Converts an HSV color value to RGB. -// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] -// *Returns:* { r, g, b } in the set [0, 255] -function hsvToRgb(h, s, v) { - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - var i = Math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - return { - r: r * 255, - g: g * 255, - b: b * 255 - }; -} - -// `rgbToHex` -// Converts an RGB color to hex -// Assumes r, g, and b are contained in the set [0, 255] -// Returns a 3 or 6 character hex -function rgbToHex(r, g, b, allow3Char) { - var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - return hex.join(""); -} - -// `rgbaToHex` -// Converts an RGBA color plus alpha transparency to hex -// Assumes r, g, b are contained in the set [0, 255] and -// a in [0, 1]. Returns a 4 or 8 character rgba hex -function rgbaToHex(r, g, b, a, allow4Char) { - var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; - - // Return a 4 character hex if possible - if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); - } - return hex.join(""); -} - -// `rgbaToArgbHex` -// Converts an RGBA color to an ARGB Hex8 string -// Rarely used, but required for "toFilter()" -function rgbaToArgbHex(r, g, b, a) { - var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; - return hex.join(""); -} - -// `equals` -// Can be called with any tinycolor input -tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) return false; - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); -}; -tinycolor.random = function () { - return tinycolor.fromRatio({ - r: Math.random(), - g: Math.random(), - b: Math.random() - }); -}; - -// Modification Functions -// ---------------------- -// Thanks to less.js for some of the basics here -// - -function _desaturate(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); -} -function _saturate(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); -} -function _greyscale(color) { - return tinycolor(color).desaturate(100); -} -function _lighten(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); -} -function _brighten(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var rgb = tinycolor(color).toRgb(); - rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); - rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100)))); - rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); - return tinycolor(rgb); -} -function _darken(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); -} - -// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. -// Values outside of this range will be wrapped into this range. -function _spin(color, amount) { - var hsl = tinycolor(color).toHsl(); - var hue = (hsl.h + amount) % 360; - hsl.h = hue < 0 ? 360 + hue : hue; - return tinycolor(hsl); -} - -// Combination Functions -// --------------------- -// Thanks to jQuery xColor for some of the ideas behind these -// - -function _complement(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); -} -function polyad(color, number) { - if (isNaN(number) || number <= 0) { - throw new Error("Argument to polyad must be a positive number"); - } - var hsl = tinycolor(color).toHsl(); - var result = [tinycolor(color)]; - var step = 360 / number; - for (var i = 1; i < number; i++) { - result.push(tinycolor({ - h: (hsl.h + i * step) % 360, - s: hsl.s, - l: hsl.l - })); - } - return result; -} -function _splitcomplement(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [tinycolor(color), tinycolor({ - h: (h + 72) % 360, - s: hsl.s, - l: hsl.l - }), tinycolor({ - h: (h + 216) % 360, - s: hsl.s, - l: hsl.l - })]; -} -function _analogous(color, results, slices) { - results = results || 6; - slices = slices || 30; - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; -} -function _monochromatic(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, - s = hsv.s, - v = hsv.v; - var ret = []; - var modification = 1 / results; - while (results--) { - ret.push(tinycolor({ - h: h, - s: s, - v: v - })); - v = (v + modification) % 1; - } - return ret; -} - -// Utility Functions -// --------------------- - -tinycolor.mix = function (color1, color2, amount) { - amount = amount === 0 ? 0 : amount || 50; - var rgb1 = tinycolor(color1).toRgb(); - var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; - var rgba = { - r: (rgb2.r - rgb1.r) * p + rgb1.r, - g: (rgb2.g - rgb1.g) * p + rgb1.g, - b: (rgb2.b - rgb1.b) * p + rgb1.b, - a: (rgb2.a - rgb1.a) * p + rgb1.a - }; - return tinycolor(rgba); -}; - -// Readability Functions -// --------------------- -// false -// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false -tinycolor.isReadable = function (color1, color2, wcag2) { - var readability = tinycolor.readability(color1, color2); - var wcag2Parms, out; - out = false; - wcag2Parms = validateWCAG2Parms(wcag2); - switch (wcag2Parms.level + wcag2Parms.size) { - case "AAsmall": - case "AAAlarge": - out = readability >= 4.5; - break; - case "AAlarge": - out = readability >= 3; - break; - case "AAAsmall": - out = readability >= 7; - break; - } - return out; -}; - -// `mostReadable` -// Given a base color and a list of possible foreground or background -// colors for that base, returns the most readable color. -// Optionally returns Black or White if the most readable color is unreadable. -// *Example* -// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" -// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" -// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" -// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" -tinycolor.mostReadable = function (baseColor, colorList, args) { - var bestColor = null; - var bestScore = 0; - var readability; - var includeFallbackColors, level, size; - args = args || {}; - includeFallbackColors = args.includeFallbackColors; - level = args.level; - size = args.size; - for (var i = 0; i < colorList.length; i++) { - readability = tinycolor.readability(baseColor, colorList[i]); - if (readability > bestScore) { - bestScore = readability; - bestColor = tinycolor(colorList[i]); - } - } - if (tinycolor.isReadable(baseColor, bestColor, { - level: level, - size: size - }) || !includeFallbackColors) { - return bestColor; - } else { - args.includeFallbackColors = false; - return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args); - } -}; - -// Big List of Colors -// ------------------ -// -var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - rebeccapurple: "663399", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" -}; - -// Make it easy to access colors via `hexNames[hex]` -var hexNames = tinycolor.hexNames = flip(names); - -// Utilities -// --------- - -// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` -function flip(o) { - var flipped = {}; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; -} - -// Return a valid alpha value [0,1] with all invalid values being set to 1 -function boundAlpha(a) { - a = parseFloat(a); - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - return a; -} - -// Take input from [0, n] and return it as [0, 1] -function bound01(n, max) { - if (isOnePointZero(n)) n = "100%"; - var processPercent = isPercentage(n); - n = Math.min(max, Math.max(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if (Math.abs(n - max) < 0.000001) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return n % max / parseFloat(max); -} - -// Force a number between 0 and 1 -function clamp01(val) { - return Math.min(1, Math.max(0, val)); -} - -// Parse a base-16 hex value into a base-10 integer -function parseIntFromHex(val) { - return parseInt(val, 16); -} - -// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 -// -function isOnePointZero(n) { - return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1; -} - -// Check to see if string passed in is a percentage -function isPercentage(n) { - return typeof n === "string" && n.indexOf("%") != -1; -} - -// Force a hex value to have 2 characters -function pad2(c) { - return c.length == 1 ? "0" + c : "" + c; -} - -// Replace a decimal with it's percentage value -function convertToPercentage(n) { - if (n <= 1) { - n = n * 100 + "%"; - } - return n; -} - -// Converts a decimal to a hex value -function convertDecimalToHex(d) { - return Math.round(parseFloat(d) * 255).toString(16); -} -// Converts a hex value to a decimal -function convertHexToDecimal(h) { - return parseIntFromHex(h) / 255; -} -var matchers = function () { - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - return { - CSS_UNIT: new RegExp(CSS_UNIT), - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), - hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, - hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; -}(); - -// `isValidCSSUnit` -// Take in a single string / number and check to see if it looks like a CSS unit -// (see `matchers` above for definition). -function isValidCSSUnit(color) { - return !!matchers.CSS_UNIT.exec(color); -} - -// `stringInputToObject` -// Permissive string parsing. Take in a number of formats, and output an object -// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` -function stringInputToObject(color) { - color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } else if (color == "transparent") { - return { - r: 0, - g: 0, - b: 0, - a: 0, - format: "name" - }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if (match = matchers.rgb.exec(color)) { - return { - r: match[1], - g: match[2], - b: match[3] - }; - } - if (match = matchers.rgba.exec(color)) { - return { - r: match[1], - g: match[2], - b: match[3], - a: match[4] - }; - } - if (match = matchers.hsl.exec(color)) { - return { - h: match[1], - s: match[2], - l: match[3] - }; - } - if (match = matchers.hsla.exec(color)) { - return { - h: match[1], - s: match[2], - l: match[3], - a: match[4] - }; - } - if (match = matchers.hsv.exec(color)) { - return { - h: match[1], - s: match[2], - v: match[3] - }; - } - if (match = matchers.hsva.exec(color)) { - return { - h: match[1], - s: match[2], - v: match[3], - a: match[4] - }; - } - if (match = matchers.hex8.exec(color)) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8" - }; - } - if (match = matchers.hex6.exec(color)) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - format: named ? "name" : "hex" - }; - } - if (match = matchers.hex4.exec(color)) { - return { - r: parseIntFromHex(match[1] + "" + match[1]), - g: parseIntFromHex(match[2] + "" + match[2]), - b: parseIntFromHex(match[3] + "" + match[3]), - a: convertHexToDecimal(match[4] + "" + match[4]), - format: named ? "name" : "hex8" - }; - } - if (match = matchers.hex3.exec(color)) { - return { - r: parseIntFromHex(match[1] + "" + match[1]), - g: parseIntFromHex(match[2] + "" + match[2]), - b: parseIntFromHex(match[3] + "" + match[3]), - format: named ? "name" : "hex" - }; - } - return false; -} -function validateWCAG2Parms(parms) { - // return valid WCAG2 parms for isReadable. - // If input parms are invalid, return {"level":"AA", "size":"small"} - var level, size; - parms = parms || { - level: "AA", - size: "small" - }; - level = (parms.level || "AA").toUpperCase(); - size = (parms.size || "small").toLowerCase(); - if (level !== "AA" && level !== "AAA") { - level = "AA"; - } - if (size !== "small" && size !== "large") { - size = "small"; - } - return { - level: level, - size: size - }; -} - -export { tinycolor as default }; diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/package.json b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/package.json deleted file mode 100644 index 5eb8c35d0f604e63c6221190fdf32ed010d8761f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "version": "1.6.0", - "name": "tinycolor2", - "description": "Fast Color Parsing and Manipulation", - "url": "http://bgrins.github.com/TinyColor", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/bgrins/TinyColor.git" - }, - "keywords": [ - "color", - "parser", - "tinycolor" - ], - "author": "Brian Grinstead (http://briangrinstead.com)", - "bugs": { - "url": "https://github.com/bgrins/TinyColor/issues" - }, - "module": "./esm/tinycolor.js", - "main": "./cjs/tinycolor.js", - "browser": "./cjs/tinycolor.js", - "exports": { - ".": { - "import": "./esm/tinycolor.js", - "require": "./cjs/tinycolor.js" - } - }, - "scripts": { - "test": "node cjs/test.js && node esm/test.js" - }, - "devDependencies": { - "@deno/shim-deno-test": "^0.4.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/tinycolor.js b/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/tinycolor.js deleted file mode 100644 index 52601dfe40262bb793b7c2b8c9bba93e1ca0003e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinycolor2/tinycolor.js +++ /dev/null @@ -1,1191 +0,0 @@ -// This file is autogenerated. -// It's here at this path for backwards compatibility for links to it -// but the npm package now exports both CJS and ESM. -// See https://github.com/bgrins/TinyColor/ for instructions. - (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory()); -})(this, (function () { 'use strict'; - - 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); - } - - // https://github.com/bgrins/TinyColor - // Brian Grinstead, MIT License - - var trimLeft = /^\s+/; - var trimRight = /\s+$/; - function tinycolor(color, opts) { - color = color ? color : ""; - opts = opts || {}; - - // If input is already a tinycolor, return itself - if (color instanceof tinycolor) { - return color; - } - // If we are called as a function, call using new instead - if (!(this instanceof tinycolor)) { - return new tinycolor(color, opts); - } - var rgb = inputToRGB(color); - this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format; - this._gradientType = opts.gradientType; - - // Don't let the range of [0,255] come back in [0,1]. - // Potentially lose a little bit of precision here, but will fix issues where - // .5 gets interpreted as half of the total, instead of half of 1 - // If it was supposed to be 128, this was already taken care of by `inputToRgb` - if (this._r < 1) this._r = Math.round(this._r); - if (this._g < 1) this._g = Math.round(this._g); - if (this._b < 1) this._b = Math.round(this._b); - this._ok = rgb.ok; - } - tinycolor.prototype = { - isDark: function isDark() { - return this.getBrightness() < 128; - }, - isLight: function isLight() { - return !this.isDark(); - }, - isValid: function isValid() { - return this._ok; - }, - getOriginalInput: function getOriginalInput() { - return this._originalInput; - }, - getFormat: function getFormat() { - return this._format; - }, - getAlpha: function getAlpha() { - return this._a; - }, - getBrightness: function getBrightness() { - //http://www.w3.org/TR/AERT#color-contrast - var rgb = this.toRgb(); - return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; - }, - getLuminance: function getLuminance() { - //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef - var rgb = this.toRgb(); - var RsRGB, GsRGB, BsRGB, R, G, B; - RsRGB = rgb.r / 255; - GsRGB = rgb.g / 255; - BsRGB = rgb.b / 255; - if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4); - if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4); - if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4); - return 0.2126 * R + 0.7152 * G + 0.0722 * B; - }, - setAlpha: function setAlpha(value) { - this._a = boundAlpha(value); - this._roundA = Math.round(100 * this._a) / 100; - return this; - }, - toHsv: function toHsv() { - var hsv = rgbToHsv(this._r, this._g, this._b); - return { - h: hsv.h * 360, - s: hsv.s, - v: hsv.v, - a: this._a - }; - }, - toHsvString: function toHsvString() { - var hsv = rgbToHsv(this._r, this._g, this._b); - var h = Math.round(hsv.h * 360), - s = Math.round(hsv.s * 100), - v = Math.round(hsv.v * 100); - return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")"; - }, - toHsl: function toHsl() { - var hsl = rgbToHsl(this._r, this._g, this._b); - return { - h: hsl.h * 360, - s: hsl.s, - l: hsl.l, - a: this._a - }; - }, - toHslString: function toHslString() { - var hsl = rgbToHsl(this._r, this._g, this._b); - var h = Math.round(hsl.h * 360), - s = Math.round(hsl.s * 100), - l = Math.round(hsl.l * 100); - return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")"; - }, - toHex: function toHex(allow3Char) { - return rgbToHex(this._r, this._g, this._b, allow3Char); - }, - toHexString: function toHexString(allow3Char) { - return "#" + this.toHex(allow3Char); - }, - toHex8: function toHex8(allow4Char) { - return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char); - }, - toHex8String: function toHex8String(allow4Char) { - return "#" + this.toHex8(allow4Char); - }, - toRgb: function toRgb() { - return { - r: Math.round(this._r), - g: Math.round(this._g), - b: Math.round(this._b), - a: this._a - }; - }, - toRgbString: function toRgbString() { - return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")"; - }, - toPercentageRgb: function toPercentageRgb() { - return { - r: Math.round(bound01(this._r, 255) * 100) + "%", - g: Math.round(bound01(this._g, 255) * 100) + "%", - b: Math.round(bound01(this._b, 255) * 100) + "%", - a: this._a - }; - }, - toPercentageRgbString: function toPercentageRgbString() { - return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; - }, - toName: function toName() { - if (this._a === 0) { - return "transparent"; - } - if (this._a < 1) { - return false; - } - return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; - }, - toFilter: function toFilter(secondColor) { - var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a); - var secondHex8String = hex8String; - var gradientType = this._gradientType ? "GradientType = 1, " : ""; - if (secondColor) { - var s = tinycolor(secondColor); - secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a); - } - return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")"; - }, - toString: function toString(format) { - var formatSet = !!format; - format = format || this._format; - var formattedString = false; - var hasAlpha = this._a < 1 && this._a >= 0; - var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name"); - if (needsAlphaFormat) { - // Special case for "transparent", all other non-alpha formats - // will return rgba when there is transparency. - if (format === "name" && this._a === 0) { - return this.toName(); - } - return this.toRgbString(); - } - if (format === "rgb") { - formattedString = this.toRgbString(); - } - if (format === "prgb") { - formattedString = this.toPercentageRgbString(); - } - if (format === "hex" || format === "hex6") { - formattedString = this.toHexString(); - } - if (format === "hex3") { - formattedString = this.toHexString(true); - } - if (format === "hex4") { - formattedString = this.toHex8String(true); - } - if (format === "hex8") { - formattedString = this.toHex8String(); - } - if (format === "name") { - formattedString = this.toName(); - } - if (format === "hsl") { - formattedString = this.toHslString(); - } - if (format === "hsv") { - formattedString = this.toHsvString(); - } - return formattedString || this.toHexString(); - }, - clone: function clone() { - return tinycolor(this.toString()); - }, - _applyModification: function _applyModification(fn, args) { - var color = fn.apply(null, [this].concat([].slice.call(args))); - this._r = color._r; - this._g = color._g; - this._b = color._b; - this.setAlpha(color._a); - return this; - }, - lighten: function lighten() { - return this._applyModification(_lighten, arguments); - }, - brighten: function brighten() { - return this._applyModification(_brighten, arguments); - }, - darken: function darken() { - return this._applyModification(_darken, arguments); - }, - desaturate: function desaturate() { - return this._applyModification(_desaturate, arguments); - }, - saturate: function saturate() { - return this._applyModification(_saturate, arguments); - }, - greyscale: function greyscale() { - return this._applyModification(_greyscale, arguments); - }, - spin: function spin() { - return this._applyModification(_spin, arguments); - }, - _applyCombination: function _applyCombination(fn, args) { - return fn.apply(null, [this].concat([].slice.call(args))); - }, - analogous: function analogous() { - return this._applyCombination(_analogous, arguments); - }, - complement: function complement() { - return this._applyCombination(_complement, arguments); - }, - monochromatic: function monochromatic() { - return this._applyCombination(_monochromatic, arguments); - }, - splitcomplement: function splitcomplement() { - return this._applyCombination(_splitcomplement, arguments); - }, - // Disabled until https://github.com/bgrins/TinyColor/issues/254 - // polyad: function (number) { - // return this._applyCombination(polyad, [number]); - // }, - triad: function triad() { - return this._applyCombination(polyad, [3]); - }, - tetrad: function tetrad() { - return this._applyCombination(polyad, [4]); - } - }; - - // If input is an object, force 1 into "1.0" to handle ratios properly - // String input requires "1.0" as input, so 1 will be treated as 1 - tinycolor.fromRatio = function (color, opts) { - if (_typeof(color) == "object") { - var newColor = {}; - for (var i in color) { - if (color.hasOwnProperty(i)) { - if (i === "a") { - newColor[i] = color[i]; - } else { - newColor[i] = convertToPercentage(color[i]); - } - } - } - color = newColor; - } - return tinycolor(color, opts); - }; - - // Given a string or object, convert that input to RGB - // Possible string inputs: - // - // "red" - // "#f00" or "f00" - // "#ff0000" or "ff0000" - // "#ff000000" or "ff000000" - // "rgb 255 0 0" or "rgb (255, 0, 0)" - // "rgb 1.0 0 0" or "rgb (1, 0, 0)" - // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" - // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" - // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" - // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" - // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" - // - function inputToRGB(color) { - var rgb = { - r: 0, - g: 0, - b: 0 - }; - var a = 1; - var s = null; - var v = null; - var l = null; - var ok = false; - var format = false; - if (typeof color == "string") { - color = stringInputToObject(color); - } - if (_typeof(color) == "object") { - if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) { - rgb = rgbToRgb(color.r, color.g, color.b); - ok = true; - format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) { - s = convertToPercentage(color.s); - v = convertToPercentage(color.v); - rgb = hsvToRgb(color.h, s, v); - ok = true; - format = "hsv"; - } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) { - s = convertToPercentage(color.s); - l = convertToPercentage(color.l); - rgb = hslToRgb(color.h, s, l); - ok = true; - format = "hsl"; - } - if (color.hasOwnProperty("a")) { - a = color.a; - } - } - a = boundAlpha(a); - return { - ok: ok, - format: color.format || format, - r: Math.min(255, Math.max(rgb.r, 0)), - g: Math.min(255, Math.max(rgb.g, 0)), - b: Math.min(255, Math.max(rgb.b, 0)), - a: a - }; - } - - // Conversion Functions - // -------------------- - - // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: - // - - // `rgbToRgb` - // Handle bounds / percentage checking to conform to CSS color spec - // - // *Assumes:* r, g, b in [0, 255] or [0, 1] - // *Returns:* { r, g, b } in [0, 255] - function rgbToRgb(r, g, b) { - return { - r: bound01(r, 255) * 255, - g: bound01(g, 255) * 255, - b: bound01(b, 255) * 255 - }; - } - - // `rgbToHsl` - // Converts an RGB color value to HSL. - // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] - // *Returns:* { h, s, l } in [0,1] - function rgbToHsl(r, g, b) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - var max = Math.max(r, g, b), - min = Math.min(r, g, b); - var h, - s, - l = (max + min) / 2; - if (max == min) { - h = s = 0; // achromatic - } else { - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch (max) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - h /= 6; - } - return { - h: h, - s: s, - l: l - }; - } - - // `hslToRgb` - // Converts an HSL color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hslToRgb(h, s, l) { - var r, g, b; - h = bound01(h, 360); - s = bound01(s, 100); - l = bound01(l, 100); - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; - return p; - } - if (s === 0) { - r = g = b = l; // achromatic - } else { - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1 / 3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1 / 3); - } - return { - r: r * 255, - g: g * 255, - b: b * 255 - }; - } - - // `rgbToHsv` - // Converts an RGB color value to HSV - // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] - // *Returns:* { h, s, v } in [0,1] - function rgbToHsv(r, g, b) { - r = bound01(r, 255); - g = bound01(g, 255); - b = bound01(b, 255); - var max = Math.max(r, g, b), - min = Math.min(r, g, b); - var h, - s, - v = max; - var d = max - min; - s = max === 0 ? 0 : d / max; - if (max == min) { - h = 0; // achromatic - } else { - switch (max) { - case r: - h = (g - b) / d + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / d + 2; - break; - case b: - h = (r - g) / d + 4; - break; - } - h /= 6; - } - return { - h: h, - s: s, - v: v - }; - } - - // `hsvToRgb` - // Converts an HSV color value to RGB. - // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] - // *Returns:* { r, g, b } in the set [0, 255] - function hsvToRgb(h, s, v) { - h = bound01(h, 360) * 6; - s = bound01(s, 100); - v = bound01(v, 100); - var i = Math.floor(h), - f = h - i, - p = v * (1 - s), - q = v * (1 - f * s), - t = v * (1 - (1 - f) * s), - mod = i % 6, - r = [v, q, p, p, t, v][mod], - g = [t, v, v, q, p, p][mod], - b = [p, p, t, v, v, q][mod]; - return { - r: r * 255, - g: g * 255, - b: b * 255 - }; - } - - // `rgbToHex` - // Converts an RGB color to hex - // Assumes r, g, and b are contained in the set [0, 255] - // Returns a 3 or 6 character hex - function rgbToHex(r, g, b, allow3Char) { - var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; - - // Return a 3 character hex if possible - if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); - } - return hex.join(""); - } - - // `rgbaToHex` - // Converts an RGBA color plus alpha transparency to hex - // Assumes r, g, b are contained in the set [0, 255] and - // a in [0, 1]. Returns a 4 or 8 character rgba hex - function rgbaToHex(r, g, b, a, allow4Char) { - var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))]; - - // Return a 4 character hex if possible - if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) { - return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0); - } - return hex.join(""); - } - - // `rgbaToArgbHex` - // Converts an RGBA color to an ARGB Hex8 string - // Rarely used, but required for "toFilter()" - function rgbaToArgbHex(r, g, b, a) { - var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))]; - return hex.join(""); - } - - // `equals` - // Can be called with any tinycolor input - tinycolor.equals = function (color1, color2) { - if (!color1 || !color2) return false; - return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); - }; - tinycolor.random = function () { - return tinycolor.fromRatio({ - r: Math.random(), - g: Math.random(), - b: Math.random() - }); - }; - - // Modification Functions - // ---------------------- - // Thanks to less.js for some of the basics here - // - - function _desaturate(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.s -= amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - } - function _saturate(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.s += amount / 100; - hsl.s = clamp01(hsl.s); - return tinycolor(hsl); - } - function _greyscale(color) { - return tinycolor(color).desaturate(100); - } - function _lighten(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.l += amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - } - function _brighten(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var rgb = tinycolor(color).toRgb(); - rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100)))); - rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100)))); - rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100)))); - return tinycolor(rgb); - } - function _darken(color, amount) { - amount = amount === 0 ? 0 : amount || 10; - var hsl = tinycolor(color).toHsl(); - hsl.l -= amount / 100; - hsl.l = clamp01(hsl.l); - return tinycolor(hsl); - } - - // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. - // Values outside of this range will be wrapped into this range. - function _spin(color, amount) { - var hsl = tinycolor(color).toHsl(); - var hue = (hsl.h + amount) % 360; - hsl.h = hue < 0 ? 360 + hue : hue; - return tinycolor(hsl); - } - - // Combination Functions - // --------------------- - // Thanks to jQuery xColor for some of the ideas behind these - // - - function _complement(color) { - var hsl = tinycolor(color).toHsl(); - hsl.h = (hsl.h + 180) % 360; - return tinycolor(hsl); - } - function polyad(color, number) { - if (isNaN(number) || number <= 0) { - throw new Error("Argument to polyad must be a positive number"); - } - var hsl = tinycolor(color).toHsl(); - var result = [tinycolor(color)]; - var step = 360 / number; - for (var i = 1; i < number; i++) { - result.push(tinycolor({ - h: (hsl.h + i * step) % 360, - s: hsl.s, - l: hsl.l - })); - } - return result; - } - function _splitcomplement(color) { - var hsl = tinycolor(color).toHsl(); - var h = hsl.h; - return [tinycolor(color), tinycolor({ - h: (h + 72) % 360, - s: hsl.s, - l: hsl.l - }), tinycolor({ - h: (h + 216) % 360, - s: hsl.s, - l: hsl.l - })]; - } - function _analogous(color, results, slices) { - results = results || 6; - slices = slices || 30; - var hsl = tinycolor(color).toHsl(); - var part = 360 / slices; - var ret = [tinycolor(color)]; - for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) { - hsl.h = (hsl.h + part) % 360; - ret.push(tinycolor(hsl)); - } - return ret; - } - function _monochromatic(color, results) { - results = results || 6; - var hsv = tinycolor(color).toHsv(); - var h = hsv.h, - s = hsv.s, - v = hsv.v; - var ret = []; - var modification = 1 / results; - while (results--) { - ret.push(tinycolor({ - h: h, - s: s, - v: v - })); - v = (v + modification) % 1; - } - return ret; - } - - // Utility Functions - // --------------------- - - tinycolor.mix = function (color1, color2, amount) { - amount = amount === 0 ? 0 : amount || 50; - var rgb1 = tinycolor(color1).toRgb(); - var rgb2 = tinycolor(color2).toRgb(); - var p = amount / 100; - var rgba = { - r: (rgb2.r - rgb1.r) * p + rgb1.r, - g: (rgb2.g - rgb1.g) * p + rgb1.g, - b: (rgb2.b - rgb1.b) * p + rgb1.b, - a: (rgb2.a - rgb1.a) * p + rgb1.a - }; - return tinycolor(rgba); - }; - - // Readability Functions - // --------------------- - // false - // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false - tinycolor.isReadable = function (color1, color2, wcag2) { - var readability = tinycolor.readability(color1, color2); - var wcag2Parms, out; - out = false; - wcag2Parms = validateWCAG2Parms(wcag2); - switch (wcag2Parms.level + wcag2Parms.size) { - case "AAsmall": - case "AAAlarge": - out = readability >= 4.5; - break; - case "AAlarge": - out = readability >= 3; - break; - case "AAAsmall": - out = readability >= 7; - break; - } - return out; - }; - - // `mostReadable` - // Given a base color and a list of possible foreground or background - // colors for that base, returns the most readable color. - // Optionally returns Black or White if the most readable color is unreadable. - // *Example* - // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255" - // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff" - // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3" - // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff" - tinycolor.mostReadable = function (baseColor, colorList, args) { - var bestColor = null; - var bestScore = 0; - var readability; - var includeFallbackColors, level, size; - args = args || {}; - includeFallbackColors = args.includeFallbackColors; - level = args.level; - size = args.size; - for (var i = 0; i < colorList.length; i++) { - readability = tinycolor.readability(baseColor, colorList[i]); - if (readability > bestScore) { - bestScore = readability; - bestColor = tinycolor(colorList[i]); - } - } - if (tinycolor.isReadable(baseColor, bestColor, { - level: level, - size: size - }) || !includeFallbackColors) { - return bestColor; - } else { - args.includeFallbackColors = false; - return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args); - } - }; - - // Big List of Colors - // ------------------ - // - var names = tinycolor.names = { - aliceblue: "f0f8ff", - antiquewhite: "faebd7", - aqua: "0ff", - aquamarine: "7fffd4", - azure: "f0ffff", - beige: "f5f5dc", - bisque: "ffe4c4", - black: "000", - blanchedalmond: "ffebcd", - blue: "00f", - blueviolet: "8a2be2", - brown: "a52a2a", - burlywood: "deb887", - burntsienna: "ea7e5d", - cadetblue: "5f9ea0", - chartreuse: "7fff00", - chocolate: "d2691e", - coral: "ff7f50", - cornflowerblue: "6495ed", - cornsilk: "fff8dc", - crimson: "dc143c", - cyan: "0ff", - darkblue: "00008b", - darkcyan: "008b8b", - darkgoldenrod: "b8860b", - darkgray: "a9a9a9", - darkgreen: "006400", - darkgrey: "a9a9a9", - darkkhaki: "bdb76b", - darkmagenta: "8b008b", - darkolivegreen: "556b2f", - darkorange: "ff8c00", - darkorchid: "9932cc", - darkred: "8b0000", - darksalmon: "e9967a", - darkseagreen: "8fbc8f", - darkslateblue: "483d8b", - darkslategray: "2f4f4f", - darkslategrey: "2f4f4f", - darkturquoise: "00ced1", - darkviolet: "9400d3", - deeppink: "ff1493", - deepskyblue: "00bfff", - dimgray: "696969", - dimgrey: "696969", - dodgerblue: "1e90ff", - firebrick: "b22222", - floralwhite: "fffaf0", - forestgreen: "228b22", - fuchsia: "f0f", - gainsboro: "dcdcdc", - ghostwhite: "f8f8ff", - gold: "ffd700", - goldenrod: "daa520", - gray: "808080", - green: "008000", - greenyellow: "adff2f", - grey: "808080", - honeydew: "f0fff0", - hotpink: "ff69b4", - indianred: "cd5c5c", - indigo: "4b0082", - ivory: "fffff0", - khaki: "f0e68c", - lavender: "e6e6fa", - lavenderblush: "fff0f5", - lawngreen: "7cfc00", - lemonchiffon: "fffacd", - lightblue: "add8e6", - lightcoral: "f08080", - lightcyan: "e0ffff", - lightgoldenrodyellow: "fafad2", - lightgray: "d3d3d3", - lightgreen: "90ee90", - lightgrey: "d3d3d3", - lightpink: "ffb6c1", - lightsalmon: "ffa07a", - lightseagreen: "20b2aa", - lightskyblue: "87cefa", - lightslategray: "789", - lightslategrey: "789", - lightsteelblue: "b0c4de", - lightyellow: "ffffe0", - lime: "0f0", - limegreen: "32cd32", - linen: "faf0e6", - magenta: "f0f", - maroon: "800000", - mediumaquamarine: "66cdaa", - mediumblue: "0000cd", - mediumorchid: "ba55d3", - mediumpurple: "9370db", - mediumseagreen: "3cb371", - mediumslateblue: "7b68ee", - mediumspringgreen: "00fa9a", - mediumturquoise: "48d1cc", - mediumvioletred: "c71585", - midnightblue: "191970", - mintcream: "f5fffa", - mistyrose: "ffe4e1", - moccasin: "ffe4b5", - navajowhite: "ffdead", - navy: "000080", - oldlace: "fdf5e6", - olive: "808000", - olivedrab: "6b8e23", - orange: "ffa500", - orangered: "ff4500", - orchid: "da70d6", - palegoldenrod: "eee8aa", - palegreen: "98fb98", - paleturquoise: "afeeee", - palevioletred: "db7093", - papayawhip: "ffefd5", - peachpuff: "ffdab9", - peru: "cd853f", - pink: "ffc0cb", - plum: "dda0dd", - powderblue: "b0e0e6", - purple: "800080", - rebeccapurple: "663399", - red: "f00", - rosybrown: "bc8f8f", - royalblue: "4169e1", - saddlebrown: "8b4513", - salmon: "fa8072", - sandybrown: "f4a460", - seagreen: "2e8b57", - seashell: "fff5ee", - sienna: "a0522d", - silver: "c0c0c0", - skyblue: "87ceeb", - slateblue: "6a5acd", - slategray: "708090", - slategrey: "708090", - snow: "fffafa", - springgreen: "00ff7f", - steelblue: "4682b4", - tan: "d2b48c", - teal: "008080", - thistle: "d8bfd8", - tomato: "ff6347", - turquoise: "40e0d0", - violet: "ee82ee", - wheat: "f5deb3", - white: "fff", - whitesmoke: "f5f5f5", - yellow: "ff0", - yellowgreen: "9acd32" - }; - - // Make it easy to access colors via `hexNames[hex]` - var hexNames = tinycolor.hexNames = flip(names); - - // Utilities - // --------- - - // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` - function flip(o) { - var flipped = {}; - for (var i in o) { - if (o.hasOwnProperty(i)) { - flipped[o[i]] = i; - } - } - return flipped; - } - - // Return a valid alpha value [0,1] with all invalid values being set to 1 - function boundAlpha(a) { - a = parseFloat(a); - if (isNaN(a) || a < 0 || a > 1) { - a = 1; - } - return a; - } - - // Take input from [0, n] and return it as [0, 1] - function bound01(n, max) { - if (isOnePointZero(n)) n = "100%"; - var processPercent = isPercentage(n); - n = Math.min(max, Math.max(0, parseFloat(n))); - - // Automatically convert percentage into number - if (processPercent) { - n = parseInt(n * max, 10) / 100; - } - - // Handle floating point rounding errors - if (Math.abs(n - max) < 0.000001) { - return 1; - } - - // Convert into [0, 1] range if it isn't already - return n % max / parseFloat(max); - } - - // Force a number between 0 and 1 - function clamp01(val) { - return Math.min(1, Math.max(0, val)); - } - - // Parse a base-16 hex value into a base-10 integer - function parseIntFromHex(val) { - return parseInt(val, 16); - } - - // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 - // - function isOnePointZero(n) { - return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1; - } - - // Check to see if string passed in is a percentage - function isPercentage(n) { - return typeof n === "string" && n.indexOf("%") != -1; - } - - // Force a hex value to have 2 characters - function pad2(c) { - return c.length == 1 ? "0" + c : "" + c; - } - - // Replace a decimal with it's percentage value - function convertToPercentage(n) { - if (n <= 1) { - n = n * 100 + "%"; - } - return n; - } - - // Converts a decimal to a hex value - function convertDecimalToHex(d) { - return Math.round(parseFloat(d) * 255).toString(16); - } - // Converts a hex value to a decimal - function convertHexToDecimal(h) { - return parseIntFromHex(h) / 255; - } - var matchers = function () { - // - var CSS_INTEGER = "[-\\+]?\\d+%?"; - - // - var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; - - // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. - var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; - - // Actual matching. - // Parentheses and commas are optional, but not required. - // Whitespace can take the place of commas or opening paren - var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; - return { - CSS_UNIT: new RegExp(CSS_UNIT), - rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), - rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), - hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), - hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), - hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), - hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), - hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, - hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, - hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ - }; - }(); - - // `isValidCSSUnit` - // Take in a single string / number and check to see if it looks like a CSS unit - // (see `matchers` above for definition). - function isValidCSSUnit(color) { - return !!matchers.CSS_UNIT.exec(color); - } - - // `stringInputToObject` - // Permissive string parsing. Take in a number of formats, and output an object - // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` - function stringInputToObject(color) { - color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase(); - var named = false; - if (names[color]) { - color = names[color]; - named = true; - } else if (color == "transparent") { - return { - r: 0, - g: 0, - b: 0, - a: 0, - format: "name" - }; - } - - // Try to match string input using regular expressions. - // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] - // Just return an object and let the conversion functions handle that. - // This way the result will be the same whether the tinycolor is initialized with string or object. - var match; - if (match = matchers.rgb.exec(color)) { - return { - r: match[1], - g: match[2], - b: match[3] - }; - } - if (match = matchers.rgba.exec(color)) { - return { - r: match[1], - g: match[2], - b: match[3], - a: match[4] - }; - } - if (match = matchers.hsl.exec(color)) { - return { - h: match[1], - s: match[2], - l: match[3] - }; - } - if (match = matchers.hsla.exec(color)) { - return { - h: match[1], - s: match[2], - l: match[3], - a: match[4] - }; - } - if (match = matchers.hsv.exec(color)) { - return { - h: match[1], - s: match[2], - v: match[3] - }; - } - if (match = matchers.hsva.exec(color)) { - return { - h: match[1], - s: match[2], - v: match[3], - a: match[4] - }; - } - if (match = matchers.hex8.exec(color)) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - a: convertHexToDecimal(match[4]), - format: named ? "name" : "hex8" - }; - } - if (match = matchers.hex6.exec(color)) { - return { - r: parseIntFromHex(match[1]), - g: parseIntFromHex(match[2]), - b: parseIntFromHex(match[3]), - format: named ? "name" : "hex" - }; - } - if (match = matchers.hex4.exec(color)) { - return { - r: parseIntFromHex(match[1] + "" + match[1]), - g: parseIntFromHex(match[2] + "" + match[2]), - b: parseIntFromHex(match[3] + "" + match[3]), - a: convertHexToDecimal(match[4] + "" + match[4]), - format: named ? "name" : "hex8" - }; - } - if (match = matchers.hex3.exec(color)) { - return { - r: parseIntFromHex(match[1] + "" + match[1]), - g: parseIntFromHex(match[2] + "" + match[2]), - b: parseIntFromHex(match[3] + "" + match[3]), - format: named ? "name" : "hex" - }; - } - return false; - } - function validateWCAG2Parms(parms) { - // return valid WCAG2 parms for isReadable. - // If input parms are invalid, return {"level":"AA", "size":"small"} - var level, size; - parms = parms || { - level: "AA", - size: "small" - }; - level = (parms.level || "AA").toUpperCase(); - size = (parms.size || "small").toLowerCase(); - if (level !== "AA" && level !== "AAA") { - level = "AA"; - } - if (size !== "small" && size !== "large") { - size = "small"; - } - return { - level: level, - size: size - }; - } - - return tinycolor; - -})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/LICENSE deleted file mode 100644 index 8657364bb085e0b193c66673fd4826d03a0bc01d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Madeline Gurriarán - -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/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/README.md b/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/README.md deleted file mode 100644 index 15695e668a2c16064ae26eee1378618df9a4db90..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# tinyglobby - -[![npm version](https://img.shields.io/npm/v/tinyglobby.svg?maxAge=3600)](https://npmjs.com/package/tinyglobby) -[![monthly downloads](https://img.shields.io/npm/dm/tinyglobby.svg?maxAge=3600)](https://npmjs.com/package/tinyglobby) - -A fast and minimal alternative to globby and fast-glob, meant to behave the same way. - -Both globby and fast-glob present some behavior no other globbing lib has, -which makes it hard to manually replace with something smaller and better. - -This library uses only two subdependencies, compared to `globby`'s [23](https://npmgraph.js.org/?q=globby@14.1.0) -and `fast-glob`'s [17](https://npmgraph.js.org/?q=fast-glob@3.3.3). - -## Usage - -```js -import { glob, globSync } from 'tinyglobby'; - -await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' }); -globSync('src/**/*.ts', { ignore: '**/*.d.ts' }); -``` - -## Documentation - -Visit https://superchupu.dev/tinyglobby to read the full documentation. diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.cjs b/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.cjs deleted file mode 100644 index e5cb03ccec9ac91a3f3d089fa48b666e211eb8a7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.cjs +++ /dev/null @@ -1,350 +0,0 @@ -//#region rolldown:runtime -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { - key = keys[i]; - if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); - -//#endregion -let fs = require("fs"); -fs = __toESM(fs); -let path = require("path"); -path = __toESM(path); -let url = require("url"); -url = __toESM(url); -let fdir = require("fdir"); -fdir = __toESM(fdir); -let picomatch = require("picomatch"); -picomatch = __toESM(picomatch); - -//#region src/utils.ts -const isReadonlyArray = Array.isArray; -const isWin = process.platform === "win32"; -const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/; -function getPartialMatcher(patterns, options = {}) { - const patternsCount = patterns.length; - const patternsParts = Array(patternsCount); - const matchers = Array(patternsCount); - const globstarEnabled = !options.noglobstar; - for (let i = 0; i < patternsCount; i++) { - const parts = splitPattern(patterns[i]); - patternsParts[i] = parts; - const partsCount = parts.length; - const partMatchers = Array(partsCount); - for (let j = 0; j < partsCount; j++) partMatchers[j] = (0, picomatch.default)(parts[j], options); - matchers[i] = partMatchers; - } - return (input) => { - const inputParts = input.split("/"); - if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true; - for (let i = 0; i < patterns.length; i++) { - const patternParts = patternsParts[i]; - const matcher = matchers[i]; - const inputPatternCount = inputParts.length; - const minParts = Math.min(inputPatternCount, patternParts.length); - let j = 0; - while (j < minParts) { - const part = patternParts[j]; - if (part.includes("/")) return true; - const match = matcher[j](inputParts[j]); - if (!match) break; - if (globstarEnabled && part === "**") return true; - j++; - } - if (j === inputPatternCount) return true; - } - return false; - }; -} -/* node:coverage ignore next 2 */ -const WIN32_ROOT_DIR = /^[A-Z]:\/$/i; -const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/"; -function buildFormat(cwd, root, absolute) { - if (cwd === root || root.startsWith(`${cwd}/`)) { - if (absolute) { - const start = isRoot(cwd) ? cwd.length : cwd.length + 1; - return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || "."; - } - const prefix = root.slice(cwd.length + 1); - if (prefix) return (p, isDir) => { - if (p === ".") return prefix; - const result = `${prefix}/${p}`; - return isDir ? result.slice(0, -1) : result; - }; - return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p; - } - if (absolute) return (p) => path.posix.relative(cwd, p) || "."; - return (p) => path.posix.relative(cwd, `${root}/${p}`) || "."; -} -function buildRelative(cwd, root) { - if (root.startsWith(`${cwd}/`)) { - const prefix = root.slice(cwd.length + 1); - return (p) => `${prefix}/${p}`; - } - return (p) => { - const result = path.posix.relative(cwd, `${root}/${p}`); - if (p.endsWith("/") && result !== "") return `${result}/`; - return result || "."; - }; -} -const splitPatternOptions = { parts: true }; -function splitPattern(path$2) { - var _result$parts; - const result = picomatch.default.scan(path$2, splitPatternOptions); - return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$2]; -} -const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g; -function convertPosixPathToPattern(path$2) { - return escapePosixPath(path$2); -} -function convertWin32PathToPattern(path$2) { - return escapeWin32Path(path$2).replace(ESCAPED_WIN32_BACKSLASHES, "/"); -} -/** -* Converts a path to a pattern depending on the platform. -* Identical to {@link escapePath} on POSIX systems. -* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern} -*/ -/* node:coverage ignore next 3 */ -const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern; -const POSIX_UNESCAPED_GLOB_SYMBOLS = /(? path$2.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&"); -const escapeWin32Path = (path$2) => path$2.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&"); -/** -* Escapes a path's special characters depending on the platform. -* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath} -*/ -/* node:coverage ignore next */ -const escapePath = isWin ? escapeWin32Path : escapePosixPath; -/** -* Checks if a pattern has dynamic parts. -* -* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy: -* -* - Doesn't necessarily return `false` on patterns that include `\`. -* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not. -* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`. -* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`. -* -* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern} -*/ -function isDynamicPattern(pattern, options) { - if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true; - const scan = picomatch.default.scan(pattern); - return scan.isGlob || scan.negated; -} -function log(...tasks) { - console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks); -} - -//#endregion -//#region src/index.ts -const PARENT_DIRECTORY = /^(\/?\.\.)+/; -const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g; -const BACKSLASHES = /\\/g; -function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) { - let result = pattern; - if (pattern.endsWith("/")) result = pattern.slice(0, -1); - if (!result.endsWith("*") && expandDirectories) result += "/**"; - const escapedCwd = escapePath(cwd); - if (path.default.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = path.posix.relative(escapedCwd, result); - else result = path.posix.normalize(result); - const parentDirectoryMatch = PARENT_DIRECTORY.exec(result); - const parts = splitPattern(result); - if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) { - const n = (parentDirectoryMatch[0].length + 1) / 3; - let i = 0; - const cwdParts = escapedCwd.split("/"); - while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) { - result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || "."; - i++; - } - const potentialRoot = path.posix.join(cwd, parentDirectoryMatch[0].slice(i * 3)); - if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) { - props.root = potentialRoot; - props.depthOffset = -n + i; - } - } - if (!isIgnore && props.depthOffset >= 0) { - var _props$commonPath; - (_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts); - const newCommonPath = []; - const length = Math.min(props.commonPath.length, parts.length); - for (let i = 0; i < length; i++) { - const part = parts[i]; - if (part === "**" && !parts[i + 1]) { - newCommonPath.pop(); - break; - } - if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break; - newCommonPath.push(part); - } - props.depthOffset = newCommonPath.length; - props.commonPath = newCommonPath; - props.root = newCommonPath.length > 0 ? path.posix.join(cwd, ...newCommonPath) : cwd; - } - return result; -} -function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd, props) { - if (typeof patterns === "string") patterns = [patterns]; - if (typeof ignore === "string") ignore = [ignore]; - const matchPatterns = []; - const ignorePatterns = []; - for (const pattern of ignore) { - if (!pattern) continue; - if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true)); - } - for (const pattern of patterns) { - if (!pattern) continue; - if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false)); - else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true)); - } - return { - match: matchPatterns, - ignore: ignorePatterns - }; -} -function formatPaths(paths, relative) { - for (let i = paths.length - 1; i >= 0; i--) { - const path$2 = paths[i]; - paths[i] = relative(path$2); - } - return paths; -} -function normalizeCwd(cwd) { - if (!cwd) return process.cwd().replace(BACKSLASHES, "/"); - if (cwd instanceof URL) return (0, url.fileURLToPath)(cwd).replace(BACKSLASHES, "/"); - return path.default.resolve(cwd).replace(BACKSLASHES, "/"); -} -function getCrawler(patterns, inputOptions = {}) { - const options = process.env.TINYGLOBBY_DEBUG ? { - ...inputOptions, - debug: true - } : inputOptions; - const cwd = normalizeCwd(options.cwd); - if (options.debug) log("globbing with:", { - patterns, - options, - cwd - }); - if (Array.isArray(patterns) && patterns.length === 0) return [{ - sync: () => [], - withPromise: async () => [] - }, false]; - const props = { - root: cwd, - commonPath: null, - depthOffset: 0 - }; - const processed = processPatterns({ - ...options, - patterns - }, cwd, props); - if (options.debug) log("internal processing patterns:", processed); - const matchOptions = { - dot: options.dot, - nobrace: options.braceExpansion === false, - nocase: options.caseSensitiveMatch === false, - noextglob: options.extglob === false, - noglobstar: options.globstar === false, - posix: true - }; - const matcher = (0, picomatch.default)(processed.match, { - ...matchOptions, - ignore: processed.ignore - }); - const ignore = (0, picomatch.default)(processed.ignore, matchOptions); - const partialMatcher = getPartialMatcher(processed.match, matchOptions); - const format = buildFormat(cwd, props.root, options.absolute); - const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true); - const fdirOptions = { - filters: [options.debug ? (p, isDirectory) => { - const path$2 = format(p, isDirectory); - const matches = matcher(path$2); - if (matches) log(`matched ${path$2}`); - return matches; - } : (p, isDirectory) => matcher(format(p, isDirectory))], - exclude: options.debug ? (_, p) => { - const relativePath = formatExclude(p, true); - const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); - if (skipped) log(`skipped ${p}`); - else log(`crawling ${p}`); - return skipped; - } : (_, p) => { - const relativePath = formatExclude(p, true); - return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); - }, - fs: options.fs ? { - readdir: options.fs.readdir || fs.default.readdir, - readdirSync: options.fs.readdirSync || fs.default.readdirSync, - realpath: options.fs.realpath || fs.default.realpath, - realpathSync: options.fs.realpathSync || fs.default.realpathSync, - stat: options.fs.stat || fs.default.stat, - statSync: options.fs.statSync || fs.default.statSync - } : void 0, - pathSeparator: "/", - relativePaths: true, - resolveSymlinks: true, - signal: options.signal - }; - if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset); - if (options.absolute) { - fdirOptions.relativePaths = false; - fdirOptions.resolvePaths = true; - fdirOptions.includeBasePath = true; - } - if (options.followSymbolicLinks === false) { - fdirOptions.resolveSymlinks = false; - fdirOptions.excludeSymlinks = true; - } - if (options.onlyDirectories) { - fdirOptions.excludeFiles = true; - fdirOptions.includeDirs = true; - } else if (options.onlyFiles === false) fdirOptions.includeDirs = true; - props.root = props.root.replace(BACKSLASHES, ""); - const root = props.root; - if (options.debug) log("internal properties:", props); - const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root); - return [new fdir.fdir(fdirOptions).crawl(root), relative]; -} -async function glob(patternsOrOptions, options) { - if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option"); - const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string"; - const opts = isModern ? options : patternsOrOptions; - const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns; - const [crawler, relative] = getCrawler(patterns, opts); - if (!relative) return crawler.withPromise(); - return formatPaths(await crawler.withPromise(), relative); -} -function globSync(patternsOrOptions, options) { - if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option"); - const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string"; - const opts = isModern ? options : patternsOrOptions; - const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns; - const [crawler, relative] = getCrawler(patterns, opts); - if (!relative) return crawler.sync(); - return formatPaths(crawler.sync(), relative); -} - -//#endregion -exports.convertPathToPattern = convertPathToPattern; -exports.escapePath = escapePath; -exports.glob = glob; -exports.globSync = globSync; -exports.isDynamicPattern = isDynamicPattern; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.d.cts b/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.d.cts deleted file mode 100644 index 9d67dae260a76a6aa817a310390687becbc1eee6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.d.cts +++ /dev/null @@ -1,147 +0,0 @@ -import { FSLike } from "fdir"; - -//#region src/utils.d.ts - -/** -* Converts a path to a pattern depending on the platform. -* Identical to {@link escapePath} on POSIX systems. -* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern} -*/ -declare const convertPathToPattern: (path: string) => string; -/** -* Escapes a path's special characters depending on the platform. -* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath} -*/ -declare const escapePath: (path: string) => string; -/** -* Checks if a pattern has dynamic parts. -* -* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy: -* -* - Doesn't necessarily return `false` on patterns that include `\`. -* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not. -* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`. -* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`. -* -* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern} -*/ -declare function isDynamicPattern(pattern: string, options?: { - caseSensitiveMatch: boolean; -}): boolean; -//#endregion -//#region src/index.d.ts -interface GlobOptions { - /** - * Whether to return absolute paths. Disable to have relative paths. - * @default false - */ - absolute?: boolean; - /** - * Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`. - * @default true - */ - braceExpansion?: boolean; - /** - * Whether to match in case-sensitive mode. - * @default true - */ - caseSensitiveMatch?: boolean; - /** - * The working directory in which to search. Results will be returned relative to this directory, unless - * {@link absolute} is set. - * - * It is important to avoid globbing outside this directory when possible, even with absolute paths enabled, - * as doing so can harm performance due to having to recalculate relative paths. - * @default process.cwd() - */ - cwd?: string | URL; - /** - * Logs useful debug information. Meant for development purposes. Logs can change at any time. - * @default false - */ - debug?: boolean; - /** - * Maximum directory depth to crawl. - * @default Infinity - */ - deep?: number; - /** - * Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`. - * @default false - */ - dot?: boolean; - /** - * Whether to automatically expand directory patterns. - * - * Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob). - * @default true - */ - expandDirectories?: boolean; - /** - * Enables support for extglobs, like `+(pattern)`. - * @default true - */ - extglob?: boolean; - /** - * Whether to traverse and include symbolic links. Can slightly affect performance. - * @default true - */ - followSymbolicLinks?: boolean; - /** - * An object that overrides `node:fs` functions. - * @default import('node:fs') - */ - fs?: FileSystemAdapter; - /** - * Enables support for matching nested directories with globstars (`**`). - * If `false`, `**` behaves exactly like `*`. - * @default true - */ - globstar?: boolean; - /** - * Glob patterns to exclude from the results. - * @default [] - */ - ignore?: string | readonly string[]; - /** - * Enable to only return directories. - * If `true`, disables {@link onlyFiles}. - * @default false - */ - onlyDirectories?: boolean; - /** - * Enable to only return files. - * @default true - */ - onlyFiles?: boolean; - /** - * @deprecated Provide patterns as the first argument instead. - */ - patterns?: string | readonly string[]; - /** - * An `AbortSignal` to abort crawling the file system. - * @default undefined - */ - signal?: AbortSignal; -} -type FileSystemAdapter = Partial; -/** -* Asynchronously match files following a glob pattern. -* @see {@link https://superchupu.dev/tinyglobby/documentation#glob} -*/ -declare function glob(patterns: string | readonly string[], options?: Omit): Promise; -/** -* @deprecated Provide patterns as the first argument instead. -*/ -declare function glob(options: GlobOptions): Promise; -/** -* Synchronously match files following a glob pattern. -* @see {@link https://superchupu.dev/tinyglobby/documentation#globSync} -*/ -declare function globSync(patterns: string | readonly string[], options?: Omit): string[]; -/** -* @deprecated Provide patterns as the first argument instead. -*/ -declare function globSync(options: GlobOptions): string[]; -//#endregion -export { FileSystemAdapter, GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern }; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.d.mts b/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.d.mts deleted file mode 100644 index 9d67dae260a76a6aa817a310390687becbc1eee6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.d.mts +++ /dev/null @@ -1,147 +0,0 @@ -import { FSLike } from "fdir"; - -//#region src/utils.d.ts - -/** -* Converts a path to a pattern depending on the platform. -* Identical to {@link escapePath} on POSIX systems. -* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern} -*/ -declare const convertPathToPattern: (path: string) => string; -/** -* Escapes a path's special characters depending on the platform. -* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath} -*/ -declare const escapePath: (path: string) => string; -/** -* Checks if a pattern has dynamic parts. -* -* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy: -* -* - Doesn't necessarily return `false` on patterns that include `\`. -* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not. -* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`. -* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`. -* -* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern} -*/ -declare function isDynamicPattern(pattern: string, options?: { - caseSensitiveMatch: boolean; -}): boolean; -//#endregion -//#region src/index.d.ts -interface GlobOptions { - /** - * Whether to return absolute paths. Disable to have relative paths. - * @default false - */ - absolute?: boolean; - /** - * Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`. - * @default true - */ - braceExpansion?: boolean; - /** - * Whether to match in case-sensitive mode. - * @default true - */ - caseSensitiveMatch?: boolean; - /** - * The working directory in which to search. Results will be returned relative to this directory, unless - * {@link absolute} is set. - * - * It is important to avoid globbing outside this directory when possible, even with absolute paths enabled, - * as doing so can harm performance due to having to recalculate relative paths. - * @default process.cwd() - */ - cwd?: string | URL; - /** - * Logs useful debug information. Meant for development purposes. Logs can change at any time. - * @default false - */ - debug?: boolean; - /** - * Maximum directory depth to crawl. - * @default Infinity - */ - deep?: number; - /** - * Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`. - * @default false - */ - dot?: boolean; - /** - * Whether to automatically expand directory patterns. - * - * Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob). - * @default true - */ - expandDirectories?: boolean; - /** - * Enables support for extglobs, like `+(pattern)`. - * @default true - */ - extglob?: boolean; - /** - * Whether to traverse and include symbolic links. Can slightly affect performance. - * @default true - */ - followSymbolicLinks?: boolean; - /** - * An object that overrides `node:fs` functions. - * @default import('node:fs') - */ - fs?: FileSystemAdapter; - /** - * Enables support for matching nested directories with globstars (`**`). - * If `false`, `**` behaves exactly like `*`. - * @default true - */ - globstar?: boolean; - /** - * Glob patterns to exclude from the results. - * @default [] - */ - ignore?: string | readonly string[]; - /** - * Enable to only return directories. - * If `true`, disables {@link onlyFiles}. - * @default false - */ - onlyDirectories?: boolean; - /** - * Enable to only return files. - * @default true - */ - onlyFiles?: boolean; - /** - * @deprecated Provide patterns as the first argument instead. - */ - patterns?: string | readonly string[]; - /** - * An `AbortSignal` to abort crawling the file system. - * @default undefined - */ - signal?: AbortSignal; -} -type FileSystemAdapter = Partial; -/** -* Asynchronously match files following a glob pattern. -* @see {@link https://superchupu.dev/tinyglobby/documentation#glob} -*/ -declare function glob(patterns: string | readonly string[], options?: Omit): Promise; -/** -* @deprecated Provide patterns as the first argument instead. -*/ -declare function glob(options: GlobOptions): Promise; -/** -* Synchronously match files following a glob pattern. -* @see {@link https://superchupu.dev/tinyglobby/documentation#globSync} -*/ -declare function globSync(patterns: string | readonly string[], options?: Omit): string[]; -/** -* @deprecated Provide patterns as the first argument instead. -*/ -declare function globSync(options: GlobOptions): string[]; -//#endregion -export { FileSystemAdapter, GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern }; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.mjs b/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.mjs deleted file mode 100644 index 4f41787d8bc4b72d4108dbcf477e9d861dd01cd2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/dist/index.mjs +++ /dev/null @@ -1,318 +0,0 @@ -import nativeFs from "fs"; -import path, { posix } from "path"; -import { fileURLToPath } from "url"; -import { fdir } from "fdir"; -import picomatch from "picomatch"; - -//#region src/utils.ts -const isReadonlyArray = Array.isArray; -const isWin = process.platform === "win32"; -const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/; -function getPartialMatcher(patterns, options = {}) { - const patternsCount = patterns.length; - const patternsParts = Array(patternsCount); - const matchers = Array(patternsCount); - const globstarEnabled = !options.noglobstar; - for (let i = 0; i < patternsCount; i++) { - const parts = splitPattern(patterns[i]); - patternsParts[i] = parts; - const partsCount = parts.length; - const partMatchers = Array(partsCount); - for (let j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options); - matchers[i] = partMatchers; - } - return (input) => { - const inputParts = input.split("/"); - if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true; - for (let i = 0; i < patterns.length; i++) { - const patternParts = patternsParts[i]; - const matcher = matchers[i]; - const inputPatternCount = inputParts.length; - const minParts = Math.min(inputPatternCount, patternParts.length); - let j = 0; - while (j < minParts) { - const part = patternParts[j]; - if (part.includes("/")) return true; - const match = matcher[j](inputParts[j]); - if (!match) break; - if (globstarEnabled && part === "**") return true; - j++; - } - if (j === inputPatternCount) return true; - } - return false; - }; -} -/* node:coverage ignore next 2 */ -const WIN32_ROOT_DIR = /^[A-Z]:\/$/i; -const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/"; -function buildFormat(cwd, root, absolute) { - if (cwd === root || root.startsWith(`${cwd}/`)) { - if (absolute) { - const start = isRoot(cwd) ? cwd.length : cwd.length + 1; - return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || "."; - } - const prefix = root.slice(cwd.length + 1); - if (prefix) return (p, isDir) => { - if (p === ".") return prefix; - const result = `${prefix}/${p}`; - return isDir ? result.slice(0, -1) : result; - }; - return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p; - } - if (absolute) return (p) => posix.relative(cwd, p) || "."; - return (p) => posix.relative(cwd, `${root}/${p}`) || "."; -} -function buildRelative(cwd, root) { - if (root.startsWith(`${cwd}/`)) { - const prefix = root.slice(cwd.length + 1); - return (p) => `${prefix}/${p}`; - } - return (p) => { - const result = posix.relative(cwd, `${root}/${p}`); - if (p.endsWith("/") && result !== "") return `${result}/`; - return result || "."; - }; -} -const splitPatternOptions = { parts: true }; -function splitPattern(path$1) { - var _result$parts; - const result = picomatch.scan(path$1, splitPatternOptions); - return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1]; -} -const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g; -function convertPosixPathToPattern(path$1) { - return escapePosixPath(path$1); -} -function convertWin32PathToPattern(path$1) { - return escapeWin32Path(path$1).replace(ESCAPED_WIN32_BACKSLASHES, "/"); -} -/** -* Converts a path to a pattern depending on the platform. -* Identical to {@link escapePath} on POSIX systems. -* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern} -*/ -/* node:coverage ignore next 3 */ -const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern; -const POSIX_UNESCAPED_GLOB_SYMBOLS = /(? path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&"); -const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&"); -/** -* Escapes a path's special characters depending on the platform. -* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath} -*/ -/* node:coverage ignore next */ -const escapePath = isWin ? escapeWin32Path : escapePosixPath; -/** -* Checks if a pattern has dynamic parts. -* -* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy: -* -* - Doesn't necessarily return `false` on patterns that include `\`. -* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not. -* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`. -* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`. -* -* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern} -*/ -function isDynamicPattern(pattern, options) { - if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true; - const scan = picomatch.scan(pattern); - return scan.isGlob || scan.negated; -} -function log(...tasks) { - console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks); -} - -//#endregion -//#region src/index.ts -const PARENT_DIRECTORY = /^(\/?\.\.)+/; -const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g; -const BACKSLASHES = /\\/g; -function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) { - let result = pattern; - if (pattern.endsWith("/")) result = pattern.slice(0, -1); - if (!result.endsWith("*") && expandDirectories) result += "/**"; - const escapedCwd = escapePath(cwd); - if (path.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result); - else result = posix.normalize(result); - const parentDirectoryMatch = PARENT_DIRECTORY.exec(result); - const parts = splitPattern(result); - if (parentDirectoryMatch === null || parentDirectoryMatch === void 0 ? void 0 : parentDirectoryMatch[0]) { - const n = (parentDirectoryMatch[0].length + 1) / 3; - let i = 0; - const cwdParts = escapedCwd.split("/"); - while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) { - result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || "."; - i++; - } - const potentialRoot = posix.join(cwd, parentDirectoryMatch[0].slice(i * 3)); - if (!potentialRoot.startsWith(".") && props.root.length > potentialRoot.length) { - props.root = potentialRoot; - props.depthOffset = -n + i; - } - } - if (!isIgnore && props.depthOffset >= 0) { - var _props$commonPath; - (_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts); - const newCommonPath = []; - const length = Math.min(props.commonPath.length, parts.length); - for (let i = 0; i < length; i++) { - const part = parts[i]; - if (part === "**" && !parts[i + 1]) { - newCommonPath.pop(); - break; - } - if (part !== props.commonPath[i] || isDynamicPattern(part) || i === parts.length - 1) break; - newCommonPath.push(part); - } - props.depthOffset = newCommonPath.length; - props.commonPath = newCommonPath; - props.root = newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd; - } - return result; -} -function processPatterns({ patterns = ["**/*"], ignore = [], expandDirectories = true }, cwd, props) { - if (typeof patterns === "string") patterns = [patterns]; - if (typeof ignore === "string") ignore = [ignore]; - const matchPatterns = []; - const ignorePatterns = []; - for (const pattern of ignore) { - if (!pattern) continue; - if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, true)); - } - for (const pattern of patterns) { - if (!pattern) continue; - if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, expandDirectories, cwd, props, false)); - else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), expandDirectories, cwd, props, true)); - } - return { - match: matchPatterns, - ignore: ignorePatterns - }; -} -function formatPaths(paths, relative) { - for (let i = paths.length - 1; i >= 0; i--) { - const path$1 = paths[i]; - paths[i] = relative(path$1); - } - return paths; -} -function normalizeCwd(cwd) { - if (!cwd) return process.cwd().replace(BACKSLASHES, "/"); - if (cwd instanceof URL) return fileURLToPath(cwd).replace(BACKSLASHES, "/"); - return path.resolve(cwd).replace(BACKSLASHES, "/"); -} -function getCrawler(patterns, inputOptions = {}) { - const options = process.env.TINYGLOBBY_DEBUG ? { - ...inputOptions, - debug: true - } : inputOptions; - const cwd = normalizeCwd(options.cwd); - if (options.debug) log("globbing with:", { - patterns, - options, - cwd - }); - if (Array.isArray(patterns) && patterns.length === 0) return [{ - sync: () => [], - withPromise: async () => [] - }, false]; - const props = { - root: cwd, - commonPath: null, - depthOffset: 0 - }; - const processed = processPatterns({ - ...options, - patterns - }, cwd, props); - if (options.debug) log("internal processing patterns:", processed); - const matchOptions = { - dot: options.dot, - nobrace: options.braceExpansion === false, - nocase: options.caseSensitiveMatch === false, - noextglob: options.extglob === false, - noglobstar: options.globstar === false, - posix: true - }; - const matcher = picomatch(processed.match, { - ...matchOptions, - ignore: processed.ignore - }); - const ignore = picomatch(processed.ignore, matchOptions); - const partialMatcher = getPartialMatcher(processed.match, matchOptions); - const format = buildFormat(cwd, props.root, options.absolute); - const formatExclude = options.absolute ? format : buildFormat(cwd, props.root, true); - const fdirOptions = { - filters: [options.debug ? (p, isDirectory) => { - const path$1 = format(p, isDirectory); - const matches = matcher(path$1); - if (matches) log(`matched ${path$1}`); - return matches; - } : (p, isDirectory) => matcher(format(p, isDirectory))], - exclude: options.debug ? (_, p) => { - const relativePath = formatExclude(p, true); - const skipped = relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); - if (skipped) log(`skipped ${p}`); - else log(`crawling ${p}`); - return skipped; - } : (_, p) => { - const relativePath = formatExclude(p, true); - return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath); - }, - fs: options.fs ? { - readdir: options.fs.readdir || nativeFs.readdir, - readdirSync: options.fs.readdirSync || nativeFs.readdirSync, - realpath: options.fs.realpath || nativeFs.realpath, - realpathSync: options.fs.realpathSync || nativeFs.realpathSync, - stat: options.fs.stat || nativeFs.stat, - statSync: options.fs.statSync || nativeFs.statSync - } : void 0, - pathSeparator: "/", - relativePaths: true, - resolveSymlinks: true, - signal: options.signal - }; - if (options.deep !== void 0) fdirOptions.maxDepth = Math.round(options.deep - props.depthOffset); - if (options.absolute) { - fdirOptions.relativePaths = false; - fdirOptions.resolvePaths = true; - fdirOptions.includeBasePath = true; - } - if (options.followSymbolicLinks === false) { - fdirOptions.resolveSymlinks = false; - fdirOptions.excludeSymlinks = true; - } - if (options.onlyDirectories) { - fdirOptions.excludeFiles = true; - fdirOptions.includeDirs = true; - } else if (options.onlyFiles === false) fdirOptions.includeDirs = true; - props.root = props.root.replace(BACKSLASHES, ""); - const root = props.root; - if (options.debug) log("internal properties:", props); - const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root); - return [new fdir(fdirOptions).crawl(root), relative]; -} -async function glob(patternsOrOptions, options) { - if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option"); - const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string"; - const opts = isModern ? options : patternsOrOptions; - const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns; - const [crawler, relative] = getCrawler(patterns, opts); - if (!relative) return crawler.withPromise(); - return formatPaths(await crawler.withPromise(), relative); -} -function globSync(patternsOrOptions, options) { - if (patternsOrOptions && (options === null || options === void 0 ? void 0 : options.patterns)) throw new Error("Cannot pass patterns as both an argument and an option"); - const isModern = isReadonlyArray(patternsOrOptions) || typeof patternsOrOptions === "string"; - const opts = isModern ? options : patternsOrOptions; - const patterns = isModern ? patternsOrOptions : patternsOrOptions.patterns; - const [crawler, relative] = getCrawler(patterns, opts); - if (!relative) return crawler.sync(); - return formatPaths(crawler.sync(), relative); -} - -//#endregion -export { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern }; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/package.json b/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/package.json deleted file mode 100644 index d0247c25ae3a1edddcd9ae2eba9888aca5a604f0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyglobby/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "tinyglobby", - "version": "0.2.15", - "description": "A fast and minimal alternative to globby and fast-glob", - "type": "module", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.cts", - "exports": { - ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.cjs" - }, - "./package.json": "./package.json" - }, - "sideEffects": false, - "files": [ - "dist" - ], - "author": "Superchupu", - "license": "MIT", - "keywords": [ - "glob", - "patterns", - "fast", - "implementation" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/SuperchupuDev/tinyglobby.git" - }, - "bugs": { - "url": "https://github.com/SuperchupuDev/tinyglobby/issues" - }, - "homepage": "https://superchupu.dev/tinyglobby", - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - }, - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "devDependencies": { - "@biomejs/biome": "^2.2.3", - "@types/node": "^24.3.1", - "@types/picomatch": "^4.0.2", - "fast-glob": "^3.3.3", - "fs-fixture": "^2.8.1", - "glob": "^11.0.3", - "tinybench": "^5.0.1", - "tsdown": "^0.14.2", - "typescript": "^5.9.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "publishConfig": { - "provenance": true - }, - "scripts": { - "bench": "node benchmark/bench.ts", - "bench:setup": "node benchmark/setup.ts", - "build": "tsdown", - "check": "biome check", - "check:fix": "biome check --write --unsafe", - "format": "biome format --write", - "lint": "biome lint", - "test": "node --test \"test/**/*.ts\"", - "test:coverage": "node --test --experimental-test-coverage \"test/**/*.ts\"", - "test:only": "node --test --test-only \"test/**/*.ts\"", - "typecheck": "tsc --noEmit" - } -} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/LICENSE deleted file mode 100644 index 2b7cd9d34ce49efe275c407edad891f7db085052..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2017, Vladimir Agafonkin - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/README.md b/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/README.md deleted file mode 100644 index 32843f59c1d254fcafa129738d39048a1dfb1a94..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/README.md +++ /dev/null @@ -1,59 +0,0 @@ -## tinyqueue - -The smallest and simplest binary heap priority queue in JavaScript. - -```js -// create an empty priority queue -var queue = new TinyQueue(); - -// add some items -queue.push(7); -queue.push(5); -queue.push(10); - -// remove the top item -var top = queue.pop(); // returns 5 - -// return the top item (without removal) -top = queue.peek(); // returns 7 - -// get queue length -queue.length; // returns 2 - -// create a priority queue from an existing array (modifies the array) -queue = new TinyQueue([7, 5, 10]); - -// pass a custom item comparator as a second argument -queue = new TinyQueue([{value: 5}, {value: 7}], function (a, b) { - return a.value - b.value; -}); - -// turn a queue into a sorted array -var array = []; -while (queue.length) array.push(queue.pop()); -``` - -For a faster number-based queue, see [flatqueue](https://github.com/mourner/flatqueue). - -### Install - -Install using NPM (`npm install tinyqueue`) or Yarn (`yarn add tinyqueue`), then: - -```js -// import as an ES module -import TinyQueue from 'tinyqueue'; - -// or require in Node / Browserify -const TinyQueue = require('tinyqueue'); -``` - -Or use a browser build directly: - -```html - -``` - -### Thanks - -Inspired by [js-priority-queue](https://github.com/adamhooper/js-priority-queue) -by [Adam Hooper](https://github.com/adamhooper). diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/index.d.ts b/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/index.d.ts deleted file mode 100644 index 89b562abca3b6272b5a7ca7568a93ef912db3f11..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export declare type Item = any; -export declare type Comparator = (a: Item, b: Item) => number; - -export default class TinyQueue { - public data : Item[]; - public length : number; - constructor (items? : Item[], compare? : Comparator); - peek () : Item | undefined; - pop () : Item | undefined; - push (item: Item) : void; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/index.js b/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/index.js deleted file mode 100644 index d1a4ae7e4ea47f17673853bd09bd27cb0c6cb499..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/index.js +++ /dev/null @@ -1,79 +0,0 @@ - -export default class TinyQueue { - constructor(data = [], compare = defaultCompare) { - this.data = data; - this.length = this.data.length; - this.compare = compare; - - if (this.length > 0) { - for (let i = (this.length >> 1) - 1; i >= 0; i--) this._down(i); - } - } - - push(item) { - this.data.push(item); - this.length++; - this._up(this.length - 1); - } - - pop() { - if (this.length === 0) return undefined; - - const top = this.data[0]; - const bottom = this.data.pop(); - this.length--; - - if (this.length > 0) { - this.data[0] = bottom; - this._down(0); - } - - return top; - } - - peek() { - return this.data[0]; - } - - _up(pos) { - const {data, compare} = this; - const item = data[pos]; - - while (pos > 0) { - const parent = (pos - 1) >> 1; - const current = data[parent]; - if (compare(item, current) >= 0) break; - data[pos] = current; - pos = parent; - } - - data[pos] = item; - } - - _down(pos) { - const {data, compare} = this; - const halfLength = this.length >> 1; - const item = data[pos]; - - while (pos < halfLength) { - let left = (pos << 1) + 1; - let best = data[left]; - const right = left + 1; - - if (right < this.length && compare(data[right], best) < 0) { - left = right; - best = data[right]; - } - if (compare(best, item) >= 0) break; - - data[pos] = best; - pos = left; - } - - data[pos] = item; - } -} - -function defaultCompare(a, b) { - return a < b ? -1 : a > b ? 1 : 0; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/package.json b/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/package.json deleted file mode 100644 index d731affd6bfb76fb7312b861315b36bcb01b62a9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "tinyqueue", - "version": "2.0.3", - "description": "The smallest and simplest JavaScript priority queue", - "main": "tinyqueue.js", - "module": "index.js", - "jsdelivr": "tinyqueue.min.js", - "unpkg": "tinyqueue.min.js", - "types": "index.d.ts", - "scripts": { - "lint": "eslint index.js test.js bench.js rollup.config.js", - "pretest": "npm run lint", - "test": "tape -r esm test.js", - "bench": "node -r esm bench.js", - "build": "rollup -c", - "watch": "rollup -cw", - "prepublishOnly": "npm test" - }, - "files": [ - "index.js", - "tinyqueue.js", - "tinyqueue.min.js", - "index.d.ts" - ], - "repository": { - "type": "git", - "url": "https://github.com/mourner/tinyqueue.git" - }, - "keywords": [ - "queue", - "priority", - "binary heap", - "data structures" - ], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/mourner/tinyqueue/issues" - }, - "homepage": "https://github.com/mourner/tinyqueue", - "devDependencies": { - "eslint": "^5.16.0", - "eslint-config-mourner": "^3.0.0", - "esm": "^3.2.25", - "rollup": "^1.15.4", - "rollup-plugin-buble": "^0.19.6", - "rollup-plugin-terser": "^5.0.0", - "tape": "^4.10.2" - }, - "eslintConfig": { - "extends": "mourner" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/tinyqueue.js b/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/tinyqueue.js deleted file mode 100644 index 0d4171643ae99fa072b5d892ab67620369a7f5ad..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/tinyqueue.js +++ /dev/null @@ -1,93 +0,0 @@ -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : -typeof define === 'function' && define.amd ? define(factory) : -(global = global || self, global.TinyQueue = factory()); -}(this, function () { 'use strict'; - -var TinyQueue = function TinyQueue(data, compare) { - if ( data === void 0 ) data = []; - if ( compare === void 0 ) compare = defaultCompare; - - this.data = data; - this.length = this.data.length; - this.compare = compare; - - if (this.length > 0) { - for (var i = (this.length >> 1) - 1; i >= 0; i--) { this._down(i); } - } -}; - -TinyQueue.prototype.push = function push (item) { - this.data.push(item); - this.length++; - this._up(this.length - 1); -}; - -TinyQueue.prototype.pop = function pop () { - if (this.length === 0) { return undefined; } - - var top = this.data[0]; - var bottom = this.data.pop(); - this.length--; - - if (this.length > 0) { - this.data[0] = bottom; - this._down(0); - } - - return top; -}; - -TinyQueue.prototype.peek = function peek () { - return this.data[0]; -}; - -TinyQueue.prototype._up = function _up (pos) { - var ref = this; - var data = ref.data; - var compare = ref.compare; - var item = data[pos]; - - while (pos > 0) { - var parent = (pos - 1) >> 1; - var current = data[parent]; - if (compare(item, current) >= 0) { break; } - data[pos] = current; - pos = parent; - } - - data[pos] = item; -}; - -TinyQueue.prototype._down = function _down (pos) { - var ref = this; - var data = ref.data; - var compare = ref.compare; - var halfLength = this.length >> 1; - var item = data[pos]; - - while (pos < halfLength) { - var left = (pos << 1) + 1; - var best = data[left]; - var right = left + 1; - - if (right < this.length && compare(data[right], best) < 0) { - left = right; - best = data[right]; - } - if (compare(best, item) >= 0) { break; } - - data[pos] = best; - pos = left; - } - - data[pos] = item; -}; - -function defaultCompare(a, b) { - return a < b ? -1 : a > b ? 1 : 0; -} - -return TinyQueue; - -})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/tinyqueue.min.js b/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/tinyqueue.min.js deleted file mode 100644 index a15a796c7acb6913285e58e720c462c5194b7ed1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tinyqueue/tinyqueue.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t=t||self).TinyQueue=i()}(this,function(){"use strict";var t=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=i),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function i(t,i){return ti?1:0}return t.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(0!==this.length){var t=this.data[0],i=this.data.pop();return this.length--,this.length>0&&(this.data[0]=i,this._down(0)),t}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(t){for(var i=this.data,e=this.compare,n=i[t];t>0;){var o=t-1>>1,h=i[o];if(e(n,h)>=0)break;i[t]=h,t=o}i[t]=n},t.prototype._down=function(t){for(var i=this.data,e=this.compare,n=this.length>>1,o=i[t];t=0)break;i[t]=s,t=h}i[t]=o},t}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-float32/.eslintrc.json b/ThinFilm_Analyzer/frontend/node_modules/to-float32/.eslintrc.json deleted file mode 100644 index 1e5e08b37332379d194a6a5e8fd259d8de4f7fc9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-float32/.eslintrc.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-magic-numbers": ["warn", { "ignore": [1, 0, -1], "ignoreArrayIndexes": true}], - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-float32/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/to-float32/.travis.yml deleted file mode 100644 index d4619bb9121302d84ab04eb2b68c512c6f5b5718..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-float32/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - '6' - - '5' - - '4' diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-float32/index.js b/ThinFilm_Analyzer/frontend/node_modules/to-float32/index.js deleted file mode 100644 index 5c77ce22dc343b17de84bf038fadf5972f6c4295..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-float32/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/* @module to-float32 */ - -'use strict' - -module.exports = float32 -module.exports.float32 = -module.exports.float = float32 -module.exports.fract32 = -module.exports.fract = fract32 - -var narr = new Float32Array(1) - -// Returns fractional part of float32 array -function fract32 (arr, fract) { - if (arr.length) { - if (arr instanceof Float32Array) return new Float32Array(arr.length); - if (!(fract instanceof Float32Array)) fract = float32(arr) - for (var i = 0, l = fract.length; i < l; i++) { - fract[i] = arr[i] - fract[i] - } - return fract - } - - // number - return float32(arr - float32(arr)) -} - -// Make sure data is float32 array -function float32 (arr) { - if (arr.length) { - if (arr instanceof Float32Array) return arr - return new Float32Array(arr); - } - - // number - narr[0] = arr - return narr[0] -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-float32/license b/ThinFilm_Analyzer/frontend/node_modules/to-float32/license deleted file mode 100644 index a8405c9e2a627a546c471ab404f3810d6e5ec4d4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-float32/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Dmitry Ivanov - -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/ThinFilm_Analyzer/frontend/node_modules/to-float32/package.json b/ThinFilm_Analyzer/frontend/node_modules/to-float32/package.json deleted file mode 100644 index f4223918c13171958c00edce048442c127cd87be..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-float32/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "to-float32", - "version": "1.1.0", - "description": "Convert data to float32 array or get float32 fractions", - "main": "index.js", - "scripts": { - "test": "node test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dy/to-float32.git" - }, - "keywords": [ - "float32", - "fract32", - "webgl" - ], - "author": "Dmitry Yv. ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dy/to-float32/issues" - }, - "homepage": "https://github.com/dy/to-float32#readme", - "dependencies": {} -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-float32/readme.md b/ThinFilm_Analyzer/frontend/node_modules/to-float32/readme.md deleted file mode 100644 index d3aa87d92f41cee56cce220e05321e9c679888d5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-float32/readme.md +++ /dev/null @@ -1,29 +0,0 @@ -# to-float32 [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) [![Build Status](https://travis-ci.org/dy/to-uint8.svg?branch=master)](https://travis-ci.org/dy/to-uint8) - -Dirty little helper to convert array to float32 array or return round remainder of converting to float32. Useful for sending data to webgl buffers. - -[![npm install to-float32](https://nodei.co/npm/to-float32.png?mini=true)](https://npmjs.org/package/to-float32/) - -```js -let {float32, fract32} = require('to-float32') - -let data = Array.from({length: 1024}, Math.random) - -// create float32 data -let buffer = float(data) - -// get float32 remainders -let fractBuffer = fract32(data) - -// convert number to float32 -let f32 = float32(0.1) // 0.10000000149011612 - -// get float32 number remainder -let rem32 = fract32(0.1) // -``` - -Fract data is _Float32Array_ with values calculated as `origValue - float32value` - -## License - -(c) 2017 Dmitry Yv. MIT License diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-float32/test.js b/ThinFilm_Analyzer/frontend/node_modules/to-float32/test.js deleted file mode 100644 index 088482c024cec5a2764e8f107dd4ca7552b7b207..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-float32/test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -let {float32, fract32} = require('./') -let a = require('assert') - -let data = [0, 0.1, 0.2, 0.5, 1, 1.5] - -a.deepEqual(float32(data), new Float32Array(data)) -a.deepEqual(fract32(data), new Float32Array([ 0, -1.4901161415892261e-9, - -2.9802322831784522e-9, 0, 0, 0 ])) -a.deepEqual(float32(.1), 0.10000000149011612); -a.deepEqual(fract32([.1]), new Float32Array([-1.4901161415892261e-9])) - -let data_to_32 = float32(data); -a.deepEqual(fract32(data, data_to_32), new Float32Array([ 0, -1.4901161415892261e-9, - -2.9802322831784522e-9, 0, 0, 0 ])) diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-px/.npmignore b/ThinFilm_Analyzer/frontend/node_modules/to-px/.npmignore deleted file mode 100644 index ddc9ab330c2a9e77591abb3effd1b9ebf278a988..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-px/.npmignore +++ /dev/null @@ -1,16 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log -node_modules/* -*.DS_Store \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-px/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/to-px/LICENSE deleted file mode 100644 index 1815ddd61d61d007ca9c832c7d69ffc8a4f9f86a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-px/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2015 Mikola Lysenko - -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/ThinFilm_Analyzer/frontend/node_modules/to-px/README.md b/ThinFilm_Analyzer/frontend/node_modules/to-px/README.md deleted file mode 100644 index df23fef3c8c34825f6d6a8a6efa347e8a2c8ae90..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-px/README.md +++ /dev/null @@ -1,38 +0,0 @@ -to-px -===== -Get the scale factor to convert any CSS unit to `px` (logical pixel units). - -[![testling badge](https://ci.testling.com/mikolalysenko/to-px.png)](https://ci.testling.com/mikolalysenko/to-px) - -# Example - -```javascript -var toPX = require('to-px') - -console.log(toPX('em')) -console.log(toPX('vh')) -console.log(toPX('in')) -``` - -# Install - -Note that this module only works within the DOM. - -``` -npm i to-px -``` - -# API - -#### `var scaleFactor = require('to-px')(unit[, element])` -Computes the number of pixels in the unit `unit`. - -* `unit` is a CSS unit type -* `element` is an optional element in which the unit is computed (default is `document.body`) - -**Returns** The number of pixels in one `unit` - -**Note** Conversions for `%` are not supported since they are context dependent. - -# License -(c) 2015 Mikola Lysenko. MIT License \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/to-px/package.json b/ThinFilm_Analyzer/frontend/node_modules/to-px/package.json deleted file mode 100644 index 5ae35e73eea5c3b305fab40760227792e4ad7990..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-px/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "to-px", - "version": "1.0.1", - "description": "Convert any CSS unit to logical pixels (\"px\")", - "main": "topx.js", - "directories": { - "test": "test" - }, - "dependencies": { - "parse-unit": "^1.0.1" - }, - "devDependencies": { - "almost-equal": "^0.0.0", - "tape": "^3.5.0" - }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/mikolalysenko/to-px.git" - }, - "keywords": [ - "css", - "px", - "em", - "ex", - "line", - "height", - "ch", - "rem", - "vh", - "vw", - "vmin", - "vmax", - "unit", - "conversion", - "scale", - "factor" - ], - "author": "Mikola Lysenko", - "license": "MIT", - "bugs": { - "url": "https://github.com/mikolalysenko/to-px/issues" - }, - "homepage": "https://github.com/mikolalysenko/to-px", - "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/ThinFilm_Analyzer/frontend/node_modules/to-px/test/test.js b/ThinFilm_Analyzer/frontend/node_modules/to-px/test/test.js deleted file mode 100644 index 15fb802b484c01012bbda4d2c8c86a66abbf0284..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/to-px/test/test.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -var tape = require('tape') -var toPX = require('../topx') -var parseUnit = require('parse-unit') -var almostEqual = require('almost-equal') - -var units = ['em', 'ch', 'ex', 'rem', 'px', 'vw', 'vh', 'vmin', 'vmax', 'in', 'cm', 'mm', 'pt', 'pc'] - -var fontSizes = ['20px', '10px', '1em', '3in'] - -tape('test to-px', function(t) { - - function testUnitsEmpirically(element) { - var testDiv = document.createElement('div') - element.appendChild(testDiv) - for(var i=0; i - - - - -``` - -## Installing - -If you use NPM, `npm install topojson-client`. Otherwise, download the [latest release](https://github.com/topojson/topojson-client/releases/latest). You can also load directly from [UNPKG](https://unpkg.com) as a [standalone library](https://unpkg.com/topojson-client@3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `topojson` global is exported: - -```html - - -``` - -The TopoJSON client API is implemented using ES2015 modules. In compatible environments, you can import the library as a namespace, like so: - -```js -import * as topojson from "topojson-client"; -``` - -[Try topojson-client in your browser.](https://runkit.com/npm/topojson-client) - -# API Reference - -# topojson.feature(topology, object) [<>](https://github.com/topojson/topojson-client/blob/master/src/feature.js "Source") - -Returns the GeoJSON Feature or FeatureCollection for the specified *object* in the given *topology*. If the specified object is a string, it is treated as *topology*.objects[*object*]. Then, if the object is a GeometryCollection, a FeatureCollection is returned, and each geometry in the collection is mapped to a Feature. Otherwise, a Feature is returned. The returned feature is a shallow copy of the source *object*: they may share identifiers, bounding boxes, properties and coordinates. - -Some examples: - -* A point is mapped to a feature with a geometry object of type “Point”. -* Likewise for line strings, polygons, and other simple geometries. -* A null geometry object (of type null in TopoJSON) is mapped to a feature with a null geometry object. -* A geometry collection of points is mapped to a feature collection of features, each with a point geometry. -* A geometry collection of geometry collections is mapped to a feature collection of features, each with a geometry collection. - -See [feature-test.js](https://github.com/topojson/topojson-client/blob/master/test/feature-test.js) for more examples. - -# topojson.merge(topology, objects) [<>](https://github.com/topojson/topojson-client/blob/master/src/merge.js#L5 "Source") - -Returns the GeoJSON MultiPolygon geometry object representing the union for the specified array of Polygon and MultiPolygon *objects* in the given *topology*. Interior borders shared by adjacent polygons are removed. See [Merging States](https://bl.ocks.org/mbostock/5416405) for an example. The returned geometry is a shallow copy of the source *object*: they may share coordinates. - -# topojson.mergeArcs(topology, objects) [<>](https://github.com/topojson/topojson-client/blob/master/src/merge.js#L9 "Source") - -Equivalent to [topojson.merge](#merge), but returns TopoJSON rather than GeoJSON. The returned geometry is a shallow copy of the source *object*: they may share coordinates. - -# topojson.mesh(topology[, object[, filter]]) [<>](https://github.com/topojson/topojson-client/blob/master/src/mesh.js#L4 "Source") - -Returns the GeoJSON MultiLineString geometry object representing the mesh for the specified *object* in the given *topology*. This is useful for rendering strokes in complicated objects efficiently, as edges that are shared by multiple features are only stroked once. If *object* is not specified, a mesh of the entire topology is returned. The returned geometry is a shallow copy of the source *object*: they may share coordinates. - -An optional *filter* function may be specified to prune arcs from the returned mesh using the topology. The filter function is called once for each candidate arc and takes two arguments, *a* and *b*, two geometry objects that share that arc. Each arc is only included in the resulting mesh if the filter function returns true. For typical map topologies the geometries *a* and *b* are adjacent polygons and the candidate arc is their boundary. If an arc is only used by a single geometry then *a* and *b* are identical. This property is useful for separating interior and exterior boundaries; an easy way to produce a mesh of interior boundaries is: - -```js -var interiors = topojson.mesh(topology, object, function(a, b) { return a !== b; }); -``` - -See this [county choropleth](https://bl.ocks.org/mbostock/4060606) for example. Note: the *a* and *b* objects are TopoJSON objects (pulled directly from the topology), and not automatically converted to GeoJSON features as by [topojson.feature](#feature). - -# topojson.meshArcs(topology[, object[, filter]]) [<>](https://github.com/topojson/topojson-client/blob/master/src/mesh.js#L8 "Source") - -Equivalent to [topojson.mesh](#mesh), but returns TopoJSON rather than GeoJSON. The returned geometry is a shallow copy of the source *object*: they may share coordinates. - -# topojson.neighbors(objects) [<>](https://github.com/topojson/topojson-client/blob/master/src/neighbors.js "Source") - -Returns an array representing the set of neighboring objects for each object in the specified *objects* array. The returned array has the same number of elements as the input array; each element *i* in the returned array is the array of indexes for neighbors of object *i* in the input array. For example, if the specified objects array contains the features *foo* and *bar*, and these features are neighbors, the returned array will be \[\[1\], \[0\]\], indicating that *foo* is a neighbor of *bar* and *vice versa*. Each array of neighbor indexes for each object is guaranteed to be sorted in ascending order. - -For a practical example, see the [world map](https://bl.ocks.org/mbostock/4180634) with topological coloring. - -### Transforms - -# topojson.bbox(topology) [<>](https://github.com/topojson/topojson-client/blob/master/src/bbox.js "Source") - -Returns the computed [bounding box](https://github.com/topojson/topojson-specification#3-bounding-boxes) of the specified *topology* [*x*₀, *y*₀, *x*₁, *y*₁] where *x*₀ is the minimum *x*-value, *y*₀ is the minimum *y*-value, *x*₁ is the maximum *x*-value, and *y*₁ is the maximum *y*-value. If the *topology* has no points and no arcs, the returned bounding box is [∞, ∞, -∞, -∞]. (This method ignores the existing *topology*.bbox, if any.) - -# topojson.quantize(topology, transform) [<>](https://github.com/topojson/topojson-client/blob/master/src/quantize.js "Source") - -Returns a shallow copy of the specified *topology* with [quantized and delta-encoded](https://github.com/topojson/topojson-specification#213-arcs) arcs according to the specified [*transform* object](https://github.com/topojson/topojson-specification/blob/master/README.md#212-transforms). If the *topology* is already quantized, an error is thrown. See also [topoquantize](#topoquantize). - -If a quantization number *n* is specified instead of a *transform* object, the corresponding transform object is first computed using the bounding box of the topology. In this case, the quantization number *n* must be a positive integer greater than one which determines the maximum number of expressible values per dimension in the resulting quantized coordinates; typically, a power of ten is chosen such as 1e4, 1e5 or 1e6. If the *topology* does not already have a *topology*.bbox, one is computed using [topojson.bbox](#bbox). - -# topojson.transform(transform) [<>](https://github.com/topojson/topojson-client/blob/master/src/transform.js "Source") - -If the specified [*transform* object](https://github.com/topojson/topojson-specification/blob/master/README.md#212-transforms) is non-null, returns a [point *transform* function](#_transform) to remove delta-encoding and apply the transform. If the *transform* is null, returns the identity function. - -# topojson.untransform(transform) [<>](https://github.com/topojson/topojson-client/blob/master/src/untransform.js "Source") - -If the specified [*transform* object](https://github.com/topojson/topojson-specification/blob/master/README.md#212-transforms) is non-null, returns a [point *transform* function](#_transform) to apply quantized delta-encoding and remove the transform. If the *transform* is null, returns the identity function. See also [topojson.quantize](#quantize). - -# transform(point[, index]) - -Applies this transform function to the specified *point*, returning a new point with the transformed coordinates. If the specified *index* is truthy, the input *point* is treated as relative to the previous point passed to this transform, as is the case with delta-encoded arcs. - -## Command Line Reference - -### topo2geo - -# topo2geo [options…] <name=file>… [<>](https://github.com/topojson/topojson-client/blob/master/bin/topo2geo "Source") - -Converts one or more TopoJSON objects from an input topology to one or more GeoJSON features. For example, to convert the “states” TopoJSON GeometryCollection object in us.json to a GeoJSON feature collection in us-states.json: - -``` -topo2geo states=us-states.json < us.json -``` - -For convenience, you can omit the object name and specify only the file *name*; the object name will be the basename of the file, with the directory and extension removed. For example, to convert the “states” TopoJSON GeometryCollection object in us.json to a GeoJSON feature collection in states.json: - -``` -topo2geo states.json < us.json -``` - -See also [geo2topo](https://github.com/topojson/topojson/blob/master/README.md#geo2topo). - -To list the available object names, use [--list](#topo2geo_list). - -# topo2geo -h -
# topo2geo --help - -Output usage information. - -# topo2geo -V -
# topo2geo --version - -Output the version number. - -# topo2geo -n -
# topo2geo --newline-delimited - -Output [newline-delimited JSON](http://ndjson.org/), with one feature per line. - -# topo2geo -i file -
# topo2geo --in file - -Specify the input TopoJSON file name. Defaults to “-” for stdin. - -# topo2geo -l -
# topo2geo --list - -List the names of the objects in the input topology, and then exit. For example, this: - -``` -topo2geo -l < us.json -``` - -Will output this: - -``` -counties -states -nation -``` - -### topomerge - -# topomerge [options…] <target=source> [file] [<>](https://github.com/topojson/topojson-client/blob/master/bin/topomerge "Source") - -Merges polygons (or meshes lines) from the specified *source* TopoJSON geometry collection object, assigning to the *target* object. - -See also [topojson.mergeArcs](#mergeArcs) and [topojson.meshArcs](#meshArcs). - -# topomerge -h -
# topomerge --help - -Output usage information. - -# topomerge -V -
# topomerge --version - -Output the version number. - -# topomerge -o file -
# topomerge --out file - -Specify the output TopoJSON file name. Defaults to “-” for stdout. - -# topomerge -k expression -
# topomerge --key expression - -Specify a JavaScript *expression*, given a TopoJSON geometry object *d* and its zero-based index *i* in its parent collection, that determines how geometry objects are grouped before merging; each group is merged separately. For example, given a topology of U.S. *counties*, where the *id* of each county is it’s five-digit FIPS code, the county boundaries can be merged into state boundaries by using the first two digits of the county FIPS code, which represents the state FIPS code: - -``` -topomerge states=counties -k 'd.id.slice(0, 2)' < us-counties.json > us-states.json -``` - -If a key is not specified, all input geometry objects will be merged together. For example, this can be used to merge the state boundaries into a single nation boundary: - -``` -topomerge nation=states < us-states.json > us.json -``` - -# topomerge -f expression -
# topomerge --filter expression - -Specify a JavaScript *expression* that filters the input geometries before merging or meshing. In conjunction with [--mesh](#topomerge_mesh), the *expression* is given two TopoJSON geometry objects *a* and *b* that represent the adjacent features for a given arc segment; if the *expression* evaluates truthily, the associated arc segment is retained in mesh. Otherwise, the *expression* is given an input TopoJSON geometry object *d* and its zero-based index *i* in its parent collection; if the *expression* evaluates truthily, the geometry object is retained in the merged polygon. - -# topomerge --mesh - -Use [topojson.meshArcs](#meshArcs) instead of [topojson.mergeArcs](#mergeArcs), generating a geometry collection of lines rather than polygons. - -### topoquantize - -# topoquantize [options…] <n> [file] [<>](https://github.com/topojson/topojson-client/blob/master/bin/topoquantize "Source") - -Quantizes the coordinates of the input TopoJSON topology and [delta-encodes](https://github.com/topojson/topojson-specification#213-arcs) the topology’s arcs. The quantization parameter *n* must be a positive integer greater than one, and determines the maximum expressible number of unique values per dimension in the resulting quantized coordinates; typically, a power of ten is chosen such as 1e4, 1e5 or 1e6. If the *topology* does not already have a [bbox](#bbox), one is computed and assigned. If the *topology* is already quantized, an error is thrown. See also [topojson.quantize](#quantize). - -# topoquantize -h -
# topoquantize --help - -Output usage information. - -# topoquantize -V -
# topoquantize --version - -Output the version number. - -# topoquantize -o file -
# topoquantize --out file - -Specify the output TopoJSON file name. Defaults to “-” for stdout. diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topo2geo b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topo2geo deleted file mode 100644 index 4406905f836719f89fef89188999deb3b7c879db..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topo2geo +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs"), - path = require("path"), - commander = require("commander"), - topojson = require("../"); - -commander - .version(require("../package.json").version) - .usage("[options] …") - .description("Converts TopoJSON objects to GeoJSON features.") - .option("-i, --in ", "input topology file name; defaults to “-” for stdin", "-") - .option("-l, --list", "list the object names on the input topology") - .option("-n, --newline-delimited", "output newline-delimited JSON") - .parse(process.argv); - -if (!commander.list === commander.args.length < 1) { - console.error(); - console.error(" error: " + (commander.list ? "--list does not take arguments" : "no arguments specified")); - console.error(); - process.exit(1); -} - -read(commander.in).then(write).catch(abort); - -function read(file) { - return new Promise(function(resolve, reject) { - var data = []; - readStream(file) - .on("data", function(d) { data.push(d); }) - .on("end", function() { resolve(JSON.parse(Buffer.concat(data))); }) - .on("error", reject); - }); -} - -function readStream(file) { - return file === "-" ? process.stdin : fs.createReadStream(file); -} - -function write(topology) { - var write, writer = commander.newlineDelimited ? writeNewlineDelimitedFeature : writeFeature, name; - if (commander.list) { - for (name in topology.objects) { - console.log(name); - } - return; - } - write = Promise.resolve(); - commander.args.forEach(function(specifier) { - var i = specifier.indexOf("="), - file = i >= 0 ? specifier.slice(i + 1) : specifier, - name = i >= 0 ? specifier.slice(0, i) : path.basename(specifier, path.extname(specifier)); - if (!(name in topology.objects)) { - console.error(); - console.error(" error: object “" + name + "” not found"); - console.error(); - process.exit(1); - } - write = write.then(writer(file, topojson.feature(topology, topology.objects[name]))); - }); - return write; -} - -function writeStream(file) { - return (file === "-" ? process.stdout : fs.createWriteStream(file)).on("error", handleEpipe); -} - -function writeFeature(file, feature) { - return new Promise(function(resolve, reject) { - writeStream(file).on("error", reject)[file === "-" ? "write" : "end"](JSON.stringify(feature) + "\n", function(error) { - if (error) reject(error); - else resolve(); - }); - }); -} - -function writeNewlineDelimitedFeature(file, feature) { - return feature == null || feature.type != "FeatureCollection" ? writeFeature(file, feature) : new Promise(function(resolve, reject) { - var stream = writeStream(file).on("error", reject), i = -1, n = feature.features.length; - - (function writeNext(error) { - if (error) return void reject(error); - if (++i >= n) { - if (file !== "-") stream.end(writeEnd); - else writeEnd(); - } else { - stream.write(JSON.stringify(feature.features[i]) + "\n", writeNext); - } - })(null); - - function writeEnd(error) { - if (error) return void reject(error); - resolve(); - } - }); -} - -function handleEpipe(error) { - if (error.code === "EPIPE" || error.errno === "EPIPE") { - process.exit(0); - } -} - -function abort(error) { - console.error(error.stack); -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topomerge b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topomerge deleted file mode 100644 index be790ed46652ffb2b746b9863483d35f3168e813..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topomerge +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs"), - vm = require("vm"), - commander = require("commander"), - topojson = require("../"); - -commander - .version(require("../package.json").version) - .usage("[options] [file]") - .description("Merges the source TopoJSON geometry collection, assigning to the target.") - .option("-o, --out ", "output topology file name; defaults to “-” for stdout", "-") - .option("-k, --key ", "group geometries by key") - .option("-f, --filter ", "filter merged geometries or meshed lines") - .option("--mesh", "mesh lines instead of merging polygons") - .parse(process.argv); - -if (commander.args.length < 1) { - console.error(); - console.error(" error: missing source and target names"); - console.error(); - process.exit(1); -} else if (commander.args.length > 2) { - console.error(); - console.error(" error: multiple input files"); - console.error(); - process.exit(1); -} else if (commander.args.length === 1) { - commander.args.push("-"); -} - -var keyFunction = function() {}, - postfilterFunction = function() { return true; }, - prefilterFunction = function() { return true; }; - -if (commander.key != null) { - var keySandbox = {d: undefined, i: -1}, - keyContext = new vm.createContext(keySandbox), - keyScript = new vm.Script("(" + commander.key + ")"); - keyFunction = function(d, i) { - keySandbox.d = d; - keySandbox.i = i; - return keyScript.runInContext(keyContext); - }; -} - -if (commander.filter != null) { - if (commander.mesh) { - var filterSandbox = {a: undefined, b: undefined}, - filterContext = new vm.createContext(filterSandbox), - filterScript = new vm.Script("(" + commander.filter + ")"); - postfilterFunction = function(a, b) { - filterSandbox.a = a; - filterSandbox.b = b; - return filterScript.runInContext(filterContext); - }; - } else { - var filterSandbox = {d: undefined, i: -1}, - filterContext = new vm.createContext(filterSandbox), - filterScript = new vm.Script("(" + commander.filter + ")"); - prefilterFunction = function(d, i) { - filterSandbox.d = d; - filterSandbox.i = i; - return filterScript.runInContext(filterContext); - }; - } -} - -read(commander.args[1]).then(merge).then(write(commander.out)).catch(abort); - -function read(file) { - return new Promise(function(resolve, reject) { - var data = [], stream = file === "-" ? process.stdin : fs.createReadStream(file); - stream - .on("data", function(d) { data.push(d); }) - .on("end", function() { resolve(JSON.parse(Buffer.concat(data))); }) - .on("error", reject); - }); -} - -function merge(topology) { - var name = commander.args[0], i = name.indexOf("="), - sourceName = i >= 0 ? name.slice(i + 1) : name, - targetName = i >= 0 ? name.slice(0, i) : name, - source = topology.objects[sourceName], - target = topology.objects[targetName] = {type: "GeometryCollection", geometries: []}, - geometries = target.geometries, - geometriesByKey = {}, - k; - - if (!source) { - console.error(); - console.error(" error: source object “" + name + "” not found"); - console.error(); - process.exit(1); - } - - if (source.type !== "GeometryCollection") { - console.error(); - console.error(" error: expected GeometryCollection, not " + source.type); - console.error(); - process.exit(1); - } - - source.geometries.forEach(function(geometry, i) { - if (!prefilterFunction(geometry, i)) return; - var k = stringify(keyFunction(geometry, i)), v; - if (v = geometriesByKey[k]) v.push(geometry); - else geometriesByKey[k] = v = [geometry]; - }); - - if (commander.mesh) { - for (k in geometriesByKey) { - var v = geometriesByKey[k], - o = topojson.meshArcs(topology, {type: "GeometryCollection", geometries: v}, postfilterFunction); - o.id = k.length > 1 ? k.slice(1) : undefined; - o.properties = properties(v); - geometries.push(o); - } - } else { - for (k in geometriesByKey) { - var v = geometriesByKey[k], - o = topojson.mergeArcs(topology, v); - o.id = k.length > 1 ? k.slice(1) : undefined; - o.properties = properties(v); - geometries.push(o); - } - } - - return topology; -} - -function stringify(key) { - return key == null ? "$" : "$" + key; -} - -function properties(objects) { - var properties = undefined, hasProperties; - - objects.forEach(function(object) { - var newProperties = object.properties, key; - - // If no properties have yet been merged, - // then we need to initialize the merged properties object. - if (properties === undefined) { - - // If the first set of properties is null, undefined or empty, - // then the result of the merge will be the empty set. - // Otherwise, the new properties can copied into the merged object. - if (newProperties != null) for (key in newProperties) { - properties = {}; - for (key in newProperties) properties[key] = newProperties[key]; - return; - } - - properties = null; - return; - } - - // If any of the new properties are null or undefined, - // then the result of the merge will be the empty set. - if (newProperties == null) properties = null; - if (properties === null) return; - - // Now mark as inconsistent any of the properties - // that differ from previously-merged values. - for (key in newProperties) { - if ((key in properties) && !is(properties[key], newProperties[key])) { - properties[key] = undefined; - } - } - - // And mark as inconsistent any of the properties - // that are missing from this new set of merged values. - for (key in properties) { - if (!(key in newProperties)) { - properties[key] = undefined; - } - } - - return object; - }); - - // Return undefined if there are no properties. - for (var key in properties) { - if (properties[key] !== undefined) { - return properties; - } - } -}; - -function write(file) { - var stream = (file === "-" ? process.stdout : fs.createWriteStream(file)).on("error", handleEpipe); - return function(topology) { - return new Promise(function(resolve, reject) { - stream.on("error", reject)[stream === process.stdout ? "write" : "end"](JSON.stringify(topology) + "\n", function(error) { - if (error) reject(error); - else resolve(); - }); - }); - }; -} - -function handleEpipe(error) { - if (error.code === "EPIPE" || error.errno === "EPIPE") { - process.exit(0); - } -} - -function abort(error) { - console.error(error.stack); -} - -function is(x, y) { - return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topoquantize b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topoquantize deleted file mode 100644 index aac6b79017055a829f2f6fad5ae1004eee2986d5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/bin/topoquantize +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs"), - commander = require("commander"), - topojson = require("../"); - -commander - .version(require("../package.json").version) - .usage("[options] [file]") - .description("Quantizes TopoJSON.") - .option("-o, --out ", "output topology file name; defaults to “-” for stdout", "-") - .parse(process.argv); - -if (commander.args.length < 1) { - console.error(); - console.error(" error: missing quantization parameter n"); - console.error(); - process.exit(1); -} else if (commander.args.length > 2) { - console.error(); - console.error(" error: multiple input files"); - console.error(); - process.exit(1); -} else if (commander.args.length === 1) { - commander.args.push("-"); -} - -if (!(Math.floor(commander.args[0]) >= 2)) { - console.error(); - console.error(" error: invalid quantization parameter " + commander.args[0]); - console.error(); - process.exit(1); -} - -read(commander.args[1]).then(quantize).then(write(commander.out)).catch(abort); - -function read(file) { - return new Promise(function(resolve, reject) { - var data = [], stream = file === "-" ? process.stdin : fs.createReadStream(file); - stream - .on("data", function(d) { data.push(d); }) - .on("end", function() { resolve(JSON.parse(Buffer.concat(data))); }) - .on("error", reject); - }); -} - -function quantize(topology) { - return topojson.quantize(topology, +commander.args[0]); -} - -function write(file) { - var stream = (file === "-" ? process.stdout : fs.createWriteStream(file)).on("error", handleEpipe); - return function(topology) { - return new Promise(function(resolve, reject) { - stream.on("error", reject)[stream === process.stdout ? "write" : "end"](JSON.stringify(topology) + "\n", function(error) { - if (error) reject(error); - else resolve(); - }); - }); - }; -} - -function handleEpipe(error) { - if (error.code === "EPIPE" || error.errno === "EPIPE") { - process.exit(0); - } -} - -function abort(error) { - console.error(); - console.error(" error: " + error.message); - console.error(); - process.exit(1); -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/dist/topojson-client.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/dist/topojson-client.js deleted file mode 100644 index 79214003d313c29a36cd1a2f71ada391669295fa..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/dist/topojson-client.js +++ /dev/null @@ -1,508 +0,0 @@ -// https://github.com/topojson/topojson-client v3.1.0 Copyright 2019 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.topojson = global.topojson || {})); -}(this, function (exports) { 'use strict'; - -function identity(x) { - return x; -} - -function transform(transform) { - if (transform == null) return identity; - var x0, - y0, - kx = transform.scale[0], - ky = transform.scale[1], - dx = transform.translate[0], - dy = transform.translate[1]; - return function(input, i) { - if (!i) x0 = y0 = 0; - var j = 2, n = input.length, output = new Array(n); - output[0] = (x0 += input[0]) * kx + dx; - output[1] = (y0 += input[1]) * ky + dy; - while (j < n) output[j] = input[j], ++j; - return output; - }; -} - -function bbox(topology) { - var t = transform(topology.transform), key, - x0 = Infinity, y0 = x0, x1 = -x0, y1 = -x0; - - function bboxPoint(p) { - p = t(p); - if (p[0] < x0) x0 = p[0]; - if (p[0] > x1) x1 = p[0]; - if (p[1] < y0) y0 = p[1]; - if (p[1] > y1) y1 = p[1]; - } - - function bboxGeometry(o) { - switch (o.type) { - case "GeometryCollection": o.geometries.forEach(bboxGeometry); break; - case "Point": bboxPoint(o.coordinates); break; - case "MultiPoint": o.coordinates.forEach(bboxPoint); break; - } - } - - topology.arcs.forEach(function(arc) { - var i = -1, n = arc.length, p; - while (++i < n) { - p = t(arc[i], i); - if (p[0] < x0) x0 = p[0]; - if (p[0] > x1) x1 = p[0]; - if (p[1] < y0) y0 = p[1]; - if (p[1] > y1) y1 = p[1]; - } - }); - - for (key in topology.objects) { - bboxGeometry(topology.objects[key]); - } - - return [x0, y0, x1, y1]; -} - -function reverse(array, n) { - var t, j = array.length, i = j - n; - while (i < --j) t = array[i], array[i++] = array[j], array[j] = t; -} - -function feature(topology, o) { - if (typeof o === "string") o = topology.objects[o]; - return o.type === "GeometryCollection" - ? {type: "FeatureCollection", features: o.geometries.map(function(o) { return feature$1(topology, o); })} - : feature$1(topology, o); -} - -function feature$1(topology, o) { - var id = o.id, - bbox = o.bbox, - properties = o.properties == null ? {} : o.properties, - geometry = object(topology, o); - return id == null && bbox == null ? {type: "Feature", properties: properties, geometry: geometry} - : bbox == null ? {type: "Feature", id: id, properties: properties, geometry: geometry} - : {type: "Feature", id: id, bbox: bbox, properties: properties, geometry: geometry}; -} - -function object(topology, o) { - var transformPoint = transform(topology.transform), - arcs = topology.arcs; - - function arc(i, points) { - if (points.length) points.pop(); - for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) { - points.push(transformPoint(a[k], k)); - } - if (i < 0) reverse(points, n); - } - - function point(p) { - return transformPoint(p); - } - - function line(arcs) { - var points = []; - for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points); - if (points.length < 2) points.push(points[0]); // This should never happen per the specification. - return points; - } - - function ring(arcs) { - var points = line(arcs); - while (points.length < 4) points.push(points[0]); // This may happen if an arc has only two points. - return points; - } - - function polygon(arcs) { - return arcs.map(ring); - } - - function geometry(o) { - var type = o.type, coordinates; - switch (type) { - case "GeometryCollection": return {type: type, geometries: o.geometries.map(geometry)}; - case "Point": coordinates = point(o.coordinates); break; - case "MultiPoint": coordinates = o.coordinates.map(point); break; - case "LineString": coordinates = line(o.arcs); break; - case "MultiLineString": coordinates = o.arcs.map(line); break; - case "Polygon": coordinates = polygon(o.arcs); break; - case "MultiPolygon": coordinates = o.arcs.map(polygon); break; - default: return null; - } - return {type: type, coordinates: coordinates}; - } - - return geometry(o); -} - -function stitch(topology, arcs) { - var stitchedArcs = {}, - fragmentByStart = {}, - fragmentByEnd = {}, - fragments = [], - emptyIndex = -1; - - // Stitch empty arcs first, since they may be subsumed by other arcs. - arcs.forEach(function(i, j) { - var arc = topology.arcs[i < 0 ? ~i : i], t; - if (arc.length < 3 && !arc[1][0] && !arc[1][1]) { - t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t; - } - }); - - arcs.forEach(function(i) { - var e = ends(i), - start = e[0], - end = e[1], - f, g; - - if (f = fragmentByEnd[start]) { - delete fragmentByEnd[f.end]; - f.push(i); - f.end = end; - if (g = fragmentByStart[end]) { - delete fragmentByStart[g.start]; - var fg = g === f ? f : f.concat(g); - fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg; - } else { - fragmentByStart[f.start] = fragmentByEnd[f.end] = f; - } - } else if (f = fragmentByStart[end]) { - delete fragmentByStart[f.start]; - f.unshift(i); - f.start = start; - if (g = fragmentByEnd[start]) { - delete fragmentByEnd[g.end]; - var gf = g === f ? f : g.concat(f); - fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf; - } else { - fragmentByStart[f.start] = fragmentByEnd[f.end] = f; - } - } else { - f = [i]; - fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f; - } - }); - - function ends(i) { - var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1; - if (topology.transform) p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; }); - else p1 = arc[arc.length - 1]; - return i < 0 ? [p1, p0] : [p0, p1]; - } - - function flush(fragmentByEnd, fragmentByStart) { - for (var k in fragmentByEnd) { - var f = fragmentByEnd[k]; - delete fragmentByStart[f.start]; - delete f.start; - delete f.end; - f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; }); - fragments.push(f); - } - } - - flush(fragmentByEnd, fragmentByStart); - flush(fragmentByStart, fragmentByEnd); - arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) fragments.push([i]); }); - - return fragments; -} - -function mesh(topology) { - return object(topology, meshArcs.apply(this, arguments)); -} - -function meshArcs(topology, object, filter) { - var arcs, i, n; - if (arguments.length > 1) arcs = extractArcs(topology, object, filter); - else for (i = 0, arcs = new Array(n = topology.arcs.length); i < n; ++i) arcs[i] = i; - return {type: "MultiLineString", arcs: stitch(topology, arcs)}; -} - -function extractArcs(topology, object, filter) { - var arcs = [], - geomsByArc = [], - geom; - - function extract0(i) { - var j = i < 0 ? ~i : i; - (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom}); - } - - function extract1(arcs) { - arcs.forEach(extract0); - } - - function extract2(arcs) { - arcs.forEach(extract1); - } - - function extract3(arcs) { - arcs.forEach(extract2); - } - - function geometry(o) { - switch (geom = o, o.type) { - case "GeometryCollection": o.geometries.forEach(geometry); break; - case "LineString": extract1(o.arcs); break; - case "MultiLineString": case "Polygon": extract2(o.arcs); break; - case "MultiPolygon": extract3(o.arcs); break; - } - } - - geometry(object); - - geomsByArc.forEach(filter == null - ? function(geoms) { arcs.push(geoms[0].i); } - : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) arcs.push(geoms[0].i); }); - - return arcs; -} - -function planarRingArea(ring) { - var i = -1, n = ring.length, a, b = ring[n - 1], area = 0; - while (++i < n) a = b, b = ring[i], area += a[0] * b[1] - a[1] * b[0]; - return Math.abs(area); // Note: doubled area! -} - -function merge(topology) { - return object(topology, mergeArcs.apply(this, arguments)); -} - -function mergeArcs(topology, objects) { - var polygonsByArc = {}, - polygons = [], - groups = []; - - objects.forEach(geometry); - - function geometry(o) { - switch (o.type) { - case "GeometryCollection": o.geometries.forEach(geometry); break; - case "Polygon": extract(o.arcs); break; - case "MultiPolygon": o.arcs.forEach(extract); break; - } - } - - function extract(polygon) { - polygon.forEach(function(ring) { - ring.forEach(function(arc) { - (polygonsByArc[arc = arc < 0 ? ~arc : arc] || (polygonsByArc[arc] = [])).push(polygon); - }); - }); - polygons.push(polygon); - } - - function area(ring) { - return planarRingArea(object(topology, {type: "Polygon", arcs: [ring]}).coordinates[0]); - } - - polygons.forEach(function(polygon) { - if (!polygon._) { - var group = [], - neighbors = [polygon]; - polygon._ = 1; - groups.push(group); - while (polygon = neighbors.pop()) { - group.push(polygon); - polygon.forEach(function(ring) { - ring.forEach(function(arc) { - polygonsByArc[arc < 0 ? ~arc : arc].forEach(function(polygon) { - if (!polygon._) { - polygon._ = 1; - neighbors.push(polygon); - } - }); - }); - }); - } - } - }); - - polygons.forEach(function(polygon) { - delete polygon._; - }); - - return { - type: "MultiPolygon", - arcs: groups.map(function(polygons) { - var arcs = [], n; - - // Extract the exterior (unique) arcs. - polygons.forEach(function(polygon) { - polygon.forEach(function(ring) { - ring.forEach(function(arc) { - if (polygonsByArc[arc < 0 ? ~arc : arc].length < 2) { - arcs.push(arc); - } - }); - }); - }); - - // Stitch the arcs into one or more rings. - arcs = stitch(topology, arcs); - - // If more than one ring is returned, - // at most one of these rings can be the exterior; - // choose the one with the greatest absolute area. - if ((n = arcs.length) > 1) { - for (var i = 1, k = area(arcs[0]), ki, t; i < n; ++i) { - if ((ki = area(arcs[i])) > k) { - t = arcs[0], arcs[0] = arcs[i], arcs[i] = t, k = ki; - } - } - } - - return arcs; - }).filter(function(arcs) { - return arcs.length > 0; - }) - }; -} - -function bisect(a, x) { - var lo = 0, hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (a[mid] < x) lo = mid + 1; - else hi = mid; - } - return lo; -} - -function neighbors(objects) { - var indexesByArc = {}, // arc index -> array of object indexes - neighbors = objects.map(function() { return []; }); - - function line(arcs, i) { - arcs.forEach(function(a) { - if (a < 0) a = ~a; - var o = indexesByArc[a]; - if (o) o.push(i); - else indexesByArc[a] = [i]; - }); - } - - function polygon(arcs, i) { - arcs.forEach(function(arc) { line(arc, i); }); - } - - function geometry(o, i) { - if (o.type === "GeometryCollection") o.geometries.forEach(function(o) { geometry(o, i); }); - else if (o.type in geometryType) geometryType[o.type](o.arcs, i); - } - - var geometryType = { - LineString: line, - MultiLineString: polygon, - Polygon: polygon, - MultiPolygon: function(arcs, i) { arcs.forEach(function(arc) { polygon(arc, i); }); } - }; - - objects.forEach(geometry); - - for (var i in indexesByArc) { - for (var indexes = indexesByArc[i], m = indexes.length, j = 0; j < m; ++j) { - for (var k = j + 1; k < m; ++k) { - var ij = indexes[j], ik = indexes[k], n; - if ((n = neighbors[ij])[i = bisect(n, ik)] !== ik) n.splice(i, 0, ik); - if ((n = neighbors[ik])[i = bisect(n, ij)] !== ij) n.splice(i, 0, ij); - } - } - } - - return neighbors; -} - -function untransform(transform) { - if (transform == null) return identity; - var x0, - y0, - kx = transform.scale[0], - ky = transform.scale[1], - dx = transform.translate[0], - dy = transform.translate[1]; - return function(input, i) { - if (!i) x0 = y0 = 0; - var j = 2, - n = input.length, - output = new Array(n), - x1 = Math.round((input[0] - dx) / kx), - y1 = Math.round((input[1] - dy) / ky); - output[0] = x1 - x0, x0 = x1; - output[1] = y1 - y0, y0 = y1; - while (j < n) output[j] = input[j], ++j; - return output; - }; -} - -function quantize(topology, transform) { - if (topology.transform) throw new Error("already quantized"); - - if (!transform || !transform.scale) { - if (!((n = Math.floor(transform)) >= 2)) throw new Error("n must be ≥2"); - box = topology.bbox || bbox(topology); - var x0 = box[0], y0 = box[1], x1 = box[2], y1 = box[3], n; - transform = {scale: [x1 - x0 ? (x1 - x0) / (n - 1) : 1, y1 - y0 ? (y1 - y0) / (n - 1) : 1], translate: [x0, y0]}; - } else { - box = topology.bbox; - } - - var t = untransform(transform), box, key, inputs = topology.objects, outputs = {}; - - function quantizePoint(point) { - return t(point); - } - - function quantizeGeometry(input) { - var output; - switch (input.type) { - case "GeometryCollection": output = {type: "GeometryCollection", geometries: input.geometries.map(quantizeGeometry)}; break; - case "Point": output = {type: "Point", coordinates: quantizePoint(input.coordinates)}; break; - case "MultiPoint": output = {type: "MultiPoint", coordinates: input.coordinates.map(quantizePoint)}; break; - default: return input; - } - if (input.id != null) output.id = input.id; - if (input.bbox != null) output.bbox = input.bbox; - if (input.properties != null) output.properties = input.properties; - return output; - } - - function quantizeArc(input) { - var i = 0, j = 1, n = input.length, p, output = new Array(n); // pessimistic - output[0] = t(input[0], 0); - while (++i < n) if ((p = t(input[i], i))[0] || p[1]) output[j++] = p; // non-coincident points - if (j === 1) output[j++] = [0, 0]; // an arc must have at least two points - output.length = j; - return output; - } - - for (key in inputs) outputs[key] = quantizeGeometry(inputs[key]); - - return { - type: "Topology", - bbox: box, - transform: transform, - objects: outputs, - arcs: topology.arcs.map(quantizeArc) - }; -} - -exports.bbox = bbox; -exports.feature = feature; -exports.merge = merge; -exports.mergeArcs = mergeArcs; -exports.mesh = mesh; -exports.meshArcs = meshArcs; -exports.neighbors = neighbors; -exports.quantize = quantize; -exports.transform = transform; -exports.untransform = untransform; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/dist/topojson-client.min.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/dist/topojson-client.min.js deleted file mode 100644 index 41433fa09fe01f1d5c8498ad74b79b4830d6378c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/dist/topojson-client.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://github.com/topojson/topojson-client v3.1.0 Copyright 2019 Mike Bostock -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).topojson=e.topojson||{})}(this,function(e){"use strict";function t(e){return e}function r(e){if(null==e)return t;var r,n,o=e.scale[0],a=e.scale[1],i=e.translate[0],c=e.translate[1];return function(e,t){t||(r=n=0);var u=2,f=e.length,s=new Array(f);for(s[0]=(r+=e[0])*o+i,s[1]=(n+=e[1])*a+c;ui&&(i=e[0]),e[1]c&&(c=e[1])}function f(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(f);break;case"Point":u(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(u)}}for(t in e.arcs.forEach(function(e){for(var t,r=-1,u=e.length;++ri&&(i=t[0]),t[1]c&&(c=t[1])}),e.objects)f(e.objects[t]);return[o,a,i,c]}function o(e,t){var r=t.id,n=t.bbox,o=null==t.properties?{}:t.properties,i=a(e,t);return null==r&&null==n?{type:"Feature",properties:o,geometry:i}:null==n?{type:"Feature",id:r,properties:o,geometry:i}:{type:"Feature",id:r,bbox:n,properties:o,geometry:i}}function a(e,t){var n=r(e.transform),o=e.arcs;function a(e,t){t.length&&t.pop();for(var r=o[e<0?~e:e],a=0,i=r.length;a1)n=function(e,t,r){var n,o=[],a=[];function i(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:n})}function c(e){e.forEach(i)}function u(e){e.forEach(c)}return function e(t){switch(n=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":c(t.arcs);break;case"MultiLineString":case"Polygon":u(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(u)}(t.arcs)}}(t),a.forEach(null==r?function(e){o.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&o.push(e[0].i)}),o}(0,t,r);else for(o=0,n=new Array(a=e.arcs.length);o1)for(var a,c,f=1,s=u(o[0]);fs&&(c=o[0],o[0]=o[f],o[f]=c,s=a);return o}).filter(function(e){return e.length>0})}}function f(e,t){for(var r=0,n=e.length;r>>1;e[o]=2))throw new Error("n must be ≥2");var r,o=(u=e.bbox||n(e))[0],a=u[1],i=u[2],c=u[3];t={scale:[i-o?(i-o)/(r-1):1,c-a?(c-a)/(r-1):1],translate:[o,a]}}var u,f,l=s(t),h=e.objects,p={};function g(e){return l(e)}function y(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(y)};break;case"Point":t={type:"Point",coordinates:g(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(g)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(f in h)p[f]=y(h[f]);return{type:"Topology",bbox:u,transform:t,objects:p,arcs:e.arcs.map(function(e){var t,r=0,n=1,o=e.length,a=new Array(o);for(a[0]=l(e[0],0);++r x1) x1 = p[0]; - if (p[1] < y0) y0 = p[1]; - if (p[1] > y1) y1 = p[1]; - } - - function bboxGeometry(o) { - switch (o.type) { - case "GeometryCollection": o.geometries.forEach(bboxGeometry); break; - case "Point": bboxPoint(o.coordinates); break; - case "MultiPoint": o.coordinates.forEach(bboxPoint); break; - } - } - - topology.arcs.forEach(function(arc) { - var i = -1, n = arc.length, p; - while (++i < n) { - p = t(arc[i], i); - if (p[0] < x0) x0 = p[0]; - if (p[0] > x1) x1 = p[0]; - if (p[1] < y0) y0 = p[1]; - if (p[1] > y1) y1 = p[1]; - } - }); - - for (key in topology.objects) { - bboxGeometry(topology.objects[key]); - } - - return [x0, y0, x1, y1]; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/bisect.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/bisect.js deleted file mode 100644 index ebd4b57b41032911587c963f72e03221bb577a49..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/bisect.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function(a, x) { - var lo = 0, hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (a[mid] < x) lo = mid + 1; - else hi = mid; - } - return lo; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/feature.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/feature.js deleted file mode 100644 index 6bf73f063b64f80c281298325281953092e31494..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/feature.js +++ /dev/null @@ -1,70 +0,0 @@ -import reverse from "./reverse.js"; -import transform from "./transform.js"; - -export default function(topology, o) { - if (typeof o === "string") o = topology.objects[o]; - return o.type === "GeometryCollection" - ? {type: "FeatureCollection", features: o.geometries.map(function(o) { return feature(topology, o); })} - : feature(topology, o); -} - -function feature(topology, o) { - var id = o.id, - bbox = o.bbox, - properties = o.properties == null ? {} : o.properties, - geometry = object(topology, o); - return id == null && bbox == null ? {type: "Feature", properties: properties, geometry: geometry} - : bbox == null ? {type: "Feature", id: id, properties: properties, geometry: geometry} - : {type: "Feature", id: id, bbox: bbox, properties: properties, geometry: geometry}; -} - -export function object(topology, o) { - var transformPoint = transform(topology.transform), - arcs = topology.arcs; - - function arc(i, points) { - if (points.length) points.pop(); - for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) { - points.push(transformPoint(a[k], k)); - } - if (i < 0) reverse(points, n); - } - - function point(p) { - return transformPoint(p); - } - - function line(arcs) { - var points = []; - for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points); - if (points.length < 2) points.push(points[0]); // This should never happen per the specification. - return points; - } - - function ring(arcs) { - var points = line(arcs); - while (points.length < 4) points.push(points[0]); // This may happen if an arc has only two points. - return points; - } - - function polygon(arcs) { - return arcs.map(ring); - } - - function geometry(o) { - var type = o.type, coordinates; - switch (type) { - case "GeometryCollection": return {type: type, geometries: o.geometries.map(geometry)}; - case "Point": coordinates = point(o.coordinates); break; - case "MultiPoint": coordinates = o.coordinates.map(point); break; - case "LineString": coordinates = line(o.arcs); break; - case "MultiLineString": coordinates = o.arcs.map(line); break; - case "Polygon": coordinates = polygon(o.arcs); break; - case "MultiPolygon": coordinates = o.arcs.map(polygon); break; - default: return null; - } - return {type: type, coordinates: coordinates}; - } - - return geometry(o); -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/identity.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/identity.js deleted file mode 100644 index b2f94b2e21fee82e347197f65d2d2c8f0b655642..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return x; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/index.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/index.js deleted file mode 100644 index 08ee6574451887c599405199a2bdab4350bff034..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export {default as bbox} from "./bbox.js"; -export {default as feature} from "./feature.js"; -export {default as mesh, meshArcs} from "./mesh.js"; -export {default as merge, mergeArcs} from "./merge.js"; -export {default as neighbors} from "./neighbors.js"; -export {default as quantize} from "./quantize.js"; -export {default as transform} from "./transform.js"; -export {default as untransform} from "./untransform.js"; diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/merge.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/merge.js deleted file mode 100644 index 4dcd342eac737f6ef72bda76999466339f022c54..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/merge.js +++ /dev/null @@ -1,103 +0,0 @@ -import {object} from "./feature.js"; -import stitch from "./stitch.js"; - -function planarRingArea(ring) { - var i = -1, n = ring.length, a, b = ring[n - 1], area = 0; - while (++i < n) a = b, b = ring[i], area += a[0] * b[1] - a[1] * b[0]; - return Math.abs(area); // Note: doubled area! -} - -export default function(topology) { - return object(topology, mergeArcs.apply(this, arguments)); -} - -export function mergeArcs(topology, objects) { - var polygonsByArc = {}, - polygons = [], - groups = []; - - objects.forEach(geometry); - - function geometry(o) { - switch (o.type) { - case "GeometryCollection": o.geometries.forEach(geometry); break; - case "Polygon": extract(o.arcs); break; - case "MultiPolygon": o.arcs.forEach(extract); break; - } - } - - function extract(polygon) { - polygon.forEach(function(ring) { - ring.forEach(function(arc) { - (polygonsByArc[arc = arc < 0 ? ~arc : arc] || (polygonsByArc[arc] = [])).push(polygon); - }); - }); - polygons.push(polygon); - } - - function area(ring) { - return planarRingArea(object(topology, {type: "Polygon", arcs: [ring]}).coordinates[0]); - } - - polygons.forEach(function(polygon) { - if (!polygon._) { - var group = [], - neighbors = [polygon]; - polygon._ = 1; - groups.push(group); - while (polygon = neighbors.pop()) { - group.push(polygon); - polygon.forEach(function(ring) { - ring.forEach(function(arc) { - polygonsByArc[arc < 0 ? ~arc : arc].forEach(function(polygon) { - if (!polygon._) { - polygon._ = 1; - neighbors.push(polygon); - } - }); - }); - }); - } - } - }); - - polygons.forEach(function(polygon) { - delete polygon._; - }); - - return { - type: "MultiPolygon", - arcs: groups.map(function(polygons) { - var arcs = [], n; - - // Extract the exterior (unique) arcs. - polygons.forEach(function(polygon) { - polygon.forEach(function(ring) { - ring.forEach(function(arc) { - if (polygonsByArc[arc < 0 ? ~arc : arc].length < 2) { - arcs.push(arc); - } - }); - }); - }); - - // Stitch the arcs into one or more rings. - arcs = stitch(topology, arcs); - - // If more than one ring is returned, - // at most one of these rings can be the exterior; - // choose the one with the greatest absolute area. - if ((n = arcs.length) > 1) { - for (var i = 1, k = area(arcs[0]), ki, t; i < n; ++i) { - if ((ki = area(arcs[i])) > k) { - t = arcs[0], arcs[0] = arcs[i], arcs[i] = t, k = ki; - } - } - } - - return arcs; - }).filter(function(arcs) { - return arcs.length > 0; - }) - }; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/mesh.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/mesh.js deleted file mode 100644 index e0b7097a5825e2c2ba6da5705ce6edca5214cef0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/mesh.js +++ /dev/null @@ -1,53 +0,0 @@ -import {object} from "./feature.js"; -import stitch from "./stitch.js"; - -export default function(topology) { - return object(topology, meshArcs.apply(this, arguments)); -} - -export function meshArcs(topology, object, filter) { - var arcs, i, n; - if (arguments.length > 1) arcs = extractArcs(topology, object, filter); - else for (i = 0, arcs = new Array(n = topology.arcs.length); i < n; ++i) arcs[i] = i; - return {type: "MultiLineString", arcs: stitch(topology, arcs)}; -} - -function extractArcs(topology, object, filter) { - var arcs = [], - geomsByArc = [], - geom; - - function extract0(i) { - var j = i < 0 ? ~i : i; - (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom}); - } - - function extract1(arcs) { - arcs.forEach(extract0); - } - - function extract2(arcs) { - arcs.forEach(extract1); - } - - function extract3(arcs) { - arcs.forEach(extract2); - } - - function geometry(o) { - switch (geom = o, o.type) { - case "GeometryCollection": o.geometries.forEach(geometry); break; - case "LineString": extract1(o.arcs); break; - case "MultiLineString": case "Polygon": extract2(o.arcs); break; - case "MultiPolygon": extract3(o.arcs); break; - } - } - - geometry(object); - - geomsByArc.forEach(filter == null - ? function(geoms) { arcs.push(geoms[0].i); } - : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) arcs.push(geoms[0].i); }); - - return arcs; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/neighbors.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/neighbors.js deleted file mode 100644 index 70db593162b081590e385297168561abd83a1d24..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/neighbors.js +++ /dev/null @@ -1,45 +0,0 @@ -import bisect from "./bisect.js"; - -export default function(objects) { - var indexesByArc = {}, // arc index -> array of object indexes - neighbors = objects.map(function() { return []; }); - - function line(arcs, i) { - arcs.forEach(function(a) { - if (a < 0) a = ~a; - var o = indexesByArc[a]; - if (o) o.push(i); - else indexesByArc[a] = [i]; - }); - } - - function polygon(arcs, i) { - arcs.forEach(function(arc) { line(arc, i); }); - } - - function geometry(o, i) { - if (o.type === "GeometryCollection") o.geometries.forEach(function(o) { geometry(o, i); }); - else if (o.type in geometryType) geometryType[o.type](o.arcs, i); - } - - var geometryType = { - LineString: line, - MultiLineString: polygon, - Polygon: polygon, - MultiPolygon: function(arcs, i) { arcs.forEach(function(arc) { polygon(arc, i); }); } - }; - - objects.forEach(geometry); - - for (var i in indexesByArc) { - for (var indexes = indexesByArc[i], m = indexes.length, j = 0; j < m; ++j) { - for (var k = j + 1; k < m; ++k) { - var ij = indexes[j], ik = indexes[k], n; - if ((n = neighbors[ij])[i = bisect(n, ik)] !== ik) n.splice(i, 0, ik); - if ((n = neighbors[ik])[i = bisect(n, ij)] !== ij) n.splice(i, 0, ij); - } - } - } - - return neighbors; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/quantize.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/quantize.js deleted file mode 100644 index 64d060f4b10f34eb769319bd51b3e49a9fee1fdb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/quantize.js +++ /dev/null @@ -1,54 +0,0 @@ -import bbox from "./bbox.js"; -import untransform from "./untransform.js"; - -export default function(topology, transform) { - if (topology.transform) throw new Error("already quantized"); - - if (!transform || !transform.scale) { - if (!((n = Math.floor(transform)) >= 2)) throw new Error("n must be ≥2"); - box = topology.bbox || bbox(topology); - var x0 = box[0], y0 = box[1], x1 = box[2], y1 = box[3], n; - transform = {scale: [x1 - x0 ? (x1 - x0) / (n - 1) : 1, y1 - y0 ? (y1 - y0) / (n - 1) : 1], translate: [x0, y0]}; - } else { - box = topology.bbox; - } - - var t = untransform(transform), box, key, inputs = topology.objects, outputs = {}; - - function quantizePoint(point) { - return t(point); - } - - function quantizeGeometry(input) { - var output; - switch (input.type) { - case "GeometryCollection": output = {type: "GeometryCollection", geometries: input.geometries.map(quantizeGeometry)}; break; - case "Point": output = {type: "Point", coordinates: quantizePoint(input.coordinates)}; break; - case "MultiPoint": output = {type: "MultiPoint", coordinates: input.coordinates.map(quantizePoint)}; break; - default: return input; - } - if (input.id != null) output.id = input.id; - if (input.bbox != null) output.bbox = input.bbox; - if (input.properties != null) output.properties = input.properties; - return output; - } - - function quantizeArc(input) { - var i = 0, j = 1, n = input.length, p, output = new Array(n); // pessimistic - output[0] = t(input[0], 0); - while (++i < n) if ((p = t(input[i], i))[0] || p[1]) output[j++] = p; // non-coincident points - if (j === 1) output[j++] = [0, 0]; // an arc must have at least two points - output.length = j; - return output; - } - - for (key in inputs) outputs[key] = quantizeGeometry(inputs[key]); - - return { - type: "Topology", - bbox: box, - transform: transform, - objects: outputs, - arcs: topology.arcs.map(quantizeArc) - }; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/reverse.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/reverse.js deleted file mode 100644 index 4bc7c31453c0149e0ac1b1d7a4d28943886d22e0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/reverse.js +++ /dev/null @@ -1,4 +0,0 @@ -export default function(array, n) { - var t, j = array.length, i = j - n; - while (i < --j) t = array[i], array[i++] = array[j], array[j] = t; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/stitch.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/stitch.js deleted file mode 100644 index 0163e0474dba40888fff8ba8f624dac30dd61b54..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/stitch.js +++ /dev/null @@ -1,73 +0,0 @@ -export default function(topology, arcs) { - var stitchedArcs = {}, - fragmentByStart = {}, - fragmentByEnd = {}, - fragments = [], - emptyIndex = -1; - - // Stitch empty arcs first, since they may be subsumed by other arcs. - arcs.forEach(function(i, j) { - var arc = topology.arcs[i < 0 ? ~i : i], t; - if (arc.length < 3 && !arc[1][0] && !arc[1][1]) { - t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t; - } - }); - - arcs.forEach(function(i) { - var e = ends(i), - start = e[0], - end = e[1], - f, g; - - if (f = fragmentByEnd[start]) { - delete fragmentByEnd[f.end]; - f.push(i); - f.end = end; - if (g = fragmentByStart[end]) { - delete fragmentByStart[g.start]; - var fg = g === f ? f : f.concat(g); - fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg; - } else { - fragmentByStart[f.start] = fragmentByEnd[f.end] = f; - } - } else if (f = fragmentByStart[end]) { - delete fragmentByStart[f.start]; - f.unshift(i); - f.start = start; - if (g = fragmentByEnd[start]) { - delete fragmentByEnd[g.end]; - var gf = g === f ? f : g.concat(f); - fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf; - } else { - fragmentByStart[f.start] = fragmentByEnd[f.end] = f; - } - } else { - f = [i]; - fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f; - } - }); - - function ends(i) { - var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1; - if (topology.transform) p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; }); - else p1 = arc[arc.length - 1]; - return i < 0 ? [p1, p0] : [p0, p1]; - } - - function flush(fragmentByEnd, fragmentByStart) { - for (var k in fragmentByEnd) { - var f = fragmentByEnd[k]; - delete fragmentByStart[f.start]; - delete f.start; - delete f.end; - f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; }); - fragments.push(f); - } - } - - flush(fragmentByEnd, fragmentByStart); - flush(fragmentByStart, fragmentByEnd); - arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) fragments.push([i]); }); - - return fragments; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/transform.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/transform.js deleted file mode 100644 index 91efb4869714053d0adf4dae17df8a97606c6a57..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/transform.js +++ /dev/null @@ -1,19 +0,0 @@ -import identity from "./identity.js"; - -export default function(transform) { - if (transform == null) return identity; - var x0, - y0, - kx = transform.scale[0], - ky = transform.scale[1], - dx = transform.translate[0], - dy = transform.translate[1]; - return function(input, i) { - if (!i) x0 = y0 = 0; - var j = 2, n = input.length, output = new Array(n); - output[0] = (x0 += input[0]) * kx + dx; - output[1] = (y0 += input[1]) * ky + dy; - while (j < n) output[j] = input[j], ++j; - return output; - }; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/untransform.js b/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/untransform.js deleted file mode 100644 index 6a4636d9a0d281b61d4074d6387c964051b5cf26..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/topojson-client/src/untransform.js +++ /dev/null @@ -1,23 +0,0 @@ -import identity from "./identity.js"; - -export default function(transform) { - if (transform == null) return identity; - var x0, - y0, - kx = transform.scale[0], - ky = transform.scale[1], - dx = transform.translate[0], - dy = transform.translate[1]; - return function(input, i) { - if (!i) x0 = y0 = 0; - var j = 2, - n = input.length, - output = new Array(n), - x1 = Math.round((input[0] - dx) / kx), - y1 = Math.round((input[1] - dy) / ky); - output[0] = x1 - x0, x0 = x1; - output[1] = y1 - y0, y0 = y1; - while (j < n) output[j] = input[j], ++j; - return output; - }; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/CopyrightNotice.txt b/ThinFilm_Analyzer/frontend/node_modules/tslib/CopyrightNotice.txt deleted file mode 100644 index 5d7d2d9ceef9ad9ea38818cc7d2392f1a9b7af10..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/CopyrightNotice.txt +++ /dev/null @@ -1,15 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/LICENSE.txt b/ThinFilm_Analyzer/frontend/node_modules/tslib/LICENSE.txt deleted file mode 100644 index fa7d1bdf94d541b1754132c52ec3868d1fe4cdaf..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/LICENSE.txt +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/README.md b/ThinFilm_Analyzer/frontend/node_modules/tslib/README.md deleted file mode 100644 index 14b9a83dcce1d653dfa798ae622dfc7c0c6ebd41..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/README.md +++ /dev/null @@ -1,164 +0,0 @@ -# tslib - -This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions. - -This library is primarily used by the `--importHelpers` flag in TypeScript. -When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file: - -```ts -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; -}; -exports.x = {}; -exports.y = __assign({}, exports.x); - -``` - -will instead be emitted as something like the following: - -```ts -var tslib_1 = require("tslib"); -exports.x = {}; -exports.y = tslib_1.__assign({}, exports.x); -``` - -Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead. -For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`. - -# Installing - -For the latest stable version, run: - -## npm - -```sh -# TypeScript 3.9.2 or later -npm install tslib - -# TypeScript 3.8.4 or earlier -npm install tslib@^1 - -# TypeScript 2.3.2 or earlier -npm install tslib@1.6.1 -``` - -## yarn - -```sh -# TypeScript 3.9.2 or later -yarn add tslib - -# TypeScript 3.8.4 or earlier -yarn add tslib@^1 - -# TypeScript 2.3.2 or earlier -yarn add tslib@1.6.1 -``` - -## bower - -```sh -# TypeScript 3.9.2 or later -bower install tslib - -# TypeScript 3.8.4 or earlier -bower install tslib@^1 - -# TypeScript 2.3.2 or earlier -bower install tslib@1.6.1 -``` - -## JSPM - -```sh -# TypeScript 3.9.2 or later -jspm install tslib - -# TypeScript 3.8.4 or earlier -jspm install tslib@^1 - -# TypeScript 2.3.2 or earlier -jspm install tslib@1.6.1 -``` - -# Usage - -Set the `importHelpers` compiler option on the command line: - -``` -tsc --importHelpers file.ts -``` - -or in your tsconfig.json: - -```json -{ - "compilerOptions": { - "importHelpers": true - } -} -``` - -#### For bower and JSPM users - -You will need to add a `paths` mapping for `tslib`, e.g. For Bower users: - -```json -{ - "compilerOptions": { - "module": "amd", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["bower_components/tslib/tslib.d.ts"] - } - } -} -``` - -For JSPM users: - -```json -{ - "compilerOptions": { - "module": "system", - "importHelpers": true, - "baseUrl": "./", - "paths": { - "tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"] - } - } -} -``` - -## Deployment - -- Choose your new version number -- Set it in `package.json` and `bower.json` -- Create a tag: `git tag [version]` -- Push the tag: `git push --tags` -- Create a [release in GitHub](https://github.com/microsoft/tslib/releases) -- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow - -Done. - -# Contribute - -There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript. - -* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in. -* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls). -* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript). -* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter. -* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md). - -# Documentation - -* [Quick tutorial](http://www.typescriptlang.org/Tutorial) -* [Programming handbook](http://www.typescriptlang.org/Handbook) -* [Homepage](http://www.typescriptlang.org/) diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/SECURITY.md b/ThinFilm_Analyzer/frontend/node_modules/tslib/SECURITY.md deleted file mode 100644 index 869fdfe2b246991a053fab9cfec1bed3ab532ab1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/SECURITY.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). - - diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/index.d.ts b/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/index.d.ts deleted file mode 100644 index 3244fabeec060d55c47f0a981adb9d629fd0678f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/index.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Note: named reexports are used instead of `export *` because -// TypeScript itself doesn't resolve the `export *` when checking -// if a particular helper exists. -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __createBinding, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -} from '../tslib.js'; -export * as default from '../tslib.js'; diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/index.js b/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/index.js deleted file mode 100644 index f4f9a06d2a5bdd722d7f5f212a2948aaf26cde45..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/index.js +++ /dev/null @@ -1,70 +0,0 @@ -import tslib from '../tslib.js'; -const { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -} = tslib; -export { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __exportStar, - __createBinding, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -}; -export default tslib; diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/package.json b/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/package.json deleted file mode 100644 index 96ae6e57eb3980436bae7749ddbdca84b4978cc2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/modules/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/package.json b/ThinFilm_Analyzer/frontend/node_modules/tslib/package.json deleted file mode 100644 index 57d05787665b23adae49ad9d1c4fcc1b183481e6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "tslib", - "author": "Microsoft Corp.", - "homepage": "https://www.typescriptlang.org/", - "version": "2.8.1", - "license": "0BSD", - "description": "Runtime library for TypeScript helper functions", - "keywords": [ - "TypeScript", - "Microsoft", - "compiler", - "language", - "javascript", - "tslib", - "runtime" - ], - "bugs": { - "url": "https://github.com/Microsoft/TypeScript/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/tslib.git" - }, - "main": "tslib.js", - "module": "tslib.es6.js", - "jsnext:main": "tslib.es6.js", - "typings": "tslib.d.ts", - "sideEffects": false, - "exports": { - ".": { - "module": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - }, - "import": { - "node": "./modules/index.js", - "default": { - "types": "./modules/index.d.ts", - "default": "./tslib.es6.mjs" - } - }, - "default": "./tslib.js" - }, - "./*": "./*", - "./": "./" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.d.ts b/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.d.ts deleted file mode 100644 index 9c27e05864caee3f3c976bd52c48ad40ec708dd2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.d.ts +++ /dev/null @@ -1,460 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ - -/** - * Used to shim class extends. - * - * @param d The derived class. - * @param b The base class. - */ -export declare function __extends(d: Function, b: Function): void; - -/** - * Copy the values of all of the enumerable own properties from one or more source objects to a - * target object. Returns the target object. - * - * @param t The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ -export declare function __assign(t: any, ...sources: any[]): any; - -/** - * Performs a rest spread on an object. - * - * @param t The source value. - * @param propertyNames The property names excluded from the rest spread. - */ -export declare function __rest(t: any, propertyNames: (string | symbol)[]): any; - -/** - * Applies decorators to a target object - * - * @param decorators The set of decorators to apply. - * @param target The target object. - * @param key If specified, the own property to apply the decorators to. - * @param desc The property descriptor, defaults to fetching the descriptor from the target object. - * @experimental - */ -export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; - -/** - * Creates an observing function decorator from a parameter decorator. - * - * @param paramIndex The parameter index to apply the decorator to. - * @param decorator The parameter decorator to apply. Note that the return value is ignored. - * @experimental - */ -export declare function __param(paramIndex: number, decorator: Function): Function; - -/** - * Applies decorators to a class or class member, following the native ECMAScript decorator specification. - * @param ctor For non-field class members, the class constructor. Otherwise, `null`. - * @param descriptorIn The `PropertyDescriptor` to use when unable to look up the property from `ctor`. - * @param decorators The decorators to apply - * @param contextIn The `DecoratorContext` to clone for each decorator application. - * @param initializers An array of field initializer mutation functions into which new initializers are written. - * @param extraInitializers An array of extra initializer functions into which new initializers are written. - */ -export declare function __esDecorate(ctor: Function | null, descriptorIn: object | null, decorators: Function[], contextIn: object, initializers: Function[] | null, extraInitializers: Function[]): void; - -/** - * Runs field initializers or extra initializers generated by `__esDecorate`. - * @param thisArg The `this` argument to use. - * @param initializers The array of initializers to evaluate. - * @param value The initial value to pass to the initializers. - */ -export declare function __runInitializers(thisArg: unknown, initializers: Function[], value?: any): any; - -/** - * Converts a computed property name into a `string` or `symbol` value. - */ -export declare function __propKey(x: any): string | symbol; - -/** - * Assigns the name of a function derived from the left-hand side of an assignment. - * @param f The function to rename. - * @param name The new name for the function. - * @param prefix A prefix (such as `"get"` or `"set"`) to insert before the name. - */ -export declare function __setFunctionName(f: Function, name: string | symbol, prefix?: string): Function; - -/** - * Creates a decorator that sets metadata. - * - * @param metadataKey The metadata key - * @param metadataValue The metadata value - * @experimental - */ -export declare function __metadata(metadataKey: any, metadataValue: any): Function; - -/** - * Converts a generator function into a pseudo-async function, by treating each `yield` as an `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param P The optional promise constructor argument, defaults to the `Promise` property of the global object. - * @param generator The generator function - */ -export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; - -/** - * Creates an Iterator object using the body as the implementation. - * - * @param thisArg The reference to use as the `this` value in the function - * @param body The generator state-machine based implementation. - * - * @see [./docs/generator.md] - */ -export declare function __generator(thisArg: any, body: Function): any; - -/** - * Creates bindings for all enumerable properties of `m` on `exports` - * - * @param m The source object - * @param o The `exports` object. - */ -export declare function __exportStar(m: any, o: any): void; - -/** - * Creates a value iterator from an `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `Iterable`, nor an `ArrayLike`. - */ -export declare function __values(o: any): any; - -/** - * Reads values from an `Iterable` or `ArrayLike` object and returns the resulting array. - * - * @param o The object to read from. - * @param n The maximum number of arguments to read, defaults to `Infinity`. - */ -export declare function __read(o: any, n?: number): any[]; - -/** - * Creates an array from iterable spread. - * - * @param args The Iterable objects to spread. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spread(...args: any[][]): any[]; - -/** - * Creates an array from array spread. - * - * @param args The ArrayLikes to spread into the resulting array. - * @deprecated since TypeScript 4.2 - Use `__spreadArray` - */ -export declare function __spreadArrays(...args: any[][]): any[]; - -/** - * Spreads the `from` array into the `to` array. - * - * @param pack Replace empty elements with `undefined`. - */ -export declare function __spreadArray(to: any[], from: any[], pack?: boolean): any[]; - -/** - * Creates an object that signals to `__asyncGenerator` that it shouldn't be yielded, - * and instead should be awaited and the resulting value passed back to the generator. - * - * @param v The value to await. - */ -export declare function __await(v: any): any; - -/** - * Converts a generator function into an async generator function, by using `yield __await` - * in place of normal `await`. - * - * @param thisArg The reference to use as the `this` value in the generator function - * @param _arguments The optional arguments array - * @param generator The generator function - */ -export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any; - -/** - * Used to wrap a potentially async iterator in such a way so that it wraps the result - * of calling iterator methods of `o` in `__await` instances, and then yields the awaited values. - * - * @param o The potentially async iterator. - * @returns A synchronous iterator yielding `__await` instances on every odd invocation - * and returning the awaited `IteratorResult` passed to `next` every even invocation. - */ -export declare function __asyncDelegator(o: any): any; - -/** - * Creates a value async iterator from an `AsyncIterable`, `Iterable` or `ArrayLike` object. - * - * @param o The object. - * @throws {TypeError} If `o` is neither `AsyncIterable`, `Iterable`, nor an `ArrayLike`. - */ -export declare function __asyncValues(o: any): any; - -/** - * Creates a `TemplateStringsArray` frozen object from the `cooked` and `raw` arrays. - * - * @param cooked The cooked possibly-sparse array. - * @param raw The raw string content. - */ -export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; - -/** - * Used to shim default and named imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default, { Named, Other } from "mod"; - * // or - * import { default as Default, Named, Other } from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importStar(mod: T): T; - -/** - * Used to shim default imports in ECMAScript Modules transpiled to CommonJS. - * - * ```js - * import Default from "mod"; - * ``` - * - * @param mod The CommonJS module exports object. - */ -export declare function __importDefault(mod: T): T | { default: T }; - -/** - * Emulates reading a private instance field. - * - * @param receiver The instance from which to read the private field. - * @param state A WeakMap containing the private field value for an instance. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean, get(o: T): V | undefined }, - kind?: "f" -): V; - -/** - * Emulates reading a private static field. - * - * @param receiver The object from which to read the private static field. - * @param state The class constructor containing the definition of the static field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates evaluating a private instance "get" accessor. - * - * @param receiver The instance on which to evaluate the private "get" accessor. - * @param state A WeakSet used to verify an instance supports the private "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet( - receiver: T, - state: { has(o: T): boolean }, - kind: "a", - f: () => V -): V; - -/** - * Emulates evaluating a private static "get" accessor. - * - * @param receiver The object on which to evaluate the private static "get" accessor. - * @param state The class constructor containing the definition of the static "get" accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "get" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V>( - receiver: T, - state: T, - kind: "a", - f: () => V -): V; - -/** - * Emulates reading a private instance method. - * - * @param receiver The instance from which to read a private method. - * @param state A WeakSet used to verify an instance supports the private method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private instance method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldGet unknown>( - receiver: T, - state: { has(o: T): boolean }, - kind: "m", - f: V -): V; - -/** - * Emulates reading a private static method. - * - * @param receiver The object from which to read the private static method. - * @param state The class constructor containing the definition of the static method. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The function to return as the private static method. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldGet unknown, V extends (...args: any[]) => unknown>( - receiver: T, - state: T, - kind: "m", - f: V -): V; - -/** - * Emulates writing to a private instance field. - * - * @param receiver The instance on which to set a private field value. - * @param state A WeakMap used to store the private field value for an instance. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean, set(o: T, value: V): unknown }, - value: V, - kind?: "f" -): V; - -/** - * Emulates writing to a private static field. - * - * @param receiver The object on which to set the private static field. - * @param state The class constructor containing the definition of the private static field. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The descriptor that holds the static field value. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "f", - f: { value: V } -): V; - -/** - * Emulates writing to a private instance "set" accessor. - * - * @param receiver The instance on which to evaluate the private instance "set" accessor. - * @param state A WeakSet used to verify an instance supports the private "set" accessor. - * @param value The value to store in the private accessor. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `state` doesn't have an entry for `receiver`. - */ -export declare function __classPrivateFieldSet( - receiver: T, - state: { has(o: T): boolean }, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Emulates writing to a private static "set" accessor. - * - * @param receiver The object on which to evaluate the private static "set" accessor. - * @param state The class constructor containing the definition of the static "set" accessor. - * @param value The value to store in the private field. - * @param kind Either `"f"` for a field, `"a"` for an accessor, or `"m"` for a method. - * @param f The "set" accessor function to evaluate. - * - * @throws {TypeError} If `receiver` is not `state`. - */ -export declare function __classPrivateFieldSet unknown, V>( - receiver: T, - state: T, - value: V, - kind: "a", - f: (v: V) => void -): V; - -/** - * Checks for the existence of a private field/method/accessor. - * - * @param state The class constructor containing the static member, or the WeakMap or WeakSet associated with a private instance member. - * @param receiver The object for which to test the presence of the private member. - */ -export declare function __classPrivateFieldIn( - state: (new (...args: any[]) => unknown) | { has(o: any): boolean }, - receiver: unknown, -): boolean; - -/** - * Creates a re-export binding on `object` with key `objectKey` that references `target[key]`. - * - * @param object The local `exports` object. - * @param target The object to re-export from. - * @param key The property key of `target` to re-export. - * @param objectKey The property key to re-export as. Defaults to `key`. - */ -export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void; - -/** - * Adds a disposable resource to a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @param value Either a Disposable or AsyncDisposable object, `null`, or `undefined`. - * @param async When `true`, `AsyncDisposable` resources can be added. When `false`, `AsyncDisposable` resources cannot be added. - * @returns The {@link value} argument. - * - * @throws {TypeError} If {@link value} is not an object, or if either `Symbol.dispose` or `Symbol.asyncDispose` are not - * defined, or if {@link value} does not have an appropriate `Symbol.dispose` or `Symbol.asyncDispose` method. - */ -export declare function __addDisposableResource(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }, value: T, async: boolean): T; - -/** - * Disposes all resources in a resource-tracking environment object. - * @param env A resource-tracking environment object. - * @returns A {@link Promise} if any resources in the environment were marked as `async` when added; otherwise, `void`. - * - * @throws {SuppressedError} if an error thrown during disposal would have suppressed a prior error from disposal or the - * error recorded in the resource-tracking environment object. - * @seealso {@link __addDisposableResource} - */ -export declare function __disposeResources(env: { stack: { value?: unknown, dispose?: Function, async: boolean }[]; error: unknown; hasError: boolean; }): any; - -/** - * Transforms a relative import specifier ending in a non-declaration TypeScript file extension to its JavaScript file extension counterpart. - * @param path The import specifier. - * @param preserveJsx Causes '*.tsx' to transform to '*.jsx' instead of '*.js'. Should be true when `--jsx` is set to `preserve`. - */ -export declare function __rewriteRelativeImportExtension(path: string, preserveJsx?: boolean): string; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.html b/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.html deleted file mode 100644 index b122e41b06af8034aca824c9563053cf501eba2a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.js b/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.js deleted file mode 100644 index 67ba5c5ae9f53e65f7b3ae9b3ad0869e024b3d62..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.js +++ /dev/null @@ -1,402 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __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]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} - -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - -export default { - __extends: __extends, - __assign: __assign, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __createBinding: __createBinding, - __exportStar: __exportStar, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __spreadArray: __spreadArray, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldSet: __classPrivateFieldSet, - __classPrivateFieldIn: __classPrivateFieldIn, - __addDisposableResource: __addDisposableResource, - __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.mjs b/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.mjs deleted file mode 100644 index c17990a13acce3c462871f37caae96b112850771..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.es6.mjs +++ /dev/null @@ -1,401 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -export function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -export var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - } - return __assign.apply(this, arguments); -} - -export function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -export function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -export function __param(paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -} - -export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -}; - -export function __runInitializers(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -}; - -export function __propKey(x) { - return typeof x === "symbol" ? x : "".concat(x); -}; - -export function __setFunctionName(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; - -export function __metadata(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} - -export function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -export function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -export var __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]; -}); - -export function __exportStar(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); -} - -export function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -export function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -/** @deprecated */ -export function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; -} - -/** @deprecated */ -export function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} - -export function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} - -export function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); -} - -export function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -} - -export function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } -} - -export function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -export function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; - -var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}; - -var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); -}; - -export function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; -} - -export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; -} - -export function __classPrivateFieldGet(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} - -export function __classPrivateFieldSet(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -} - -export function __classPrivateFieldIn(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} - -export function __addDisposableResource(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; -} - -var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -export function __disposeResources(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} - -export function __rewriteRelativeImportExtension(path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; -} - -export default { - __extends, - __assign, - __rest, - __decorate, - __param, - __esDecorate, - __runInitializers, - __propKey, - __setFunctionName, - __metadata, - __awaiter, - __generator, - __createBinding, - __exportStar, - __values, - __read, - __spread, - __spreadArrays, - __spreadArray, - __await, - __asyncGenerator, - __asyncDelegator, - __asyncValues, - __makeTemplateObject, - __importStar, - __importDefault, - __classPrivateFieldGet, - __classPrivateFieldSet, - __classPrivateFieldIn, - __addDisposableResource, - __disposeResources, - __rewriteRelativeImportExtension, -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.html b/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.html deleted file mode 100644 index 44c9ba51e3547ad1b7a9244f14703ab681519619..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.js b/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.js deleted file mode 100644 index b6509f775817c4711695f3244761762d60596654..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/tslib/tslib.js +++ /dev/null @@ -1,484 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -var __rewriteRelativeImportExtension; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if (typeof module === "object" && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; - - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; - - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; - - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __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]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; - - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; - - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); - }; - - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); - -0 && (module.exports = { - __extends: __extends, - __assign: __assign, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __esDecorate: __esDecorate, - __runInitializers: __runInitializers, - __propKey: __propKey, - __setFunctionName: __setFunctionName, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __exportStar: __exportStar, - __createBinding: __createBinding, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __spreadArray: __spreadArray, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault, - __classPrivateFieldGet: __classPrivateFieldGet, - __classPrivateFieldSet: __classPrivateFieldSet, - __classPrivateFieldIn: __classPrivateFieldIn, - __addDisposableResource: __addDisposableResource, - __disposeResources: __disposeResources, - __rewriteRelativeImportExtension: __rewriteRelativeImportExtension, -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/type-check/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/type-check/LICENSE deleted file mode 100644 index 525b11850e6f2cc73b10854d14a4532797ed0a07..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type-check/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) George Zahariev - -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/ThinFilm_Analyzer/frontend/node_modules/type-check/README.md b/ThinFilm_Analyzer/frontend/node_modules/type-check/README.md deleted file mode 100644 index b170d67c25533c2de0cb71fb1c7a35c1feade823..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type-check/README.md +++ /dev/null @@ -1,210 +0,0 @@ -# type-check [![Build Status](https://travis-ci.org/gkz/type-check.png?branch=master)](https://travis-ci.org/gkz/type-check) - - - -`type-check` is a library which allows you to check the types of JavaScript values at runtime with a Haskell like type syntax. It is great for checking external input, for testing, or even for adding a bit of safety to your internal code. It is a major component of [levn](https://github.com/gkz/levn). MIT license. Version 0.4.0. Check out the [demo](http://gkz.github.io/type-check/). - -For updates on `type-check`, [follow me on twitter](https://twitter.com/gkzahariev). - - npm install type-check - -## Quick Examples - -```js -// Basic types: -var typeCheck = require('type-check').typeCheck; -typeCheck('Number', 1); // true -typeCheck('Number', 'str'); // false -typeCheck('Error', new Error); // true -typeCheck('Undefined', undefined); // true - -// Comment -typeCheck('count::Number', 1); // true - -// One type OR another type: -typeCheck('Number | String', 2); // true -typeCheck('Number | String', 'str'); // true - -// Wildcard, matches all types: -typeCheck('*', 2) // true - -// Array, all elements of a single type: -typeCheck('[Number]', [1, 2, 3]); // true -typeCheck('[Number]', [1, 'str', 3]); // false - -// Tuples, or fixed length arrays with elements of different types: -typeCheck('(String, Number)', ['str', 2]); // true -typeCheck('(String, Number)', ['str']); // false -typeCheck('(String, Number)', ['str', 2, 5]); // false - -// Object properties: -typeCheck('{x: Number, y: Boolean}', {x: 2, y: false}); // true -typeCheck('{x: Number, y: Boolean}', {x: 2}); // false -typeCheck('{x: Number, y: Maybe Boolean}', {x: 2}); // true -typeCheck('{x: Number, y: Boolean}', {x: 2, y: false, z: 3}); // false -typeCheck('{x: Number, y: Boolean, ...}', {x: 2, y: false, z: 3}); // true - -// A particular type AND object properties: -typeCheck('RegExp{source: String, ...}', /re/i); // true -typeCheck('RegExp{source: String, ...}', {source: 're'}); // false - -// Custom types: -var opt = {customTypes: - {Even: { typeOf: 'Number', validate: function(x) { return x % 2 === 0; }}}}; -typeCheck('Even', 2, opt); // true - -// Nested: -var type = '{a: (String, [Number], {y: Array, ...}), b: Error{message: String, ...}}' -typeCheck(type, {a: ['hi', [1, 2, 3], {y: [1, 'ms']}], b: new Error('oh no')}); // true -``` - -Check out the [type syntax format](#syntax) and [guide](#guide). - -## Usage - -`require('type-check');` returns an object that exposes four properties. `VERSION` is the current version of the library as a string. `typeCheck`, `parseType`, and `parsedTypeCheck` are functions. - -```js -// typeCheck(type, input, options); -typeCheck('Number', 2); // true - -// parseType(type); -var parsedType = parseType('Number'); // object - -// parsedTypeCheck(parsedType, input, options); -parsedTypeCheck(parsedType, 2); // true -``` - -### typeCheck(type, input, options) - -`typeCheck` checks a JavaScript value `input` against `type` written in the [type format](#type-format) (and taking account the optional `options`) and returns whether the `input` matches the `type`. - -##### arguments -* type - `String` - the type written in the [type format](#type-format) which to check against -* input - `*` - any JavaScript value, which is to be checked against the type -* options - `Maybe Object` - an optional parameter specifying additional options, currently the only available option is specifying [custom types](#custom-types) - -##### returns -`Boolean` - whether the input matches the type - -##### example -```js -typeCheck('Number', 2); // true -``` - -### parseType(type) - -`parseType` parses string `type` written in the [type format](#type-format) into an object representing the parsed type. - -##### arguments -* type - `String` - the type written in the [type format](#type-format) which to parse - -##### returns -`Object` - an object in the parsed type format representing the parsed type - -##### example -```js -parseType('Number'); // [{type: 'Number'}] -``` -### parsedTypeCheck(parsedType, input, options) - -`parsedTypeCheck` checks a JavaScript value `input` against parsed `type` in the parsed type format (and taking account the optional `options`) and returns whether the `input` matches the `type`. Use this in conjunction with `parseType` if you are going to use a type more than once. - -##### arguments -* type - `Object` - the type in the parsed type format which to check against -* input - `*` - any JavaScript value, which is to be checked against the type -* options - `Maybe Object` - an optional parameter specifying additional options, currently the only available option is specifying [custom types](#custom-types) - -##### returns -`Boolean` - whether the input matches the type - -##### example -```js -parsedTypeCheck([{type: 'Number'}], 2); // true -var parsedType = parseType('String'); -parsedTypeCheck(parsedType, 'str'); // true -``` - - -## Type Format - -### Syntax - -White space is ignored. The root node is a __Types__. - -* __Identifier__ = `[\$\w]+` - a group of any lower or upper case letters, numbers, underscores, or dollar signs - eg. `String` -* __Type__ = an `Identifier`, an `Identifier` followed by a `Structure`, just a `Structure`, or a wildcard `*` - eg. `String`, `Object{x: Number}`, `{x: Number}`, `Array{0: String, 1: Boolean, length: Number}`, `*` -* __Types__ = optionally a comment (an `Identifier` followed by a `::`), optionally the identifier `Maybe`, one or more `Type`, separated by `|` - eg. `Number`, `String | Date`, `Maybe Number`, `Maybe Boolean | String` -* __Structure__ = `Fields`, or a `Tuple`, or an `Array` - eg. `{x: Number}`, `(String, Number)`, `[Date]` -* __Fields__ = a `{`, followed one or more `Field` separated by a comma `,` (trailing comma `,` is permitted), optionally an `...` (always preceded by a comma `,`), followed by a `}` - eg. `{x: Number, y: String}`, `{k: Function, ...}` -* __Field__ = an `Identifier`, followed by a colon `:`, followed by `Types` - eg. `x: Date | String`, `y: Boolean` -* __Tuple__ = a `(`, followed by one or more `Types` separated by a comma `,` (trailing comma `,` is permitted), followed by a `)` - eg `(Date)`, `(Number, Date)` -* __Array__ = a `[` followed by exactly one `Types` followed by a `]` - eg. `[Boolean]`, `[Boolean | Null]` - -### Guide - -`type-check` uses `Object.toString` to find out the basic type of a value. Specifically, - -```js -{}.toString.call(VALUE).slice(8, -1) -{}.toString.call(true).slice(8, -1) // 'Boolean' -``` -A basic type, eg. `Number`, uses this check. This is much more versatile than using `typeof` - for example, with `document`, `typeof` produces `'object'` which isn't that useful, and our technique produces `'HTMLDocument'`. - -You may check for multiple types by separating types with a `|`. The checker proceeds from left to right, and passes if the value is any of the types - eg. `String | Boolean` first checks if the value is a string, and then if it is a boolean. If it is none of those, then it returns false. - -Adding a `Maybe` in front of a list of multiple types is the same as also checking for `Null` and `Undefined` - eg. `Maybe String` is equivalent to `Undefined | Null | String`. - -You may add a comment to remind you of what the type is for by following an identifier with a `::` before a type (or multiple types). The comment is simply thrown out. - -The wildcard `*` matches all types. - -There are three types of structures for checking the contents of a value: 'fields', 'tuple', and 'array'. - -If used by itself, a 'fields' structure will pass with any type of object as long as it is an instance of `Object` and the properties pass - this allows for duck typing - eg. `{x: Boolean}`. - -To check if the properties pass, and the value is of a certain type, you can specify the type - eg. `Error{message: String}`. - -If you want to make a field optional, you can simply use `Maybe` - eg. `{x: Boolean, y: Maybe String}` will still pass if `y` is undefined (or null). - -If you don't care if the value has properties beyond what you have specified, you can use the 'etc' operator `...` - eg. `{x: Boolean, ...}` will match an object with an `x` property that is a boolean, and with zero or more other properties. - -For an array, you must specify one or more types (separated by `|`) - it will pass for something of any length as long as each element passes the types provided - eg. `[Number]`, `[Number | String]`. - -A tuple checks for a fixed number of elements, each of a potentially different type. Each element is separated by a comma - eg. `(String, Number)`. - -An array and tuple structure check that the value is of type `Array` by default, but if another type is specified, they will check for that instead - eg. `Int32Array[Number]`. You can use the wildcard `*` to search for any type at all. - -Check out the [type precedence](https://github.com/zaboco/type-precedence) library for type-check. - -## Options - -Options is an object. It is an optional parameter to the `typeCheck` and `parsedTypeCheck` functions. The only current option is `customTypes`. - - -### Custom Types - -__Example:__ - -```js -var options = { - customTypes: { - Even: { - typeOf: 'Number', - validate: function(x) { - return x % 2 === 0; - } - } - } -}; -typeCheck('Even', 2, options); // true -typeCheck('Even', 3, options); // false -``` - -`customTypes` allows you to set up custom types for validation. The value of this is an object. The keys of the object are the types you will be matching. Each value of the object will be an object having a `typeOf` property - a string, and `validate` property - a function. - -The `typeOf` property is the type the value should be (optional - if not set only `validate` will be used), and `validate` is a function which should return true if the value is of that type. `validate` receives one parameter, which is the value that we are checking. - -## Technical About - -`type-check` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It also uses the [prelude.ls](http://preludels.com/) library. diff --git a/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/check.js b/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/check.js deleted file mode 100644 index f78687ee03cef699e38b789c2777fcfb48df269c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/check.js +++ /dev/null @@ -1,128 +0,0 @@ -// Generated by LiveScript 1.6.0 -(function(){ - var ref$, any, all, isItNaN, types, defaultType, toString$ = {}.toString; - ref$ = require('prelude-ls'), any = ref$.any, all = ref$.all, isItNaN = ref$.isItNaN; - types = { - Number: { - typeOf: 'Number', - validate: function(it){ - return !isItNaN(it); - } - }, - NaN: { - typeOf: 'Number', - validate: isItNaN - }, - Int: { - typeOf: 'Number', - validate: function(it){ - return !isItNaN(it) && it % 1 === 0; - } - }, - Float: { - typeOf: 'Number', - validate: function(it){ - return !isItNaN(it); - } - }, - Date: { - typeOf: 'Date', - validate: function(it){ - return !isItNaN(it.getTime()); - } - } - }; - defaultType = { - array: 'Array', - tuple: 'Array' - }; - function checkArray(input, type, options){ - return all(function(it){ - return checkMultiple(it, type.of, options); - }, input); - } - function checkTuple(input, type, options){ - var i, i$, ref$, len$, types; - i = 0; - for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) { - types = ref$[i$]; - if (!checkMultiple(input[i], types, options)) { - return false; - } - i++; - } - return input.length <= i; - } - function checkFields(input, type, options){ - var inputKeys, numInputKeys, k, numOfKeys, key, ref$, types; - inputKeys = {}; - numInputKeys = 0; - for (k in input) { - inputKeys[k] = true; - numInputKeys++; - } - numOfKeys = 0; - for (key in ref$ = type.of) { - types = ref$[key]; - if (!checkMultiple(input[key], types, options)) { - return false; - } - if (inputKeys[key]) { - numOfKeys++; - } - } - return type.subset || numInputKeys === numOfKeys; - } - function checkStructure(input, type, options){ - if (!(input instanceof Object)) { - return false; - } - switch (type.structure) { - case 'fields': - return checkFields(input, type, options); - case 'array': - return checkArray(input, type, options); - case 'tuple': - return checkTuple(input, type, options); - } - } - function check(input, typeObj, options){ - var type, structure, setting, that; - type = typeObj.type, structure = typeObj.structure; - if (type) { - if (type === '*') { - return true; - } - setting = options.customTypes[type] || types[type]; - if (setting) { - return (setting.typeOf === void 8 || setting.typeOf === toString$.call(input).slice(8, -1)) && setting.validate(input); - } else { - return type === toString$.call(input).slice(8, -1) && (!structure || checkStructure(input, typeObj, options)); - } - } else if (structure) { - if (that = defaultType[structure]) { - if (that !== toString$.call(input).slice(8, -1)) { - return false; - } - } - return checkStructure(input, typeObj, options); - } else { - throw new Error("No type defined. Input: " + input + "."); - } - } - function checkMultiple(input, types, options){ - if (toString$.call(types).slice(8, -1) !== 'Array') { - throw new Error("Types must be in an array. Input: " + input + "."); - } - return any(function(it){ - return check(input, it, options); - }, types); - } - module.exports = function(parsedType, input, options){ - options == null && (options = {}); - if (options.customTypes == null) { - options.customTypes = {}; - } - return checkMultiple(input, parsedType, options); - }; -}).call(this); diff --git a/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/index.js b/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/index.js deleted file mode 100644 index 09db4cb61a30fa9d92dd96d5fb06b8a29e067019..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/index.js +++ /dev/null @@ -1,16 +0,0 @@ -// Generated by LiveScript 1.6.0 -(function(){ - var VERSION, parseType, parsedTypeCheck, typeCheck; - VERSION = '0.4.0'; - parseType = require('./parse-type'); - parsedTypeCheck = require('./check'); - typeCheck = function(type, input, options){ - return parsedTypeCheck(parseType(type), input, options); - }; - module.exports = { - VERSION: VERSION, - typeCheck: typeCheck, - parsedTypeCheck: parsedTypeCheck, - parseType: parseType - }; -}).call(this); diff --git a/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/parse-type.js b/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/parse-type.js deleted file mode 100644 index c360c9733964caacc23b6f39eeccf6915c8d03d5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type-check/lib/parse-type.js +++ /dev/null @@ -1,198 +0,0 @@ -// Generated by LiveScript 1.6.0 -(function(){ - var identifierRegex, tokenRegex; - identifierRegex = /[\$\w]+/; - function peek(tokens){ - var token; - token = tokens[0]; - if (token == null) { - throw new Error('Unexpected end of input.'); - } - return token; - } - function consumeIdent(tokens){ - var token; - token = peek(tokens); - if (!identifierRegex.test(token)) { - throw new Error("Expected text, got '" + token + "' instead."); - } - return tokens.shift(); - } - function consumeOp(tokens, op){ - var token; - token = peek(tokens); - if (token !== op) { - throw new Error("Expected '" + op + "', got '" + token + "' instead."); - } - return tokens.shift(); - } - function maybeConsumeOp(tokens, op){ - var token; - token = tokens[0]; - if (token === op) { - return tokens.shift(); - } else { - return null; - } - } - function consumeArray(tokens){ - var types; - consumeOp(tokens, '['); - if (peek(tokens) === ']') { - throw new Error("Must specify type of Array - eg. [Type], got [] instead."); - } - types = consumeTypes(tokens); - consumeOp(tokens, ']'); - return { - structure: 'array', - of: types - }; - } - function consumeTuple(tokens){ - var components; - components = []; - consumeOp(tokens, '('); - if (peek(tokens) === ')') { - throw new Error("Tuple must be of at least length 1 - eg. (Type), got () instead."); - } - for (;;) { - components.push(consumeTypes(tokens)); - maybeConsumeOp(tokens, ','); - if (')' === peek(tokens)) { - break; - } - } - consumeOp(tokens, ')'); - return { - structure: 'tuple', - of: components - }; - } - function consumeFields(tokens){ - var fields, subset, ref$, key, types; - fields = {}; - consumeOp(tokens, '{'); - subset = false; - for (;;) { - if (maybeConsumeOp(tokens, '...')) { - subset = true; - break; - } - ref$ = consumeField(tokens), key = ref$[0], types = ref$[1]; - fields[key] = types; - maybeConsumeOp(tokens, ','); - if ('}' === peek(tokens)) { - break; - } - } - consumeOp(tokens, '}'); - return { - structure: 'fields', - of: fields, - subset: subset - }; - } - function consumeField(tokens){ - var key, types; - key = consumeIdent(tokens); - consumeOp(tokens, ':'); - types = consumeTypes(tokens); - return [key, types]; - } - function maybeConsumeStructure(tokens){ - switch (tokens[0]) { - case '[': - return consumeArray(tokens); - case '(': - return consumeTuple(tokens); - case '{': - return consumeFields(tokens); - } - } - function consumeType(tokens){ - var token, wildcard, type, structure; - token = peek(tokens); - wildcard = token === '*'; - if (wildcard || identifierRegex.test(token)) { - type = wildcard - ? consumeOp(tokens, '*') - : consumeIdent(tokens); - structure = maybeConsumeStructure(tokens); - if (structure) { - return structure.type = type, structure; - } else { - return { - type: type - }; - } - } else { - structure = maybeConsumeStructure(tokens); - if (!structure) { - throw new Error("Unexpected character: " + token); - } - return structure; - } - } - function consumeTypes(tokens){ - var lookahead, types, typesSoFar, typeObj, type, structure; - if ('::' === peek(tokens)) { - throw new Error("No comment before comment separator '::' found."); - } - lookahead = tokens[1]; - if (lookahead != null && lookahead === '::') { - tokens.shift(); - tokens.shift(); - } - types = []; - typesSoFar = {}; - if ('Maybe' === peek(tokens)) { - tokens.shift(); - types = [ - { - type: 'Undefined' - }, { - type: 'Null' - } - ]; - typesSoFar = { - Undefined: true, - Null: true - }; - } - for (;;) { - typeObj = consumeType(tokens), type = typeObj.type, structure = typeObj.structure; - if (!typesSoFar[type]) { - types.push(typeObj); - } - if (structure == null) { - typesSoFar[type] = true; - } - if (!maybeConsumeOp(tokens, '|')) { - break; - } - } - return types; - } - tokenRegex = RegExp('\\.\\.\\.|::|->|' + identifierRegex.source + '|\\S', 'g'); - module.exports = function(input){ - var tokens, e; - if (!input.length) { - throw new Error('No type specified.'); - } - tokens = input.match(tokenRegex) || []; - if (in$('->', tokens)) { - throw new Error("Function types are not supported.\ To validate that something is a function, you may use 'Function'."); - } - try { - return consumeTypes(tokens); - } catch (e$) { - e = e$; - throw new Error(e.message + " - Remaining tokens: " + JSON.stringify(tokens) + " - Initial input: '" + input + "'"); - } - }; - function in$(x, xs){ - var i = -1, l = xs.length >>> 0; - while (++i < l) if (x === xs[i]) return true; - return false; - } -}).call(this); diff --git a/ThinFilm_Analyzer/frontend/node_modules/type-check/package.json b/ThinFilm_Analyzer/frontend/node_modules/type-check/package.json deleted file mode 100644 index 2a57ea0643dc58da3f6016ea033ed75323047326..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type-check/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "type-check", - "version": "0.4.0", - "author": "George Zahariev ", - "description": "type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.", - "homepage": "https://github.com/gkz/type-check", - "keywords": [ - "type", - "check", - "checking", - "library" - ], - "files": [ - "lib", - "README.md", - "LICENSE" - ], - "main": "./lib/", - "bugs": "https://github.com/gkz/type-check/issues", - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/gkz/type-check.git" - }, - "scripts": { - "test": "make test" - }, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "devDependencies": { - "livescript": "^1.6.0", - "mocha": "^7.1.1", - "browserify": "^16.5.1" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/CHANGELOG.md b/ThinFilm_Analyzer/frontend/node_modules/type/CHANGELOG.md deleted file mode 100644 index 22fb2252f8ad9a3012200444e49d0e4e0b7087f8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/CHANGELOG.md +++ /dev/null @@ -1,180 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [2.7.3](https://github.com/medikoo/type/compare/v2.7.2...v2.7.3) (2024-05-30) - -### Maintenance Improvements - -- Add security vulnerability policy ([a28cc58](https://github.com/medikoo/type/commit/a28cc586882ee8b1f0af6789b5af927cc4f14227)) -- Prettify ([aaa9256](https://github.com/medikoo/type/commit/aaa92561a812d756ece952e1afade7d4aa0f116c)) -- Upgrade `prettier-elastic` to v3 ([7f10b2c](https://github.com/medikoo/type/commit/7f10b2c995bb590903b2d3d2c1eacfd7e045d73b)) - -### [2.7.2](https://github.com/medikoo/type/compare/v2.7.1...v2.7.2) (2022-08-05) - -### Maintenance Improvements - -- **TS:** Improve `ensure` options handling ([#8](https://github.com/medikoo/type/issues/8)) ([4a54066](https://github.com/medikoo/type/commit/4a54066d7b55cef14ac4aa25a6f070296a043a6f)) ([Marco](https://github.com/borracciaBlu)) - -### [2.7.1](https://github.com/medikoo/type/compare/v2.7.0...v2.7.1) (2022-08-04) - -### Maintenance Improvements - -- **TS:** Fix support for `isOptional` in `ensure` options ([#7](https://github.com/medikoo/type/issues/7)) ([320f89b](https://github.com/medikoo/type/commit/320f89b89237e3e0ceff5e26b67cb18bd52cb42d)) ([Marco](https://github.com/borracciaBlu)) - -## [2.7.0](https://github.com/medikoo/type/compare/v2.6.1...v2.7.0) (2022-08-03) - -### Features - -- `BigInt.coerce` and `BigInt.ensure` ([e49ad78](https://github.com/medikoo/type/commit/e49ad787bd3aa67b7aa9f7a8ea4cde22a08bebc5)) - -### [2.6.1](https://github.com/medikoo/type/compare/v2.6.0...v2.6.1) (2022-07-29) - -### Maintenance Improvements - -- Declare TS types ([#6](https://github.com/medikoo/type/issues/6)) ([6378e2c](https://github.com/medikoo/type/commit/6378e2c457670bcb8a9b898e0f2502ed5b942d44)) ([Marco](https://github.com/borracciaBlu)) - -## [2.6.0](https://github.com/medikoo/type/compare/v2.5.0...v2.6.0) (2022-02-02) - -### Features - -- `constructor` validation utils ([74b99bb](https://github.com/medikoo/type/commit/74b99bbf6be27083bf9a053961edb2a585ae3e77)) - -## [2.5.0](https://github.com/medikoo/type/compare/v2.4.0...v2.5.0) (2021-03-08) - -### Features - -- `errorCode` option for `ensure*` utils ([777a1f2](https://github.com/medikoo/type/commit/777a1f2c9fd76defcd24d3a30cce49491947fef7)) - -## [2.4.0](https://github.com/medikoo/type/compare/v2.3.0...v2.4.0) (2021-03-08) - -### Features - -- `set/is` and `set/ensure` utils ([083ec23](https://github.com/medikoo/type/commit/083ec2351718c310f316dcfd8c624a13201e227f)) - -## [2.3.0](https://github.com/medikoo/type/compare/v2.2.0...v2.3.0) (2021-02-16) - -### Features - -- `map/is` and `map/ensure` utils ([aafd1cb](https://github.com/medikoo/type/commit/aafd1cbd8c888fda98d39fd17e59f38b078d7bcf)) - -## [2.2.0](https://github.com/medikoo/type/compare/v2.1.0...v2.2.0) (2021-02-11) - -### Features - -- Support `ensureItem` option in `array/ensure` ([8f74973](https://github.com/medikoo/type/commit/8f749739df9bfebf44087093e09c8f7341a33a09)) - -## [2.1.0](https://github.com/medikoo/type/compare/v2.0.0...v2.1.0) (2020-08-21) - -### Features - -- `ensure` util for cumulated input validation ([814c5a8](https://github.com/medikoo/type/commit/814c5a801ecac23d06d8a5f4bcafc4763a04408c)) -- Provide an alternative error message with `options.name` ([c7751c0](https://github.com/medikoo/type/commit/c7751c084ee4f3d3ed10500db0edde2ff00e03a1)) -- Support `%n` (meaningful name) token in error message resolver ([b0f374e](https://github.com/medikoo/type/commit/b0f374e54345c714fe37a90887ecfe60577ce133)) -- Support `min` validation for natural numbers ([e703512](https://github.com/medikoo/type/commit/e70351248818d3e113110106ad174b42c5fd9b25)) -- Support custom Error constructors ([c6ecb90](https://github.com/medikoo/type/commit/c6ecb90e21c1c778210934204cbe393fb89ef2f6)) - -### Bug Fixes - -- Fix typo in error message ([2735533](https://github.com/medikoo/type/commit/2735533de28d33dfa13222743698169c92d08c09)) - -## [2.0.0](https://github.com/medikoo/type/compare/v1.2.0...v2.0.0) (2019-10-10) - -### Features - -- `allowedKeys` option for plain-object/ensure ([f81e72e](https://github.com/medikoo/type/commit/f81e72e)) -- `ensurePropertyValue` option for plain-object/ensure ([c5ff8fb](https://github.com/medikoo/type/commit/c5ff8fb)) -- Replace `coerceItem` with `ensureItem` option in iterable/ensure ([721494f](https://github.com/medikoo/type/commit/721494f)) -- Seclude lib/resolve-error-message ([12636d9](https://github.com/medikoo/type/commit/12636d9)) -- Validate options.ensureItem in iterable/ensure ([78da6c1](https://github.com/medikoo/type/commit/78da6c1)) - -### BREAKING CHANGES - -- iterable/ensure no longer supports `coerceItem` option. Instead `ensureItem` was introduced - -## [1.2.0](https://github.com/medikoo/type/compare/v1.1.0...v1.2.0) (2019-09-20) - -### Bug Fixes - -- Improve error message so it's not confusing ([97cd6b9](https://github.com/medikoo/type/commit/97cd6b9)) - -### Features - -- 'coerceItem' option for iterable/ensure ([0818860](https://github.com/medikoo/type/commit/0818860)) - -## [1.1.0](https://github.com/medikoo/type/compare/v1.0.3...v1.1.0) (2019-09-20) - -### Features - -- `denyEmpty` option for iterables validation ([301d071](https://github.com/medikoo/type/commit/301d071)) - -### [1.0.3](https://github.com/medikoo/type/compare/v1.0.2...v1.0.3) (2019-08-06) - -### Bug Fixes - -- Recognize custom built ES5 era errors ([6462fac](https://github.com/medikoo/type/commit/6462fac)) - -### [1.0.2](https://github.com/medikoo/type/compare/v1.0.1...v1.0.2) (2019-08-06) - -### Bug Fixes - -- Recognize host errors (e.g. DOMException) ([96ef399](https://github.com/medikoo/type/commit/96ef399)) - -## [1.0.1](https://github.com/medikoo/type/compare/v1.0.0...v1.0.1) (2019-04-08) - -# 1.0.0 (2019-04-05) - -### Bug Fixes - -- ensure 'is' functions can't crash ([59ceb78](https://github.com/medikoo/type/commit/59ceb78)) - -### Features - -- array-length/coerce ([af8ddec](https://github.com/medikoo/type/commit/af8ddec)) -- array-length/ensure ([d313eb6](https://github.com/medikoo/type/commit/d313eb6)) -- array-like/ensure ([45f1ddd](https://github.com/medikoo/type/commit/45f1ddd)) -- array-like/is ([9a026a5](https://github.com/medikoo/type/commit/9a026a5)) -- array/ensure ([9db1515](https://github.com/medikoo/type/commit/9db1515)) -- array/is ([9672839](https://github.com/medikoo/type/commit/9672839)) -- date/ensure ([44e25a0](https://github.com/medikoo/type/commit/44e25a0)) -- date/is ([0316558](https://github.com/medikoo/type/commit/0316558)) -- ensure to not crash ([3998348](https://github.com/medikoo/type/commit/3998348)) -- ensure/number ([134b5cb](https://github.com/medikoo/type/commit/134b5cb)) -- error/ensure ([d5c8a30](https://github.com/medikoo/type/commit/d5c8a30)) -- error/is-error ([4d6b899](https://github.com/medikoo/type/commit/4d6b899)) -- finite/coerce ([accaad1](https://github.com/medikoo/type/commit/accaad1)) -- finite/ensure ([51e4174](https://github.com/medikoo/type/commit/51e4174)) -- function/ensure ([b624c9a](https://github.com/medikoo/type/commit/b624c9a)) -- function/is ([dab8026](https://github.com/medikoo/type/commit/dab8026)) -- integer/coerce ([89dea2e](https://github.com/medikoo/type/commit/89dea2e)) -- integer/ensure ([44a7071](https://github.com/medikoo/type/commit/44a7071)) -- iterable/ensure ([3d48841](https://github.com/medikoo/type/commit/3d48841)) -- iterable/is ([cf09513](https://github.com/medikoo/type/commit/cf09513)) -- lib/is-to-string-tag-supported ([c8c001d](https://github.com/medikoo/type/commit/c8c001d)) -- natural-number/coerce ([d08fdd9](https://github.com/medikoo/type/commit/d08fdd9)) -- natural-number/ensure ([6c24d12](https://github.com/medikoo/type/commit/6c24d12)) -- number/coerce ([86ccf08](https://github.com/medikoo/type/commit/86ccf08)) -- object/ensure ([a9e8eed](https://github.com/medikoo/type/commit/a9e8eed)) -- object/is ([d2d7251](https://github.com/medikoo/type/commit/d2d7251)) -- plain-function/ensure ([5186518](https://github.com/medikoo/type/commit/5186518)) -- plain-function/is ([51bc791](https://github.com/medikoo/type/commit/51bc791)) -- plain-object/ensure ([91cf5e5](https://github.com/medikoo/type/commit/91cf5e5)) -- plain-object/is ([4dcf393](https://github.com/medikoo/type/commit/4dcf393)) -- promise/ensure ([8d096a4](https://github.com/medikoo/type/commit/8d096a4)) -- promise/is ([a00de02](https://github.com/medikoo/type/commit/a00de02)) -- prototype/is ([b23bdcc](https://github.com/medikoo/type/commit/b23bdcc)) -- reg-exp/ensure ([6f7bbcb](https://github.com/medikoo/type/commit/6f7bbcb)) -- reg-exp/is ([9728519](https://github.com/medikoo/type/commit/9728519)) -- safe-integer/coerce ([b8549c4](https://github.com/medikoo/type/commit/b8549c4)) -- safe-integer/ensure ([a70ef3f](https://github.com/medikoo/type/commit/a70ef3f)) -- string/coerce ([b25c71f](https://github.com/medikoo/type/commit/b25c71f)) -- string/ensure ([b62577d](https://github.com/medikoo/type/commit/b62577d)) -- support 'default' in resolveException ([e08332a](https://github.com/medikoo/type/commit/e08332a)) -- switch config to ES3 based ([37606d9](https://github.com/medikoo/type/commit/37606d9)) -- thenable/ensure ([6762c0d](https://github.com/medikoo/type/commit/6762c0d)) -- thenable/is ([2711d70](https://github.com/medikoo/type/commit/2711d70)) -- time-value/coerce ([27fd109](https://github.com/medikoo/type/commit/27fd109)) -- time-value/ensure ([1f6a8ea](https://github.com/medikoo/type/commit/1f6a8ea)) -- **string/coerce:** restrict toString acceptance ([2a87100](https://github.com/medikoo/type/commit/2a87100)) -- value/ensure ([dd6d8cb](https://github.com/medikoo/type/commit/dd6d8cb)) -- value/is ([fdf4763](https://github.com/medikoo/type/commit/fdf4763)) diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/type/LICENSE deleted file mode 100644 index 75582027d95b072d672a247ad657d5c20eb4aaf0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2019-2024, Mariusz Nowak, @medikoo, medikoo.com - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/README.md b/ThinFilm_Analyzer/frontend/node_modules/type/README.md deleted file mode 100644 index 65eab8809ce975ee727fba59be4b5d3ab063eaf3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/README.md +++ /dev/null @@ -1,172 +0,0 @@ -[![Build status][build-image]][build-url] -[![Tests coverage][cov-image]][cov-url] -[![npm version][npm-image]][npm-url] - -# type - -## Runtime validation and processing of JavaScript types - -- Respects language nature and acknowledges its quirks -- Allows coercion in restricted forms (rejects clearly invalid input, normalizes permissible type deviations) -- No transpilation implied, written to work in all ECMAScript 3+ engines - -## Use case - -Validate arguments input in public API endpoints. - -_For validation of more sophisticated input structures (as deeply nested configuration objects) it's recommended to consider more powerful schema based utlities (as [AJV](https://ajv.js.org/) or [@hapi/joi](https://hapi.dev/family/joi/))_ - -### Example usage - -Bulletproof input arguments normalization and validation: - -```javascript -const ensureString = require('type/string/ensure') - , ensureDate = require('type/date/ensure') - , ensureNaturalNumber = require('type/natural-number/ensure') - , isObject = require('type/object/is'); - -module.exports = (path, options = { min: 0 }) { - path = ensureString(path, { errorMessage: "%v is not a path" }); - if (!isObject(options)) options = {}; - const min = ensureNaturalNumber(options.min, { default: 0 }) - , max = ensureNaturalNumber(options.max, { isOptional: true }) - , startTime = ensureDate(options.startTime, { isOptional: true }); - - // ...logic -}; -``` - -### Installation - -```bash -npm install type -``` - -## Utilities - -Aside of general [`ensure`](docs/ensure.md) validation util, following kind of utilities for recognized JavaScript types are provided: - -##### `*/coerce` - -Restricted coercion into primitive type. Returns coerced value or `null` if value is not coercible per rules. - -##### `*/is` - -Object type/kind confirmation, returns either `true` or `false`. - -##### `*/ensure` - -Value validation. Returns input value (in primitive cases possibly coerced) or if value doesn't meet the constraints throws `TypeError` . - -Each `*/ensure` utility, accepts following options (eventually passed with second argument): - -- `isOptional` - Makes `null` or `undefined` accepted as valid value. In such case instead of `TypeError` being thrown, `null` is returned. -- `default` - A value to be returned if `null` or `undefined` is passed as an input value. -- `errorMessage` - Custom error message. Following placeholders can be used: - - `%v` - To be replaced with short string representation of invalid value - - `%n` - To be replaced with meaninfgul name (to be passed with `name` option) of validated value. Not effective if `name` option is not present -- `errorCode` - Eventual error code to be exposed on `.code` error property -- `name` - Meaningful name for validated value, to be used in error message, assuming it contains `%n` placeholder -- `Error` - Alternative error constructor to be used (defaults to `TypeError`) - -### Index - -#### General utils: - -- [`ensure`](docs/ensure.md) - -#### Type specific utils: - -- **Value** - - [`value/is`](docs/value.md#valueis) - - [`value/ensure`](docs/value.md#valueensure) -- **Object** - - [`object/is`](docs/object.md#objectis) - - [`object/ensure`](docs/object.md#objectensure) - - **Plain Object** - - [`plain-object/is`](docs/plain-object.md#plain-objectis) - - [`plain-object/ensure`](docs/plain-object.md#plain-objectensure) -- **String** - - [`string/coerce`](docs/string.md#stringcoerce) - - [`string/ensure`](docs/string.md#stringensure) -- **Number** - - [`number/coerce`](docs/number.md#numbercoerce) - - [`number/ensure`](docs/number.md#numberensure) - - **Finite Number** - - [`finite/coerce`](docs/finite.md#finitecoerce) - - [`finite/ensure`](docs/finite.md#finiteensure) - - **Integer Number** - - [`integer/coerce`](docs/integer.md#integercoerce) - - [`integer/ensure`](docs/integer.md#integerensure) - - **Safe Integer Number** - - [`safe-integer/coerce`](docs/safe-integer.md#safe-integercoerce) - - [`safe-integer/ensure`](docs/.md#safe-integerensure) - - **Natural Number** - - [`natural-number/coerce`](docs/natural-number.md#natural-numbercoerce) - - [`natural-number/ensure`](docs/natural-number.md#natural-numberensure) - - **Array Length** - - [`array-length/coerce`](docs/array-length.md#array-lengthcoerce) - - [`array-length/ensure`](docs/array-length.md#array-lengthensure) - - **Time Value** - - [`time-value/coerce`](docs/time-value.md#time-valuecoerce) - - [`time-value/ensure`](docs/time-value.md#time-valueensure) -- **BigInt** - - [`big-int/coerce`](docs/big-int.md#big-intcoerce) - - [`big-int/ensure`](docs/big-int.md#big-intensure) -- **Array Like** - - [`array-like/is`](docs/array-like.md#array-likeis) - - [`array-like/ensure`](docs/array-like.md#array-likeensure) - - **Array** - - [`array/is`](docs/array.md#arrayis) - - [`array/ensure`](docs/array.md#arrayensure) -- **Iterable** - - [`iterable/is`](docs/iterable.md#iterableis) - - [`iterable/ensure`](docs/iterable.md#iterableensure) -- **Set** - - [`set/is`](docs/set.md#setis) - - [`set/ensure`](docs/set.md#setensure) -- **Map** - - [`map/is`](docs/map.md#mapis) - - [`map/ensure`](docs/map.md#mapensure) -- **Date** - - [`date/is`](docs/date.md#dateis) - - [`date/ensure`](docs/date.md#dateensure) -- **Function** - - [`function/is`](docs/function.md#functionis) - - [`function/ensure`](docs/function.md#functionensure) - - **Constructor** - - [`constructor/is`](docs/constructor.md#plain-functionis) - - [`constructor/ensure`](docs/constructor.md#plain-functionensure) - - **Plain Function** - - [`plain-function/is`](docs/plain-function.md#plain-functionis) - - [`plain-function/ensure`](docs/plain-function.md#plain-functionensure) -- **Reg Exp** - - [`reg-exp/is`](docs/reg-exp.md#reg-expis) - - [`reg-exp/ensure`](docs/.md#reg-expensure) -- **Thenable** - - [`thenable/is`](docs/thenable.md#thenableis) - - [`thenable/ensure`](docs/thenable.md#thenableensure) - - **Promise** - - [`promise/is`](docs/promise.md#promiseis) - - [`promise/ensure`](docs/promise.md#promiseensure) -- **Error** - - [`error/is`](docs/error.md#erroris) - - [`error/ensure`](docs/error.md#errorensure) -- **Prototype** - - [`prototype/is`](docs/prototype.md#prototypeis) - -### Tests - - $ npm test - -[build-image]: https://github.com/medikoo/type/workflows/Integrate/badge.svg -[build-url]: https://github.com/medikoo/type/actions?query=workflow%3AIntegrate -[cov-image]: https://img.shields.io/codecov/c/github/medikoo/type.svg -[cov-url]: https://codecov.io/gh/medikoo/type -[npm-image]: https://img.shields.io/npm/v/type.svg -[npm-url]: https://www.npmjs.com/package/type - -## Security contact information - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/array-length/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/array-length/coerce.js deleted file mode 100644 index 3dbbf9777262a2e0147e77a4cae81666877d689b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/array-length/coerce.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var coerceToSafeInteger = require("../safe-integer/coerce"); - -module.exports = function (value) { - value = coerceToSafeInteger(value); - if (!value) return value; - if (value < 0) return null; - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/array-length/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/array-length/ensure.js deleted file mode 100644 index 2b48ddcf0b9901dcd6f949cd9b9d9c2eb80e46b5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/array-length/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected an array length for %n, received %v" - : "%v is not an array length"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/array-like/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/array-like/ensure.js deleted file mode 100644 index 0d1a9f755a478f128e512c56e99aedfe18053f41..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/array-like/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value, arguments[1])) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected an array like for %n, received %v" - : "%v is not an array like"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/array-like/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/array-like/is.js deleted file mode 100644 index 7778fedea95e5498a61efe93b8e93a2adbe40692..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/array-like/is.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var coerceToArrayLength = require("../array-length/coerce") - , isObject = require("../object/is"); - -module.exports = function (value/*, options*/) { - if (!isObject(value)) { - var options = arguments[1]; - if (isObject(options) && options.allowString && typeof value === "string") return true; - return false; - } - - if (typeof value === "function") return false; - - var length; - try { length = value.length; } - catch (error) { return false; } - - if (coerceToArrayLength(length) === null) return false; - return true; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/array/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/array/ensure.js deleted file mode 100644 index e364693a63c954c71599837f439aa6b3dfad8ff3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/array/ensure.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , resolveErrorMessage = require("../lib/resolve-error-message") - , toShortString = require("../lib/to-short-string") - , ensurePlainFunction = require("../plain-function/ensure") - , is = require("./is"); - -var objHasOwnProperty = Object.prototype.hasOwnProperty, invalidItemsLimit = 3; - -module.exports = function (value/*, options*/) { - var options = arguments[1]; - var mainErrorMessage = - options && options.name ? "Expected an array for %n, received %v" : "%v is not an array"; - if (!is(value)) return resolveException(value, mainErrorMessage, options); - if (!options) return value; - - var ensureItem = ensurePlainFunction(options.ensureItem, { isOptional: true }); - if (ensureItem) { - var coercedValue = [], invalidItems; - for (var index = 0, length = value.length; index < length; ++index) { - if (!objHasOwnProperty.call(value, index)) continue; - var coercedItem; - try { - coercedItem = ensureItem(value[index]); - } catch (error) { - if (!invalidItems) invalidItems = []; - if (invalidItems.push(toShortString(value[index])) === invalidItemsLimit) break; - } - if (invalidItems) continue; - coercedValue[index] = coercedItem; - } - if (invalidItems) { - throw new TypeError( - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Following items are invalid: " + - invalidItems.join(", ") - ); - } - return coercedValue; - } - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/array/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/array/is.js deleted file mode 100644 index 13fd8d39eb12e447cf8ae6d1c1b7cbfb04afda1d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/array/is.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -var isArray; -if (typeof Array.isArray === "function") { - isArray = Array.isArray; -} else { - var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call([]); - isArray = function (value) { return objectToString.call(value) === objectTaggedString; }; -} - -module.exports = function (value) { - if (!isArray(value)) return false; - - // Sanity check (reject objects which do not expose common Array interface) - if (!hasOwnProperty.call(value, "length")) return false; - try { - if (typeof value.length !== "number") return false; - if (typeof value.push !== "function") return false; - if (typeof value.splice !== "function") return false; - } catch (error) { - return false; - } - - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/big-int/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/big-int/coerce.js deleted file mode 100644 index a600a20d2b6e6c4e97c42729bfaaf6256c864cec..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/big-int/coerce.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var isValue = require("../value/is"); - -// Sanity BigInt support check -BigInt(0); - -module.exports = function (value) { - if (!isValue(value)) return null; - if (typeof value === "bigint") return value; - try { return BigInt(value); } - catch (error) { return null; } -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/big-int/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/big-int/ensure.js deleted file mode 100644 index 9cca0cfccae273b54199ba4eaed2a59826cc068b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/big-int/ensure.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected bigint for %n, received %v" : "%v is not a bigint"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/constructor/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/constructor/ensure.js deleted file mode 100644 index 245411e0841cd6311bda2088cdaed1471e8dd7e4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/constructor/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a constructor function for %n, received %v" - : "%v is not a constructor function"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/constructor/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/constructor/is.js deleted file mode 100644 index 058a1564de7cede5d07ae86d790b7ab080cf5e1b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/constructor/is.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var isFunction = require("../function/is"); - -var constructorRe = /^\s*(?:class[\s{/}]|function[\s(])/ - , functionToString = Function.prototype.toString; - -module.exports = function (value) { - if (!isFunction(value)) return false; - if (!constructorRe.test(functionToString.call(value))) return false; - return true; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/date/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/date/ensure.js deleted file mode 100644 index 0fae4d3da77aabe341990b5f9286a4b3463a274a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/date/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a date for %n, received %v" : "%v is not a date"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/date/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/date/is.js deleted file mode 100644 index 0754085fbf253e0bea48841100e00da8f560ecc9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/date/is.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -var dateValueOf = Date.prototype.valueOf; - -module.exports = function (value) { - if (!value) return false; - - try { - // Sanity check (reject objects which do not expose common Date interface) - if (typeof value.getFullYear !== "function") return false; - if (typeof value.getTimezoneOffset !== "function") return false; - if (typeof value.setFullYear !== "function") return false; - - // Ensure its native Date object (has [[DateValue]] slot) - dateValueOf.call(value); - } catch (error) { - return false; - } - - // Ensure it hosts valid date - if (isNaN(value)) return false; - - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/array-length.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/array-length.md deleted file mode 100644 index cca7d8ad8730a4dc8a4acf3999f8db57ab907ff5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/array-length.md +++ /dev/null @@ -1,27 +0,0 @@ -# Array length - -_number_ primitive that conforms as valid _array length_ - -## `array-length/coerce` - -Follows [`safe-integer/coerce`](safe-integer.md#safe-integercoerce) but returns `null` in place of values which are below `0` - -```javascript -const coerceToArrayLength = require("type/safe-integer/coerce"); - -coerceToArrayLength("12.95"); // 12 -coerceToArrayLength(9007199254740992); // null -coerceToArrayLength(null); // null -``` - -## `array-length/ensure` - -If given argument is an _array length_ coercible value (via [`array-length/coerce`](#array-lengthcoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureArrayLength = require("type/array-length/ensure"); - -ensureArrayLength(12.93); // "12" -ensureArrayLength(9007199254740992); // Thrown TypeError: 9007199254740992 is not a valid array length -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/array-like.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/array-like.md deleted file mode 100644 index 2a48df83b3407d7f3928d26e4efb56ec885427a7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/array-like.md +++ /dev/null @@ -1,33 +0,0 @@ -# Array Like - -_Array-like_ value (any value with `length` property) - -## `array-like/is` - -Restricted _array-like_ confirmation. Returns true for every value that meets following contraints - -- is an _object_ (or with `allowString` option, a _string_) -- is not a _function_ -- Exposes `length` that meets [`array-length`](array-length.md#array-lengthcoerce) constraints - -```javascript -const isArrayLike = require("type/array-like/is"); - -isArrayLike([]); // true -isArrayLike({}); // false -isArrayLike({ length: 0 }); // true -isArrayLike("foo"); // false -isArrayLike("foo", { allowString: true }); // true -``` - -## `array-like/ensure` - -If given argument is an _array-like_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureArrayLike = require("type/array-like/ensure"); - -ensureArrayLike({ length: 0 }); // { length: 0 } -ensureArrayLike("foo", { allowString: true }); // "foo" -ensureArrayLike({}); // Thrown TypeError: null is not an iterable -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/array.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/array.md deleted file mode 100644 index 0c6ac4e960b732337f51be1e8e885599c2304ced..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/array.md +++ /dev/null @@ -1,46 +0,0 @@ -# Array - -_Array_ instance - -## `array/is` - -Confirms if given object is a native array - -```javascript -const isArray = require("type/array/is"); - -isArray([]); // true -isArray({}); // false -isArray("foo"); // false -``` - -## `array/ensure` - -If given argument is an array, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureArray = require("type/array/ensure"); - -ensureArray(["foo"]); // ["foo"] -ensureArray("foo"); // Thrown TypeError: foo is not an array -``` - -### Confirming on items - -Items can be validated by passing `ensureItem` option. Note that in this case: - -- A newly created instance of an array with coerced item values is returned -- Error message lists up to three items which are invalid - -```javascript -const ensureString = require("type/string/ensure"); - -ensureArray([12], { ensureItem: ensureString }); // ["12"] - -/* - Below invocation with crash with: - TypeError: 23, [object Object], [object Object] is not a valid array. - Following items are invalid: [object Object], [object Object] -*/ -ensureArray([23, {}, {}], { ensureItem: ensureString }); -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/big-int.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/big-int.md deleted file mode 100644 index 78626fdb7e956092aff422ef8d8b6cf96b8ab304..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/big-int.md +++ /dev/null @@ -1,27 +0,0 @@ -# BigInt - -_bigint_ primitive - -## `big-int/coerce` - -BigInt coercion. If value can be coerced by `BigInt` its result is returned. -For all other values `null` is returned - -```javascript -const coerceToBigInt = require("type/big-int/coerce"); - -coerceToBigInt(12); // 12n -coerceToBigInt(undefined); // null -``` - -## `big-int/ensure` - -If given argument is a _bigint_ coercible value (via [`big-int/coerce`](#big-intcoerce)) returns result bigint. -Otherwise `TypeError` is thrown. - -```javascript -const ensureBigInt = require("type/big-int/ensure"); - -ensureBigInt(12); // 12n -ensureBigInt(null); // Thrown TypeError: null is not a bigint -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/constructor.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/constructor.md deleted file mode 100644 index 172462af4af8423626d9b3bb5b437539105a6339..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/constructor.md +++ /dev/null @@ -1,28 +0,0 @@ -# Constructor - -A _Function_ instance that's a _constructor_ (either regular function or _class_) - -## `constructor/is` - -Confirms if given object is a constructor function\_ - -```javascript -const isConstructor = require("type/constructor/is"); - -isConstructor(function () {}); // true -isConstructor(() => {}); // false -isConstructor(class {}); // true -isConstructor("foo"); // false -``` - -## `constructor/ensure` - -If given argument is a _constructor function_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureConstructor = require("type/constructor/ensure"); - -const fn = function () {}; -ensureConstructor(fn); // fn -ensureConstructor(() => {}); // Thrown TypeError: () => {} is not a constructor function -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/date.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/date.md deleted file mode 100644 index 98d365400671f4ad32d84f454ba397cb3414aa15..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/date.md +++ /dev/null @@ -1,28 +0,0 @@ -# Date - -_Date_ instance - -## `date/is` - -Confirms if given object is a native date, and is not an _Invalid Date_ - -```javascript -const isDate = require("type/date/is"); - -isDate(new Date()); // true -isDate(new Date("Invalid date")); // false -isDate(Date.now()); // false -isDate("foo"); // false -``` - -## `date/ensure` - -If given argument is a date object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureDate = require("type/date/ensure"); - -const date = new Date(); -ensureDate(date); // date -ensureDate(123123); // Thrown TypeError: 123123 is not a date object -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/ensure.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/ensure.md deleted file mode 100644 index c3a9527a8269efe615387f867a11e764a1720553..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/ensure.md +++ /dev/null @@ -1,40 +0,0 @@ -# `ensure(validationDatum1[, ...validationDatumN[, options]])` - -Provides a complete cumulated input validation for an API endpoint. Validates multiple input arguments and consolidates eventual errors into one. - -## Arguments - -### `validationDatum1[, ...validationDatumN]` - -For each argument to be validated a `validationDatum` of following stucture should be defined: - -```javascript -[argumentName, inputValue, ensureFunction, (options = {})]; -``` - -- `argumentName` - Name of validated argument (used for meaningful error messaging) -- `inputValue` - An argument value as passed to function -- `ensureFunction` - An `ensureX` function with which argument should be validated (e.g. if we're after string, then we need [string/ensure](string.md#stringensure)) -- `options` - Optional, extra options to be passed to `ensureX` function - -### `[options]` - -Eventual options be passed to underlying `ensureX` functions. If custom error constructor is passed with an `Error` option, then cumulated error is created with this constructor. - -## Usage example - -```javascript -const ensure = require("type/ensure"); -const ensureString = require("type/string/ensure"); -const ensureNaturalNumber = require("type/natural-number/ensure"); - -const resolveRepositoryIssue = (repoName, issueNumber) => { - // Validate input - [repoName, issueNumber] = ensure( - ["repoName", repoName, ensureString], - ["issueNumber", issueNumber, ensureNaturalNumber], - { Error: UserError } - ); - // ... logic -}; -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/error.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/error.md deleted file mode 100644 index c77933336e64d7f40b7d4734377f994b544028e1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/error.md +++ /dev/null @@ -1,26 +0,0 @@ -# Error - -_Error_ instance - -## `error/is` - -Confirms if given object is a native error object - -```javascript -const isError = require("type/error/is"); - -isError(new Error()); // true -isError({ message: "Fake error" }); // false -``` - -## `error/ensure` - -If given argument is an error object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureError = require("type/error/ensure"); - -const someError = new Error("Some error"); -ensureError(someError); // someError -ensureError({ message: "Fake error" }); // Thrown TypeError: [object Object] is not an error object -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/finite.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/finite.md deleted file mode 100644 index 68786caffb4ecff5af6bc29b33d4525292c26336..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/finite.md +++ /dev/null @@ -1,27 +0,0 @@ -# Finite Number - -Finite _number_ primitive - -## `finite/coerce` - -Follows [`number/coerce`](number.md#numbercoerce) additionally rejecting `Infinity` and `-Infinity` values (`null` is returned if given values coerces to them) - -```javascript -const coerceToFinite = require("type/finite/coerce"); - -coerceToFinite("12"); // 12 -coerceToFinite(Infinity); // null -coerceToFinite(null); // null -``` - -## `finite/ensure` - -If given argument is a finite number coercible value (via [`finite/coerce`](#finitecoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureFinite = require("type/finite/ensure"); - -ensureFinite(12); // "12" -ensureFinite(null); // Thrown TypeError: null is not a finite number -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/function.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/function.md deleted file mode 100644 index 23f382734c5692d13abe38a69b290b5643a6a90b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/function.md +++ /dev/null @@ -1,28 +0,0 @@ -# Function - -_Function_ instance - -## `function/is` - -Confirms if given object is a native function - -```javascript -const isFunction = require("type/function/is"); - -isFunction(function () {}); // true -isFunction(() => {}); // true -isFunction(class {}); // true -isFunction("foo"); // false -``` - -## `function/ensure` - -If given argument is a function object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureFunction = require("type/function/ensure"); - -const fn = function () {}; -ensureFunction(fn); // fn -ensureFunction(/foo/); // Thrown TypeError: /foo/ is not a function -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/integer.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/integer.md deleted file mode 100644 index 9260a460cddcb0774263493d2f8634dbe3709f7c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/integer.md +++ /dev/null @@ -1,27 +0,0 @@ -# Integer Number - -Integer _number_ primitive - -## `integer/coerce` - -Follows [`finite/coerce`](finite.md#finitecoerce) additionally stripping decimal part from the number - -```javascript -const coerceToInteger = require("type/integer/coerce"); - -coerceToInteger("12.95"); // 12 -coerceToInteger(Infinity); // null -coerceToInteger(null); // null -``` - -## `integer/ensure` - -If given argument is an integer coercible value (via [`integer/coerce`](#integercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureInteger = require("type/integer/ensure"); - -ensureInteger(12.93); // "12" -ensureInteger(null); // Thrown TypeError: null is not an integer -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/iterable.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/iterable.md deleted file mode 100644 index 862e6c88c276873bb9b409ac48b1809ac8170776..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/iterable.md +++ /dev/null @@ -1,65 +0,0 @@ -# Iterable - -Value which implements _iterable_ protocol - -## `iterable/is` - -Confirms if given object is an _iterable_ and is not a _string_ (unless `allowString` option is passed) - -```javascript -const isIterable = require("type/iterable/is"); - -isIterable([]); // true -isIterable({}); // false -isIterable("foo"); // false -isIterable("foo", { allowString: true }); // true -``` - -Supports also `denyEmpty` option - -```javascript -isIterable([], { denyEmpty: true }); // false -isIterable(["foo"], { denyEmpty: true }); // true -``` - -## `iterable/ensure` - -If given argument is an _iterable_, it is returned back. Otherwise `TypeError` is thrown. -By default _string_ primitives are rejected unless `allowString` option is passed. - -```javascript -const ensureIterable = require("type/iterable/ensure"); - -ensureIterable([]); // [] -ensureIterable("foo", { allowString: true }); // "foo" -ensureIterable({}); // Thrown TypeError: null is not expected iterable -``` - -### Denying empty iterables - -Pass `denyEmpty` option to require non empty iterables - -```javascript -ensureIterable([], { denyEmpty: true }); // Thrown TypeError: [] is not expected iterable -``` - -### Confirming on items - -Items can be validated by passing `ensureItem` option. Note that in this case: - -- A newly created instance of array with coerced values is returned -- Error message lists up to three invalid items - -```javascript -const ensureString = require("type/string/ensure"); - -ensureIterable(new Set(["foo", 12]), { ensureItem: ensureString }); // ["foo", "12"] - -/* - Below invocation with crash with: - TypeError: [object Set] is not expected iterable value. - Following items are invalid: - - [object Object] -*/ -ensureIterable(new Set(["foo", {}]), { ensureItem: ensureString }); -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/map.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/map.md deleted file mode 100644 index c12802270aaed44ef9c2a1303bd87d6086439743..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/map.md +++ /dev/null @@ -1,27 +0,0 @@ -# Map - -_Map_ instance - -## `map/is` - -Confirms if given object is a native _map_ - -```javascript -const isMap = require("type/map/is"); - -isMap(new Map()); // true -isMap(new Set()); // false -isMap({}); // false -``` - -## `map/ensure` - -If given argument is a _map_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureMap = require("type/map/ensure"); - -const map = new Map(); -ensureMap(map); // map -eensureMap({}); // Thrown TypeError: [object Object] is not a map -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/natural-number.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/natural-number.md deleted file mode 100644 index c91ee164a536c1fb78e6168e6f3e72f568aac014..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/natural-number.md +++ /dev/null @@ -1,27 +0,0 @@ -# Natural Number - -Natural _number_ primitive - -## `natural-number/coerce` - -Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` for values below `0` - -```javascript -const coerceToNaturalNumber = require("type/natural-number/coerce"); - -coerceToNaturalNumber("12.95"); // 12 -coerceToNaturalNumber(-120); // null -coerceToNaturalNumber(null); // null -``` - -## `natural-number/ensure` - -If given argument is a natural number coercible value (via [`natural-number/coerce`](#natural-numbercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureNaturalNumber = require("type/natural-number/ensure"); - -ensureNaturalNumber(12.93); // "12" -ensureNaturalNumber(-230); // Thrown TypeError: null is not a natural number -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/number.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/number.md deleted file mode 100644 index 5f4dfa92499e80df3a3f6b49bf1e40932101d02b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/number.md +++ /dev/null @@ -1,33 +0,0 @@ -# Number - -_number_ primitive - -## `number/coerce` - -Restricted number coercion. Returns number presentation for every value that follows below constraints - -- is implicitly coercible to number -- is neither `null` nor `undefined` -- is not `NaN` and doesn't coerce to `NaN` - -For all other values `null` is returned - -```javascript -const coerceToNumber = require("type/number/coerce"); - -coerceToNumber("12"); // 12 -coerceToNumber({}); // null -coerceToNumber(null); // null -``` - -## `number/ensure` - -If given argument is a number coercible value (via [`number/coerce`](#numbercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureNumber = require("type/number/ensure"); - -ensureNumber(12); // "12" -ensureNumber(null); // Thrown TypeError: null is not a number -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/object.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/object.md deleted file mode 100644 index ed43b1fa4028389e01aedb066bbae55c96bb1f63..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/object.md +++ /dev/null @@ -1,28 +0,0 @@ -# Object - -_Object_, any non-primitive value - -## `object/is` - -Confirms if passed value is an object - -```javascript -const isObject = require("type/object/is"); - -isObject({}); // true -isObject(true); // false -isObject(null); // false -``` - -## `object/ensure` - -If given argument is an object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureObject = require("type/object/ensure"); - -const obj = {}; - -ensureObject(obj); // obj -ensureString(null); // Thrown TypeError: null is not an object -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/plain-function.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/plain-function.md deleted file mode 100644 index e3a8895bc941b390263755cd1055d3114047e17a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/plain-function.md +++ /dev/null @@ -1,28 +0,0 @@ -# Plain Function - -A _Function_ instance that is not a _Class_ - -## `plain-function/is` - -Confirms if given object is a _plain function_ - -```javascript -const isPlainFunction = require("type/plain-function/is"); - -isPlainFunction(function () {}); // true -isPlainFunction(() => {}); // true -isPlainFunction(class {}); // false -isPlainFunction("foo"); // false -``` - -## `plain-function/ensure` - -If given argument is a _plain function_ object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensurePlainFunction = require("type/function/ensure"); - -const fn = function () {}; -ensurePlainFunction(fn); // fn -ensurePlainFunction(class {}); // Thrown TypeError: class is not a plain function -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/plain-object.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/plain-object.md deleted file mode 100644 index ce3f522580c8a768dc87f690011c8d1160f30c03..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/plain-object.md +++ /dev/null @@ -1,69 +0,0 @@ -# Plain Object - -A _plain object_ - -- Inherits directly from `Object.prototype` or `null` -- Is not a constructor's `prototype` property - -## `plain-object/is` - -Confirms if given object is a _plain object_ - -```javascript -const isPlainObject = require("type/plain-object/is"); - -isPlainObject({}); // true -isPlainObject(Object.create(null)); // true -isPlainObject([]); // false -``` - -## `plain-object/ensure` - -If given argument is a plain object it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensurePlainObject = require("type/plain-object/ensure"); - -ensurePlainObject({}); // {} -ensurePlainObject("foo"); // Thrown TypeError: foo is not a plain object -``` - -### Confirming on keys - -Keys can be validated by passing `allowedKeys` option. Note that in this case: - -- Error message lists up to three invalid keys - -```javascript -const allowedKeys = ["foo"]; - -ensurePlainObject({}, { allowedKeys }); // {} -ensurePlainObject({ foo: "bar" }, { allowedKeys }); // { foo: 'bar' } - -/* - Below invocation with crash with: - TypeError: [object Object] is not a valid plain object. - Following keys are unexpected: lorem, ipsum -*/ -ensurePlainObject({ foo: "bar", lorem: 1, ipsum: 2 }, { allowedKeys }); -``` - -### Confirming on property values - -Property values can be validated by passing `ensurePropertyValue` option. Note that in this case: - -- A newly created instance of plain object with coerced values is returned -- Error message lists up to three keys that contain invalid values - -```javascript -const ensureString = require("type/string/ensure"); - -ensurePlainObject({ foo: 12 }, { ensurePropertyValue: ensureString }); // { foo: '12' } - -/* - Below invocation with crash with: - TypeError: [object Object] is not a valid plain object. - Valuees for following keys are invalid: lorem, ipsum -*/ -ensurePlainObject({ foo: 23, lorem: {}, ipsum: {} }, { ensurePropertyValue: ensureString }); -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/promise.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/promise.md deleted file mode 100644 index ce387949edc183aa847e1d33426d786c079e1088..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/promise.md +++ /dev/null @@ -1,27 +0,0 @@ -# Promise - -_Promise_ instance - -## `promise/is` - -Confirms if given object is a native _promise_ - -```javascript -const isPromise = require("type/promise/is"); - -isPromise(Promise.resolve()); // true -isPromise({ then: () => {} }); // false -isPromise({}); // false -``` - -## `promise/ensure` - -If given argument is a promise, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensurePromise = require("type/promise/ensure"); - -const promise = Promise.resolve(); -ensurePromise(promise); // promise -eensurePromise({}); // Thrown TypeError: [object Object] is not a promise -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/prototype.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/prototype.md deleted file mode 100644 index 926c256e15dac0584c9061716c906fd793180a2c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/prototype.md +++ /dev/null @@ -1,15 +0,0 @@ -# Prototype - -Some constructor's `prototype` property - -## `prototype/is` - -Confirms if given object serves as a _prototype_ property - -```javascript -const isPrototype = require("type/prototype/is"); - -isPrototype({}); // false -isPrototype(Object.prototype); // true -isPrototype(Array.prototype); // true -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/reg-exp.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/reg-exp.md deleted file mode 100644 index 00d081c3ed25f1161892287a403d2981b8bada8b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/reg-exp.md +++ /dev/null @@ -1,26 +0,0 @@ -# RegExp - -_RegExp_ instance - -## `reg-exp/is` - -Confirms if given object is a native regular expression object - -```javascript -const isRegExp = require("type/reg-exp/is"); - -isRegExp(/foo/); -isRegExp({}); // false -isRegExp("foo"); // false -``` - -## `reg-exp/ensure` - -If given argument is a regular expression object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureRegExp = require("type/reg-exp/ensure"); - -ensureRegExp(/foo/); // /foo/ -ensureRegExp("foo"); // Thrown TypeError: null is not a regular expression object -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/safe-integer.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/safe-integer.md deleted file mode 100644 index cf4bb1c8d7f1763377966a41a377a024f4e505e0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/safe-integer.md +++ /dev/null @@ -1,27 +0,0 @@ -# Safe Integer Number - -Safe integer _number_ primitive - -## `safe-integer/coerce` - -Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` in place of values which are beyond `Number.MIN_SAFE_INTEGER` and `Number.MAX_SAFE_INTEGER` range. - -```javascript -const coerceToSafeInteger = require("type/safe-integer/coerce"); - -coerceToInteger("12.95"); // 12 -coerceToInteger(9007199254740992); // null -coerceToInteger(null); // null -``` - -## `safe-integer/ensure` - -If given argument is a safe integer coercible value (via [`safe-integer/coerce`](#safe-integercoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureSafeInteger = require("type/safe-integer/ensure"); - -ensureSafeInteger(12.93); // "12" -ensureSafeInteger(9007199254740992); // Thrown TypeError: null is not a safe integer -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/set.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/set.md deleted file mode 100644 index 33f8876802d2d3228903555ef8dec28c59b35893..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/set.md +++ /dev/null @@ -1,27 +0,0 @@ -# Set - -_Set_ instance - -## `set/is` - -Confirms if given object is a native set\_ - -```javascript -const isSet = require("type/set/is"); - -isSet(new Set()); // true -isSet(new Map()); // false -isSet({}); // false -``` - -## `Set/ensure` - -If given argument is a _set_, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureSet = require("type/set/ensure"); - -const set = new Set(); -ensureSet(set); // set -eensureSet({}); // Thrown TypeError: [object Object] is not a set -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/string.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/string.md deleted file mode 100644 index 051b4a3d8158eff159594302027c88f8c76cd121..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/string.md +++ /dev/null @@ -1,32 +0,0 @@ -# String - -_string_ primitive - -## `string/coerce` - -Restricted string coercion. Returns string presentation for every value that follows below constraints - -- is implicitly coercible to string -- is neither`null` nor `undefined` -- its `toString` method is not `Object.prototype.toString` - -For all other values `null` is returned - -```javascript -const coerceToString = require("type/string/coerce"); - -coerceToString(12); // "12" -coerceToString(undefined); // null -``` - -## `string/ensure` - -If given argument is a string coercible value (via [`string/coerce`](#stringcoerce)) returns result string. -Otherwise `TypeError` is thrown. - -```javascript -const ensureString = require("type/string/ensure"); - -ensureString(12); // "12" -ensureString(null); // Thrown TypeError: null is not a string -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/thenable.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/thenable.md deleted file mode 100644 index 1bdf92dd2058726362d938ce9bf2e48b896bba88..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/thenable.md +++ /dev/null @@ -1,27 +0,0 @@ -# Thenable - -_Thenable_ object (an object with `then` method) - -## `thenable/is` - -Confirms if given object is a _thenable_ - -```javascript -const isThenable = require("type/thenable/is"); - -isThenable(Promise.resolve()); // true -isThenable({ then: () => {} }); // true -isThenable({}); // false -``` - -## `thenable/ensure` - -If given argument is a _thenable_ object, it is returned back. Otherwise `TypeError` is thrown. - -```javascript -const ensureThenable = require("type/thenable/ensure"); - -const promise = Promise.resolve(); -ensureThenable(promise); // promise -ensureThenable({}); // Thrown TypeError: [object Object] is not a thenable object -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/time-value.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/time-value.md deleted file mode 100644 index 98e9e8eb07b6e777749ff286710a6216c9ffaf6d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/time-value.md +++ /dev/null @@ -1,27 +0,0 @@ -# Time value - -_number_ primitive which is a valid _time value_ (as used internally in _Date_ instances) - -## `time-value/coerce` - -Follows [`integer/coerce`](integer.md#integercoerce) but returns `null` in place of values which go beyond 100 000 0000 days from unix epoch - -```javascript -const coerceToTimeValue = require("type/time-value/coerce"); - -coerceToTimeValue(12312312); // true -coerceToTimeValue(Number.MAX_SAFE_INTEGER); // false -coerceToTimeValue("foo"); // false -``` - -## `time-value/ensure` - -If given argument is a _time value_ coercible value (via [`time-value/coerce`](#time-valuecoerce)) returns result number. -Otherwise `TypeError` is thrown. - -```javascript -const ensureTimeValue = require("type/time-value/ensure"); - -ensureTimeValue(12.93); // "12" -ensureTimeValue(Number.MAX_SAFE_INTEGER); // Thrown TypeError: null is not a natural number -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/docs/value.md b/ThinFilm_Analyzer/frontend/node_modules/type/docs/value.md deleted file mode 100644 index 1310609b9cb80a939589221d8cc81b4b47a35e4c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/docs/value.md +++ /dev/null @@ -1,27 +0,0 @@ -# Value - -_Value_, any value that's neither `null` nor `undefined` . - -## `value/is` - -Confirms whether passed argument is a _value_ - -```javascript -const isValue = require("type/value/is"); - -isValue({}); // true -isValue(null); // false -``` - -## `value/ensure` - -Ensures if given argument is a _value_. If it's a value it is returned back, if not `TypeError` is thrown - -```javascript -const ensureValue = require("type/value/ensure"); - -const obj = {}; - -ensureValue(obj); // obj -ensureValue(null); // Thrown TypeError: Cannot use null -``` diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/ensure.js deleted file mode 100644 index 7fe8220754a15d72b5c8b40437e16075f54ae458..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ensure.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; - -var isArray = require("./array/is") - , toShortString = require("./lib/to-short-string"); - -var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; - -var assign = function (target, source) { - for (var key in source) { - if (objPropertyIsEnumerable.call(source, key)) target[key] = source[key]; - } -}; - -module.exports = function (validationDatum1/*, ...validationDatumN, options */) { - var validationData = [validationDatum1]; - var globalOptions; - if (arguments.length > 1) { - var hasOptions = !isArray(arguments[arguments.length - 1]); - if (hasOptions) globalOptions = arguments[arguments.length - 1]; - var lastDatumIndex = hasOptions ? arguments.length - 2 : arguments.length - 1; - for (var i = 1; i <= lastDatumIndex; ++i) validationData.push(arguments[i]); - } - var result = [], errors; - for (var j = 0; j < validationData.length; ++j) { - var validationDatum = validationData[j]; - var options = { name: validationDatum[0] }; - if (globalOptions) assign(options, globalOptions); - if (validationDatum[3]) assign(options, validationDatum[3]); - var resultItem; - if (typeof validationDatum[2] !== "function") { - throw new TypeError(toShortString(validationDatum[2]) + " is not a function"); - } - try { - resultItem = validationDatum[2](validationDatum[1], options); - } catch (error) { - if (!errors) errors = []; - errors.push(error); - } - if (errors) continue; - result.push(resultItem); - } - if (!errors) return result; - - if (errors.length === 1) throw errors[0]; - var ErrorConstructor = (globalOptions && globalOptions.Error) || TypeError; - var errorMessage = "Approached following errors:"; - for (var k = 0; k < errors.length; ++k) { - errorMessage += "\n - " + errors[k].message.split("\n").join("\n "); - } - throw new ErrorConstructor(errorMessage); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/error/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/error/ensure.js deleted file mode 100644 index 8b28d855c23d923760b2a7f4bab7db57d66ec9ec..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/error/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected an error for %n, received %v" : "%v is not an error"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/error/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/error/is.js deleted file mode 100644 index bf04c8086930dfe5e3a31bc9bf5ed83bf035882a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/error/is.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is") - , isPlainObject = require("../plain-object/is"); - -var objectToString = Object.prototype.toString; - -// Recognize host specific errors (e.g. DOMException) -var errorTaggedStringRe = /^\[object .*(?:Error|Exception)\]$/ - , errorNameRe = /^[^\s]*(?:Error|Exception)$/; - -module.exports = function (value) { - if (!value) return false; - - var name; - // Sanity check (reject objects which do not expose common Error interface) - try { - name = value.name; - if (typeof name !== "string") return false; - if (typeof value.message !== "string") return false; - } catch (error) { - return false; - } - - // Ensure its a native-like Error object - // (has [[ErrorData]] slot, or was created to resemble one) - // Note: It's not a 100% bulletproof check of confirming that as: - // - In ES2015+ string tag can be overriden via Symbol.toStringTag property - // - Host errors do not share native error tag. Still we rely on assumption that - // tag for each error will end either with `Error` or `Exception` string - // - In pre ES2015 era, no custom errors will share the error tag. - if (!errorTaggedStringRe.test(objectToString.call(value))) { - // Definitely not an ES2015 error instance, but could still be an error - // (created via e.g. CustomError.prototype = Object.create(Error.prototype)) - try { - if (name !== value.constructor.name) return false; - } catch (error) { - return false; - } - if (!errorNameRe.test(name)) return false; - if (isPlainObject(value)) return false; - } - - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/finite/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/finite/coerce.js deleted file mode 100644 index a3783be5e291ff252e2c89fa497a356145e2a994..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/finite/coerce.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -var coerceToNumber = require("../number/coerce"); - -module.exports = function (value) { - value = coerceToNumber(value); - return isFinite(value) ? value : null; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/finite/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/finite/ensure.js deleted file mode 100644 index aac96becaee9dee1d3abbbd460d26f3ad0e77869..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/finite/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a finite number for %n, received %v" - : "%v is not a finite number"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/function/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/function/ensure.js deleted file mode 100644 index d1337017b9a4f3439fa52e514bfa48342a16a7b2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/function/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a function for %n, received %v" - : "%v is not a function"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/function/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/function/is.js deleted file mode 100644 index 981990a7c1f047e94e5c198cdce1f2a21ac1ddee..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/function/is.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -module.exports = function (value) { - if (typeof value !== "function") return false; - - if (!hasOwnProperty.call(value, "length")) return false; - - try { - if (typeof value.length !== "number") return false; - if (typeof value.call !== "function") return false; - if (typeof value.apply !== "function") return false; - } catch (error) { - return false; - } - - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/integer/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/integer/coerce.js deleted file mode 100644 index cba5e17e1a99ff130b200fee31c069a4e1e2bcf0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/integer/coerce.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var coerceToFinite = require("../finite/coerce"); - -var abs = Math.abs, floor = Math.floor; - -module.exports = function (value) { - value = coerceToFinite(value); - if (!value) return value; - return (value > 0 ? 1 : -1) * floor(abs(value)); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/integer/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/integer/ensure.js deleted file mode 100644 index df1a97544fdadeb3bbf3c90ce085e18f85e14522..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/integer/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected an integer for %n, received %v" - : "%v is not an integer"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/iterable/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/iterable/ensure.js deleted file mode 100644 index b1a2489085ea51f0001e0cd65b31e4551f613192..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/iterable/ensure.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , resolveErrorMessage = require("../lib/resolve-error-message") - , toShortString = require("../lib/to-short-string") - , ensurePlainFunction = require("../plain-function/ensure") - , is = require("./is"); - -var invalidItemsLimit = 3; - -module.exports = function (value/*, options*/) { - var options = arguments[1]; - var mainErrorMessage = - options && options.name - ? "Expected an iterable for %n, received %v" - : "%v is not expected iterable"; - if (!is(value, options)) return resolveException(value, mainErrorMessage, options); - if (!options) return value; - - var ensureItem = ensurePlainFunction(options.ensureItem, { isOptional: true }); - if (ensureItem) { - var coercedValue = []; - var iterator = value[Symbol.iterator](); - var item, invalidItems; - while (!(item = iterator.next()).done) { - var newItemValue; - try { - newItemValue = ensureItem(item.value); - } catch (error) { - if (!invalidItems) invalidItems = []; - if (invalidItems.push(item.value) === invalidItemsLimit) break; - } - if (invalidItems) continue; - coercedValue.push(newItemValue); - } - if (invalidItems) { - var errorMessage = - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Following items are invalid:"; - for (var i = 0; i < invalidItems.length; ++i) { - errorMessage += "\n - " + toShortString(invalidItems[i]); - } - throw new TypeError(errorMessage); - } - return coercedValue; - } - - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/iterable/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/iterable/is.js deleted file mode 100644 index d35408cd6e75f5b94f022e8565d31d8c891f92e4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/iterable/is.js +++ /dev/null @@ -1,32 +0,0 @@ -// Polyfills friendly, therefore ES5 syntax - -"use strict"; - -var isObject = require("../object/is"); - -var iteratorSymbol = Symbol.iterator; - -if (!iteratorSymbol) { - throw new Error("Cannot initialize iterator/is due to Symbol.iterator not being implemented"); -} - -module.exports = function (value/*, options*/) { - var options = arguments[1]; - if (!isObject(value)) { - if (!isObject(options) || !options.allowString || typeof value !== "string") return false; - } - try { - if (typeof value[iteratorSymbol] !== "function") return false; - } catch (error) { - return false; - } - if (!options) return true; - if (options.denyEmpty) { - try { - if (value[iteratorSymbol]().next().done) return false; - } catch (error) { - return false; - } - } - return true; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/lib/ensure/min.js b/ThinFilm_Analyzer/frontend/node_modules/type/lib/ensure/min.js deleted file mode 100644 index df878bdc1db65f559c7c1ff4b60f65f8fadbe092..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/lib/ensure/min.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../resolve-exception"); - -module.exports = function (value, coerced, options) { - if (coerced >= options.min) return coerced; - var errorMessage = - options && options.name - ? "Expected %n to be greater or equal " + options.min + ", received %v" - : "%v is not greater or equal " + options.min; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/lib/is-to-string-tag-supported.js b/ThinFilm_Analyzer/frontend/node_modules/type/lib/is-to-string-tag-supported.js deleted file mode 100644 index 254d8b3d04929699180d6916f075e644b0fc41ef..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/lib/is-to-string-tag-supported.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/lib/resolve-error-message.js b/ThinFilm_Analyzer/frontend/node_modules/type/lib/resolve-error-message.js deleted file mode 100644 index 3cb000b5954c84533bf65ed4ff81d3f167aa7716..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/lib/resolve-error-message.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var stringCoerce = require("../string/coerce") - , toShortString = require("./to-short-string"); - -module.exports = function (errorMessage, value, inputOptions) { - if (inputOptions && inputOptions.errorMessage) { - errorMessage = stringCoerce(inputOptions.errorMessage); - } - - var valueInsertIndex = errorMessage.indexOf("%v"); - var valueToken = valueInsertIndex > -1 ? toShortString(value) : null; - if (inputOptions && inputOptions.name) { - var nameInsertIndex = errorMessage.indexOf("%n"); - if (nameInsertIndex > -1) { - if (valueInsertIndex > -1) { - var firstToken, secondToken, firstInsertIndex, secondInsertIndex; - if (nameInsertIndex > valueInsertIndex) { - firstToken = valueToken; - firstInsertIndex = valueInsertIndex; - secondToken = inputOptions.name; - secondInsertIndex = nameInsertIndex; - } else { - firstToken = inputOptions.name; - firstInsertIndex = nameInsertIndex; - secondToken = valueToken; - secondInsertIndex = valueInsertIndex; - } - return ( - errorMessage.slice(0, firstInsertIndex) + - firstToken + - errorMessage.slice(firstInsertIndex + 2, secondInsertIndex) + - secondToken + - errorMessage.slice(secondInsertIndex + 2) - ); - } - return ( - errorMessage.slice(0, nameInsertIndex) + - inputOptions.name + - errorMessage.slice(nameInsertIndex + 2) - ); - } - } - if (valueInsertIndex > -1) { - return ( - errorMessage.slice(0, valueInsertIndex) + - valueToken + - errorMessage.slice(valueInsertIndex + 2) - ); - } - return errorMessage; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/lib/resolve-exception.js b/ThinFilm_Analyzer/frontend/node_modules/type/lib/resolve-exception.js deleted file mode 100644 index 6c99286e4a8c6c4ced2d4ab6e8889db4d729b7c2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/lib/resolve-exception.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var isValue = require("../value/is") - , resolveErrorMessage = require("./resolve-error-message"); - -module.exports = function (value, defaultMessage, inputOptions) { - if (inputOptions && !isValue(value)) { - if ("default" in inputOptions) return inputOptions["default"]; - if (inputOptions.isOptional) return null; - } - var ErrorConstructor = (inputOptions && inputOptions.Error) || TypeError; - var error = new ErrorConstructor(resolveErrorMessage(defaultMessage, value, inputOptions)); - if (inputOptions && inputOptions.errorCode) error.code = inputOptions.errorCode; - throw error; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/lib/safe-to-string.js b/ThinFilm_Analyzer/frontend/node_modules/type/lib/safe-to-string.js deleted file mode 100644 index a756dd37291685ca7dd049864d8dc36debb4c9c7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/lib/safe-to-string.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -module.exports = function (value) { - try { - return value.toString(); - } catch (error) { - try { return String(value); } - catch (error2) { return null; } - } -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/lib/to-short-string.js b/ThinFilm_Analyzer/frontend/node_modules/type/lib/to-short-string.js deleted file mode 100644 index c8d7ed885a9020eef8d06eded468ae4104370a77..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/lib/to-short-string.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -var safeToString = require("./safe-to-string"); - -var reNewLine = /[\n\r\u2028\u2029]/g; - -module.exports = function (value) { - var string = safeToString(value); - if (string === null) return ""; - // Trim if too long - if (string.length > 100) string = string.slice(0, 99) + "…"; - // Replace eventual new lines - string = string.replace(reNewLine, function (char) { - switch (char) { - case "\n": - return "\\n"; - case "\r": - return "\\r"; - case "\u2028": - return "\\u2028"; - case "\u2029": - return "\\u2029"; - /* istanbul ignore next */ - default: - throw new Error("Unexpected character"); - } - }); - return string; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/map/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/map/ensure.js deleted file mode 100644 index d17c3168d882c57bc38716768abeb9ca6e08beb2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/map/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a map for %n, received %v" : "%v is not a map"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/map/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/map/is.js deleted file mode 100644 index 4ed7baea978ed5174d4dbd2c226634c8ac091d7d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/map/is.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -// In theory we could rely on Symbol.toStringTag directly, -// still early native implementation (e.g. in FF) predated symbols -var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call(new Map()); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common Promise interface) - try { - if (typeof value.set !== "function") return false; - if (typeof value.get !== "function") return false; - if (typeof value.has !== "function") return false; - if (typeof value.clear !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native Promise object (has [[MapData]] slot) - // Note: it's not 100% precise as string tag may be overriden - // and other objects could be hacked to expose it - if (objectToString.call(value) !== objectTaggedString) return false; - - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/natural-number/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/natural-number/coerce.js deleted file mode 100644 index 4b7931c5f662a0f9d92d1e02760eecfc0d02ceff..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/natural-number/coerce.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -var coerceToInteger = require("../integer/coerce"); - -module.exports = function (value) { - value = coerceToInteger(value); - if (!value) return value; - if (value < 0) return null; - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/natural-number/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/natural-number/ensure.js deleted file mode 100644 index 1f09174a467ee847081d71434fbf4dbbedc30e5c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/natural-number/ensure.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , ensureMin = require("../lib/ensure/min") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value), options = arguments[1]; - if (coerced !== null) { - if (options) { - if (options.min) ensureMin(value, coerced, options); - } - return coerced; - } - - var errorMessage = - options && options.name - ? "Expected a natural number for %n, received %v" - : "%v is not a natural number"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/number/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/number/coerce.js deleted file mode 100644 index 1bb15125c3a14c6d015187270444d55bfc5ad79f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/number/coerce.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var isValue = require("../value/is"); - -module.exports = function (value) { - if (!isValue(value)) return null; - try { - value = +value; // Ensure implicit coercion - } catch (error) { - return null; - } - if (isNaN(value)) return null; - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/number/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/number/ensure.js deleted file mode 100644 index 9ae705dcd683675ca9e298f87bd72dee1d10000d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/number/ensure.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a number for %n, received %v" : "%v is not a number"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/object/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/object/ensure.js deleted file mode 100644 index 341f55c723acc5a53e1522e771635fecb2dfd2c3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/object/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected an object for %n, received %v" : "%v is not an object"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/object/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/object/is.js deleted file mode 100644 index a254dcbc73626b4cd94cbec23ea753e963d22f30..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/object/is.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isValue = require("../value/is"); - -// prettier-ignore -var possibleTypes = { "object": true, "function": true, "undefined": true /* document.all */ }; - -module.exports = function (value) { - if (!isValue(value)) return false; - return hasOwnProperty.call(possibleTypes, typeof value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/package.json b/ThinFilm_Analyzer/frontend/node_modules/type/package.json deleted file mode 100644 index b5d9ff01876dcf32189d13c815ce31aade8abaf3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/package.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "name": "type", - "version": "2.7.3", - "description": "Runtime validation and processing of JavaScript types", - "author": "Mariusz Nowak (https://www.medikoo.com/)", - "keywords": [ - "type", - "coercion" - ], - "repository": "medikoo/type", - "devDependencies": { - "chai": "^4.3.6", - "eslint": "^8.21.0", - "eslint-config-medikoo": "^4.1.2", - "git-list-updated": "^1.2.1", - "github-release-from-cc-changelog": "^2.3.0", - "husky": "^4.3.8", - "lint-staged": "^15.2.5", - "mocha": "^6.2.3", - "nyc": "^15.1.0", - "prettier-elastic": "^3.2.5" - }, - "typesVersions": { - ">=4": { - "*": [ - "ts-types/*" - ] - } - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint" - ], - "*.{css,html,js,json,md,yaml,yml}": [ - "prettier -c" - ] - }, - "eslintConfig": { - "extends": "medikoo/es3", - "root": true, - "globals": { - "BigInt": true, - "Map": true, - "Promise": true, - "Set": true, - "Symbol": true - }, - "overrides": [ - { - "files": "test/**/*.js", - "env": { - "mocha": true - }, - "rules": { - "no-eval": "off", - "no-new-wrappers": "off" - } - }, - { - "files": [ - "string/coerce.js", - "number/coerce.js" - ], - "rules": { - "no-implicit-coercion": "off" - } - }, - { - "files": "plain-object/is.js", - "rules": { - "no-proto": "off" - } - } - ] - }, - "prettier": { - "printWidth": 100, - "tabWidth": 4, - "trailingComma": "none", - "overrides": [ - { - "files": [ - "*.md", - "*.yml" - ], - "options": { - "tabWidth": 2 - } - } - ] - }, - "nyc": { - "all": true, - "exclude": [ - ".github", - "coverage/**", - "test/**", - "*.config.js" - ], - "reporter": [ - "lcov", - "html", - "text-summary" - ] - }, - "scripts": { - "coverage": "nyc npm test", - "lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'", - "prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c", - "prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"", - "prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write", - "test": "mocha --recursive" - }, - "license": "ISC" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/plain-function/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/plain-function/ensure.js deleted file mode 100644 index d3a20e6d83442f64ee9e084e5184483852604faa..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/plain-function/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a plain function for %n, received %v" - : "%v is not a plain function"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/plain-function/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/plain-function/is.js deleted file mode 100644 index b55d4fff66aba764377b210c8d5cdc4069edaba1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/plain-function/is.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -var isFunction = require("../function/is"); - -var classRe = /^\s*class[\s{/}]/, functionToString = Function.prototype.toString; - -module.exports = function (value) { - if (!isFunction(value)) return false; - if (classRe.test(functionToString.call(value))) return false; - return true; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/plain-object/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/plain-object/ensure.js deleted file mode 100644 index 519261efbc6e298efca23d2ec761151e04765efb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/plain-object/ensure.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , resolveErrorMessage = require("../lib/resolve-error-message") - , ensurePlainFunction = require("../plain-function/ensure") - , ensureArray = require("../array/ensure") - , is = require("./is"); - -var objHasOwnProperty = Object.prototype.hasOwnProperty, invalidItemsLimit = 3; - -module.exports = function (value/*, options*/) { - var options = arguments[1]; - var mainErrorMessage = - options && options.name - ? "Expected a plain object for %n, received %v" - : "%v is not a plain object"; - if (!is(value)) return resolveException(value, mainErrorMessage, options); - if (!options) return value; - - var invalidKeys, key, errorMessage; - var allowedKeys = ensureArray(options.allowedKeys, { isOptional: true }); - if (allowedKeys) { - for (key in value) { - if (!objHasOwnProperty.call(value, key)) continue; - if (allowedKeys.indexOf(key) > -1) continue; - if (!invalidKeys) invalidKeys = []; - if (invalidKeys.push(key) === invalidItemsLimit) break; - } - if (invalidKeys) { - errorMessage = - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Following keys are unexpected: " + - invalidKeys.join(", "); - throw new TypeError(errorMessage); - } - } - - var ensurePropertyValue = ensurePlainFunction(options.ensurePropertyValue, { - isOptional: true - }); - if (ensurePropertyValue) { - var coercedValue = {}; - for (key in value) { - if (!objHasOwnProperty.call(value, key)) continue; - var coercedPropertyValue; - try { - coercedPropertyValue = ensurePropertyValue(value[key]); - } catch (error) { - if (!invalidKeys) invalidKeys = []; - if (invalidKeys.push(key) === invalidItemsLimit) break; - } - if (invalidKeys) continue; - coercedValue[key] = coercedPropertyValue; - } - if (invalidKeys) { - errorMessage = - resolveErrorMessage(mainErrorMessage, value, options) + - ".\n Values for following keys are invalid: " + - invalidKeys.join(", "); - throw new TypeError(errorMessage); - } - - return coercedValue; - } - - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/plain-object/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/plain-object/is.js deleted file mode 100644 index 50d6713c69e51a51a71def5fc15051c420c2da08..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/plain-object/is.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -var isObject = require("../object/is") - , isPrototype = require("../prototype/is"); - -var getPrototypeOf; -if (typeof Object.getPrototypeOf === "function") { - getPrototypeOf = Object.getPrototypeOf; -} else if ({}.__proto__ === Object.prototype) { - getPrototypeOf = function (object) { return object.__proto__; }; -} - -module.exports = function (value) { - if (!isObject(value)) return false; - var prototype; - if (getPrototypeOf) { - prototype = getPrototypeOf(value); - } else { - try { - var valueConstructor = value.constructor; - if (valueConstructor) prototype = valueConstructor.prototype; - } catch (error) { - return false; - } - } - if (prototype && !hasOwnProperty.call(prototype, "propertyIsEnumerable")) return false; - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/promise/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/promise/ensure.js deleted file mode 100644 index 7fbebb35f6ea88552c0ca91ee07bdca624522f4d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/promise/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a promise for %n, received %v" : "%v is not a promise"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/promise/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/promise/is.js deleted file mode 100644 index 53533627ad106d800410dac70cac307af2733c73..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/promise/is.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -// In theory we could rely on Symbol.toStringTag directly, -// still early native implementation (e.g. in FF) predated symbols -var objectToString = Object.prototype.toString - , objectTaggedString = objectToString.call(Promise.resolve()); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common Promise interface) - try { - if (typeof value.then !== "function") return false; - if (typeof value["catch"] !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native Promise object (has [[PromiseState]] slot) - // Note: it's not 100% precise as string tag may be overriden - // and other objects could be hacked to expose it - if (objectToString.call(value) !== objectTaggedString) return false; - - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/prototype/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/prototype/is.js deleted file mode 100644 index aaddb2aa1a145415a59f00b66084e6e871eef8f5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/prototype/is.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var isObject = require("../object/is"); - -module.exports = function (value) { - if (!isObject(value)) return false; - try { - if (!value.constructor) return false; - return value.constructor.prototype === value; - } catch (error) { - return false; - } -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/reg-exp/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/reg-exp/ensure.js deleted file mode 100644 index 50669f3da65d1cd57377714cd7ae871f953a2cba..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/reg-exp/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a regular expression for %n, received %v" - : "%v is not a regular expression"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/reg-exp/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/reg-exp/is.js deleted file mode 100644 index f0c69d52b84ca7af44ff24bf9ee42600ba610e9d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/reg-exp/is.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -var isToStringTagSupported = require("../lib/is-to-string-tag-supported") - , isPrototype = require("../prototype/is"); - -var regExpTest = RegExp.prototype.test - , objectToString = Object.prototype.toString - , objectTaggedString = objectToString.call(/a/); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common RegExp interface) - if (!hasOwnProperty.call(value, "lastIndex")) return false; - try { - if (typeof value.lastIndex !== "number") return false; - if (typeof value.test !== "function") return false; - if (typeof value.exec !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native RegExp object (has [[RegExpMatcher]] slot) - if (isToStringTagSupported && typeof value[Symbol.toStringTag] === "string") { - // Edge case (possibly a regExp with custom Symbol.toStringTag) - try { - var lastIndex = value.lastIndex; - regExpTest.call(value, ""); - if (value.lastIndex !== lastIndex) value.lastIndex = lastIndex; - return true; - } catch (error) { - return false; - } - } - if (objectToString.call(value) !== objectTaggedString) return false; - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/safe-integer/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/safe-integer/coerce.js deleted file mode 100644 index b97e4aae775a0278dbec563ad3040728c8494d18..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/safe-integer/coerce.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var coerceToInteger = require("../integer/coerce"); - -var MAX_SAFE_INTEGER = 9007199254740991, MIN_SAFE_INTEGER = -9007199254740991; - -module.exports = function (value) { - value = coerceToInteger(value); - if (!value) return value; - if (value > MAX_SAFE_INTEGER) return null; - if (value < MIN_SAFE_INTEGER) return null; - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/safe-integer/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/safe-integer/ensure.js deleted file mode 100644 index dbdc46d186ef3290840d6979b8f50367bbc90d03..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/safe-integer/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a safe integer for %n, received %v" - : "%v is not a safe integer"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/set/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/set/ensure.js deleted file mode 100644 index 76d224641ba07ace034de3aa8a48bece7d02a32e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/set/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a set for %n, received %v" : "%v is not a set"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/set/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/set/is.js deleted file mode 100644 index d0b137b893947bbd25a95e2d193f7e01605d884e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/set/is.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -var isPrototype = require("../prototype/is"); - -// In theory we could rely on Symbol.toStringTag directly, -// still early native implementation (e.g. in FF) predated symbols -var objectToString = Object.prototype.toString, objectTaggedString = objectToString.call(new Set()); - -module.exports = function (value) { - if (!value) return false; - - // Sanity check (reject objects which do not expose common Set interface) - try { - if (typeof value.add !== "function") return false; - if (typeof value.has !== "function") return false; - if (typeof value.clear !== "function") return false; - } catch (error) { - return false; - } - - // Ensure its native Set object (has [[SetData]] slot) - // Note: it's not 100% precise as string tag may be overriden - // and other objects could be hacked to expose it - if (objectToString.call(value) !== objectTaggedString) return false; - - return !isPrototype(value); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/string/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/string/coerce.js deleted file mode 100644 index 43cd931fc13a642f1174bf0e376a682b06ec1fc7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/string/coerce.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var isValue = require("../value/is") - , isObject = require("../object/is"); - -var objectToString = Object.prototype.toString; - -module.exports = function (value) { - if (!isValue(value)) return null; - if (isObject(value)) { - // Reject Object.prototype.toString coercion - var valueToString = value.toString; - if (typeof valueToString !== "function") return null; - if (valueToString === objectToString) return null; - // Note: It can be object coming from other realm, still as there's no ES3 and CSP compliant - // way to resolve its realm's Object.prototype.toString it's left as not addressed edge case - } - try { - return "" + value; // Ensure implicit coercion - } catch (error) { - return null; - } -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/string/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/string/ensure.js deleted file mode 100644 index e26b5f0de6cb8e7ae91859cc6842e700501ed437..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/string/ensure.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a string for %n, received %v" : "%v is not a string"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/thenable/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/thenable/ensure.js deleted file mode 100644 index 8397c7cf6a748d184bd74c0aece1f2321a43736b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/thenable/ensure.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a thenable for %n, received %v" - : "%v is not a thenable"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/thenable/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/thenable/is.js deleted file mode 100644 index 1f3d3993f5fb7d16fcc001c60a8df944ca060e7d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/thenable/is.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var isObject = require("../object/is"); - -module.exports = function (value) { - if (!isObject(value)) return false; - try { return typeof value.then === "function"; } - catch (error) { return false; } -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/time-value/coerce.js b/ThinFilm_Analyzer/frontend/node_modules/type/time-value/coerce.js deleted file mode 100644 index 7124864aebe6857e23e26116a1243e3177bd3bfc..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/time-value/coerce.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var coerceToInteger = require("../integer/coerce"); - -var abs = Math.abs; - -module.exports = function (value) { - value = coerceToInteger(value); - if (!value) return value; - if (abs(value) > 8.64e15) return null; - return value; -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/time-value/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/time-value/ensure.js deleted file mode 100644 index ddf4f6148309e51398cfcf17f7adb9626bd4ec4c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/time-value/ensure.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , coerce = require("./coerce"); - -module.exports = function (value/*, options*/) { - var coerced = coerce(value); - if (coerced !== null) return coerced; - var options = arguments[1]; - var errorMessage = - options && options.name - ? "Expected a time value for %n, received %v" - : "%v is not a time value"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-length/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-length/coerce.d.ts deleted file mode 100644 index e949e11ab9fb2d8b9d84bc9ac0df4c8dea02d647..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-length/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToArrayLength(value: any): number | null; -export default coerceToArrayLength; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-length/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-length/ensure.d.ts deleted file mode 100644 index 25c9370adc88cb33ead316aacd093d0cbe171531..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-length/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureArrayLength(value: any, options?: EnsureBaseOptions): number; -declare function ensureArrayLength(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureArrayLength(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureArrayLength; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-like/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-like/ensure.d.ts deleted file mode 100644 index 549febed76411a59d3dada27e472b2f28249bbde..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-like/ensure.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type LengthwiseObject = { length: number } & object; -type ArrayLikeEnsureOptions = { allowString?: boolean }; - - -declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions): T[] | string | LengthwiseObject; -declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions & EnsureIsOptional): T[] | string | LengthwiseObject | null; -declare function ensureArrayLike(value: any, options?: ArrayLikeEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[] | string | LengthwiseObject; - -export default ensureArrayLike; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-like/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-like/is.d.ts deleted file mode 100644 index acdd657dc0371bd9868364451f131140915c9c26..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array-like/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isArrayLike(value: any, options?: {allowString?: boolean}): boolean; -export default isArrayLike; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array/ensure.d.ts deleted file mode 100644 index 6c249b7e2378caa2b9299aa10b4eb80efa0d67a9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type EnsureArrayOptions = { ensureItem?: EnsureFunction }; - - -declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions): T[]; -declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions & EnsureIsOptional): T[] | null; -declare function ensureArray(value: any, options?: EnsureArrayOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[]; - -export default ensureArray; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array/is.d.ts deleted file mode 100644 index 71af03e36133f6f47a64101385f7cd70a408984a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/array/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isArray(value: any): boolean; -export default isArray; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/big-int/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/big-int/coerce.d.ts deleted file mode 100644 index 8c73fc60d15c26b174d3ce14383abf85cff5a419..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/big-int/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToBigInt(value: any): bigint | null; -export default coerceToBigInt; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/big-int/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/big-int/ensure.d.ts deleted file mode 100644 index 93073cbb2dda32a0b7e040c602522c42adb07ce6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/big-int/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureBigInt(value: any, options?: EnsureBaseOptions): bigint; -declare function ensureBigInt(value: any, options?: EnsureBaseOptions & EnsureIsOptional): bigint | null; -declare function ensureBigInt(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): bigint; - -export default ensureBigInt; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/constructor/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/constructor/ensure.d.ts deleted file mode 100644 index 79dd28caf58298a77398e9c85e689d084197e98d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/constructor/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureConstructor(value: any, options?: EnsureBaseOptions): EnsureFunction | object; -declare function ensureConstructor(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | object | null; -declare function ensureConstructor(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction | object; - -export default ensureConstructor; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/constructor/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/constructor/is.d.ts deleted file mode 100644 index 768a6359e5508a310339be459240678d4643c0f4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/constructor/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isConstructor(value: any): boolean; -export default isConstructor; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/date/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/date/ensure.d.ts deleted file mode 100644 index d96ad31af3d14952c3206c99e0b49d4ad74e2cbf..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/date/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureDate(value: any, options?: EnsureBaseOptions): Date; -declare function ensureDate(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Date | null; -declare function ensureDate(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): Date; - -export default ensureDate; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/date/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/date/is.d.ts deleted file mode 100644 index 7907a8ff614289d9659aa7b93f2c723045b741ef..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/date/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isDate(value: any): boolean; -export default isDate; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/ensure.d.ts deleted file mode 100644 index 62ba597082aa85f9d6d94bfb2efc389ee9a14412..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/ensure.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export type EnsureFunction = (...args: any[]) => any; -export interface EnsureBaseOptions { - name?: string; - errorMessage?: string; - errorCode?: number; - Error?: ErrorConstructor; -} - -export interface EnsureIsOptional { - isOptional: boolean; -} - -export interface EnsureDefault { - default: T; -} - -type EnsureOptions = EnsureBaseOptions & { isOptional?: boolean } & { default?: any }; - -type ValidationDatum = [argumentName: string, inputValue: any, ensureFunction: EnsureFunction, options?: object]; -type ValidationDatumList = ValidationDatum[]; - -declare function ensure(...args: [...ValidationDatumList, EnsureOptions]): T; -declare function ensure(...args: [...ValidationDatumList]): T; -export default ensure; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/error/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/error/ensure.d.ts deleted file mode 100644 index b42f446acb4ee121b4c5d77c487d63c5216124b8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/error/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureError(value: any, options?: EnsureBaseOptions): Error; -declare function ensureError(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Error | null; -declare function ensureError(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): Error; - -export default ensureError; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/error/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/error/is.d.ts deleted file mode 100644 index db64ea370d187f53a6fa7683b6df35ba22183cd5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/error/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isError(value: any): boolean; -export default isError; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/finite/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/finite/coerce.d.ts deleted file mode 100644 index f1edc2d20c70cadfceb0accefb069dbb46dff1b9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/finite/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToFinite(value: any): number | null; -export default coerceToFinite; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/finite/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/finite/ensure.d.ts deleted file mode 100644 index 988c511626ed1710b378483aedc2c1dc74a11469..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/finite/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureFinite(value: any, options?: EnsureBaseOptions): number; -declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureFinite(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureFinite; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/function/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/function/ensure.d.ts deleted file mode 100644 index 30839e54943ea1116ac41c4279bd908189d08a23..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/function/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureFunction(value: any, options?: EnsureBaseOptions): EnsureFunction; -declare function ensureFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | null; -declare function ensureFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction; - -export default ensureFunction; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/function/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/function/is.d.ts deleted file mode 100644 index 9d94f954eda0b064e26c27ac62fe304e7e1dadac..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/function/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isFunction(value: any): boolean; -export default isFunction; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/integer/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/integer/coerce.d.ts deleted file mode 100644 index 3bbb00f6b774589649fd2b969d0c9482126a2df0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/integer/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToInteger(value: any): number | null; -export default coerceToInteger; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/integer/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/integer/ensure.d.ts deleted file mode 100644 index 06f1c8a1c14d12bb4be7089a352a383079df7dc7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/integer/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureInteger(value: any, options?: EnsureBaseOptions): number; -declare function ensureInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureInteger; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/iterable/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/iterable/ensure.d.ts deleted file mode 100644 index 973d3eabba6c70bcb224aaa0f9f32005f697fd7f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/iterable/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type IterableEnsureOptions = { ensureItem?: EnsureFunction, allowString?: boolean, denyEmpty?: boolean}; - - -declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions): T[]; -declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions & EnsureIsOptional): T[] | null; -declare function ensureIterable(value: any, options?: IterableEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): T[]; - -export default ensureIterable; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/iterable/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/iterable/is.d.ts deleted file mode 100644 index 93686d22b9edd56fcc33b16417b7a09fe6afb64f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/iterable/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isIterable(value: any, options?: { allowString?: boolean, denyEmpty?: boolean }): boolean; -export default isIterable; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/map/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/map/ensure.d.ts deleted file mode 100644 index 6a23851f5c25845661370c50f5641bfe17d88fff..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/map/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureMap(value: any, options?: EnsureBaseOptions): Map; -declare function ensureMap(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Map | null; -declare function ensureMap(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Map; - -export default ensureMap; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/map/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/map/is.d.ts deleted file mode 100644 index 340ed1be22dea8a6304e722bd0350dd186d4a743..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/map/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isMap(value: any): boolean; -export default isMap; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/natural-number/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/natural-number/coerce.d.ts deleted file mode 100644 index 633317c78b1e98354d452dfd1fe2a1947198827c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/natural-number/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToNaturalNumber(value: any): number | null; -export default coerceToNaturalNumber; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/natural-number/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/natural-number/ensure.d.ts deleted file mode 100644 index 2f6d6b5e65d7be13b8aafc56d278854c876a1a08..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/natural-number/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions): number; -declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureNaturalNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureNaturalNumber; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/number/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/number/coerce.d.ts deleted file mode 100644 index cc9f355da38c47b4e67c3d544aad6430e1f5151e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/number/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToNumber(value: any): number | null; -export default coerceToNumber; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/number/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/number/ensure.d.ts deleted file mode 100644 index 326b222e60dc6435a6b99267f73939bac7e75835..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/number/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureNumber(value: any, options?: EnsureBaseOptions): number; -declare function ensureNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureNumber(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureNumber; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/object/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/object/ensure.d.ts deleted file mode 100644 index f5ccce154d24bdda6f7df45135806922d799fa7f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/object/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureObject(value: any, options?: EnsureBaseOptions): object; -declare function ensureObject(value: any, options?: EnsureBaseOptions & EnsureIsOptional): object | null; -declare function ensureObject(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): object; - -export default ensureObject; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/object/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/object/is.d.ts deleted file mode 100644 index 47fdd9c4c546defea00a85d8c7318b91e58da12b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/object/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isObject(value: any): boolean; -export default isObject; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-function/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-function/ensure.d.ts deleted file mode 100644 index 8681e770ad27fd57b2f652a731b3096513075586..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-function/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions): EnsureFunction; -declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional): EnsureFunction | null; -declare function ensurePlainFunction(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): EnsureFunction; - -export default ensurePlainFunction; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-function/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-function/is.d.ts deleted file mode 100644 index de32a5e806dc26d592accf7d923bc882e7960bc8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-function/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPlainFunction(value: any): boolean; -export default isPlainFunction; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-object/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-object/ensure.d.ts deleted file mode 100644 index 063d70963ac9c865a070277f4c2f2bc7b77ff8e2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-object/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type PlainObjectEnsureOptions = {allowedKeys?: string[], ensurePropertyValue?: EnsureFunction}; - - -declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions): object; -declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions & EnsureIsOptional): object | null; -declare function ensurePlainObject(value: any, options?: PlainObjectEnsureOptions & EnsureBaseOptions & EnsureIsOptional & EnsureDefault): object; - -export default ensurePlainObject; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-object/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-object/is.d.ts deleted file mode 100644 index 862608578aa95a7b9ed64d3663500ef2b7418385..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/plain-object/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPlainObject(value: any): boolean; -export default isPlainObject; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/promise/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/promise/ensure.d.ts deleted file mode 100644 index 3ddf4ea71479c13052a6d0fb98783ef199eb6d86..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/promise/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensurePromise(value: any, options?: EnsureBaseOptions): Promise; -declare function ensurePromise(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Promise | null; -declare function ensurePromise(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Promise; - -export default ensurePromise; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/promise/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/promise/is.d.ts deleted file mode 100644 index 9306fe5e70bdc596f99787081fc80f5ac981294d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/promise/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPromise(value: any): boolean; -export default isPromise; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/prototype/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/prototype/is.d.ts deleted file mode 100644 index 7f2eb12902eed9bc95f6897445ba3eb5726fc0ca..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/prototype/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPrototype(value: any): boolean; -export default isPrototype; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/reg-exp/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/reg-exp/ensure.d.ts deleted file mode 100644 index 95a2c9b97e14e2315411bb0b72df5b0d0851cf36..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/reg-exp/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureRegExp(value: any, options?: EnsureBaseOptions): RegExp; -declare function ensureRegExp(value: any, options?: EnsureBaseOptions & EnsureIsOptional): RegExp | null; -declare function ensureRegExp(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): RegExp; - -export default ensureRegExp; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/reg-exp/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/reg-exp/is.d.ts deleted file mode 100644 index a325e3468c2a8cc41b868a3f7c815b5926a8e266..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/reg-exp/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isRegExp(value: any): boolean; -export default isRegExp; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/safe-integer/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/safe-integer/coerce.d.ts deleted file mode 100644 index 5e6539c49dc6796feafd856fc78964013228eaab..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/safe-integer/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToSafeInteger(value: any): number | null; -export default coerceToSafeInteger; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/safe-integer/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/safe-integer/ensure.d.ts deleted file mode 100644 index 5d4b953553b8a879b038f3318a72420441e79c36..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/safe-integer/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions): number; -declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureSafeInteger(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; - -export default ensureSafeInteger; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/set/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/set/ensure.d.ts deleted file mode 100644 index 2b1425988d65a30fe7308a6162413e4cba0746ea..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/set/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureSet(value: any, options?: EnsureBaseOptions): Set; -declare function ensureSet(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Set | null; -declare function ensureSet(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault>): Set; - -export default ensureSet; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/set/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/set/is.d.ts deleted file mode 100644 index 530aed3083fd032cc86df582ac00f4c019777303..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/set/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isSet(value: any): boolean; -export default isSet; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/string/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/string/coerce.d.ts deleted file mode 100644 index 603519dc24819dad1cd3657f80a6dd6d101b0755..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/string/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToString(value: any): string | null; -export default coerceToString; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/string/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/string/ensure.d.ts deleted file mode 100644 index d31965a76d4fa63e3d1e29e5591a5f4387d520e0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/string/ensure.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureString(value: any, options?: EnsureBaseOptions): string; -declare function ensureString(value: any, options?: EnsureBaseOptions & EnsureIsOptional): string | null; -declare function ensureString(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): string; - -export default ensureString; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/thenable/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/thenable/ensure.d.ts deleted file mode 100644 index 741faad93c6add9e4e43bb788cff5bd7209e5c85..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/thenable/ensure.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { EnsureFunction, EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -type ThenableObject = { then: EnsureFunction } & object; - - -declare function ensureThenable(value: any, options?: EnsureBaseOptions): Promise | ThenableObject; -declare function ensureThenable(value: any, options?: EnsureBaseOptions & EnsureIsOptional): Promise | ThenableObject | null; -declare function ensureThenable(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault | ThenableObject>): Promise | ThenableObject; - -export default ensureThenable; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/thenable/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/thenable/is.d.ts deleted file mode 100644 index c8f207fe1d170ccbdbe3ae730df2b07cddc16975..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/thenable/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isThenable(value: any): boolean; -export default isThenable; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/time-value/coerce.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/time-value/coerce.d.ts deleted file mode 100644 index 44849ba65f38037fd8d0b9548e27eb06a89e05df..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/time-value/coerce.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function coerceToTimeValue(value: any): number | null; -export default coerceToTimeValue; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/time-value/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/time-value/ensure.d.ts deleted file mode 100644 index f8084b883e34f2fefbc2372450fd165b0be6db30..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/time-value/ensure.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { EnsureBaseOptions, EnsureIsOptional, EnsureDefault } from '../ensure'; - -declare function ensureTimeValue(value: any, options?: EnsureBaseOptions & EnsureIsOptional): number | null; -declare function ensureTimeValue(value: any, options?: EnsureBaseOptions & EnsureIsOptional & EnsureDefault): number; -export default ensureTimeValue; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/value/ensure.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/value/ensure.d.ts deleted file mode 100644 index 928b29ea4f07fbce918bf96ff9bacc9a09b91a7c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/value/ensure.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { EnsureOptions } from '../ensure'; - -declare function ensureValue(value: any, options?: EnsureOptions): T; -export default ensureValue; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/value/is.d.ts b/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/value/is.d.ts deleted file mode 100644 index 31f306d0c11cae735a74354bb2dee23bdd39e0b1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/ts-types/value/is.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isValue(value: any): boolean; -export default isValue; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/value/ensure.js b/ThinFilm_Analyzer/frontend/node_modules/type/value/ensure.js deleted file mode 100644 index 3067a3ed361705b945b90d8462e95e27ceea6f56..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/value/ensure.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -var resolveException = require("../lib/resolve-exception") - , is = require("./is"); - -module.exports = function (value/*, options*/) { - if (is(value)) return value; - var options = arguments[1]; - var errorMessage = - options && options.name ? "Expected a value for %n, received %v" : "Cannot use %v"; - return resolveException(value, errorMessage, options); -}; diff --git a/ThinFilm_Analyzer/frontend/node_modules/type/value/is.js b/ThinFilm_Analyzer/frontend/node_modules/type/value/is.js deleted file mode 100644 index 648aa9c7b0146e2e369fec1db2f103c65a9a36b2..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/type/value/is.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -// ES3 safe -var _undefined = void 0; - -module.exports = function (value) { return value !== _undefined && value !== null; }; diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/.travis.yml deleted file mode 100644 index 9672e1293cc2b52fbd761062c659b1f1aceb36b4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" -before_install: - - npm install -g npm@~1.4.6 diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/LICENSE deleted file mode 100644 index 8ce206a84544ae1623a4c94db88c18c2d9ed8009..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2013 Mikola Lysenko - -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/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/README.md b/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/README.md deleted file mode 100644 index 0ca8f3ca0c0b6acb46648c7b6f05331c63c2c66b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/README.md +++ /dev/null @@ -1,101 +0,0 @@ -typedarray-pool -=============== -A global pool for typed arrays. - -[![testling badge](https://ci.testling.com/mikolalysenko/typedarray-pool.png)](https://ci.testling.com/mikolalysenko/typedarray-pool) - -[![build status](https://secure.travis-ci.org/mikolalysenko/typedarray-pool.png)](http://travis-ci.org/mikolalysenko/typedarray-pool) - -# Example - -```javascript -var pool = require("typedarray-pool") - -//Allocate a buffer with at least 128 floats -var f = pool.malloc(128, "float") - -// ... do stuff ... - -//When done, release buffer -pool.free(f) -``` - -# Install - - npm install typedarray-pool - -# API - -```javascript -var pool = require("typedarray-pool") -``` - -### `pool.malloc(n[, dtype])` -Allocates a typed array (or ArrayBuffer) with at least n elements. - -* `n` is the number of elements in the array -* `dtype` is the data type of the array to allocate. Must be one of: - - + `"uint8"` - + `"uint16"` - + `"uint32"` - + `"int8"` - + `"int16"` - + `"int32"` - + `"float"` - + `"float32"` - + `"double"` - + `"float64"` - + `"arraybuffer"` - + `"data"` - + `"uint8_clamped"` - + `"bigint64"` - + `"biguint64"` - + `"buffer"` - -**Returns** A typed array with at least `n` elements in it. If `dtype` is undefined, an ArrayBuffer is returned. - -**Note** You can avoid the dispatch by directly calling one of the following methods: - -* `pool.mallocUint8` -* `pool.mallocUint16` -* `pool.mallocUint32` -* `pool.mallocInt8` -* `pool.mallocInt16` -* `pool.mallocInt32` -* `pool.mallocFloat` -* `pool.mallocDouble` -* `pool.mallocArrayBuffer` -* `pool.mallocDataView` -* `pool.mallocUint8Clamped` -* `pool.mallocBigInt64` -* `pool.mallocBigUint64` -* `pool.mallocBuffer` - -### `pool.free(array)` -Returns the array back to the pool. - -* `array` The array object to return to the pool. - -**Note** You can speed up the method if you know the type of array before hand by calling one of the following: - -* `pool.freeUint8` -* `pool.freeUint16` -* `pool.freeUint32` -* `pool.freeInt8` -* `pool.freeInt16` -* `pool.freeInt32` -* `pool.freeFloat` -* `pool.freeDouble` -* `pool.freeArrayBuffer` -* `pool.freeDataView` -* `pool.freeUint8Clamped` -* `pool.freeBigInt64` -* `pool.freeBigUint64` -* `pool.freeBuffer` - -### `pool.clearCache()` -Removes all references to cached arrays. Use this when you are done with the pool to return all the cached memory to the garbage collector. - -# Credits -(c) 2014 Mikola Lysenko. MIT License diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/package.json b/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/package.json deleted file mode 100644 index 354745d1bca06e5b56cafa84d7d4f1c9298823f7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "typedarray-pool", - "version": "1.2.0", - "description": "Reuse typed arrays", - "main": "pool.js", - "directories": { - "test": "test" - }, - "dependencies": { - "bit-twiddle": "^1.0.0", - "dup": "^1.0.0" - }, - "devDependencies": { - "tape": "^2.12.3" - }, - "scripts": { - "test": "tape test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/mikolalysenko/typedarray-pool.git" - }, - "keywords": [ - "typed", - "array", - "cache", - "pool", - "memory", - "malloc", - "free", - "reuse", - "optimize", - "construct", - "overhead" - ], - "author": "Mikola Lysenko", - "license": "MIT", - "readmeFilename": "README.md", - "gitHead": "d7a8a448caf51042e6c371b11074aab6ebaf53ad", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/10..latest", - "firefox/17..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/6.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/pool.js b/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/pool.js deleted file mode 100644 index 8d3a2025a9707cf4074f7cbaffa0ddc5586ddadb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/pool.js +++ /dev/null @@ -1,251 +0,0 @@ -'use strict' - -var bits = require('bit-twiddle') -var dup = require('dup') -var Buffer = require('buffer').Buffer - -//Legacy pool support -if(!global.__TYPEDARRAY_POOL) { - global.__TYPEDARRAY_POOL = { - UINT8 : dup([32, 0]) - , UINT16 : dup([32, 0]) - , UINT32 : dup([32, 0]) - , BIGUINT64 : dup([32, 0]) - , INT8 : dup([32, 0]) - , INT16 : dup([32, 0]) - , INT32 : dup([32, 0]) - , BIGINT64 : dup([32, 0]) - , FLOAT : dup([32, 0]) - , DOUBLE : dup([32, 0]) - , DATA : dup([32, 0]) - , UINT8C : dup([32, 0]) - , BUFFER : dup([32, 0]) - } -} - -var hasUint8C = (typeof Uint8ClampedArray) !== 'undefined' -var hasBigUint64 = (typeof BigUint64Array) !== 'undefined' -var hasBigInt64 = (typeof BigInt64Array) !== 'undefined' -var POOL = global.__TYPEDARRAY_POOL - -//Upgrade pool -if(!POOL.UINT8C) { - POOL.UINT8C = dup([32, 0]) -} -if(!POOL.BIGUINT64) { - POOL.BIGUINT64 = dup([32, 0]) -} -if(!POOL.BIGINT64) { - POOL.BIGINT64 = dup([32, 0]) -} -if(!POOL.BUFFER) { - POOL.BUFFER = dup([32, 0]) -} - -//New technique: Only allocate from ArrayBufferView and Buffer -var DATA = POOL.DATA - , BUFFER = POOL.BUFFER - -exports.free = function free(array) { - if(Buffer.isBuffer(array)) { - BUFFER[bits.log2(array.length)].push(array) - } else { - if(Object.prototype.toString.call(array) !== '[object ArrayBuffer]') { - array = array.buffer - } - if(!array) { - return - } - var n = array.length || array.byteLength - var log_n = bits.log2(n)|0 - DATA[log_n].push(array) - } -} - -function freeArrayBuffer(buffer) { - if(!buffer) { - return - } - var n = buffer.length || buffer.byteLength - var log_n = bits.log2(n) - DATA[log_n].push(buffer) -} - -function freeTypedArray(array) { - freeArrayBuffer(array.buffer) -} - -exports.freeUint8 = -exports.freeUint16 = -exports.freeUint32 = -exports.freeBigUint64 = -exports.freeInt8 = -exports.freeInt16 = -exports.freeInt32 = -exports.freeBigInt64 = -exports.freeFloat32 = -exports.freeFloat = -exports.freeFloat64 = -exports.freeDouble = -exports.freeUint8Clamped = -exports.freeDataView = freeTypedArray - -exports.freeArrayBuffer = freeArrayBuffer - -exports.freeBuffer = function freeBuffer(array) { - BUFFER[bits.log2(array.length)].push(array) -} - -exports.malloc = function malloc(n, dtype) { - if(dtype === undefined || dtype === 'arraybuffer') { - return mallocArrayBuffer(n) - } else { - switch(dtype) { - case 'uint8': - return mallocUint8(n) - case 'uint16': - return mallocUint16(n) - case 'uint32': - return mallocUint32(n) - case 'int8': - return mallocInt8(n) - case 'int16': - return mallocInt16(n) - case 'int32': - return mallocInt32(n) - case 'float': - case 'float32': - return mallocFloat(n) - case 'double': - case 'float64': - return mallocDouble(n) - case 'uint8_clamped': - return mallocUint8Clamped(n) - case 'bigint64': - return mallocBigInt64(n) - case 'biguint64': - return mallocBigUint64(n) - case 'buffer': - return mallocBuffer(n) - case 'data': - case 'dataview': - return mallocDataView(n) - - default: - return null - } - } - return null -} - -function mallocArrayBuffer(n) { - var n = bits.nextPow2(n) - var log_n = bits.log2(n) - var d = DATA[log_n] - if(d.length > 0) { - return d.pop() - } - return new ArrayBuffer(n) -} -exports.mallocArrayBuffer = mallocArrayBuffer - -function mallocUint8(n) { - return new Uint8Array(mallocArrayBuffer(n), 0, n) -} -exports.mallocUint8 = mallocUint8 - -function mallocUint16(n) { - return new Uint16Array(mallocArrayBuffer(2*n), 0, n) -} -exports.mallocUint16 = mallocUint16 - -function mallocUint32(n) { - return new Uint32Array(mallocArrayBuffer(4*n), 0, n) -} -exports.mallocUint32 = mallocUint32 - -function mallocInt8(n) { - return new Int8Array(mallocArrayBuffer(n), 0, n) -} -exports.mallocInt8 = mallocInt8 - -function mallocInt16(n) { - return new Int16Array(mallocArrayBuffer(2*n), 0, n) -} -exports.mallocInt16 = mallocInt16 - -function mallocInt32(n) { - return new Int32Array(mallocArrayBuffer(4*n), 0, n) -} -exports.mallocInt32 = mallocInt32 - -function mallocFloat(n) { - return new Float32Array(mallocArrayBuffer(4*n), 0, n) -} -exports.mallocFloat32 = exports.mallocFloat = mallocFloat - -function mallocDouble(n) { - return new Float64Array(mallocArrayBuffer(8*n), 0, n) -} -exports.mallocFloat64 = exports.mallocDouble = mallocDouble - -function mallocUint8Clamped(n) { - if(hasUint8C) { - return new Uint8ClampedArray(mallocArrayBuffer(n), 0, n) - } else { - return mallocUint8(n) - } -} -exports.mallocUint8Clamped = mallocUint8Clamped - -function mallocBigUint64(n) { - if(hasBigUint64) { - return new BigUint64Array(mallocArrayBuffer(8*n), 0, n) - } else { - return null; - } -} -exports.mallocBigUint64 = mallocBigUint64 - -function mallocBigInt64(n) { - if (hasBigInt64) { - return new BigInt64Array(mallocArrayBuffer(8*n), 0, n) - } else { - return null; - } -} -exports.mallocBigInt64 = mallocBigInt64 - -function mallocDataView(n) { - return new DataView(mallocArrayBuffer(n), 0, n) -} -exports.mallocDataView = mallocDataView - -function mallocBuffer(n) { - n = bits.nextPow2(n) - var log_n = bits.log2(n) - var cache = BUFFER[log_n] - if(cache.length > 0) { - return cache.pop() - } - return new Buffer(n) -} -exports.mallocBuffer = mallocBuffer - -exports.clearCache = function clearCache() { - for(var i=0; i<32; ++i) { - POOL.UINT8[i].length = 0 - POOL.UINT16[i].length = 0 - POOL.UINT32[i].length = 0 - POOL.INT8[i].length = 0 - POOL.INT16[i].length = 0 - POOL.INT32[i].length = 0 - POOL.FLOAT[i].length = 0 - POOL.DOUBLE[i].length = 0 - POOL.BIGUINT64[i].length = 0 - POOL.BIGINT64[i].length = 0 - POOL.UINT8C[i].length = 0 - DATA[i].length = 0 - BUFFER[i].length = 0 - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/test/test.js b/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/test/test.js deleted file mode 100644 index 22ba2bdb0289aec03b7496134735fcd1bc093ac5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray-pool/test/test.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict" - -//Check upgrade works -var dup = require("dup") -global.__TYPEDARRAY_POOL = { - UINT8 : dup([32, 0]) -, UINT16 : dup([32, 0]) -, UINT32 : dup([32, 0]) -, INT8 : dup([32, 0]) -, INT16 : dup([32, 0]) -, INT32 : dup([32, 0]) -, FLOAT : dup([32, 0]) -, DOUBLE : dup([32, 0]) -, DATA : dup([32, 0]) -} - -var pool = require("../pool.js") - -require("tape")("typedarray-pool", function(t) { - - pool.clearCache() - - for(var i=1; i<100; ++i) { - var a - a = pool.malloc(i, "int8") - t.assert(a instanceof Int8Array, "int8array valid") - t.assert(a.length >= i, "int8array length") - pool.free(a) - - a = pool.malloc(i, "int16") - t.assert(a instanceof Int16Array, "int16") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "int32") - t.assert(a instanceof Int32Array, "int32") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "uint8") - t.assert(a instanceof Uint8Array, "uint8") - t.assert(!Buffer.isBuffer(a), "not buffer") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "uint16") - t.assert(a instanceof Uint16Array, "uint16") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "uint32") - t.assert(a instanceof Uint32Array, "uint32") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "float") - t.assert(a instanceof Float32Array, "float") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "double") - t.assert(a instanceof Float64Array, "double") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "uint8_clamped") - if((typeof Uint8ClampedArray) !== "undefined") { - t.assert(a instanceof Uint8ClampedArray, "uint8_clamped") - } else { - t.assert(a instanceof Uint8Array, "unit8_clamped clamped default to uint8") - } - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "bigint64") - if((typeof BigInt64Array) !== "undefined") { - t.assert(a instanceof BigInt64Array, "bigint64") - } else { - t.assert(a instanceof BigInt64Array, "bigint64 defaults to null") - } - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "biguint64") - if((typeof BigUint64Array) !== "undefined") { - t.assert(a instanceof BigUint64Array, "biguint64") - } else { - t.assert(a instanceof BigUint64Array, "biguint64 defaults to null") - } - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i, "buffer") - t.assert(Buffer.isBuffer(a), "buffer") - t.assert(a.length >= i) - pool.free(a) - - a = pool.malloc(i) - t.assert(a instanceof ArrayBuffer, "array buffer") - t.assert(a.byteLength >= i) - pool.free(a) - - a = pool.malloc(i, "arraybuffer") - t.assert(a instanceof ArrayBuffer, "array buffer") - t.assert(a.byteLength >= i) - pool.free(a) - - a = pool.malloc(i, "dataview") - t.assert(a instanceof DataView, "dataview") - t.assert(a.byteLength >= i) - pool.free(a) - } - - for(var i=1; i<100; ++i) { - var a - a = pool.mallocInt8(i) - t.assert(a instanceof Int8Array, "int8") - t.assert(a.length >= i) - pool.freeInt8(a) - - a = pool.mallocInt16(i) - t.assert(a instanceof Int16Array, "int16") - t.assert(a.length >= i) - pool.freeInt16(a) - - a = pool.mallocInt32(i) - t.assert(a instanceof Int32Array, "int32") - t.assert(a.length >= i) - pool.freeInt32(a) - - a = pool.mallocUint8(i) - t.assert(a instanceof Uint8Array, "uint8") - t.assert(!Buffer.isBuffer(a), "not buffer") - t.assert(a.length >= i) - pool.freeUint8(a) - - a = pool.mallocUint16(i) - t.assert(a instanceof Uint16Array, "uint16") - t.assert(a.length >= i) - pool.freeUint16(a) - - a = pool.mallocUint32(i) - t.assert(a instanceof Uint32Array, "uint32") - t.assert(a.length >= i) - pool.freeUint32(a) - - a = pool.mallocFloat(i) - t.assert(a instanceof Float32Array, "float32") - t.assert(a.length >= i) - pool.freeFloat(a) - - a = pool.mallocDouble(i) - t.assert(a instanceof Float64Array, "float64") - t.assert(a.length >= i) - pool.freeDouble(a) - - a = pool.mallocUint8Clamped(i) - if((typeof Uint8ClampedArray) !== "undefined") { - t.assert(a instanceof Uint8ClampedArray, "uint8 clamped") - } else { - t.assert(a instanceof Uint8Array, "uint8 clamped defaults to unt8") - } - t.assert(a.length >= i) - pool.freeUint8Clamped(a) - - a = pool.mallocBigInt64(i) - if((typeof BigInt64Array) !== "undefined") { - t.assert(a instanceof BigInt64Array, "bigint64") - } else { - t.equal(a, null, "bigint64 defaults null") - } - t.assert(a.length >= i) - pool.freeBigInt64(a) - - a = pool.mallocBigUint64(i) - if((typeof BigUint64Array) !== "undefined") { - t.assert(a instanceof BigUint64Array, "biguint64") - } else { - t.equal(a, null, "bigint64 defaults null") - } - t.assert(a.length >= i) - pool.freeBigUint64(a) - - a = pool.mallocBuffer(i) - t.assert(Buffer.isBuffer(a), "buffer") - t.assert(a.length >= i) - pool.freeBuffer(a) - - a = pool.mallocArrayBuffer(i) - t.assert(a instanceof ArrayBuffer, "array buffer") - t.assert(a.byteLength >= i) - pool.freeArrayBuffer(a) - - a = pool.mallocDataView(i) - t.assert(a instanceof DataView, "data view") - t.assert(a.byteLength >= i) - pool.freeDataView(a) - } - - pool.clearCache() - - t.end() -}) diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/.travis.yml b/ThinFilm_Analyzer/frontend/node_modules/typedarray/.travis.yml deleted file mode 100644 index cc4dba29d959a2da7b97f9edd3c7c91384b2ee5b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/typedarray/LICENSE deleted file mode 100644 index 11adfaec9e7f95f3eab1ecdd6f1f8715fcdc4311..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/LICENSE +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (c) 2010, Linden Research, Inc. - Copyright (c) 2012, Joshua Bell - - 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. - $/LicenseInfo$ - */ - -// Original can be found at: -// https://bitbucket.org/lindenlab/llsd -// Modifications by Joshua Bell inexorabletash@gmail.com -// https://github.com/inexorabletash/polyfill - -// ES3/ES5 implementation of the Krhonos Typed Array Specification -// Ref: http://www.khronos.org/registry/typedarray/specs/latest/ -// Date: 2011-02-01 -// -// Variations: -// * Allows typed_array.get/set() as alias for subscripts (typed_array[]) diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/example/tarray.js b/ThinFilm_Analyzer/frontend/node_modules/typedarray/example/tarray.js deleted file mode 100644 index 8423d7c9b1c327e5c76744eccf7ec469b3ffdd79..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/example/tarray.js +++ /dev/null @@ -1,4 +0,0 @@ -var Uint8Array = require('../').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/index.js b/ThinFilm_Analyzer/frontend/node_modules/typedarray/index.js deleted file mode 100644 index 5e540841f432413f874b4c75ffc7280f114c37eb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/index.js +++ /dev/null @@ -1,630 +0,0 @@ -var undefined = (void 0); // Paranoia - -// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to -// create, and consume so much memory, that the browser appears frozen. -var MAX_ARRAY_LENGTH = 1e5; - -// Approximations of internal ECMAScript conversion functions -var ECMAScript = (function() { - // Stash a copy in case other scripts modify these - var opts = Object.prototype.toString, - ophop = Object.prototype.hasOwnProperty; - - return { - // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: - Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); }, - HasProperty: function(o, p) { return p in o; }, - HasOwnProperty: function(o, p) { return ophop.call(o, p); }, - IsCallable: function(o) { return typeof o === 'function'; }, - ToInt32: function(v) { return v >> 0; }, - ToUint32: function(v) { return v >>> 0; } - }; -}()); - -// Snapshot intrinsics -var LN2 = Math.LN2, - abs = Math.abs, - floor = Math.floor, - log = Math.log, - min = Math.min, - pow = Math.pow, - round = Math.round; - -// ES5: lock down object properties -function configureProperties(obj) { - if (getOwnPropNames && defineProp) { - var props = getOwnPropNames(obj), i; - for (i = 0; i < props.length; i += 1) { - defineProp(obj, props[i], { - value: obj[props[i]], - writable: false, - enumerable: false, - configurable: false - }); - } - } -} - -// emulate ES5 getter/setter API using legacy APIs -// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx -// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but -// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) -var defineProp -if (Object.defineProperty && (function() { - try { - Object.defineProperty({}, 'x', {}); - return true; - } catch (e) { - return false; - } - })()) { - defineProp = Object.defineProperty; -} else { - defineProp = function(o, p, desc) { - if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object"); - if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); } - if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); } - if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; } - return o; - }; -} - -var getOwnPropNames = Object.getOwnPropertyNames || function (o) { - if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object"); - var props = [], p; - for (p in o) { - if (ECMAScript.HasOwnProperty(o, p)) { - props.push(p); - } - } - return props; -}; - -// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) -// for index in 0 ... obj.length -function makeArrayAccessors(obj) { - if (!defineProp) { return; } - - if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); - - function makeArrayAccessor(index) { - defineProp(obj, index, { - 'get': function() { return obj._getter(index); }, - 'set': function(v) { obj._setter(index, v); }, - enumerable: true, - configurable: false - }); - } - - var i; - for (i = 0; i < obj.length; i += 1) { - makeArrayAccessor(i); - } -} - -// Internal conversion functions: -// pack() - take a number (interpreted as Type), output a byte array -// unpack() - take a byte array, output a Type-like number - -function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; } -function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; } - -function packI8(n) { return [n & 0xff]; } -function unpackI8(bytes) { return as_signed(bytes[0], 8); } - -function packU8(n) { return [n & 0xff]; } -function unpackU8(bytes) { return as_unsigned(bytes[0], 8); } - -function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; } - -function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); } - -function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; } -function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); } - -function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } -function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } - -function packIEEE754(v, ebits, fbits) { - - var bias = (1 << (ebits - 1)) - 1, - s, e, f, ln, - i, bits, str, bytes; - - function roundToEven(n) { - var w = floor(n), f = n - w; - if (f < 0.5) - return w; - if (f > 0.5) - return w + 1; - return w % 2 ? w + 1 : w; - } - - // Compute sign, exponent, fraction - if (v !== v) { - // NaN - // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping - e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0; - } else if (v === Infinity || v === -Infinity) { - e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; - } else if (v === 0) { - e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; - } else { - s = v < 0; - v = abs(v); - - if (v >= pow(2, 1 - bias)) { - e = min(floor(log(v) / LN2), 1023); - f = roundToEven(v / pow(2, e) * pow(2, fbits)); - if (f / pow(2, fbits) >= 2) { - e = e + 1; - f = 1; - } - if (e > bias) { - // Overflow - e = (1 << ebits) - 1; - f = 0; - } else { - // Normalized - e = e + bias; - f = f - pow(2, fbits); - } - } else { - // Denormalized - e = 0; - f = roundToEven(v / pow(2, 1 - bias - fbits)); - } - } - - // Pack sign, exponent, fraction - bits = []; - for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); } - for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); } - bits.push(s ? 1 : 0); - bits.reverse(); - str = bits.join(''); - - // Bits to bytes - bytes = []; - while (str.length) { - bytes.push(parseInt(str.substring(0, 8), 2)); - str = str.substring(8); - } - return bytes; -} - -function unpackIEEE754(bytes, ebits, fbits) { - - // Bytes to bits - var bits = [], i, j, b, str, - bias, s, e, f; - - for (i = bytes.length; i; i -= 1) { - b = bytes[i - 1]; - for (j = 8; j; j -= 1) { - bits.push(b % 2 ? 1 : 0); b = b >> 1; - } - } - bits.reverse(); - str = bits.join(''); - - // Unpack sign, exponent, fraction - bias = (1 << (ebits - 1)) - 1; - s = parseInt(str.substring(0, 1), 2) ? -1 : 1; - e = parseInt(str.substring(1, 1 + ebits), 2); - f = parseInt(str.substring(1 + ebits), 2); - - // Produce number - if (e === (1 << ebits) - 1) { - return f !== 0 ? NaN : s * Infinity; - } else if (e > 0) { - // Normalized - return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); - } else if (f !== 0) { - // Denormalized - return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); - } else { - return s < 0 ? -0 : 0; - } -} - -function unpackF64(b) { return unpackIEEE754(b, 11, 52); } -function packF64(v) { return packIEEE754(v, 11, 52); } -function unpackF32(b) { return unpackIEEE754(b, 8, 23); } -function packF32(v) { return packIEEE754(v, 8, 23); } - - -// -// 3 The ArrayBuffer Type -// - -(function() { - - /** @constructor */ - var ArrayBuffer = function ArrayBuffer(length) { - length = ECMAScript.ToInt32(length); - if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer'); - - this.byteLength = length; - this._bytes = []; - this._bytes.length = length; - - var i; - for (i = 0; i < this.byteLength; i += 1) { - this._bytes[i] = 0; - } - - configureProperties(this); - }; - - exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer; - - // - // 4 The ArrayBufferView Type - // - - // NOTE: this constructor is not exported - /** @constructor */ - var ArrayBufferView = function ArrayBufferView() { - //this.buffer = null; - //this.byteOffset = 0; - //this.byteLength = 0; - }; - - // - // 5 The Typed Array View Types - // - - function makeConstructor(bytesPerElement, pack, unpack) { - // Each TypedArray type requires a distinct constructor instance with - // identical logic, which this produces. - - var ctor; - ctor = function(buffer, byteOffset, length) { - var array, sequence, i, s; - - if (!arguments.length || typeof arguments[0] === 'number') { - // Constructor(unsigned long length) - this.length = ECMAScript.ToInt32(arguments[0]); - if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer'); - - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) { - // Constructor(TypedArray array) - array = arguments[0]; - - this.length = array.length; - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - this._setter(i, array._getter(i)); - } - } else if (typeof arguments[0] === 'object' && - !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(sequence array) - sequence = arguments[0]; - - this.length = ECMAScript.ToUint32(sequence.length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - this.buffer = new ArrayBuffer(this.byteLength); - this.byteOffset = 0; - - for (i = 0; i < this.length; i += 1) { - s = sequence[i]; - this._setter(i, Number(s)); - } - } else if (typeof arguments[0] === 'object' && - (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, optional unsigned long length) - this.buffer = buffer; - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (this.byteOffset % this.BYTES_PER_ELEMENT) { - // The given byteOffset must be a multiple of the element - // size of the specific type, otherwise an exception is raised. - throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - - if (this.byteLength % this.BYTES_PER_ELEMENT) { - throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); - } - this.length = this.byteLength / this.BYTES_PER_ELEMENT; - } else { - this.length = ECMAScript.ToUint32(length); - this.byteLength = this.length * this.BYTES_PER_ELEMENT; - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - - this.constructor = ctor; - - configureProperties(this); - makeArrayAccessors(this); - }; - - ctor.prototype = new ArrayBufferView(); - ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; - ctor.prototype._pack = pack; - ctor.prototype._unpack = unpack; - ctor.BYTES_PER_ELEMENT = bytesPerElement; - - // getter type (unsigned long index); - ctor.prototype._getter = function(index) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = [], i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - bytes.push(this.buffer._bytes[o]); - } - return this._unpack(bytes); - }; - - // NONSTANDARD: convenience alias for getter: type get(unsigned long index); - ctor.prototype.get = ctor.prototype._getter; - - // setter void (unsigned long index, type value); - ctor.prototype._setter = function(index, value) { - if (arguments.length < 2) throw new SyntaxError("Not enough arguments"); - - index = ECMAScript.ToUint32(index); - if (index >= this.length) { - return undefined; - } - - var bytes = this._pack(value), i, o; - for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; - i < this.BYTES_PER_ELEMENT; - i += 1, o += 1) { - this.buffer._bytes[o] = bytes[i]; - } - }; - - // void set(TypedArray array, optional unsigned long offset); - // void set(sequence array, optional unsigned long offset); - ctor.prototype.set = function(index, value) { - if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); - var array, sequence, offset, len, - i, s, d, - byteOffset, byteLength, tmp; - - if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { - // void set(TypedArray array, optional unsigned long offset); - array = arguments[0]; - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + array.length > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; - byteLength = array.length * this.BYTES_PER_ELEMENT; - - if (array.buffer === this.buffer) { - tmp = []; - for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { - tmp[i] = array.buffer._bytes[s]; - } - for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { - this.buffer._bytes[d] = tmp[i]; - } - } else { - for (i = 0, s = array.byteOffset, d = byteOffset; - i < byteLength; i += 1, s += 1, d += 1) { - this.buffer._bytes[d] = array.buffer._bytes[s]; - } - } - } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { - // void set(sequence array, optional unsigned long offset); - sequence = arguments[0]; - len = ECMAScript.ToUint32(sequence.length); - offset = ECMAScript.ToUint32(arguments[1]); - - if (offset + len > this.length) { - throw new RangeError("Offset plus length of array is out of range"); - } - - for (i = 0; i < len; i += 1) { - s = sequence[i]; - this._setter(offset + i, Number(s)); - } - } else { - throw new TypeError("Unexpected argument type(s)"); - } - }; - - // TypedArray subarray(long begin, optional long end); - ctor.prototype.subarray = function(start, end) { - function clamp(v, min, max) { return v < min ? min : v > max ? max : v; } - - start = ECMAScript.ToInt32(start); - end = ECMAScript.ToInt32(end); - - if (arguments.length < 1) { start = 0; } - if (arguments.length < 2) { end = this.length; } - - if (start < 0) { start = this.length + start; } - if (end < 0) { end = this.length + end; } - - start = clamp(start, 0, this.length); - end = clamp(end, 0, this.length); - - var len = end - start; - if (len < 0) { - len = 0; - } - - return new this.constructor( - this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); - }; - - return ctor; - } - - var Int8Array = makeConstructor(1, packI8, unpackI8); - var Uint8Array = makeConstructor(1, packU8, unpackU8); - var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8); - var Int16Array = makeConstructor(2, packI16, unpackI16); - var Uint16Array = makeConstructor(2, packU16, unpackU16); - var Int32Array = makeConstructor(4, packI32, unpackI32); - var Uint32Array = makeConstructor(4, packU32, unpackU32); - var Float32Array = makeConstructor(4, packF32, unpackF32); - var Float64Array = makeConstructor(8, packF64, unpackF64); - - exports.Int8Array = exports.Int8Array || Int8Array; - exports.Uint8Array = exports.Uint8Array || Uint8Array; - exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray; - exports.Int16Array = exports.Int16Array || Int16Array; - exports.Uint16Array = exports.Uint16Array || Uint16Array; - exports.Int32Array = exports.Int32Array || Int32Array; - exports.Uint32Array = exports.Uint32Array || Uint32Array; - exports.Float32Array = exports.Float32Array || Float32Array; - exports.Float64Array = exports.Float64Array || Float64Array; -}()); - -// -// 6 The DataView View Type -// - -(function() { - function r(array, index) { - return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; - } - - var IS_BIG_ENDIAN = (function() { - var u16array = new(exports.Uint16Array)([0x1234]), - u8array = new(exports.Uint8Array)(u16array.buffer); - return r(u8array, 0) === 0x12; - }()); - - // Constructor(ArrayBuffer buffer, - // optional unsigned long byteOffset, - // optional unsigned long byteLength) - /** @constructor */ - var DataView = function DataView(buffer, byteOffset, byteLength) { - if (arguments.length === 0) { - buffer = new exports.ArrayBuffer(0); - } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) { - throw new TypeError("TypeError"); - } - - this.buffer = buffer || new exports.ArrayBuffer(0); - - this.byteOffset = ECMAScript.ToUint32(byteOffset); - if (this.byteOffset > this.buffer.byteLength) { - throw new RangeError("byteOffset out of range"); - } - - if (arguments.length < 3) { - this.byteLength = this.buffer.byteLength - this.byteOffset; - } else { - this.byteLength = ECMAScript.ToUint32(byteLength); - } - - if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { - throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); - } - - configureProperties(this); - }; - - function makeGetter(arrayType) { - return function(byteOffset, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - byteOffset += this.byteOffset; - - var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), - bytes = [], i; - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(uint8Array, i)); - } - - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0); - }; - } - - DataView.prototype.getUint8 = makeGetter(exports.Uint8Array); - DataView.prototype.getInt8 = makeGetter(exports.Int8Array); - DataView.prototype.getUint16 = makeGetter(exports.Uint16Array); - DataView.prototype.getInt16 = makeGetter(exports.Int16Array); - DataView.prototype.getUint32 = makeGetter(exports.Uint32Array); - DataView.prototype.getInt32 = makeGetter(exports.Int32Array); - DataView.prototype.getFloat32 = makeGetter(exports.Float32Array); - DataView.prototype.getFloat64 = makeGetter(exports.Float64Array); - - function makeSetter(arrayType) { - return function(byteOffset, value, littleEndian) { - - byteOffset = ECMAScript.ToUint32(byteOffset); - if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { - throw new RangeError("Array index out of range"); - } - - // Get bytes - var typeArray = new arrayType([value]), - byteArray = new exports.Uint8Array(typeArray.buffer), - bytes = [], i, byteView; - - for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { - bytes.push(r(byteArray, i)); - } - - // Flip if necessary - if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { - bytes.reverse(); - } - - // Write them - byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); - byteView.set(bytes); - }; - } - - DataView.prototype.setUint8 = makeSetter(exports.Uint8Array); - DataView.prototype.setInt8 = makeSetter(exports.Int8Array); - DataView.prototype.setUint16 = makeSetter(exports.Uint16Array); - DataView.prototype.setInt16 = makeSetter(exports.Int16Array); - DataView.prototype.setUint32 = makeSetter(exports.Uint32Array); - DataView.prototype.setInt32 = makeSetter(exports.Int32Array); - DataView.prototype.setFloat32 = makeSetter(exports.Float32Array); - DataView.prototype.setFloat64 = makeSetter(exports.Float64Array); - - exports.DataView = exports.DataView || DataView; - -}()); diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/package.json b/ThinFilm_Analyzer/frontend/node_modules/typedarray/package.json deleted file mode 100644 index a7854a0fc5fb420607f8519afbbf588597f0628e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "typedarray", - "version": "0.0.6", - "description": "TypedArray polyfill for old browsers", - "main": "index.js", - "devDependencies": { - "tape": "~2.3.2" - }, - "scripts": { - "test": "tape test/*.js test/server/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/typedarray.git" - }, - "homepage": "https://github.com/substack/typedarray", - "keywords": [ - "ArrayBuffer", - "DataView", - "Float32Array", - "Float64Array", - "Int8Array", - "Int16Array", - "Int32Array", - "Uint8Array", - "Uint8ClampedArray", - "Uint16Array", - "Uint32Array", - "typed", - "array", - "polyfill" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..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", - "android-browser/4.2..latest" - ] - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/readme.markdown b/ThinFilm_Analyzer/frontend/node_modules/typedarray/readme.markdown deleted file mode 100644 index d18f6f7197e6a5d852c592ba7539d58e9e4ea729..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/readme.markdown +++ /dev/null @@ -1,61 +0,0 @@ -# typedarray - -TypedArray polyfill ripped from [this -module](https://raw.github.com/inexorabletash/polyfill). - -[![build status](https://secure.travis-ci.org/substack/typedarray.png)](http://travis-ci.org/substack/typedarray) - -[![testling badge](https://ci.testling.com/substack/typedarray.png)](https://ci.testling.com/substack/typedarray) - -# example - -``` js -var Uint8Array = require('typedarray').Uint8Array; -var ua = new Uint8Array(5); -ua[1] = 256 + 55; -console.log(ua[1]); -``` - -output: - -``` -55 -``` - -# methods - -``` js -var TA = require('typedarray') -``` - -The `TA` object has the following constructors: - -* TA.ArrayBuffer -* TA.DataView -* TA.Float32Array -* TA.Float64Array -* TA.Int8Array -* TA.Int16Array -* TA.Int32Array -* TA.Uint8Array -* TA.Uint8ClampedArray -* TA.Uint16Array -* TA.Uint32Array - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install typedarray -``` - -To use this module in the browser, compile with -[browserify](http://browserify.org) -or download a UMD build from browserify CDN: - -http://wzrd.in/standalone/typedarray@latest - -# license - -MIT diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/test/server/undef_globals.js b/ThinFilm_Analyzer/frontend/node_modules/typedarray/test/server/undef_globals.js deleted file mode 100644 index 425950f9fc9ed7c09d78c749f27014cfdf4a84d3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/test/server/undef_globals.js +++ /dev/null @@ -1,19 +0,0 @@ -var test = require('tape'); -var vm = require('vm'); -var fs = require('fs'); -var src = fs.readFileSync(__dirname + '/../../index.js', 'utf8'); - -test('u8a without globals', function (t) { - var c = { - module: { exports: {} }, - }; - c.exports = c.module.exports; - vm.runInNewContext(src, c); - var TA = c.module.exports; - var ua = new(TA.Uint8Array)(5); - - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/typedarray/test/tarray.js b/ThinFilm_Analyzer/frontend/node_modules/typedarray/test/tarray.js deleted file mode 100644 index df596a34f23c0ef931cd5b41139985b8d23e8e2f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/typedarray/test/tarray.js +++ /dev/null @@ -1,10 +0,0 @@ -var TA = require('../'); -var test = require('tape'); - -test('tiny u8a test', function (t) { - var ua = new(TA.Uint8Array)(5); - t.equal(ua.length, 5); - ua[1] = 256 + 55; - t.equal(ua[1], 55); - t.end(); -}); diff --git a/ThinFilm_Analyzer/frontend/node_modules/unquote/.npmignore b/ThinFilm_Analyzer/frontend/node_modules/unquote/.npmignore deleted file mode 100644 index f05b1f265dc7e157ab0755423fbd8ccce6972301..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/unquote/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -test diff --git a/ThinFilm_Analyzer/frontend/node_modules/unquote/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/unquote/LICENSE deleted file mode 100644 index be9c1a04ee05ca724b9638f4030e29d952870267..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/unquote/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Cameron Lakenen - -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, sub-license, 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/ThinFilm_Analyzer/frontend/node_modules/unquote/README.md b/ThinFilm_Analyzer/frontend/node_modules/unquote/README.md deleted file mode 100644 index 47ae30bcfb5f2e2e548c7f1ad8b3c3613712d268..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/unquote/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# unquote - -Remove wrapping quotes from a string. Returns an empty string if the first arg is falsey. - -## Installation - -``` -npm install unquote -``` - - -## Usage - -Example -```js -var unquote = require('unquote') - -unquote('"hello, world"') // 'hello, world' -unquote('\'hello, world\'') // 'hello, world' -``` - - -## Running Tests - -``` -npm test -``` - -## License - -([The MIT License](LICENSE)) - -Copyright 2017 Cameron Lakenen diff --git a/ThinFilm_Analyzer/frontend/node_modules/unquote/index.js b/ThinFilm_Analyzer/frontend/node_modules/unquote/index.js deleted file mode 100644 index 016a782b9ecd2bbff5f64539964e1905aed12e65..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/unquote/index.js +++ /dev/null @@ -1,14 +0,0 @@ -var reg = /[\'\"]/ - -module.exports = function unquote(str) { - if (!str) { - return '' - } - if (reg.test(str.charAt(0))) { - str = str.substr(1) - } - if (reg.test(str.charAt(str.length - 1))) { - str = str.substr(0, str.length - 1) - } - return str -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/unquote/package.json b/ThinFilm_Analyzer/frontend/node_modules/unquote/package.json deleted file mode 100644 index 861c5bb09950a015400552eec4ce3fc027d3fe34..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/unquote/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "unquote", - "version": "1.1.1", - "description": "Remove wrapping quotes from a string.", - "main": "index.js", - "scripts": { - "test": "node test/*" - }, - "author": "Cameron Lakenen ", - "license": "MIT", - "devDependencies": { - "tape": "^2.13.4" - }, - "directories": { - "test": "test" - }, - "repository": { - "type": "git", - "url": "https://github.com/lakenen/node-unquote.git" - }, - "bugs": { - "url": "https://github.com/lakenen/node-unquote/issues" - }, - "homepage": "https://github.com/lakenen/node-unquote", - "keywords": [ - "string", - "unquote", - "quotes" - ] -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/LICENSE deleted file mode 100644 index 377ae1bee969f65948f68eaeecee947e04760073..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright 2022 Andrey Sitnik and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/README.md b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/README.md deleted file mode 100644 index 6a4770bd3540378a86d6181d6bad8a959b3809e3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Update Browserslist DB - -Browserslist logo by Anton Popov - -CLI tool to update `caniuse-lite` with browsers DB -from [Browserslist](https://github.com/browserslist/browserslist/) config. - -Some queries like `last 2 versions` or `>1%` depend on actual data -from `caniuse-lite`. - -```sh -npx update-browserslist-db@latest -``` -Or if using `pnpm`: -```sh -pnpm exec update-browserslist-db latest -``` -Or if using `yarn`: -```sh -yarn dlx update-browserslist-db@latest -``` - - - Sponsored by Evil Martians - - -## Docs -Read full docs **[here](https://github.com/browserslist/update-db#readme)**. diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/check-npm-version.js b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/check-npm-version.js deleted file mode 100644 index b06811a52239173c970529c41c8e5630b0fee50e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/check-npm-version.js +++ /dev/null @@ -1,17 +0,0 @@ -let { execSync } = require('child_process') -let pico = require('picocolors') - -try { - let version = parseInt(execSync('npm -v')) - if (version <= 6) { - process.stderr.write( - pico.red( - 'Update npm or call ' + - pico.yellow('npx browserslist@latest --update-db') + - '\n' - ) - ) - process.exit(1) - } - // eslint-disable-next-line no-unused-vars -} catch (e) {} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/cli.js b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/cli.js deleted file mode 100644 index 1388e94d08ce1c949cd65ef98172fa64c16c096a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/cli.js +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env node - -let { readFileSync } = require('fs') -let { join } = require('path') - -require('./check-npm-version') -let updateDb = require('./') - -const ROOT = __dirname - -function getPackage() { - return JSON.parse(readFileSync(join(ROOT, 'package.json'))) -} - -let args = process.argv.slice(2) - -let USAGE = 'Usage:\n npx update-browserslist-db\n' - -function isArg(arg) { - return args.some(i => i === arg) -} - -function error(msg) { - process.stderr.write('update-browserslist-db: ' + msg + '\n') - process.exit(1) -} - -if (isArg('--help') || isArg('-h')) { - process.stdout.write(getPackage().description + '.\n\n' + USAGE + '\n') -} else if (isArg('--version') || isArg('-v')) { - process.stdout.write('browserslist-lint ' + getPackage().version + '\n') -} else { - try { - updateDb() - } catch (e) { - if (e.name === 'BrowserslistUpdateError') { - error(e.message) - } else { - throw e - } - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/index.d.ts b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/index.d.ts deleted file mode 100644 index 7ae5acd345325ea0a8708f5ee01ab6054e45a62d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Run update and print output to terminal. - */ -declare function updateDb(print?: (str: string) => void): void - -export = updateDb diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/index.js b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/index.js deleted file mode 100644 index 8909e39901d524e3a4d8de88f0090b430e704c4f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/index.js +++ /dev/null @@ -1,347 +0,0 @@ -let { execSync } = require('child_process') -let escalade = require('escalade/sync') -let { existsSync, readFileSync, writeFileSync } = require('fs') -let { join } = require('path') -let pico = require('picocolors') - -const { detectEOL, detectIndent } = require('./utils') - -function BrowserslistUpdateError(message) { - this.name = 'BrowserslistUpdateError' - this.message = message - this.browserslist = true - if (Error.captureStackTrace) { - Error.captureStackTrace(this, BrowserslistUpdateError) - } -} - -BrowserslistUpdateError.prototype = Error.prototype - -// Check if HADOOP_HOME is set to determine if this is running in a Hadoop environment -const IsHadoopExists = !!process.env.HADOOP_HOME -const yarnCommand = IsHadoopExists ? 'yarnpkg' : 'yarn' - -/* c8 ignore next 3 */ -function defaultPrint(str) { - process.stdout.write(str) -} - -function detectLockfile() { - let packageDir = escalade('.', (dir, names) => { - return names.indexOf('package.json') !== -1 ? dir : '' - }) - - if (!packageDir) { - throw new BrowserslistUpdateError( - 'Cannot find package.json. ' + - 'Is this the right directory to run `npx update-browserslist-db` in?' - ) - } - - let lockfileNpm = join(packageDir, 'package-lock.json') - let lockfileShrinkwrap = join(packageDir, 'npm-shrinkwrap.json') - let lockfileYarn = join(packageDir, 'yarn.lock') - let lockfilePnpm = join(packageDir, 'pnpm-lock.yaml') - let lockfileBun = join(packageDir, 'bun.lock') - let lockfileBunBinary = join(packageDir, 'bun.lockb') - - if (existsSync(lockfilePnpm)) { - return { file: lockfilePnpm, mode: 'pnpm' } - } else if (existsSync(lockfileBun) || existsSync(lockfileBunBinary)) { - return { file: lockfileBun, mode: 'bun' } - } else if (existsSync(lockfileNpm)) { - return { file: lockfileNpm, mode: 'npm' } - } else if (existsSync(lockfileYarn)) { - let lock = { file: lockfileYarn, mode: 'yarn' } - lock.content = readFileSync(lock.file).toString() - lock.version = /# yarn lockfile v1/.test(lock.content) ? 1 : 2 - return lock - } else if (existsSync(lockfileShrinkwrap)) { - return { file: lockfileShrinkwrap, mode: 'npm' } - } - throw new BrowserslistUpdateError( - 'No lockfile found. Run "npm install", "yarn install" or "pnpm install"' - ) -} - -function getLatestInfo(lock) { - if (lock.mode === 'yarn') { - if (lock.version === 1) { - return JSON.parse( - execSync(yarnCommand + ' info caniuse-lite --json').toString() - ).data - } else { - return JSON.parse( - execSync(yarnCommand + ' npm info caniuse-lite --json').toString() - ) - } - } - if (lock.mode === 'pnpm') { - return JSON.parse(execSync('pnpm info caniuse-lite --json').toString()) - } - if (lock.mode === 'bun') { - return JSON.parse(execSync(' bun info caniuse-lite --json').toString()) - } - - return JSON.parse(execSync('npm show caniuse-lite --json').toString()) -} - -function getBrowsers() { - let browserslist = require('browserslist') - return browserslist().reduce((result, entry) => { - if (!result[entry[0]]) { - result[entry[0]] = [] - } - result[entry[0]].push(entry[1]) - return result - }, {}) -} - -function diffBrowsers(old, current) { - let browsers = Object.keys(old).concat( - Object.keys(current).filter(browser => old[browser] === undefined) - ) - return browsers - .map(browser => { - let oldVersions = old[browser] || [] - let currentVersions = current[browser] || [] - let common = oldVersions.filter(v => currentVersions.includes(v)) - let added = currentVersions.filter(v => !common.includes(v)) - let removed = oldVersions.filter(v => !common.includes(v)) - return removed - .map(v => pico.red('- ' + browser + ' ' + v)) - .concat(added.map(v => pico.green('+ ' + browser + ' ' + v))) - }) - .reduce((result, array) => result.concat(array), []) - .join('\n') -} - -function updateNpmLockfile(lock, latest) { - let metadata = { latest, versions: [] } - let content = deletePackage(JSON.parse(lock.content), metadata) - metadata.content = JSON.stringify(content, null, detectIndent(lock.content)) - return metadata -} - -function deletePackage(node, metadata) { - if (node.dependencies) { - if (node.dependencies['caniuse-lite']) { - let version = node.dependencies['caniuse-lite'].version - metadata.versions[version] = true - delete node.dependencies['caniuse-lite'] - } - for (let i in node.dependencies) { - node.dependencies[i] = deletePackage(node.dependencies[i], metadata) - } - } - if (node.packages) { - for (let path in node.packages) { - if (path.endsWith('/caniuse-lite')) { - metadata.versions[node.packages[path].version] = true - delete node.packages[path] - } - } - } - return node -} - -let yarnVersionRe = /version "(.*?)"/ - -function updateYarnLockfile(lock, latest) { - let blocks = lock.content.split(/(\n{2,})/).map(block => { - return block.split('\n') - }) - let versions = {} - blocks.forEach(lines => { - if (lines[0].indexOf('caniuse-lite@') !== -1) { - let match = yarnVersionRe.exec(lines[1]) - versions[match[1]] = true - if (match[1] !== latest.version) { - lines[1] = lines[1].replace( - /version "[^"]+"/, - 'version "' + latest.version + '"' - ) - lines[2] = lines[2].replace( - /resolved "[^"]+"/, - 'resolved "' + latest.dist.tarball + '"' - ) - if (lines.length === 4) { - lines[3] = latest.dist.integrity - ? lines[3].replace( - /integrity .+/, - 'integrity ' + latest.dist.integrity - ) - : '' - } - } - } - }) - let content = blocks.map(lines => lines.join('\n')).join('') - return { content, versions } -} - -function updateLockfile(lock, latest) { - if (!lock.content) lock.content = readFileSync(lock.file).toString() - - let updatedLockFile - if (lock.mode === 'yarn') { - updatedLockFile = updateYarnLockfile(lock, latest) - } else { - updatedLockFile = updateNpmLockfile(lock, latest) - } - updatedLockFile.content = updatedLockFile.content.replace( - /\n/g, - detectEOL(lock.content) - ) - return updatedLockFile -} - -function updatePackageManually(print, lock, latest) { - let lockfileData = updateLockfile(lock, latest) - let caniuseVersions = Object.keys(lockfileData.versions).sort() - if (caniuseVersions.length === 1 && caniuseVersions[0] === latest.version) { - print( - 'Installed version: ' + - pico.bold(pico.green(caniuseVersions[0])) + - '\n' + - pico.bold(pico.green('caniuse-lite is up to date')) + - '\n' - ) - return - } - - if (caniuseVersions.length === 0) { - caniuseVersions[0] = 'none' - } - print( - 'Installed version' + - (caniuseVersions.length === 1 ? ': ' : 's: ') + - pico.bold(pico.red(caniuseVersions.join(', '))) + - '\n' + - 'Removing old caniuse-lite from lock file\n' - ) - writeFileSync(lock.file, lockfileData.content) - - let install = - lock.mode === 'yarn' ? yarnCommand + ' add -W' : lock.mode + ' install' - print( - 'Installing new caniuse-lite version\n' + - pico.yellow('$ ' + install + ' caniuse-lite baseline-browser-mapping') + - '\n' - ) - try { - execSync(install + ' caniuse-lite baseline-browser-mapping') - } catch (e) /* c8 ignore start */ { - print( - pico.red( - '\n' + - e.stack + - '\n\n' + - 'Problem with `' + - install + - ' caniuse-lite` call. ' + - 'Run it manually.\n' - ) - ) - process.exit(1) - } /* c8 ignore end */ - - let del = - lock.mode === 'yarn' ? yarnCommand + ' remove -W' : lock.mode + ' uninstall' - print( - 'Cleaning package.json dependencies from caniuse-lite\n' + - pico.yellow('$ ' + del + ' caniuse-lite baseline-browser-mapping') + - '\n' - ) - execSync(del + ' caniuse-lite baseline-browser-mapping') -} - -function updateWith(print, cmd) { - print('Updating caniuse-lite version\n' + pico.yellow('$ ' + cmd) + '\n') - try { - execSync(cmd) - } catch (e) /* c8 ignore start */ { - print(pico.red(e.stdout.toString())) - print( - pico.red( - '\n' + - e.stack + - '\n\n' + - 'Problem with `' + - cmd + - '` call. ' + - 'Run it manually.\n' - ) - ) - process.exit(1) - } /* c8 ignore end */ -} - -module.exports = function updateDB(print = defaultPrint) { - let lock = detectLockfile() - let latest = getLatestInfo(lock) - - let listError - let oldList - try { - oldList = getBrowsers() - } catch (e) { - listError = e - } - - print('Latest version: ' + pico.bold(pico.green(latest.version)) + '\n') - - if (lock.mode === 'yarn' && lock.version !== 1) { - updateWith( - print, - yarnCommand + ' up -R caniuse-lite baseline-browser-mapping' - ) - } else if (lock.mode === 'pnpm') { - let lockContent = readFileSync(lock.file).toString() - let packages = lockContent.includes('baseline-browser-mapping') - ? 'caniuse-lite baseline-browser-mapping' - : 'caniuse-lite' - updateWith(print, 'pnpm up --depth=Infinity --no-save ' + packages) - } else if (lock.mode === 'bun') { - updateWith(print, 'bun update caniuse-lite baseline-browser-mapping') - } else { - updatePackageManually(print, lock, latest) - } - - print('caniuse-lite has been successfully updated\n') - - let newList - if (!listError) { - try { - newList = getBrowsers() - } catch (e) /* c8 ignore start */ { - listError = e - } /* c8 ignore end */ - } - - if (listError) { - if (listError.message.includes("Cannot find module 'browserslist'")) { - print( - pico.gray( - 'Install `browserslist` to your direct dependencies ' + - 'to see target browser changes\n' - ) - ) - } else { - print( - pico.gray( - 'Problem with browser list retrieval.\n' + - 'Target browser changes won’t be shown.\n' - ) - ) - } - } else { - let changes = diffBrowsers(oldList, newList) - if (changes) { - print('\nTarget browser changes:\n') - print(changes + '\n') - } else { - print('\n' + pico.green('No target browser changes') + '\n') - } - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/package.json b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/package.json deleted file mode 100644 index 1ed5daf0df8f821441173eb6ba5bdf0e7467c97b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "update-browserslist-db", - "version": "1.2.3", - "description": "CLI tool to update caniuse-lite to refresh target browsers from Browserslist config", - "keywords": [ - "caniuse", - "browsers", - "target" - ], - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "author": "Andrey Sitnik ", - "license": "MIT", - "repository": "browserslist/update-db", - "types": "./index.d.ts", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - }, - "bin": "cli.js" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/utils.js b/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/utils.js deleted file mode 100644 index c63b278c01079f60115dfa3d23276bf052613c74..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-browserslist-db/utils.js +++ /dev/null @@ -1,25 +0,0 @@ -const { EOL } = require('os') - -const getFirstRegexpMatchOrDefault = (text, regexp, defaultValue) => { - regexp.lastIndex = 0 // https://stackoverflow.com/a/11477448/4536543 - let match = regexp.exec(text) - if (match !== null) { - return match[1] - } else { - return defaultValue - } -} - -const DEFAULT_INDENT = ' ' -const INDENT_REGEXP = /^([ \t]+)[^\s]/m - -module.exports.detectIndent = text => - getFirstRegexpMatchOrDefault(text, INDENT_REGEXP, DEFAULT_INDENT) -module.exports.DEFAULT_INDENT = DEFAULT_INDENT - -const DEFAULT_EOL = EOL -const EOL_REGEXP = /(\r\n|\n|\r)/g - -module.exports.detectEOL = text => - getFirstRegexpMatchOrDefault(text, EOL_REGEXP, DEFAULT_EOL) -module.exports.DEFAULT_EOL = DEFAULT_EOL diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-diff/.eslintrc.json b/ThinFilm_Analyzer/frontend/node_modules/update-diff/.eslintrc.json deleted file mode 100644 index 1e5e08b37332379d194a6a5e8fd259d8de4f7fc9..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-diff/.eslintrc.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-magic-numbers": ["warn", { "ignore": [1, 0, -1], "ignoreArrayIndexes": true}], - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-diff/.npmignore b/ThinFilm_Analyzer/frontend/node_modules/update-diff/.npmignore deleted file mode 100644 index c2658d7d1b31848c3b71960543cb0368e56cd4c7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-diff/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-diff/index.js b/ThinFilm_Analyzer/frontend/node_modules/update-diff/index.js deleted file mode 100644 index 34848486681ed632d206c66a2501e579a3b23931..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-diff/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @module update-diff - */ - -'use strict' - -module.exports = function updateDiff (obj, diff, mappers) { - if (!Array.isArray(mappers)) mappers = [].slice.call(arguments, 2) - - for (var i = 0, l = mappers.length; i < l; i++) { - var dict = mappers[i] - for (var prop in dict) { - if (diff[prop] !== undefined && !Array.isArray(diff[prop]) && obj[prop] === diff[prop]) continue - - if (prop in diff) { - var result - - if (dict[prop] === true) result = diff[prop] - else if (dict[prop] === false) continue - else if (typeof dict[prop] === 'function') { - result = dict[prop](diff[prop], obj, diff) - if (result === undefined) continue - } - - obj[prop] = result - } - } - } - - return obj -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-diff/package.json b/ThinFilm_Analyzer/frontend/node_modules/update-diff/package.json deleted file mode 100644 index a3daf8cd37b2a203b5c9615f3edc7fed8c7592bf..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-diff/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "update-diff", - "version": "1.1.0", - "description": "Update object by mapping diff properties", - "main": "index.js", - "scripts": { - "test": "node test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/dfcreative/update-diff.git" - }, - "keywords": [ - "update-diff", - "map", - "map-obj", - "object-filter", - "map-object", - "update", - "diff", - "difference", - "patch", - "object", - "compare", - "change" - ], - "author": "Dima Yv ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dfcreative/update-diff/issues" - }, - "homepage": "https://github.com/dfcreative/update-diff#readme" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-diff/readme.md b/ThinFilm_Analyzer/frontend/node_modules/update-diff/readme.md deleted file mode 100644 index 2a55147a501f411e2a1961a0d72997ef23941526..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-diff/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# update-diff [![unstable](https://img.shields.io/badge/stability-unstable-green.svg)](http://github.com/badges/stability-badges) - -Update object by mapping differences in order. Comes handy for organizing state updating. - -[![npm install update-diff](https://nodei.co/npm/update-diff.png?mini=true)](https://npmjs.org/package/update-diff/) - -```js -let prop = require('update-diff') - -let state = {propA: 0, propB: 1, propC: ['foo'], propD: 'bar'} - -updateDiff(state, modifications, [ -//initial mapping -{ - propA: value => value, - propB: true, - propC: Array.isArray -}, -//second-pass mapping -{ - propX: (x, state) => state.propB + x -}, -//third-pass mapping -{ - propA: (value, state) => state.propA ? 'a' : 'b' -} -]) - -// {propB: 1, propC: ['foo']} -``` - -## Related - -* [obj-map-prop](https://github.com/dfcreative/obj-map-prop) − map object properties by a dict -* [map-obj](https://github.com/sindresorhus/map-obj) − map properties by single function -* [filter-obj](https://github.com/sindresorhus/filter-obj) − filter properties by single function - - -## Credits - -© 2017 Dima Yv. MIT License diff --git a/ThinFilm_Analyzer/frontend/node_modules/update-diff/test.js b/ThinFilm_Analyzer/frontend/node_modules/update-diff/test.js deleted file mode 100644 index 02ef16df8712e8c3ac534ffb386d409fa3fe5713..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/update-diff/test.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict' - -let updateDiff = require('./') - -let assert = require('assert') - -assert.deepEqual(updateDiff({}, { - a: '100.1', - b: undefined, - c: null, - d: 1, - e: ['foo'], - f: 'bar' -}, { - a: parseFloat, - b: true, - c: false, - e: x => x[0], - d: f => f -}), { - a: 100.1, - b: undefined, - d: 1, - e: 'foo' -}) - diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/uri-js/LICENSE deleted file mode 100644 index 9338bde8eb43b24ce18b60c5628836f143c8eefb..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2011 Gary Court. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/README.md b/ThinFilm_Analyzer/frontend/node_modules/uri-js/README.md deleted file mode 100644 index 43e648bbad5c85d5346c88e82e39b9ecd5f70970..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/README.md +++ /dev/null @@ -1,203 +0,0 @@ -# URI.js - -URI.js is an [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt) compliant, scheme extendable URI parsing/validating/resolving library for all JavaScript environments (browsers, Node.js, etc). -It is also compliant with the IRI ([RFC 3987](http://www.ietf.org/rfc/rfc3987.txt)), IDNA ([RFC 5890](http://www.ietf.org/rfc/rfc5890.txt)), IPv6 Address ([RFC 5952](http://www.ietf.org/rfc/rfc5952.txt)), IPv6 Zone Identifier ([RFC 6874](http://www.ietf.org/rfc/rfc6874.txt)) specifications. - -URI.js has an extensive test suite, and works in all (Node.js, web) environments. It weighs in at 6.4kb (gzipped, 17kb deflated). - -## API - -### Parsing - - URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body"); - //returns: - //{ - // scheme : "uri", - // userinfo : "user:pass", - // host : "example.com", - // port : 123, - // path : "/one/two.three", - // query : "q1=a1&q2=a2", - // fragment : "body" - //} - -### Serializing - - URI.serialize({scheme : "http", host : "example.com", fragment : "footer"}) === "http://example.com/#footer" - -### Resolving - - URI.resolve("uri://a/b/c/d?q", "../../g") === "uri://a/g" - -### Normalizing - - URI.normalize("HTTP://ABC.com:80/%7Esmith/home.html") === "http://abc.com/~smith/home.html" - -### Comparison - - URI.equal("example://a/b/c/%7Bfoo%7D", "eXAMPLE://a/./b/../b/%63/%7bfoo%7d") === true - -### IP Support - - //IPv4 normalization - URI.normalize("//192.068.001.000") === "//192.68.1.0" - - //IPv6 normalization - URI.normalize("//[2001:0:0DB8::0:0001]") === "//[2001:0:db8::1]" - - //IPv6 zone identifier support - URI.parse("//[2001:db8::7%25en1]"); - //returns: - //{ - // host : "2001:db8::7%en1" - //} - -### IRI Support - - //convert IRI to URI - URI.serialize(URI.parse("http://examplé.org/rosé")) === "http://xn--exampl-gva.org/ros%C3%A9" - //convert URI to IRI - URI.serialize(URI.parse("http://xn--exampl-gva.org/ros%C3%A9"), {iri:true}) === "http://examplé.org/rosé" - -### Options - -All of the above functions can accept an additional options argument that is an object that can contain one or more of the following properties: - -* `scheme` (string) - - Indicates the scheme that the URI should be treated as, overriding the URI's normal scheme parsing behavior. - -* `reference` (string) - - If set to `"suffix"`, it indicates that the URI is in the suffix format, and the validator will use the option's `scheme` property to determine the URI's scheme. - -* `tolerant` (boolean, false) - - If set to `true`, the parser will relax URI resolving rules. - -* `absolutePath` (boolean, false) - - If set to `true`, the serializer will not resolve a relative `path` component. - -* `iri` (boolean, false) - - If set to `true`, the serializer will unescape non-ASCII characters as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). - -* `unicodeSupport` (boolean, false) - - If set to `true`, the parser will unescape non-ASCII characters in the parsed output as per [RFC 3987](http://www.ietf.org/rfc/rfc3987.txt). - -* `domainHost` (boolean, false) - - If set to `true`, the library will treat the `host` component as a domain name, and convert IDNs (International Domain Names) as per [RFC 5891](http://www.ietf.org/rfc/rfc5891.txt). - -## Scheme Extendable - -URI.js supports inserting custom [scheme](http://en.wikipedia.org/wiki/URI_scheme) dependent processing rules. Currently, URI.js has built in support for the following schemes: - -* http \[[RFC 2616](http://www.ietf.org/rfc/rfc2616.txt)\] -* https \[[RFC 2818](http://www.ietf.org/rfc/rfc2818.txt)\] -* ws \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\] -* wss \[[RFC 6455](http://www.ietf.org/rfc/rfc6455.txt)\] -* mailto \[[RFC 6068](http://www.ietf.org/rfc/rfc6068.txt)\] -* urn \[[RFC 2141](http://www.ietf.org/rfc/rfc2141.txt)\] -* urn:uuid \[[RFC 4122](http://www.ietf.org/rfc/rfc4122.txt)\] - -### HTTP/HTTPS Support - - URI.equal("HTTP://ABC.COM:80", "http://abc.com/") === true - URI.equal("https://abc.com", "HTTPS://ABC.COM:443/") === true - -### WS/WSS Support - - URI.parse("wss://example.com/foo?bar=baz"); - //returns: - //{ - // scheme : "wss", - // host: "example.com", - // resourceName: "/foo?bar=baz", - // secure: true, - //} - - URI.equal("WS://ABC.COM:80/chat#one", "ws://abc.com/chat") === true - -### Mailto Support - - URI.parse("mailto:alpha@example.com,bravo@example.com?subject=SUBSCRIBE&body=Sign%20me%20up!"); - //returns: - //{ - // scheme : "mailto", - // to : ["alpha@example.com", "bravo@example.com"], - // subject : "SUBSCRIBE", - // body : "Sign me up!" - //} - - URI.serialize({ - scheme : "mailto", - to : ["alpha@example.com"], - subject : "REMOVE", - body : "Please remove me", - headers : { - cc : "charlie@example.com" - } - }) === "mailto:alpha@example.com?cc=charlie@example.com&subject=REMOVE&body=Please%20remove%20me" - -### URN Support - - URI.parse("urn:example:foo"); - //returns: - //{ - // scheme : "urn", - // nid : "example", - // nss : "foo", - //} - -#### URN UUID Support - - URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); - //returns: - //{ - // scheme : "urn", - // nid : "uuid", - // uuid : "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", - //} - -## Usage - -To load in a browser, use the following tag: - - - -To load in a CommonJS/Module environment, first install with npm/yarn by running on the command line: - - npm install uri-js - # OR - yarn add uri-js - -Then, in your code, load it using: - - const URI = require("uri-js"); - -If you are writing your code in ES6+ (ESNEXT) or TypeScript, you would load it using: - - import * as URI from "uri-js"; - -Or you can load just what you need using named exports: - - import { parse, serialize, resolve, resolveComponents, normalize, equal, removeDotSegments, pctEncChar, pctDecChars, escapeComponent, unescapeComponent } from "uri-js"; - -## Breaking changes - -### Breaking changes from 3.x - -URN parsing has been completely changed to better align with the specification. Scheme is now always `urn`, but has two new properties: `nid` which contains the Namspace Identifier, and `nss` which contains the Namespace Specific String. The `nss` property will be removed by higher order scheme handlers, such as the UUID URN scheme handler. - -The UUID of a URN can now be found in the `uuid` property. - -### Breaking changes from 2.x - -URI validation has been removed as it was slow, exposed a vulnerabilty, and was generally not useful. - -### Breaking changes from 1.x - -The `errors` array on parsed components is now an `error` string. diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.d.ts deleted file mode 100644 index da51e23527705f85a4d8c513d9931ae2d3eec7a0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -export interface URIComponents { - scheme?: string; - userinfo?: string; - host?: string; - port?: number | string; - path?: string; - query?: string; - fragment?: string; - reference?: string; - error?: string; -} -export interface URIOptions { - scheme?: string; - reference?: string; - tolerant?: boolean; - absolutePath?: boolean; - iri?: boolean; - unicodeSupport?: boolean; - domainHost?: boolean; -} -export interface URISchemeHandler { - scheme: string; - parse(components: ParentComponents, options: Options): Components; - serialize(components: Components, options: Options): ParentComponents; - unicodeSupport?: boolean; - domainHost?: boolean; - absolutePath?: boolean; -} -export interface URIRegExps { - NOT_SCHEME: RegExp; - NOT_USERINFO: RegExp; - NOT_HOST: RegExp; - NOT_PATH: RegExp; - NOT_PATH_NOSCHEME: RegExp; - NOT_QUERY: RegExp; - NOT_FRAGMENT: RegExp; - ESCAPE: RegExp; - UNRESERVED: RegExp; - OTHER_CHARS: RegExp; - PCT_ENCODED: RegExp; - IPV4ADDRESS: RegExp; - IPV6ADDRESS: RegExp; -} -export declare const SCHEMES: { - [scheme: string]: URISchemeHandler; -}; -export declare function pctEncChar(chr: string): string; -export declare function pctDecChars(str: string): string; -export declare function parse(uriString: string, options?: URIOptions): URIComponents; -export declare function removeDotSegments(input: string): string; -export declare function serialize(components: URIComponents, options?: URIOptions): string; -export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; -export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; -export declare function normalize(uri: string, options?: URIOptions): string; -export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; -export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; -export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; -export declare function escapeComponent(str: string, options?: URIOptions): string; -export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.js deleted file mode 100644 index 0706116fef7e309ea15e868343e2d4a673a7b9dd..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.js +++ /dev/null @@ -1,1443 +0,0 @@ -/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.URI = global.URI || {}))); -}(this, (function (exports) { 'use strict'; - -function merge() { - for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { - sets[_key] = arguments[_key]; - } - - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } -} -function subexp(str) { - return "(?:" + str + ")"; -} -function typeOf(o) { - return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); -} -function toUpperCase(str) { - return str.toUpperCase(); -} -function toArray(obj) { - return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; -} -function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; -} - -function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", - CR$ = "[\\x0D]", - DIGIT$$ = "[0-9]", - DQUOTE$$ = "[\\x22]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), - //case-insensitive - LF$$ = "[\\x0A]", - SP$$ = "[\\x20]", - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), - //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", - //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", - //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), - SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), - USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), - DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), - DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), - //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), - // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), - // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), - //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), - //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), - //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), - //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), - //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), - //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), - //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), - //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), - //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), - //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), - IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), - //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), - HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), - PORT$ = subexp(DIGIT$$ + "*"), - AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), - PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), - SEGMENT$ = subexp(PCHAR$ + "*"), - SEGMENT_NZ$ = subexp(PCHAR$ + "+"), - SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), - PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), - PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), - //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), - //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), - //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", - PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), - FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), - HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), - RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), - ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), - GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", - SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -var URI_PROTOCOL = buildExps(false); - -var IRI_PROTOCOL = buildExps(true); - -var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - - - - - - - - - - - - - -var toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } -}; - -/** Highest positive signed 32-bit float value */ - -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' - -/** Regular expressions */ -var regexPunycode = /^xn--/; -var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error$1(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, fn) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -var ucs2encode = function ucs2encode(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); -}; - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -var basicToDigit = function basicToDigit(codePoint) { - if (codePoint - 0x30 < 0x0A) { - return codePoint - 0x16; - } - if (codePoint - 0x41 < 0x1A) { - return codePoint - 0x41; - } - if (codePoint - 0x61 < 0x1A) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -var digitToBasic = function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -var adapt = function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -var decode = function decode(input) { - // Don't use UCS-2. - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (var j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error$1('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - var oldi = i; - for (var w = 1, k = base;; /* no condition */k += base) { - - if (index >= inputLength) { - error$1('invalid-input'); - } - - var digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1('overflow'); - } - - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - - if (digit < t) { - break; - } - - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1('overflow'); - } - - w *= baseMinusT; - } - - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error$1('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - - return String.fromCodePoint.apply(String, output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -var encode = function encode(input) { - var output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - var inputLength = input.length; - - // Initialize the state. - var n = initialN; - var delta = 0; - var bias = initialBias; - - // Handle the basic code points. - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - - if (_currentValue2 < 0x80) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var basicLength = output.length; - var handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - - if (_currentValue < n && ++delta > maxInt) { - error$1('overflow'); - } - if (_currentValue == n) { - // Represent delta as a generalized variable-length integer. - var q = delta; - for (var k = base;; /* no condition */k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -var toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -var toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -var punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.1.0', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -var SCHEMES = {}; -function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; -} -function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} - -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - - var _matches = slicedToArray(matches, 2), - address = _matches[1]; - - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - - var _matches2 = slicedToArray(matches, 3), - address = _matches2[1], - zone = _matches2[2]; - - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), - _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), - last = _address$toLowerCase$2[0], - first = _address$toLowerCase$2[1]; - - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function (acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index: index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function (a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } -} -var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; -function parse(uriString) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; - //fix port number - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} - -function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} - -var RDS1 = /^\.\.?\//; -var RDS2 = /^\/\.(\/|$)/; -var RDS3 = /^\/\.\.(\/|$)/; -var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} - -function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) {} - //TODO: normalize IPv6 address as per RFC 5952 - - //if host component is a domain name - else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - //convert IDN via punycode - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} - -function resolveComponents(base, relative) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var skipNormalization = arguments[3]; - - var target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} - -function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} - -function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} - -function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} - -function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); -} - -function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); -} - -var handler = { - scheme: "http", - domainHost: true, - parse: function parse(components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize(components, options) { - var secure = String(components.scheme).toLowerCase() === "https"; - //normalize the default port - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; - -var handler$1 = { - scheme: "https", - domainHost: handler.domainHost, - parse: handler.parse, - serialize: handler.serialize -}; - -function isSecure(wsComponents) { - return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; -} -//RFC 6455 -var handler$2 = { - scheme: "ws", - domainHost: true, - parse: function parse(components, options) { - var wsComponents = components; - //indicate if the secure flag is set - wsComponents.secure = isSecure(wsComponents); - //construct resouce name - wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); - wsComponents.path = undefined; - wsComponents.query = undefined; - return wsComponents; - }, - serialize: function serialize(wsComponents, options) { - //normalize the default port - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = undefined; - } - //ensure scheme matches secure flag - if (typeof wsComponents.secure === 'boolean') { - wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; - wsComponents.secure = undefined; - } - //reconstruct path from resource name - if (wsComponents.resourceName) { - var _wsComponents$resourc = wsComponents.resourceName.split('?'), - _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), - path = _wsComponents$resourc2[0], - query = _wsComponents$resourc2[1]; - - wsComponents.path = path && path !== '/' ? path : undefined; - wsComponents.query = query; - wsComponents.resourceName = undefined; - } - //forbid fragment component - wsComponents.fragment = undefined; - return wsComponents; - } -}; - -var handler$3 = { - scheme: "wss", - domainHost: handler$2.domainHost, - parse: handler$2.parse, - serialize: handler$2.serialize -}; - -var O = {}; -var isIRI = true; -//RFC 3986 -var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -var UNRESERVED = new RegExp(UNRESERVED$$, "g"); -var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -var NOT_HFVALUE = NOT_HFNAME; -function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; -} -var handler$4 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; - -var URN_PARSE = /^([^\:]+)\:(.*)/; -//RFC 2141 -var handler$5 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } -}; - -var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -//RFC 4122 -var handler$6 = { - scheme: "urn:uuid", - parse: function parse(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize(uuidComponents, options) { - var urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } -}; - -SCHEMES[handler.scheme] = handler; -SCHEMES[handler$1.scheme] = handler$1; -SCHEMES[handler$2.scheme] = handler$2; -SCHEMES[handler$3.scheme] = handler$3; -SCHEMES[handler$4.scheme] = handler$4; -SCHEMES[handler$5.scheme] = handler$5; -SCHEMES[handler$6.scheme] = handler$6; - -exports.SCHEMES = SCHEMES; -exports.pctEncChar = pctEncChar; -exports.pctDecChars = pctDecChars; -exports.parse = parse; -exports.removeDotSegments = removeDotSegments; -exports.serialize = serialize; -exports.resolveComponents = resolveComponents; -exports.resolve = resolve; -exports.normalize = normalize; -exports.equal = equal; -exports.escapeComponent = escapeComponent; -exports.unescapeComponent = unescapeComponent; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=uri.all.js.map diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.js.map deleted file mode 100644 index 5b30c4e2202e13e69c61ab7d8bbeaf249e0c85bf..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uri.all.js","sources":["../../src/index.ts","../../src/schemes/urn-uuid.ts","../../src/schemes/urn.ts","../../src/schemes/mailto.ts","../../src/schemes/wss.ts","../../src/schemes/ws.ts","../../src/schemes/https.ts","../../src/schemes/http.ts","../../src/uri.ts","../../node_modules/punycode/punycode.es6.js","../../src/regexps-iri.ts","../../src/regexps-uri.ts","../../src/util.ts"],"sourcesContent":["import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","export function merge(...sets:Array):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}"],"names":["SCHEMES","uuid","scheme","urn","mailto","wss","ws","https","http","urnComponents","nss","uuidComponents","toLowerCase","options","error","tolerant","match","UUID","undefined","handler","uriComponents","path","nid","schemeHandler","serialize","urnScheme","parse","matches","components","URN_PARSE","query","fields","join","length","push","name","replace","PCT_ENCODED","decodeUnreserved","toUpperCase","NOT_HFNAME","pctEncChar","headers","NOT_HFVALUE","O","mailtoComponents","body","subject","to","x","localPart","domain","iri","e","punycode","toASCII","unescapeComponent","toUnicode","toAddr","slice","atIdx","NOT_LOCAL_PART","lastIndexOf","String","xl","toArray","addr","unicodeSupport","split","unknownHeaders","hfield","toAddrs","hfields","decStr","UNRESERVED","str","pctDecChars","RegExp","merge","UNRESERVED$$","SOME_DELIMS$$","ATEXT$$","VCHAR$$","PCT_ENCODED$","QTEXT$$","subexp","HEXDIG$$","isIRI","domainHost","wsComponents","fragment","resourceName","secure","port","isSecure","host","toString","URI_PROTOCOL","IRI_PROTOCOL","ESCAPE","escapeComponent","uriA","uriB","typeOf","equal","uri","normalize","resolveComponents","baseURI","schemelessOptions","relativeURI","assign","resolve","target","relative","base","userinfo","removeDotSegments","charAt","skipNormalization","uriTokens","s","authority","absolutePath","reference","_recomposeAuthority","protocol","IPV6ADDRESS","test","output","Error","input","im","RDS5","pop","RDS3","RDS2","RDS1","$1","$2","_normalizeIPv6","_normalizeIPv4","_","uriString","isNaN","indexOf","parseInt","NO_MATCH_IS_UNDEFINED","URI_PARSE","newHost","zone","newFirst","newLast","longestZeroFields","index","b","a","allZeroFields","sort","acc","lastLongest","field","reduce","fieldCount","isLastFieldIPv4Address","firstFields","lastFields","lastFieldsStart","Array","IPV4ADDRESS","last","map","_stripLeadingZeros","first","address","reverse","NOT_FRAGMENT","NOT_QUERY","NOT_PATH","NOT_PATH_NOSCHEME","NOT_HOST","NOT_USERINFO","NOT_SCHEME","_normalizeComponentEncoding","newStr","substr","i","fromCharCode","c","c2","c3","il","chr","charCodeAt","encode","decode","ucs2encode","ucs2decode","regexNonASCII","string","mapDomain","regexPunycode","n","delta","handledCPCount","adapt","handledCPCountPlusOne","basicLength","stringFromCharCode","digitToBasic","q","floor","qMinusT","baseMinusT","t","k","bias","tMin","tMax","currentValue","maxInt","m","inputLength","delimiter","initialBias","initialN","fromCodePoint","splice","out","oldi","w","digit","basicToDigit","basic","j","baseMinusTMin","skew","numPoints","firstTime","damp","flag","codePoint","array","value","extra","counter","result","encoded","labels","fn","regexSeparators","parts","RangeError","errors","type","Math","buildExps","IPV6ADDRESS$","ZONEID$","IPV4ADDRESS$","RESERVED$$","SUB_DELIMS$$","IPRIVATE$$","ALPHA$$","DIGIT$$","AUTHORITY_REF$","USERINFO$","HOST$","PORT$","SAMEDOC_REF$","FRAGMENT$","ABSOLUTE_REF$","SCHEME$","PATH_ABEMPTY$","PATH_ABSOLUTE$","PATH_ROOTLESS$","PATH_EMPTY$","QUERY$","RELATIVE_REF$","PATH_NOSCHEME$","GENERIC_REF$","ABSOLUTE_URI$","HIER_PART$","URI_REFERENCE$","URI$","RELATIVE$","RELATIVE_PART$","AUTHORITY$","PCHAR$","PATH$","SEGMENT_NZ$","SEGMENT_NZ_NC$","SEGMENT$","IP_LITERAL$","REG_NAME$","IPV6ADDRZ_RELAXED$","IPVFUTURE$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV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C,MAAMD,cAAcC,GAA1B;sBACcW,IAAd,IAAwBC,OAAOT,QAAQS,GAAvC,UAA8CZ,GAA9C;eAEOU,aAAP;;CA1CF,CA8CA;;AD5DA,IAAMH,OAAO,0DAAb;AACA,AAEA;AACA,IAAME,YAAsE;YAClE,UADkE;WAGnE,eAAUV,aAAV,EAAuCI,OAAvC,EAAT;YACQF,iBAAiBF,aAAvB;uBACeR,IAAf,GAAsBU,eAAeD,GAArC;uBACeA,GAAf,GAAqBQ,SAArB;YAEI,CAACL,QAAQE,QAAT,KAAsB,CAACJ,eAAeV,IAAhB,IAAwB,CAACU,eAAeV,IAAf,CAAoBe,KAApB,CAA0BC,IAA1B,CAA/C,CAAJ,EAAqF;2BACrEH,KAAf,GAAuBH,eAAeG,KAAf,IAAwB,oBAA/C;;eAGMH,cAAP;KAZ0E;eAe/D,mBAAUA,cAAV,EAAyCE,OAAzC,EAAb;YACQJ,gBAAgBE,cAAtB;;sBAEcD,GAAd,GAAoB,CAACC,eAAeV,IAAf,IAAuB,EAAxB,EAA4BW,WAA5B,EAApB;eACOH,aAAP;;CAnBF,CAuBA;;ADhCAT,QAAQQ,QAAKN,MAAb,IAAuBM,OAAvB;AAEA,AACAR,QAAQO,UAAML,MAAd,IAAwBK,SAAxB;AAEA,AACAP,QAAQM,UAAGJ,MAAX,IAAqBI,SAArB;AAEA,AACAN,QAAQK,UAAIH,MAAZ,IAAsBG,SAAtB;AAEA,AACAL,QAAQI,UAAOF,MAAf,IAAyBE,SAAzB;AAEA,AACAJ,QAAQG,UAAID,MAAZ,IAAsBC,SAAtB;AAEA,AACAH,QAAQC,UAAKC,MAAb,IAAuBD,SAAvB,CAEA;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.min.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.min.d.ts deleted file mode 100644 index da51e23527705f85a4d8c513d9931ae2d3eec7a0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.min.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -export interface URIComponents { - scheme?: string; - userinfo?: string; - host?: string; - port?: number | string; - path?: string; - query?: string; - fragment?: string; - reference?: string; - error?: string; -} -export interface URIOptions { - scheme?: string; - reference?: string; - tolerant?: boolean; - absolutePath?: boolean; - iri?: boolean; - unicodeSupport?: boolean; - domainHost?: boolean; -} -export interface URISchemeHandler { - scheme: string; - parse(components: ParentComponents, options: Options): Components; - serialize(components: Components, options: Options): ParentComponents; - unicodeSupport?: boolean; - domainHost?: boolean; - absolutePath?: boolean; -} -export interface URIRegExps { - NOT_SCHEME: RegExp; - NOT_USERINFO: RegExp; - NOT_HOST: RegExp; - NOT_PATH: RegExp; - NOT_PATH_NOSCHEME: RegExp; - NOT_QUERY: RegExp; - NOT_FRAGMENT: RegExp; - ESCAPE: RegExp; - UNRESERVED: RegExp; - OTHER_CHARS: RegExp; - PCT_ENCODED: RegExp; - IPV4ADDRESS: RegExp; - IPV6ADDRESS: RegExp; -} -export declare const SCHEMES: { - [scheme: string]: URISchemeHandler; -}; -export declare function pctEncChar(chr: string): string; -export declare function pctDecChars(str: string): string; -export declare function parse(uriString: string, options?: URIOptions): URIComponents; -export declare function removeDotSegments(input: string): string; -export declare function serialize(components: URIComponents, options?: URIOptions): string; -export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; -export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; -export declare function normalize(uri: string, options?: URIOptions): string; -export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; -export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; -export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; -export declare function escapeComponent(str: string, options?: URIOptions): string; -export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.min.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.min.js deleted file mode 100644 index fcd845862d917f9aa5cc142908814e901c7b95e8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/es5/uri.all.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),n=0;n1){r[0]=r[0].slice(0,-1);for(var t=r.length-1,o=1;o1&&(t=n[0]+"@",e=n[1]),e=e.replace(j,"."),t+f(e.split("."),r).join(".")}function p(e){for(var r=[],n=0,t=e.length;n=55296&&o<=56319&&n>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function d(e){for(var r="",n=0,t=e.length;n=194&&o<224){if(t-n>=6){var a=parseInt(e.substr(n+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(n,6);n+=6}else if(o>=224){if(t-n>=9){var i=parseInt(e.substr(n+4,2),16),u=parseInt(e.substr(n+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(n,9);n+=9}else r+=e.substr(n,3),n+=3}return r}function l(e,r){function n(e){var n=d(e);return n.match(r.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,n).replace(r.NOT_USERINFO,h).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,n).toLowerCase().replace(r.NOT_HOST,h).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,n).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,h).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,n).replace(r.NOT_QUERY,h).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,n).replace(r.NOT_FRAGMENT,h).replace(r.PCT_ENCODED,o)),e}function m(e){return e.replace(/^0*(.*)/,"$1")||"0"}function g(e,r){var n=e.match(r.IPV4ADDRESS)||[],t=T(n,2),o=t[1];return o?o.split(".").map(m).join("."):e}function v(e,r){var n=e.match(r.IPV6ADDRESS)||[],t=T(n,3),o=t[1],a=t[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),u=T(i,2),s=u[0],f=u[1],c=f?f.split(":").map(m):[],p=s.split(":").map(m),h=r.IPV4ADDRESS.test(p[p.length-1]),d=h?7:8,l=p.length-d,v=Array(d),E=0;E1){var A=v.slice(0,y.index),D=v.slice(y.index+y.length);S=A.join(":")+"::"+D.join(":")}else S=v.join(":");return a&&(S+="%"+a),S}return e}function E(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n={},t=!1!==r.iri?R:F;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(K);if(o){W?(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5])):(n.scheme=o[1]||undefined,n.userinfo=-1!==e.indexOf("@")?o[3]:undefined,n.host=-1!==e.indexOf("//")?o[4]:undefined,n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=-1!==e.indexOf("?")?o[7]:undefined,n.fragment=-1!==e.indexOf("#")?o[8]:undefined,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),n.host&&(n.host=v(g(n.host,t),t)),n.scheme!==undefined||n.userinfo!==undefined||n.host!==undefined||n.port!==undefined||n.path||n.query!==undefined?n.scheme===undefined?n.reference="relative":n.fragment===undefined?n.reference="absolute":n.reference="uri":n.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var a=J[(r.scheme||n.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)l(n,t);else{if(n.host&&(r.domainHost||a&&a.domainHost))try{n.host=B.toASCII(n.host.replace(t.PCT_ENCODED,d).toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+i}l(n,F)}a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}function C(e,r){var n=!1!==r.iri?R:F,t=[];return e.userinfo!==undefined&&(t.push(e.userinfo),t.push("@")),e.host!==undefined&&t.push(v(g(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,r,n){return"["+r+(n?"%25"+n:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):undefined}function y(e){for(var r=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(ee))e=e.replace(ee,"/");else if(e.match(re))e=e.replace(re,"/"),r.pop();else if("."===e||".."===e)e="";else{var n=e.match(ne);if(!n)throw new Error("Unexpected dot segment condition");var t=n[0];e=e.slice(t.length),r.push(t)}return r.join("")}function S(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=r.iri?R:F,t=[],o=J[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(n.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,d).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}l(e,n),"suffix"!==r.reference&&e.scheme&&(t.push(e.scheme),t.push(":"));var a=C(e,r);if(a!==undefined&&("suffix"!==r.reference&&t.push("//"),t.push(a),e.path&&"/"!==e.path.charAt(0)&&t.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=y(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),t.push(i)}return e.query!==undefined&&(t.push("?"),t.push(e.query)),e.fragment!==undefined&&(t.push("#"),t.push(e.fragment)),t.join("")}function A(e,r){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},t=arguments[3],o={};return t||(e=E(S(e,n),n),r=E(S(r,n),n)),n=n||{},!n.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=y(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=y(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=y(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function D(e,r,n){var t=i({scheme:"null"},n);return S(A(E(e,t),E(r,t),t,!0),t)}function w(e,r){return"string"==typeof e?e=S(E(e,r),r):"object"===t(e)&&(e=E(S(e,r),r)),e}function b(e,r,n){return"string"==typeof e?e=S(E(e,n),n):"object"===t(e)&&(e=S(e,n)),"string"==typeof r?r=S(E(r,n),n):"object"===t(r)&&(r=S(r,n)),e===r}function x(e,r){return e&&e.toString().replace(r&&r.iri?R.ESCAPE:F.ESCAPE,h)}function O(e,r){return e&&e.toString().replace(r&&r.iri?R.PCT_ENCODED:F.PCT_ENCODED,d)}function N(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function I(e){var r=d(e);return r.match(he)?r:e}var F=u(!1),R=u(!0),T=function(){function e(e,r){var n=[],t=!0,o=!1,a=undefined;try{for(var i,u=e[Symbol.iterator]();!(t=(i=u.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(s){o=!0,a=s}finally{try{!t&&u["return"]&&u["return"]()}finally{if(o)throw a}}return n}return function(r,n){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=Math.floor,L=String.fromCharCode,$=function(e){return String.fromCodePoint.apply(String,_(e))},M=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},V=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},k=function(e,r,n){var t=0;for(e=n?z(e/700):e>>1,e+=z(e/r);e>455;t+=36)e=z(e/35);return z(t+36*e/(e+38))},Z=function(e){var r=[],n=e.length,t=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var u=0;u=128&&s("not-basic"),r.push(e.charCodeAt(u));for(var f=i>0?i+1:0;f=n&&s("invalid-input");var d=M(e.charCodeAt(f++));(d>=36||d>z((P-t)/p))&&s("overflow"),t+=d*p;var l=h<=a?1:h>=a+26?26:h-a;if(dz(P/m)&&s("overflow"),p*=m}var g=r.length+1;a=k(t-c,g,0==c),z(t/g)>P-o&&s("overflow"),o+=z(t/g),t%=g,r.splice(t++,0,o)}return String.fromCodePoint.apply(String,r)},G=function(e){var r=[];e=p(e);var n=e.length,t=128,o=0,a=72,i=!0,u=!1,f=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(L(d))}}catch(U){u=!0,f=U}finally{try{!i&&h["return"]&&h["return"]()}finally{if(u)throw f}}var l=r.length,m=l;for(l&&r.push("-");m=t&&Az((P-o)/D)&&s("overflow"),o+=(g-t)*D,t=g;var w=!0,b=!1,x=undefined;try{for(var O,N=e[Symbol.iterator]();!(w=(O=N.next()).done);w=!0){var I=O.value;if(IP&&s("overflow"),I==t){for(var F=o,R=36;;R+=36){var T=R<=a?1:R>=a+26?26:R-a;if(FA-Z\\x5E-\\x7E]",'[\\"\\\\]'),he=new RegExp(se,"g"),de=new RegExp(ce,"g"),le=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pe),"g"),me=new RegExp(r("[^]",se,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),ge=me,ve={scheme:"mailto",parse:function(e,r){var n=e,t=n.to=n.path?n.path.split(","):[];if(n.path=undefined,n.query){for(var o=!1,a={},i=n.query.split("&"),u=0,s=i.length;u):string {\n\tif (sets.length > 1) {\n\t\tsets[0] = sets[0].slice(0, -1);\n\t\tconst xl = sets.length - 1;\n\t\tfor (let x = 1; x < xl; ++x) {\n\t\t\tsets[x] = sets[x].slice(1, -1);\n\t\t}\n\t\tsets[xl] = sets[xl].slice(1);\n\t\treturn sets.join('');\n\t} else {\n\t\treturn sets[0];\n\t}\n}\n\nexport function subexp(str:string):string {\n\treturn \"(?:\" + str + \")\";\n}\n\nexport function typeOf(o:any):string {\n\treturn o === undefined ? \"undefined\" : (o === null ? \"null\" : Object.prototype.toString.call(o).split(\" \").pop().split(\"]\").shift().toLowerCase());\n}\n\nexport function toUpperCase(str:string):string {\n\treturn str.toUpperCase();\n}\n\nexport function toArray(obj:any):Array {\n\treturn obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== \"number\" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];\n}\n\n\nexport function assign(target: object, source: any): any {\n\tconst obj = target as any;\n\tif (source) {\n\t\tfor (const key in source) {\n\t\t\tobj[key] = source[key];\n\t\t}\n\t}\n\treturn obj;\n}","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see \n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author Gary Court\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = ((\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\" || typeof components.port === \"string\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(String(components.port));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nexport interface WSComponents extends URIComponents {\n\tresourceName?: string;\n\tsecure?: boolean;\n}\n\nfunction isSecure(wsComponents:WSComponents):boolean {\n\treturn typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === \"wss\";\n}\n\n//RFC 6455\nconst handler:URISchemeHandler = {\n\tscheme : \"ws\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):WSComponents {\n\t\tconst wsComponents = components as WSComponents;\n\n\t\t//indicate if the secure flag is set\n\t\twsComponents.secure = isSecure(wsComponents);\n\n\t\t//construct resouce name\n\t\twsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '');\n\t\twsComponents.path = undefined;\n\t\twsComponents.query = undefined;\n\n\t\treturn wsComponents;\n\t},\n\n\tserialize : function (wsComponents:WSComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === \"\") {\n\t\t\twsComponents.port = undefined;\n\t\t}\n\n\t\t//ensure scheme matches secure flag\n\t\tif (typeof wsComponents.secure === 'boolean') {\n\t\t\twsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws');\n\t\t\twsComponents.secure = undefined;\n\t\t}\n\n\t\t//reconstruct path from resource name\n\t\tif (wsComponents.resourceName) {\n\t\t\tconst [path, query] = wsComponents.resourceName.split('?');\n\t\t\twsComponents.path = (path && path !== '/' ? path : undefined);\n\t\t\twsComponents.query = query;\n\t\t\twsComponents.resourceName = undefined;\n\t\t}\n\n\t\t//forbid fragment component\n\t\twsComponents.fragment = undefined;\n\n\t\treturn wsComponents;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\tconst secure = String(components.scheme).toLowerCase() === \"https\";\n\n\t\t//normalize the default port\n\t\tif (components.port === (secure ? 443 : 80) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport ws from \"./ws\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"wss\",\n\tdomainHost : ws.domainHost,\n\tparse : ws.parse,\n\tserialize : ws.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","import { SCHEMES } from \"./uri\";\n\nimport http from \"./schemes/http\";\nSCHEMES[http.scheme] = http;\n\nimport https from \"./schemes/https\";\nSCHEMES[https.scheme] = https;\n\nimport ws from \"./schemes/ws\";\nSCHEMES[ws.scheme] = ws;\n\nimport wss from \"./schemes/wss\";\nSCHEMES[wss.scheme] = wss;\n\nimport mailto from \"./schemes/mailto\";\nSCHEMES[mailto.scheme] = mailto;\n\nimport urn from \"./schemes/urn\";\nSCHEMES[urn.scheme] = urn;\n\nimport uuid from \"./schemes/urn-uuid\";\nSCHEMES[uuid.scheme] = uuid;\n\nexport * from \"./uri\";\n"]} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.d.ts deleted file mode 100644 index f6be760343fbdf683bff1a7aa6590c43e3e9a0a7..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./uri"; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.js deleted file mode 100644 index e3531b5b61bb28ab48f0a55722eb63e97b7b83f8..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import { SCHEMES } from "./uri"; -import http from "./schemes/http"; -SCHEMES[http.scheme] = http; -import https from "./schemes/https"; -SCHEMES[https.scheme] = https; -import ws from "./schemes/ws"; -SCHEMES[ws.scheme] = ws; -import wss from "./schemes/wss"; -SCHEMES[wss.scheme] = wss; -import mailto from "./schemes/mailto"; -SCHEMES[mailto.scheme] = mailto; -import urn from "./schemes/urn"; -SCHEMES[urn.scheme] = urn; -import uuid from "./schemes/urn-uuid"; -SCHEMES[uuid.scheme] = uuid; -export * from "./uri"; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.js.map deleted file mode 100644 index 0971f6ebcadb791627f0a100919d31e679d3df38..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9B,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;AAExB,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.d.ts deleted file mode 100644 index c91cdacbce6f744f7d95fffff2f1dd9e345e2eda..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URIRegExps } from "./uri"; -declare const _default: URIRegExps; -export default _default; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.js deleted file mode 100644 index 34e7de989e3b474cccad6e4f94910f9a55accc69..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.js +++ /dev/null @@ -1,3 +0,0 @@ -import { buildExps } from "./regexps-uri"; -export default buildExps(true); -//# sourceMappingURL=regexps-iri.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.js.map deleted file mode 100644 index 2269c580c7449d79e7a39870df637e3c23ab3692..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-iri.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"regexps-iri.js","sourceRoot":"","sources":["../../src/regexps-iri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.d.ts deleted file mode 100644 index 6096bda5cd515b52bb83998b000909f0ce8b3020..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { URIRegExps } from "./uri"; -export declare function buildExps(isIRI: boolean): URIRegExps; -declare const _default: URIRegExps; -export default _default; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.js deleted file mode 100644 index 1cc659f133da37fbecff94099d04d4e0caa7a5ba..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.js +++ /dev/null @@ -1,42 +0,0 @@ -import { merge, subexp } from "./util"; -export function buildExps(isIRI) { - const ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive - LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -export default buildExps(false); -//# sourceMappingURL=regexps-uri.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.js.map deleted file mode 100644 index cb028b804e3d5e4913a902a13a9108f3636e2d8b..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/regexps-uri.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"regexps-uri.js","sourceRoot":"","sources":["../../src/regexps-uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,oBAAoB,KAAa;IACtC,MACC,OAAO,GAAG,UAAU,EACpB,GAAG,GAAG,SAAS,EACf,OAAO,GAAG,OAAO,EACjB,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,EAAG,kBAAkB;IAC1D,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,EAAG,UAAU;IACvO,YAAY,GAAG,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AAC;QAC1C,WAAW,EAAG,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC;QACxE,WAAW,EAAG,IAAI,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC;QAC3C,WAAW,EAAG,IAAI,MAAM,CAAC,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC;QACpD,WAAW,EAAG,IAAI,MAAM,CAAC,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAE,sCAAsC;KACrL,CAAC;AACH,CAAC;AAED,eAAe,SAAS,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.d.ts deleted file mode 100644 index fe5b2f354241bb655c84551cf88b6435525a588f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URISchemeHandler } from "../uri"; -declare const handler: URISchemeHandler; -export default handler; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.js deleted file mode 100644 index 6abf0fe6e3f1f897c2066285f25476e4152712f4..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.js +++ /dev/null @@ -1,28 +0,0 @@ -const handler = { - scheme: "http", - domainHost: true, - parse: function (components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function (components, options) { - const secure = String(components.scheme).toLowerCase() === "https"; - //normalize the default port - if (components.port === (secure ? 443 : 80) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; -export default handler; -//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.js.map deleted file mode 100644 index 82118970c54de6c89f87830d6612b6d5c00b06ae..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/http.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC;QAEnE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACtE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.d.ts deleted file mode 100644 index fe5b2f354241bb655c84551cf88b6435525a588f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URISchemeHandler } from "../uri"; -declare const handler: URISchemeHandler; -export default handler; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.js deleted file mode 100644 index ec4b6e76de671bbd1e7cb3a147d52b7229a401bf..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.js +++ /dev/null @@ -1,9 +0,0 @@ -import http from "./http"; -const handler = { - scheme: "https", - domainHost: http.domainHost, - parse: http.parse, - serialize: http.serialize -}; -export default handler; -//# sourceMappingURL=https.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.js.map deleted file mode 100644 index 385b8efeaa0366e434f4e3c7e504a8a09a9f70bf..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/https.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"https.js","sourceRoot":"","sources":["../../../src/schemes/https.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,OAAO;IAChB,UAAU,EAAG,IAAI,CAAC,UAAU;IAC5B,KAAK,EAAG,IAAI,CAAC,KAAK;IAClB,SAAS,EAAG,IAAI,CAAC,SAAS;CAC1B,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts deleted file mode 100644 index e2aefc2afd16379c841671277fee19096547dfda..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { URISchemeHandler, URIComponents } from "../uri"; -export interface MailtoHeaders { - [hfname: string]: string; -} -export interface MailtoComponents extends URIComponents { - to: Array; - headers?: MailtoHeaders; - subject?: string; - body?: string; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.js deleted file mode 100644 index 2553713cde8c8b21fa0d8d5c746824fc7fcdf9c0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.js +++ /dev/null @@ -1,148 +0,0 @@ -import { pctEncChar, pctDecChars, unescapeComponent } from "../uri"; -import punycode from "punycode"; -import { merge, subexp, toUpperCase, toArray } from "../util"; -const O = {}; -const isIRI = true; -//RFC 3986 -const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*"); -const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$); -const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$); -const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"'); -//RFC 6068 -const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126 -const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$); -const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]"); -const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$); -const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$); -const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*"); -const HFNAME$ = subexp(QCHAR$ + "*"); -const HFVALUE$ = HFNAME$; -const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$); -const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*"); -const HFIELDS$ = subexp("\\?" + HFIELDS2$); -const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$"); -const UNRESERVED = new RegExp(UNRESERVED$$, "g"); -const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g"); -const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -const NOT_HFVALUE = NOT_HFNAME; -const TO = new RegExp("^" + TO$ + "$"); -const HFIELDS = new RegExp("^" + HFIELDS2$ + "$"); -function decodeUnreserved(str) { - const decStr = pctDecChars(str); - return (!decStr.match(UNRESERVED) ? str : decStr); -} -const handler = { - scheme: "mailto", - parse: function (components, options) { - const mailtoComponents = components; - const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []); - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - let unknownHeaders = false; - const headers = {}; - const hfields = mailtoComponents.query.split("&"); - for (let x = 0, xl = hfields.length; x < xl; ++x) { - const hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - const toAddrs = hfield[1].split(","); - for (let x = 0, xl = toAddrs.length; x < xl; ++x) { - to.push(toAddrs[x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) - mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (let x = 0, xl = to.length; x < xl; ++x) { - const addr = to[x].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } - catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } - else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[x] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function (mailtoComponents, options) { - const components = mailtoComponents; - const to = toArray(mailtoComponents.to); - if (to) { - for (let x = 0, xl = to.length; x < xl; ++x) { - const toAddr = String(to[x]); - const atIdx = toAddr.lastIndexOf("@"); - const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - let domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain)); - } - catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - const headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) - headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) - headers["body"] = mailtoComponents.body; - const fields = []; - for (const name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + - "=" + - headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; -export default handler; -//# sourceMappingURL=mailto.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.js.map deleted file mode 100644 index 82dba9a1612b097b96147359798050adf5e4a20e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/mailto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mailto.js","sourceRoot":"","sources":["../../../src/schemes/mailto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAa9D,MAAM,CAAC,GAAiB,EAAE,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,CAAC;AAEnB,UAAU;AACV,MAAM,YAAY,GAAG,wBAAwB,GAAG,CAA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,gBAAgB,CAAC,IAAI,CAAC;QAEnE,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE;YAC3B,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE;gBAC9B,MAAM,CAAC,IAAI,CACV,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC;oBAC7G,GAAG;oBACH,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CACvH,CAAC;aACF;SACD;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YAClB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts deleted file mode 100644 index e75f2e793f929ac64f7476f2555f1a02344f36ce..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { URISchemeHandler, URIOptions } from "../uri"; -import { URNComponents } from "./urn"; -export interface UUIDComponents extends URNComponents { - uuid?: string; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js deleted file mode 100644 index d1fce495554812d1a667aec719e81bf363518ee5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js +++ /dev/null @@ -1,23 +0,0 @@ -const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/; -//RFC 4122 -const handler = { - scheme: "urn:uuid", - parse: function (urnComponents, options) { - const uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function (uuidComponents, options) { - const urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - }, -}; -export default handler; -//# sourceMappingURL=urn-uuid.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map deleted file mode 100644 index 3b7a8b3ae607c8364aac16b082bdd968b4417b2e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"urn-uuid.js","sourceRoot":"","sources":["../../../src/schemes/urn-uuid.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,0DAA0D,CAAC;AACxE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,UAAU;AACV,MAAM,OAAO,GAA+D;IAC3E,MAAM,EAAG,UAAU;IAEnB,KAAK,EAAG,UAAU,aAA2B,EAAE,OAAkB;QAChE,MAAM,cAAc,GAAG,aAA+B,CAAC;QACvD,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC;QACzC,cAAc,CAAC,GAAG,GAAG,SAAS,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;YACpF,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,IAAI,oBAAoB,CAAC;SACpE;QAED,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,SAAS,EAAG,UAAU,cAA6B,EAAE,OAAkB;QACtE,MAAM,aAAa,GAAG,cAA+B,CAAC;QACtD,gBAAgB;QAChB,aAAa,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.d.ts deleted file mode 100644 index 7e0c2fba6c6282bd78072ba3aa6572083fa77567..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { URISchemeHandler, URIComponents, URIOptions } from "../uri"; -export interface URNComponents extends URIComponents { - nid?: string; - nss?: string; -} -export interface URNOptions extends URIOptions { - nid?: string; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.js deleted file mode 100644 index 5d3f10aa0f8b137300dfa249bf21c991262e7411..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.js +++ /dev/null @@ -1,49 +0,0 @@ -import { SCHEMES } from "../uri"; -const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})"; -const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})"; -const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]"; -const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)"; -const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$"); -const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$"); -const URN_PARSE = /^([^\:]+)\:(.*)/; -const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g; -//RFC 2141 -const handler = { - scheme: "urn", - parse: function (components, options) { - const matches = components.path && components.path.match(URN_PARSE); - let urnComponents = components; - if (matches) { - const scheme = options.scheme || urnComponents.scheme || "urn"; - const nid = matches[1].toLowerCase(); - const nss = matches[2]; - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } - else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function (urnComponents, options) { - const scheme = options.scheme || urnComponents.scheme || "urn"; - const nid = urnComponents.nid; - const urnScheme = `${scheme}:${options.nid || nid}`; - const schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - const uriComponents = urnComponents; - const nss = urnComponents.nss; - uriComponents.path = `${nid || options.nid}:${nss}`; - return uriComponents; - }, -}; -export default handler; -//# sourceMappingURL=urn.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.js.map deleted file mode 100644 index ea43b0bebc3a0b881cc82c7c64a8cc95a78851e6..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/urn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../../src/schemes/urn.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAC;AAW7C,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD,MAAM,YAAY,GAAG,uBAAuB,CAAC;AAC7C,MAAM,OAAO,GAAG,mEAAmE,CAAC;AACpF,MAAM,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,OAAO,GAAG,KAAK,CAAC;AAC7D,MAAM,UAAU,GAAG,IAAI,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACjE,MAAM,SAAS,GAAG,iBAAiB,CAAC;AACpC,MAAM,YAAY,GAAG,iDAAiD,CAAC;AAEvE,UAAU;AACV,MAAM,OAAO,GAA8C;IAC1D,MAAM,EAAG,KAAK;IAEd,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,aAAa,GAAG,UAA2B,CAAC;QAEhD,IAAI,OAAO,EAAE;YACZ,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;YAC/D,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,W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} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.d.ts deleted file mode 100644 index 47f4835b24a961f8358f23eb5327cb37c5fcead3..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { URISchemeHandler, URIComponents } from "../uri"; -export interface WSComponents extends URIComponents { - resourceName?: string; - secure?: boolean; -} -declare const handler: URISchemeHandler; -export default handler; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.js deleted file mode 100644 index 9277f035a0bddd7f03558ef61ac400166e705238..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.js +++ /dev/null @@ -1,41 +0,0 @@ -function isSecure(wsComponents) { - return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; -} -//RFC 6455 -const handler = { - scheme: "ws", - domainHost: true, - parse: function (components, options) { - const wsComponents = components; - //indicate if the secure flag is set - wsComponents.secure = isSecure(wsComponents); - //construct resouce name - wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); - wsComponents.path = undefined; - wsComponents.query = undefined; - return wsComponents; - }, - serialize: function (wsComponents, options) { - //normalize the default port - if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { - wsComponents.port = undefined; - } - //ensure scheme matches secure flag - if (typeof wsComponents.secure === 'boolean') { - wsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws'); - wsComponents.secure = undefined; - } - //reconstruct path from resource name - if (wsComponents.resourceName) { - const [path, query] = wsComponents.resourceName.split('?'); - wsComponents.path = (path && path !== '/' ? path : undefined); - wsComponents.query = query; - wsComponents.resourceName = undefined; - } - //forbid fragment component - wsComponents.fragment = undefined; - return wsComponents; - } -}; -export default handler; -//# sourceMappingURL=ws.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.js.map deleted file mode 100644 index 186818ccd65df166e7cdd6c9b39e794514a15b5c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/ws.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ws.js","sourceRoot":"","sources":["../../../src/schemes/ws.ts"],"names":[],"mappings":"AAOA,kBAAkB,YAAyB;IAC1C,OAAO,OAAO,YAAY,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;AAC7H,CAAC;AAED,UAAU;AACV,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,IAAI;IAEb,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,MAAM,YAAY,GAAG,UAA0B,CAAC;QAEhD,oCAAoC;QACpC,YAAY,CAAC,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;QAE7C,wBAAwB;QACxB,YAAY,CAAC,YAAY,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9G,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;QAC9B,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC;QAE/B,OAAO,YAAY,CAAC;IACrB,CAAC;IAED,SAAS,EAAG,UAAU,YAAyB,EAAE,OAAkB;QAClE,4BAA4B;QAC5B,IAAI,YAAY,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC,IAAI,KAAK,EAAE,EAAE;YAC1F,YAAY,CAAC,IAAI,GAAG,SAAS,CAAC;SAC9B;QAED,mCAAmC;QACnC,IAAI,OAAO,YAAY,CAAC,MAAM,KAAK,SAAS,EAAE;YAC7C,YAAY,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC3D,YAAY,CAAC,MAAM,GAAG,SAAS,CAAC;SAChC;QAED,qCAAqC;QACrC,IAAI,YAAY,CAAC,YAAY,EAAE;YAC9B,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC3D,YAAY,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC9D,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;YAC3B,YAAY,CAAC,YAAY,GAAG,SAAS,CAAC;SACtC;QAED,2BAA2B;QAC3B,YAAY,CAAC,QAAQ,GAAG,SAAS,CAAC;QAElC,OAAO,YAAY,CAAC;IACrB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.d.ts deleted file mode 100644 index fe5b2f354241bb655c84551cf88b6435525a588f..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { URISchemeHandler } from "../uri"; -declare const handler: URISchemeHandler; -export default handler; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.js deleted file mode 100644 index d1e22ccd6e0cc58a1f7f91fde05bc8902ef53218..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.js +++ /dev/null @@ -1,9 +0,0 @@ -import ws from "./ws"; -const handler = { - scheme: "wss", - domainHost: ws.domainHost, - parse: ws.parse, - serialize: ws.serialize -}; -export default handler; -//# sourceMappingURL=wss.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.js.map deleted file mode 100644 index e19006d947b35e8e4a7f002fa82c9627648bb711..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/schemes/wss.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wss.js","sourceRoot":"","sources":["../../../src/schemes/wss.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,KAAK;IACd,UAAU,EAAG,EAAE,CAAC,UAAU;IAC1B,KAAK,EAAG,EAAE,CAAC,KAAK;IAChB,SAAS,EAAG,EAAE,CAAC,SAAS;CACxB,CAAA;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.d.ts deleted file mode 100644 index da51e23527705f85a4d8c513d9931ae2d3eec7a0..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -export interface URIComponents { - scheme?: string; - userinfo?: string; - host?: string; - port?: number | string; - path?: string; - query?: string; - fragment?: string; - reference?: string; - error?: string; -} -export interface URIOptions { - scheme?: string; - reference?: string; - tolerant?: boolean; - absolutePath?: boolean; - iri?: boolean; - unicodeSupport?: boolean; - domainHost?: boolean; -} -export interface URISchemeHandler { - scheme: string; - parse(components: ParentComponents, options: Options): Components; - serialize(components: Components, options: Options): ParentComponents; - unicodeSupport?: boolean; - domainHost?: boolean; - absolutePath?: boolean; -} -export interface URIRegExps { - NOT_SCHEME: RegExp; - NOT_USERINFO: RegExp; - NOT_HOST: RegExp; - NOT_PATH: RegExp; - NOT_PATH_NOSCHEME: RegExp; - NOT_QUERY: RegExp; - NOT_FRAGMENT: RegExp; - ESCAPE: RegExp; - UNRESERVED: RegExp; - OTHER_CHARS: RegExp; - PCT_ENCODED: RegExp; - IPV4ADDRESS: RegExp; - IPV6ADDRESS: RegExp; -} -export declare const SCHEMES: { - [scheme: string]: URISchemeHandler; -}; -export declare function pctEncChar(chr: string): string; -export declare function pctDecChars(str: string): string; -export declare function parse(uriString: string, options?: URIOptions): URIComponents; -export declare function removeDotSegments(input: string): string; -export declare function serialize(components: URIComponents, options?: URIOptions): string; -export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents; -export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string; -export declare function normalize(uri: string, options?: URIOptions): string; -export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents; -export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean; -export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean; -export declare function escapeComponent(str: string, options?: URIOptions): string; -export declare function unescapeComponent(str: string, options?: URIOptions): string; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.js deleted file mode 100644 index 659ce2651cea1d928546bbc296f5f0cb97c07b85..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.js +++ /dev/null @@ -1,480 +0,0 @@ -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -import URI_PROTOCOL from "./regexps-uri"; -import IRI_PROTOCOL from "./regexps-iri"; -import punycode from "punycode"; -import { toUpperCase, typeOf, assign } from "./util"; -export const SCHEMES = {}; -export function pctEncChar(chr) { - const c = chr.charCodeAt(0); - let e; - if (c < 16) - e = "%0" + c.toString(16).toUpperCase(); - else if (c < 128) - e = "%" + c.toString(16).toUpperCase(); - else if (c < 2048) - e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); - else - e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase(); - return e; -} -export function pctDecChars(str) { - let newStr = ""; - let i = 0; - const il = str.length; - while (i < il) { - const c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } - else if (c >= 194 && c < 224) { - if ((il - i) >= 6) { - const c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); - } - else { - newStr += str.substr(i, 6); - } - i += 6; - } - else if (c >= 224) { - if ((il - i) >= 9) { - const c2 = parseInt(str.substr(i + 4, 2), 16); - const c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); - } - else { - newStr += str.substr(i, 9); - } - i += 9; - } - else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - const decStr = pctDecChars(str); - return (!decStr.match(protocol.UNRESERVED) ? str : decStr); - } - if (components.scheme) - components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) - components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) - components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.path !== undefined) - components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.query !== undefined) - components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) - components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} -; -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - const matches = host.match(protocol.IPV4ADDRESS) || []; - const [, address] = matches; - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } - else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - const matches = host.match(protocol.IPV6ADDRESS) || []; - const [, address, zone] = matches; - if (address) { - const [last, first] = address.toLowerCase().split('::').reverse(); - const firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - const lastFields = last.split(":").map(_stripLeadingZeros); - const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - const fieldCount = isLastFieldIPv4Address ? 7 : 8; - const lastFieldsStart = lastFields.length - fieldCount; - const fields = Array(fieldCount); - for (let x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - const allZeroFields = fields.reduce((acc, field, index) => { - if (!field || field === "0") { - const lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } - else { - acc.push({ index, length: 1 }); - } - } - return acc; - }, []); - const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0]; - let newHost; - if (longestZeroFields && longestZeroFields.length > 1) { - const newFirst = fields.slice(0, longestZeroFields.index); - const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } - else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } - else { - return host; - } -} -const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined; -export function parse(uriString, options = {}) { - const components = {}; - const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); - if (options.reference === "suffix") - uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - const matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } - else { //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined); - components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined); - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined); - components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined); - //fix port number - if (isNaN(components.port)) { - components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined); - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } - else if (components.scheme === undefined) { - components.reference = "relative"; - } - else if (components.fragment === undefined) { - components.reference = "absolute"; - } - else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } - catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } - else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } - else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} -; -function _recomposeAuthority(components, options) { - const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL); - const uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]")); - } - if (typeof components.port === "number" || typeof components.port === "string") { - uriTokens.push(":"); - uriTokens.push(String(components.port)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} -; -const RDS1 = /^\.\.?\//; -const RDS2 = /^\/\.(\/|$)/; -const RDS3 = /^\/\.\.(\/|$)/; -const RDS4 = /^\.\.?$/; -const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -export function removeDotSegments(input) { - const output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } - else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } - else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } - else if (input === "." || input === "..") { - input = ""; - } - else { - const im = input.match(RDS5); - if (im) { - const s = im[0]; - input = input.slice(s.length); - output.push(s); - } - else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} -; -export function serialize(components, options = {}) { - const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL); - const uriTokens = []; - //find scheme handler - const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) - schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) { - //TODO: normalize IPv6 address as per RFC 5952 - } - //if host component is a domain name - else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) { - //convert IDN via punycode - try { - components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host)); - } - catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - const authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - let s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} -; -export function resolveComponents(base, relative, options = {}, skipNormalization) { - const target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } - else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } - else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } - else { - target.query = base.query; - } - } - else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } - else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } - else if (!base.path) { - target.path = relative.path; - } - else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} -; -export function resolve(baseURI, relativeURI, options) { - const schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} -; -export function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } - else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} -; -export function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } - else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } - else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} -; -export function escapeComponent(str, options) { - return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar); -} -; -export function unescapeComponent(str, options) { - return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars); -} -; -//# sourceMappingURL=uri.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.js.map deleted file mode 100644 index 2e72ab18d1192a61d62e03cb474cf5ce9731f5f5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/uri.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../src/uri.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAiDrD,MAAM,CAAC,MAAM,OAAO,GAAsC,EAAE,CAAC;AAE7D,MAAM,qBAAqB,GAAU;IACpC,MAA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YAAY,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;AAC1H,CAAC;AAAA,CAAC;AAEF,MAAM,4BAA4B,GAAU,EAAE,OAAmB;IAChE,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AACrI,CAAC;AAAA,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.d.ts b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.d.ts deleted file mode 100644 index 7c12857543a6b0ceab07e4931275186275fff7ec..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare function merge(...sets: Array): string; -export declare function subexp(str: string): string; -export declare function typeOf(o: any): string; -export declare function toUpperCase(str: string): string; -export declare function toArray(obj: any): Array; -export declare function assign(target: object, source: any): any; diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.js b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.js deleted file mode 100644 index 072711efdbfe37d4305ae6f12331d00d80a2e586..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.js +++ /dev/null @@ -1,36 +0,0 @@ -export function merge(...sets) { - if (sets.length > 1) { - sets[0] = sets[0].slice(0, -1); - const xl = sets.length - 1; - for (let x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } - else { - return sets[0]; - } -} -export function subexp(str) { - return "(?:" + str + ")"; -} -export function typeOf(o) { - return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()); -} -export function toUpperCase(str) { - return str.toUpperCase(); -} -export function toArray(obj) { - return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : []; -} -export function assign(target, source) { - const obj = target; - if (source) { - for (const key in source) { - obj[key] = source[key]; - } - } - return obj; -} -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.js.map b/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.js.map deleted file mode 100644 index 05d9df021f9d4b94c87e346098dc384b4128f778..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/dist/esnext/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,IAAkB;IAC1C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;YAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACrB;SAAM;QACN,OA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CAAC;SACvB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/package.json b/ThinFilm_Analyzer/frontend/node_modules/uri-js/package.json deleted file mode 100644 index de95d91aa1a41091d8bc6fca168bf51b289b0f7a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "uri-js", - "version": "4.4.1", - "description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.", - "main": "dist/es5/uri.all.js", - "types": "dist/es5/uri.all.d.ts", - "directories": { - "test": "tests" - }, - "files": [ - "dist", - "package.json", - "yarn.lock", - "README.md", - "CHANGELOG", - "LICENSE" - ], - "scripts": { - "build:esnext": "tsc", - "build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap", - "build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js", - "build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts", - "build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min", - "clean": "rm -rf dist", - "test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/garycourt/uri-js" - }, - "keywords": [ - "URI", - "IRI", - "IDN", - "URN", - "UUID", - "HTTP", - "HTTPS", - "WS", - "WSS", - "MAILTO", - "RFC3986", - "RFC3987", - "RFC5891", - "RFC2616", - "RFC2818", - "RFC2141", - "RFC4122", - "RFC4291", - "RFC5952", - "RFC6068", - "RFC6455", - "RFC6874" - ], - "author": "Gary Court ", - "license": "BSD-2-Clause", - "bugs": { - "url": "https://github.com/garycourt/uri-js/issues" - }, - "homepage": "https://github.com/garycourt/uri-js", - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-plugin-external-helpers": "^6.22.0", - "babel-preset-latest": "^6.24.1", - "mocha": "^8.2.1", - "mocha-qunit-ui": "^0.1.3", - "rollup": "^0.41.6", - "rollup-plugin-babel": "^2.7.1", - "rollup-plugin-node-resolve": "^2.0.0", - "sorcery": "^0.10.0", - "typescript": "^2.8.1", - "uglify-js": "^2.8.14" - }, - "dependencies": { - "punycode": "^2.1.0" - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/uri-js/yarn.lock b/ThinFilm_Analyzer/frontend/node_modules/uri-js/yarn.lock deleted file mode 100644 index 3c42ded1259efe646a53372a76f8671fd8757fc5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/uri-js/yarn.lock +++ /dev/null @@ -1,2558 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -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@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= - dependencies: - arr-flatten "^1.0.1" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-each@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -babel-cli@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" - integrity sha1-UCq1SHTX24itALiHoGODzgPQAvE= - dependencies: - babel-core "^6.26.0" - babel-polyfill "^6.26.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - commander "^2.11.0" - convert-source-map "^1.5.0" - fs-readdir-recursive "^1.0.0" - glob "^7.1.2" - lodash "^4.17.4" - output-file-sync "^1.1.2" - path-is-absolute "^1.0.1" - slash "^1.0.0" - source-map "^0.5.6" - v8flags "^2.1.1" - optionalDependencies: - chokidar "^1.6.1" - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@6: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.7" - slash "^1.0.0" - source-map "^0.5.6" - -babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-external-helpers@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.24.1, babel-plugin-transform-es2015-classes@^6.9.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-unicode-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-exponentiation-operator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-regenerator@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - dependencies: - regenerator-transform "^0.10.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-polyfill@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" - integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM= - dependencies: - babel-runtime "^6.26.0" - core-js "^2.5.0" - regenerator-runtime "^0.10.5" - -babel-preset-es2015@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.24.1" - babel-plugin-transform-es2015-classes "^6.24.1" - babel-plugin-transform-es2015-computed-properties "^6.24.1" - babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.24.1" - babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.24.1" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-plugin-transform-es2015-modules-systemjs "^6.24.1" - babel-plugin-transform-es2015-modules-umd "^6.24.1" - babel-plugin-transform-es2015-object-super "^6.24.1" - babel-plugin-transform-es2015-parameters "^6.24.1" - babel-plugin-transform-es2015-shorthand-properties "^6.24.1" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.24.1" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.24.1" - babel-plugin-transform-regenerator "^6.24.1" - -babel-preset-es2016@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2016/-/babel-preset-es2016-6.24.1.tgz#f900bf93e2ebc0d276df9b8ab59724ebfd959f8b" - dependencies: - babel-plugin-transform-exponentiation-operator "^6.24.1" - -babel-preset-es2017@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz#597beadfb9f7f208bcfd8a12e9b2b29b8b2f14d1" - dependencies: - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.24.1" - -babel-preset-latest@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-latest/-/babel-preset-latest-6.24.1.tgz#677de069154a7485c2d25c577c02f624b85b85e8" - dependencies: - babel-preset-es2015 "^6.24.1" - babel-preset-es2016 "^6.24.1" - babel-preset-es2017 "^6.24.1" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browser-resolve@^1.11.0: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" - dependencies: - resolve "1.1.7" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -buffer-crc32@^0.2.5: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - -builtin-modules@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" - integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chokidar@3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" - integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.1.2" - -chokidar@^1.6.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -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.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -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== - -commander@^2.11.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -convert-source-map@^1.5.0, convert-source-map@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -debug@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== - dependencies: - ms "2.1.2" - -debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, 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" - -decamelize@^1.0.0, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -diff@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -es6-promise@^3.1.2: - version "3.3.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" - -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== - -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estree-walker@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" - -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== - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= - dependencies: - is-posix-bracket "^0.1.0" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= - dependencies: - fill-range "^2.1.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= - dependencies: - is-extglob "^1.0.0" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= - -fill-range@^2.1.0: - version "2.2.4" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" - integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^3.0.0" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -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" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= - dependencies: - for-in "^1.0.1" - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fs-readdir-recursive@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.0.0: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -get-caller-file@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= - dependencies: - is-glob "^2.0.0" - -glob-parent@~5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob@7.1.6, glob@^7.1.2, glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -graceful-fs@^4.1.11, graceful-fs@^4.1.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" - integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - -graceful-fs@^4.1.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -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-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -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-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= - dependencies: - is-extglob "^1.0.0" - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -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-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -"js-tokens@^3.0.0 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.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@^4.17.4: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -log-symbols@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== - dependencies: - chalk "^4.0.0" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -math-random@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" - integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== - -micromatch@^2.1.5: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -micromatch@^3.1.10: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha-qunit-ui@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/mocha-qunit-ui/-/mocha-qunit-ui-0.1.3.tgz#e3e1ff1dac33222b10cef681efd7f82664141ea9" - -mocha@^8.2.1: - version "8.2.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.2.1.tgz#f2fa68817ed0e53343d989df65ccd358bc3a4b39" - integrity sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.4.3" - debug "4.2.0" - diff "4.0.2" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.1.6" - growl "1.10.5" - he "1.2.0" - js-yaml "3.14.0" - log-symbols "4.0.0" - minimatch "3.0.4" - ms "2.1.2" - nanoid "3.1.12" - serialize-javascript "5.0.1" - strip-json-comments "3.1.1" - supports-color "7.2.0" - which "2.0.2" - wide-align "1.1.3" - workerpool "6.0.2" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "2.0.0" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -nan@^2.12.1: - version "2.14.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" - integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - -nanoid@3.1.12: - version "3.1.12" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" - integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -normalize-path@^2.0.0, normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -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-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-tmpdir@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -output-file-sync@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" - integrity sha1-0KM+7+YaIF+suQCS6CZZjVJFznY= - dependencies: - graceful-fs "^4.1.4" - mkdirp "^0.5.1" - object-assign "^4.1.0" - -p-limit@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -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@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.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" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -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, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= - -private@^0.1.6, private@^0.1.7, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - -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== - -punycode@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - -randomatic@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" - integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== - dependencies: - is-number "^4.0.0" - kind-of "^6.0.0" - math-random "^1.0.1" - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -readable-stream@^2.0.2: - 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@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - dependencies: - picomatch "^2.2.1" - -regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" - -regenerator-runtime@^0.10.5: - version "0.10.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" - integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== - dependencies: - is-equal-shallow "^0.1.3" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.5.2, repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - -resolve@^1.1.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.6.0.tgz#0fbd21278b27b4004481c395349e7aba60a9ff5c" - dependencies: - path-parse "^1.0.5" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@^2.5.2: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - dependencies: - glob "^7.1.3" - -rollup-plugin-babel@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57" - dependencies: - babel-core "6" - babel-plugin-transform-es2015-classes "^6.9.0" - object-assign "^4.1.0" - rollup-pluginutils "^1.5.0" - -rollup-plugin-node-resolve@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.1.1.tgz#cbb783b0d15b02794d58915350b2f0d902b8ddc8" - dependencies: - browser-resolve "^1.11.0" - builtin-modules "^1.1.0" - resolve "^1.1.6" - -rollup-pluginutils@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" - dependencies: - estree-walker "^0.2.1" - minimatch "^3.0.2" - -rollup@^0.41.6: - version "0.41.6" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.6.tgz#e0d05497877a398c104d816d2733a718a7a94e2a" - dependencies: - source-map-support "^0.4.0" - -safe-buffer@^5.1.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -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-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -sander@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/sander/-/sander-0.5.1.tgz#741e245e231f07cafb6fdf0f133adfa216a502ad" - dependencies: - es6-promise "^3.1.2" - graceful-fs "^4.1.3" - mkdirp "^0.5.1" - rimraf "^2.5.2" - -serialize-javascript@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== - dependencies: - randombytes "^2.1.0" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sorcery@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/sorcery/-/sorcery-0.10.0.tgz#8ae90ad7d7cb05fc59f1ab0c637845d5c15a52b7" - dependencies: - buffer-crc32 "^0.2.5" - minimist "^1.2.0" - sander "^0.5.0" - sourcemap-codec "^1.3.0" - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@^0.4.0, source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -sourcemap-codec@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2" - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -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@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -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@7.2.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" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -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" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -typescript@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" - -uglify-js@^2.8.14: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -user-home@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" - integrity sha1-K1viOjK2Onyd640PKNSFcko98ZA= - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -v8flags@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" - integrity sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ= - dependencies: - user-home "^1.1.1" - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which@2.0.2: - 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" - -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -workerpool@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438" - integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q== - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== - -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.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/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/History.md b/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/History.md deleted file mode 100644 index acc8675372e980824723cfcfec09c0ba43a3195a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/History.md +++ /dev/null @@ -1,16 +0,0 @@ - -1.0.2 / 2015-10-07 -================== - - * use try/catch when checking `localStorage` (#3, @kumavis) - -1.0.1 / 2014-11-25 -================== - - * browser: use `console.warn()` for deprecation calls - * browser: more jsdocs - -1.0.0 / 2014-04-30 -================== - - * initial commit diff --git a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/LICENSE b/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/LICENSE deleted file mode 100644 index 6a60e8c225c9baca25907f87c74b428e5d85de0c..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/README.md b/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/README.md deleted file mode 100644 index 75622fa7c250a6605f4778d9dffe97bf60291d17..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/README.md +++ /dev/null @@ -1,53 +0,0 @@ -util-deprecate -============== -### The Node.js `util.deprecate()` function with browser support - -In Node.js, this module simply re-exports the `util.deprecate()` function. - -In the web browser (i.e. via browserify), a browser-specific implementation -of the `util.deprecate()` function is used. - - -## API - -A `deprecate()` function is the only thing exposed by this module. - -``` javascript -// setup: -exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead'); - - -// users see: -foo(); -// foo() is deprecated, use bar() instead -foo(); -foo(); -``` - - -## License - -(The MIT License) - -Copyright (c) 2014 Nathan Rajlich - -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/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/browser.js b/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/browser.js deleted file mode 100644 index 549ae2f065ea5add2c4b3667e412a9d0e7d2b1af..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/browser.js +++ /dev/null @@ -1,67 +0,0 @@ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/node.js b/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/node.js deleted file mode 100644 index 5e6fcff5ddd3fbf8bdda6310c224114d30b7509e..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/node.js +++ /dev/null @@ -1,6 +0,0 @@ - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = require('util').deprecate; diff --git a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/package.json b/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/package.json deleted file mode 100644 index 2e79f89a90f58369ef197534e8488158f379d264..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/util-deprecate/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "util-deprecate", - "version": "1.0.2", - "description": "The Node.js `util.deprecate()` function with browser support", - "main": "node.js", - "browser": "browser.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/util-deprecate.git" - }, - "keywords": [ - "util", - "deprecate", - "browserify", - "browser", - "node" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/TooTallNate/util-deprecate/issues" - }, - "homepage": "https://github.com/TooTallNate/util-deprecate" -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/LICENSE.md b/ThinFilm_Analyzer/frontend/node_modules/vite/LICENSE.md deleted file mode 100644 index c0f6ed8846e4072052275f2d78215b1791877537..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/LICENSE.md +++ /dev/null @@ -1,2120 +0,0 @@ -# Vite core license -Vite is released under the MIT license: - -MIT License - -Copyright (c) 2019-present, VoidZero Inc. and Vite 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. - -# Licenses of bundled dependencies -The published Vite artifact additionally contains code with the following licenses: -BSD-2-Clause, CC0-1.0, ISC, MIT - -# Bundled dependencies: -## @jridgewell/gen-mapping, @jridgewell/remapping, @jridgewell/sourcemap-codec, @jridgewell/trace-mapping -License: MIT -By: Justin Ridgewell -Repositories: https://github.com/jridgewell/sourcemaps, https://github.com/jridgewell/sourcemaps, https://github.com/jridgewell/sourcemaps, https://github.com/jridgewell/sourcemaps - -> Copyright 2024 Justin Ridgewell -> -> 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. - ---------------------------------------- - -## @jridgewell/resolve-uri -License: MIT -By: Justin Ridgewell -Repository: https://github.com/jridgewell/resolve-uri - -> Copyright 2019 Justin Ridgewell -> -> 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. - ---------------------------------------- - -## @polka/compression -License: MIT -Repository: https://github.com/lukeed/polka - ---------------------------------------- - -## @polka/url -License: MIT -By: Luke Edwards -Repository: https://github.com/lukeed/polka - ---------------------------------------- - -## @rolldown/pluginutils -License: MIT -Repository: https://github.com/rolldown/rolldown - -> MIT License -> -> Copyright (c) 2024-present VoidZero Inc. & 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. -> -> end of terms and conditions -> -> The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE). - ---------------------------------------- - -## @rollup/plugin-alias, @rollup/plugin-commonjs, @rollup/plugin-dynamic-import-vars, @rollup/pluginutils -License: MIT -By: Johannes Stein -Repository: https://github.com/rollup/plugins - -License: MIT -By: Rich Harris -Repository: https://github.com/rollup/plugins - -License: MIT -By: LarsDenBakker -Repository: https://github.com/rollup/plugins - -License: MIT -By: Rich Harris -Repository: https://github.com/rollup/plugins - -> The MIT License (MIT) -> -> Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/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. - ---------------------------------------- - -## anymatch -License: ISC -By: Elan Shanker -Repository: https://github.com/micromatch/anymatch - -> The ISC License -> -> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com) -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted, provided that the above -> copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## artichokie -License: MIT -By: sapphi-red, Evan You -Repository: https://github.com/sapphi-red/artichokie - -> MIT License -> -> Copyright (c) 2020-present, Yuxi (Evan) You -> Copyright (c) 2023-present, sapphi-red -> -> 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. - ---------------------------------------- - -## binary-extensions -License: MIT -By: Sindre Sorhus -Repository: https://github.com/sindresorhus/binary-extensions - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> Copyright (c) Paul Miller (https://paulmillr.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## braces, fill-range, is-number -License: MIT -By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm -Repository: https://github.com/micromatch/braces - -License: MIT -By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling -Repository: https://github.com/jonschlinkert/fill-range - -License: MIT -By: Jon Schlinkert, Olsten Larck, Rouven Weßling -Repository: https://github.com/jonschlinkert/is-number - -> The MIT License (MIT) -> -> Copyright (c) 2014-present, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## bundle-name, default-browser, default-browser-id, define-lazy-prop, is-docker, is-inside-container, is-wsl, open, run-applescript, wsl-utils -License: MIT -By: Sindre Sorhus -Repositories: https://github.com/sindresorhus/bundle-name, https://github.com/sindresorhus/default-browser, https://github.com/sindresorhus/default-browser-id, https://github.com/sindresorhus/define-lazy-prop, https://github.com/sindresorhus/is-docker, https://github.com/sindresorhus/is-inside-container, https://github.com/sindresorhus/is-wsl, https://github.com/sindresorhus/open, https://github.com/sindresorhus/run-applescript, https://github.com/sindresorhus/wsl-utils - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## cac -License: MIT -By: egoist -Repository: https://github.com/egoist/cac - -> The MIT License (MIT) -> -> Copyright (c) EGOIST <0x142857@gmail.com> (https://github.com/egoist) -> -> 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. - ---------------------------------------- - -## chokidar -License: MIT -By: Paul Miller, Elan Shanker -Repository: https://github.com/paulmillr/chokidar - -> The MIT License (MIT) -> -> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker -> -> 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. - ---------------------------------------- - -## commondir, shell-quote -License: MIT -By: James Halliday -Repositories: http://github.com/substack/node-commondir, http://github.com/ljharb/shell-quote - -> The MIT License -> -> Copyright (c) 2013 James Halliday (mail@substack.net) -> -> 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. - ---------------------------------------- - -## connect -License: MIT -By: TJ Holowaychuk, Douglas Christopher Wilson, Jonathan Ong, Tim Caswell -Repository: https://github.com/senchalabs/connect - -> (The MIT License) -> -> Copyright (c) 2010 Sencha Inc. -> Copyright (c) 2011 LearnBoost -> Copyright (c) 2011-2014 TJ Holowaychuk -> Copyright (c) 2015 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. - ---------------------------------------- - -## convert-source-map -License: MIT -By: Thorsten Lorenz -Repository: https://github.com/thlorenz/convert-source-map - -> Copyright 2013 Thorsten Lorenz. -> 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. - ---------------------------------------- - -## cors -License: MIT -By: Troy Goode -Repository: https://github.com/expressjs/cors - -> (The MIT License) -> -> 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 -> '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. - ---------------------------------------- - -## cross-spawn -License: MIT -By: André Cruz -Repository: https://github.com/moxystudio/node-cross-spawn - -> The MIT License (MIT) -> -> Copyright (c) 2018 Made With MOXY Lda -> -> 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. - ---------------------------------------- - -## cssesc -License: MIT -By: Mathias Bynens -Repository: https://github.com/mathiasbynens/cssesc - -> Copyright Mathias Bynens -> -> Permission is hereby granted, free of charge, to any person obtaining -> a copy of this software and associated documentation files (the -> "Software"), to deal in the Software without restriction, including -> without limitation the rights to use, copy, modify, merge, publish, -> distribute, sublicense, and/or sell copies of the Software, and to -> permit persons to whom the Software is furnished to do so, subject to -> the following conditions: -> -> The above copyright notice and this permission notice shall be -> included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## dotenv -License: BSD-2-Clause -Repository: https://github.com/motdotla/dotenv - -> Copyright (c) 2015, Scott Motte -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions are met: -> -> * Redistributions of source code must retain the above copyright notice, this -> list of conditions and the following disclaimer. -> -> * Redistributions in binary form must reproduce the above copyright notice, -> this list of conditions and the following disclaimer in the documentation -> and/or other materials provided with the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -> DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -> FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -> OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ---------------------------------------- - -## dotenv-expand -License: BSD-2-Clause -By: motdotla -Repository: https://github.com/motdotla/dotenv-expand - -> Copyright (c) 2016, Scott Motte -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions are met: -> -> * Redistributions of source code must retain the above copyright notice, this -> list of conditions and the following disclaimer. -> -> * Redistributions in binary form must reproduce the above copyright notice, -> this list of conditions and the following disclaimer in the documentation -> and/or other materials provided with the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -> DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -> FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -> OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ---------------------------------------- - -## ee-first -License: MIT -By: Jonathan Ong, Douglas Christopher Wilson -Repository: https://github.com/jonathanong/ee-first - -> The MIT License (MIT) -> -> Copyright (c) 2014 Jonathan Ong me@jongleberry.com -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## encodeurl -License: MIT -By: Douglas Christopher Wilson -Repository: https://github.com/pillarjs/encodeurl - -> (The MIT License) -> -> 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. - ---------------------------------------- - -## entities -License: BSD-2-Clause -By: Felix Boehm -Repository: https://github.com/fb55/entities - -> Copyright (c) Felix Böhm -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -> -> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -> -> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -> -> THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, -> EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ---------------------------------------- - -## es-module-lexer -License: MIT -By: Guy Bedford -Repository: https://github.com/guybedford/es-module-lexer - -> MIT License -> ----------- -> -> Copyright (C) 2018-2022 Guy Bedford -> -> 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. - ---------------------------------------- - -## escape-html -License: MIT -Repository: https://github.com/component/escape-html - -> (The MIT License) -> -> Copyright (c) 2012-2013 TJ Holowaychuk -> Copyright (c) 2015 Andreas Lubbe -> Copyright (c) 2015 Tiancheng "Timothy" Gu -> -> 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. - ---------------------------------------- - -## estree-walker -License: MIT -By: Rich Harris -Repository: https://github.com/Rich-Harris/estree-walker - -> Copyright (c) 2015-20 [these people](https://github.com/Rich-Harris/estree-walker/graphs/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. - ---------------------------------------- - -## etag -License: MIT -By: Douglas Christopher Wilson, David Björklund -Repository: https://github.com/jshttp/etag - -> (The MIT License) -> -> Copyright (c) 2014-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. - ---------------------------------------- - -## finalhandler -License: MIT -By: Douglas Christopher Wilson -Repository: https://github.com/pillarjs/finalhandler - -> (The MIT License) -> -> Copyright (c) 2014-2017 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. - ---------------------------------------- - -## follow-redirects -License: MIT -By: Ruben Verborgh, Olivier Lalonde, James Talmage -Repository: https://github.com/follow-redirects/follow-redirects - -> Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh -> -> 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. - ---------------------------------------- - -## generic-names -License: MIT -By: Alexey Litvinov -Repository: https://github.com/css-modules/generic-names - -> The MIT License (MIT) -> -> Copyright (c) 2015 Alexey Litvinov -> -> 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. - ---------------------------------------- - -## glob-parent -License: ISC -By: Gulp Team, Elan Shanker, Blaine Bublitz -Repository: https://github.com/gulpjs/glob-parent - -> The ISC License -> -> Copyright (c) 2015, 2019 Elan Shanker -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted, provided that the above -> copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## host-validation-middleware -License: MIT -By: sapphi-red -Repository: https://github.com/sapphi-red/host-validation-middleware - -> MIT License -> -> Copyright (c) 2025 sapphi-red -> -> 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. - ---------------------------------------- - -## http-proxy-3 -License: MIT -By: William Stein, Charlie Robbins, Jimb Esser, jcrugzz -Repository: https://github.com/sagemathinc/http-proxy-3 - -> node-http-3 -> -> Copyright (c) 2010-2025 William Stein, Charlie Robbins, Jarrett Cruger & the 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. - ---------------------------------------- - -## icss-utils -License: ISC -By: Glen Maddern -Repository: https://github.com/css-modules/icss-utils - -> ISC License (ISC) -> Copyright 2018 Glen Maddern -> -> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## is-binary-path -License: MIT -By: Sindre Sorhus -Repository: https://github.com/sindresorhus/is-binary-path - -> MIT License -> -> Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## is-extglob -License: MIT -By: Jon Schlinkert -Repository: https://github.com/jonschlinkert/is-extglob - -> The MIT License (MIT) -> -> Copyright (c) 2014-2016, Jon Schlinkert -> -> 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. - ---------------------------------------- - -## is-glob -License: MIT -By: Jon Schlinkert, Brian Woodward, Daniel Perez -Repository: https://github.com/micromatch/is-glob - -> The MIT License (MIT) -> -> Copyright (c) 2014-2017, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## is-reference -License: MIT -By: Rich Harris -Repository: https://github.com/Rich-Harris/is-reference - ---------------------------------------- - -## isexe, which -License: ISC -By: Isaac Z. Schlueter -Repositories: https://github.com/isaacs/isexe, https://github.com/isaacs/node-which - -> The ISC License -> -> Copyright (c) Isaac Z. Schlueter and Contributors -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted, provided that the above -> copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## js-tokens -License: MIT -By: Simon Lydell -Repository: https://github.com/lydell/js-tokens - -> The MIT License (MIT) -> -> Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Simon Lydell -> -> 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. - ---------------------------------------- - -## launch-editor, launch-editor-middleware -License: MIT -By: Evan You -Repositories: https://github.com/yyx990803/launch-editor, https://github.com/yyx990803/launch-editor - -> The MIT License (MIT) -> -> Copyright (c) 2017-present, Yuxi (Evan) You -> -> 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. - ---------------------------------------- - -## lilconfig -License: MIT -By: antonk52 -Repository: https://github.com/antonk52/lilconfig - -> MIT License -> -> Copyright (c) 2022 Anton Kastritskiy -> -> 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. - ---------------------------------------- - -## loader-utils -License: MIT -By: Tobias Koppers @sokra -Repository: https://github.com/webpack/loader-utils - -> Copyright JS Foundation and other 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. - ---------------------------------------- - -## lodash.camelcase -License: MIT -By: John-David Dalton, Blaine Bublitz, Mathias Bynens -Repository: https://github.com/lodash/lodash - -> Copyright jQuery 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. - ---------------------------------------- - -## magic-string -License: MIT -By: Rich Harris -Repository: https://github.com/Rich-Harris/magic-string - -> Copyright 2018 Rich Harris -> -> 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. - ---------------------------------------- - -## mlly, ufo -License: MIT -Repositories: https://github.com/unjs/mlly, https://github.com/unjs/ufo - -> MIT License -> -> Copyright (c) Pooya Parsa -> -> 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. - ---------------------------------------- - -## mrmime -License: MIT -By: Luke Edwards -Repository: https://github.com/lukeed/mrmime - -> The MIT License (MIT) -> -> Copyright (c) Luke Edwards (https://lukeed.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## normalize-path -License: MIT -By: Jon Schlinkert, Blaine Bublitz -Repository: https://github.com/jonschlinkert/normalize-path - -> The MIT License (MIT) -> -> Copyright (c) 2014-2018, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## object-assign -License: MIT -By: Sindre Sorhus -Repository: https://github.com/sindresorhus/object-assign - -> The MIT License (MIT) -> -> Copyright (c) Sindre Sorhus (sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## obug -License: MIT -By: Kevin Deng -Repository: https://github.com/sxzz/obug - -> The MIT License (MIT) -> -> Copyright © 2025-PRESENT Kevin Deng (https://github.com/sxzz) -> Copyright (c) 2014-2017 TJ Holowaychuk -> Copyright (c) 2018-2021 Josh Junon -> -> 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. - ---------------------------------------- - -## on-finished -License: MIT -By: Douglas Christopher Wilson, Jonathan Ong -Repository: https://github.com/jshttp/on-finished - -> (The MIT License) -> -> Copyright (c) 2013 Jonathan Ong -> Copyright (c) 2014 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. - ---------------------------------------- - -## parse5 -License: MIT -By: Ivan Nikulin, https://github.com/inikulin/parse5/graphs/contributors -Repository: https://github.com/inikulin/parse5 - -> Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin) -> -> 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. - ---------------------------------------- - -## parseurl -License: MIT -By: Douglas Christopher Wilson, Jonathan Ong -Repository: https://github.com/pillarjs/parseurl - -> (The MIT License) -> -> Copyright (c) 2014 Jonathan Ong -> Copyright (c) 2014-2017 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. - ---------------------------------------- - -## path-key, shebang-regex -License: MIT -By: Sindre Sorhus -Repositories: https://github.com/sindresorhus/path-key, https://github.com/sindresorhus/shebang-regex - -> MIT License -> -> Copyright (c) Sindre Sorhus (sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---------------------------------------- - -## periscopic -License: MIT -Repository: https://github.com/Rich-Harris/periscopic - -> Copyright (c) 2019 Rich Harris -> -> 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. - ---------------------------------------- - -## picocolors -License: ISC -By: Alexey Raspopov -Repository: https://github.com/alexeyraspopov/picocolors - -> ISC License -> -> Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov -> -> Permission to use, copy, modify, and/or distribute this software for any -> purpose with or without fee is hereby granted, provided that the above -> copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## postcss-import -License: MIT -By: Maxime Thirouin -Repository: https://github.com/postcss/postcss-import - -> The MIT License (MIT) -> -> Copyright (c) 2014 Maxime Thirouin, Jason Campbell & Kevin Mårtensson -> -> 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. - ---------------------------------------- - -## postcss-load-config -License: MIT -By: Michael Ciniawky, Ryan Dunckel, Mateusz Derks, Dalton Santos, Patrick Gilday, François Wouts -Repository: https://github.com/postcss/postcss-load-config - -> The MIT License (MIT) -> -> Copyright Michael Ciniawsky -> -> 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. - ---------------------------------------- - -## postcss-modules -License: MIT -By: Alexander Madyankin -Repository: https://github.com/css-modules/postcss-modules - -> The MIT License (MIT) -> -> Copyright 2015-present Alexander Madyankin -> -> 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. - ---------------------------------------- - -## postcss-modules-extract-imports -License: ISC -By: Glen Maddern -Repository: https://github.com/css-modules/postcss-modules-extract-imports - -> Copyright 2015 Glen Maddern -> -> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## postcss-modules-local-by-default -License: MIT -By: Mark Dalgleish -Repository: https://github.com/css-modules/postcss-modules-local-by-default - -> The MIT License (MIT) -> -> Copyright 2015 Mark Dalgleish -> -> 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. - ---------------------------------------- - -## postcss-modules-scope -License: ISC -By: Glen Maddern -Repository: https://github.com/css-modules/postcss-modules-scope - -> ISC License (ISC) -> -> Copyright (c) 2015, Glen Maddern -> -> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## postcss-modules-values -License: ISC -By: Glen Maddern -Repository: https://github.com/css-modules/postcss-modules-values - -> ISC License (ISC) -> -> Copyright (c) 2015, Glen Maddern -> -> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -> -> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------- - -## postcss-selector-parser -License: MIT -By: Ben Briggs, Chris Eppstein -Repository: https://github.com/postcss/postcss-selector-parser - -> Copyright (c) Ben Briggs (http://beneb.info) -> -> 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. - ---------------------------------------- - -## postcss-value-parser -License: MIT -By: Bogdan Chadkin -Repository: https://github.com/TrySound/postcss-value-parser - -> Copyright (c) Bogdan Chadkin -> -> 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. - ---------------------------------------- - -## readdirp -License: MIT -By: Thorsten Lorenz, Paul Miller -Repository: https://github.com/paulmillr/readdirp - -> MIT License -> -> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - -## resolve.exports, totalist -License: MIT -By: Luke Edwards -Repositories: https://github.com/lukeed/resolve.exports, https://github.com/lukeed/totalist - -> The MIT License (MIT) -> -> Copyright (c) Luke Edwards (lukeed.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ---------------------------------------- - -## shebang-command -License: MIT -By: Kevin Mårtensson -Repository: https://github.com/kevva/shebang-command - -> MIT License -> -> Copyright (c) Kevin Mårtensson (github.com/kevva) -> -> 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. - ---------------------------------------- - -## sirv -License: MIT -By: Luke Edwards -Repository: https://github.com/lukeed/sirv - ---------------------------------------- - -## statuses -License: MIT -By: Douglas Christopher Wilson, Jonathan Ong -Repository: https://github.com/jshttp/statuses - -> 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. - ---------------------------------------- - -## string-hash -License: CC0-1.0 -By: The Dark Sky Company -Repository: https://github.com/darkskyapp/string-hash - ---------------------------------------- - -## strip-literal -License: MIT -By: Anthony Fu -Repository: https://github.com/antfu/strip-literal - -> MIT License -> -> Copyright (c) 2022 Anthony Fu -> -> 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. - ---------------------------------------- - -## to-regex-range -License: MIT -By: Jon Schlinkert, Rouven Weßling -Repository: https://github.com/micromatch/to-regex-range - -> The MIT License (MIT) -> -> Copyright (c) 2015-present, Jon Schlinkert. -> -> 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. - ---------------------------------------- - -## tsconfck -License: MIT -By: dominikg -Repository: https://github.com/dominikg/tsconfck - -> MIT License -> -> Copyright (c) 2021-present dominikg and [contributors](https://github.com/dominikg/tsconfck/graphs/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. -> -> -- Licenses for 3rd-party code included in tsconfck -- -> -> # strip-bom and strip-json-comments -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ---------------------------------------- - -## unpipe -License: MIT -By: Douglas Christopher Wilson -Repository: https://github.com/stream-utils/unpipe - -> (The MIT License) -> -> Copyright (c) 2015 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. - ---------------------------------------- - -## util-deprecate -License: MIT -By: Nathan Rajlich -Repository: https://github.com/TooTallNate/util-deprecate - -> (The MIT License) -> -> Copyright (c) 2014 Nathan Rajlich -> -> 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. - ---------------------------------------- - -## utils-merge -License: MIT -By: Jared Hanson -Repository: https://github.com/jaredhanson/utils-merge - -> The MIT License (MIT) -> -> Copyright (c) 2013-2017 Jared Hanson -> -> 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. - ---------------------------------------- - -## vary -License: MIT -By: Douglas Christopher Wilson -Repository: https://github.com/jshttp/vary - -> (The MIT License) -> -> Copyright (c) 2014-2017 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. - ---------------------------------------- - -## ws -License: MIT -By: Einar Otto Stangvik -Repository: https://github.com/websockets/ws - -> Copyright (c) 2011 Einar Otto Stangvik -> Copyright (c) 2013 Arnout Kazemier and contributors -> Copyright (c) 2016 Luigi Pinca and contributors -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of -> this software and associated documentation files (the "Software"), to deal in -> the Software without restriction, including without limitation the rights to -> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -> the Software, and to permit persons to whom the Software is furnished to do so, -> subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/README.md b/ThinFilm_Analyzer/frontend/node_modules/vite/README.md deleted file mode 100644 index b0e348be45cdc96c7ec94b7344310eb19f15ed46..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Vite ⚡ - -> Next Generation Frontend Tooling - -- 💡 Instant Server Start -- ⚡️ Lightning Fast HMR -- 🛠️ Rich Features -- 📦 Optimized Build -- 🔩 Universal Plugin Interface -- 🔑 Fully Typed APIs - -Vite (French word for "fast", pronounced `/vit/`) is a new breed of frontend build tool that significantly improves the frontend development experience. It consists of two major parts: - -- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.html#hot-module-replacement). - -- A [build command](https://vite.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production. - -In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support. - -[Read the Docs to Learn More](https://vite.dev). diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/bin/openChrome.js b/ThinFilm_Analyzer/frontend/node_modules/vite/bin/openChrome.js deleted file mode 100644 index 5a4aa95e94cf4748921178b1017541482727f6c5..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/bin/openChrome.js +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright (c) 2015-present, Facebook, Inc. - -This source code is licensed under the MIT license found in the -LICENSE file at -https://github.com/facebook/create-react-app/blob/main/LICENSE -*/ - -/* global Application */ - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function run(argv) { - const urlToOpen = argv[0] - // Allow requested program to be optional, default to Google Chrome - const programName = argv[1] ?? 'Google Chrome' - - const app = Application(programName) - - if (app.windows.length === 0) { - app.Window().make() - } - - // 1: Looking for tab running debugger then, - // Reload debugging tab if found, then return - const found = lookupTabWithUrl(urlToOpen, app) - if (found) { - found.targetWindow.activeTabIndex = found.targetTabIndex - found.targetTab.reload() - found.targetWindow.index = 1 - app.activate() - return - } - - // 2: Looking for Empty tab - // In case debugging tab was not found - // We try to find an empty tab instead - const emptyTabFound = lookupTabWithUrl('chrome://newtab/', app) - if (emptyTabFound) { - emptyTabFound.targetWindow.activeTabIndex = emptyTabFound.targetTabIndex - emptyTabFound.targetTab.url = urlToOpen - app.activate() - return - } - - // 3: Create new tab - // both debugging and empty tab were not found make a new tab with url - const firstWindow = app.windows[0] - firstWindow.tabs.push(app.Tab({ url: urlToOpen })) - app.activate() -} - -/** - * Lookup tab with given url - */ -function lookupTabWithUrl(lookupUrl, app) { - const windows = app.windows() - for (const window of windows) { - for (const [tabIndex, tab] of window.tabs().entries()) { - if (tab.url().includes(lookupUrl)) { - return { - targetTab: tab, - targetTabIndex: tabIndex + 1, - targetWindow: window, - } - } - } - } -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/bin/vite.js b/ThinFilm_Analyzer/frontend/node_modules/vite/bin/vite.js deleted file mode 100644 index 79c49ab70f624eac6d3b0888864e279998c32662..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/bin/vite.js +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env node -import { performance } from 'node:perf_hooks' -import module from 'node:module' - -if (!import.meta.url.includes('node_modules')) { - if (!process.env.DEBUG_DISABLE_SOURCE_MAP) { - // eslint-disable-next-line n/no-unsupported-features/node-builtins -- only used in dev - process.setSourceMapsEnabled(true) - } - - process.on('unhandledRejection', (err) => { - throw new Error('UNHANDLED PROMISE REJECTION', { cause: err }) - }) -} - -global.__vite_start_time = performance.now() - -// check debug mode first before requiring the CLI. -const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg)) -const filterIndex = process.argv.findIndex((arg) => - /^(?:-f|--filter)$/.test(arg), -) -const profileIndex = process.argv.indexOf('--profile') - -if (debugIndex > 0) { - let value = process.argv[debugIndex + 1] - if (!value || value[0] === '-') { - value = 'vite:*' - } else { - // support debugging multiple flags with comma-separated list - value = value - .split(',') - .map((v) => `vite:${v}`) - .join(',') - } - process.env.DEBUG = `${ - process.env.DEBUG ? process.env.DEBUG + ',' : '' - }${value}` - - if (filterIndex > 0) { - const filter = process.argv[filterIndex + 1] - if (filter && filter[0] !== '-') { - process.env.VITE_DEBUG_FILTER = filter - } - } -} - -function start() { - try { - // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists - module.enableCompileCache?.() - // flush the cache after 10s because the cache is not flushed until process end - // for dev server, the cache is never flushed unless manually flushed because the process.exit is called - // also flushing the cache in SIGINT handler seems to cause the process to hang - setTimeout(() => { - try { - // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.12.0+ and only called if it exists - module.flushCompileCache?.() - } catch {} - }, 10 * 1000).unref() - } catch {} - return import('../dist/node/cli.js') -} - -if (profileIndex > 0) { - process.argv.splice(profileIndex, 1) - const next = process.argv[profileIndex] - if (next && next[0] !== '-') { - process.argv.splice(profileIndex, 1) - } - const inspector = await import('node:inspector').then((r) => r.default) - const session = (global.__vite_profile_session = new inspector.Session()) - session.connect() - session.post('Profiler.enable', () => { - session.post('Profiler.start', start) - }) -} else { - start() -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/client.d.ts b/ThinFilm_Analyzer/frontend/node_modules/vite/client.d.ts deleted file mode 100644 index 3a9dd88f771f0d88310d8441543af477269e3973..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/client.d.ts +++ /dev/null @@ -1,279 +0,0 @@ -/// - -// CSS modules -type CSSModuleClasses = { readonly [key: string]: string } - -declare module '*.module.css' { - const classes: CSSModuleClasses - export default classes -} -declare module '*.module.scss' { - const classes: CSSModuleClasses - export default classes -} -declare module '*.module.sass' { - const classes: CSSModuleClasses - export default classes -} -declare module '*.module.less' { - const classes: CSSModuleClasses - export default classes -} -declare module '*.module.styl' { - const classes: CSSModuleClasses - export default classes -} -declare module '*.module.stylus' { - const classes: CSSModuleClasses - export default classes -} -declare module '*.module.pcss' { - const classes: CSSModuleClasses - export default classes -} -declare module '*.module.sss' { - const classes: CSSModuleClasses - export default classes -} - -// CSS -declare module '*.css' {} -declare module '*.scss' {} -declare module '*.sass' {} -declare module '*.less' {} -declare module '*.styl' {} -declare module '*.stylus' {} -declare module '*.pcss' {} -declare module '*.sss' {} - -// Built-in asset types -// see `src/node/constants.ts` - -// images -declare module '*.apng' { - const src: string - export default src -} -declare module '*.bmp' { - const src: string - export default src -} -declare module '*.png' { - const src: string - export default src -} -declare module '*.jpg' { - const src: string - export default src -} -declare module '*.jpeg' { - const src: string - export default src -} -declare module '*.jfif' { - const src: string - export default src -} -declare module '*.pjpeg' { - const src: string - export default src -} -declare module '*.pjp' { - const src: string - export default src -} -declare module '*.gif' { - const src: string - export default src -} -declare module '*.svg' { - const src: string - export default src -} -declare module '*.ico' { - const src: string - export default src -} -declare module '*.webp' { - const src: string - export default src -} -declare module '*.avif' { - const src: string - export default src -} -declare module '*.cur' { - const src: string - export default src -} -declare module '*.jxl' { - const src: string - export default src -} - -// media -declare module '*.mp4' { - const src: string - export default src -} -declare module '*.webm' { - const src: string - export default src -} -declare module '*.ogg' { - const src: string - export default src -} -declare module '*.mp3' { - const src: string - export default src -} -declare module '*.wav' { - const src: string - export default src -} -declare module '*.flac' { - const src: string - export default src -} -declare module '*.aac' { - const src: string - export default src -} -declare module '*.opus' { - const src: string - export default src -} -declare module '*.mov' { - const src: string - export default src -} -declare module '*.m4a' { - const src: string - export default src -} -declare module '*.vtt' { - const src: string - export default src -} - -// fonts -declare module '*.woff' { - const src: string - export default src -} -declare module '*.woff2' { - const src: string - export default src -} -declare module '*.eot' { - const src: string - export default src -} -declare module '*.ttf' { - const src: string - export default src -} -declare module '*.otf' { - const src: string - export default src -} - -// other -declare module '*.webmanifest' { - const src: string - export default src -} -declare module '*.pdf' { - const src: string - export default src -} -declare module '*.txt' { - const src: string - export default src -} - -// wasm?init -declare module '*.wasm?init' { - const initWasm: ( - options?: WebAssembly.Imports, - ) => Promise - export default initWasm -} - -// web worker -declare module '*?worker' { - const workerConstructor: { - new (options?: { name?: string }): Worker - } - export default workerConstructor -} - -declare module '*?worker&inline' { - const workerConstructor: { - new (options?: { name?: string }): Worker - } - export default workerConstructor -} - -declare module '*?worker&url' { - const src: string - export default src -} - -declare module '*?sharedworker' { - const sharedWorkerConstructor: { - new (options?: { name?: string }): SharedWorker - } - export default sharedWorkerConstructor -} - -declare module '*?sharedworker&inline' { - const sharedWorkerConstructor: { - new (options?: { name?: string }): SharedWorker - } - export default sharedWorkerConstructor -} - -declare module '*?sharedworker&url' { - const src: string - export default src -} - -declare module '*?raw' { - const src: string - export default src -} - -declare module '*?url' { - const src: string - export default src -} - -declare module '*?inline' { - const src: string - export default src -} - -declare module '*?no-inline' { - const src: string - export default src -} - -declare module '*?url&inline' { - const src: string - export default src -} - -declare module '*?url&no-inline' { - const src: string - export default src -} - -declare interface VitePreloadErrorEvent extends Event { - payload: Error -} - -declare interface WindowEventMap { - 'vite:preloadError': VitePreloadErrorEvent -} diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/client/client.mjs b/ThinFilm_Analyzer/frontend/node_modules/vite/dist/client/client.mjs deleted file mode 100644 index 977c52719b774b2f5557852e0ba738ea143903a1..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/client/client.mjs +++ /dev/null @@ -1,1106 +0,0 @@ -import "@vite/env"; - -//#region \0@oxc-project+runtime@0.99.0/helpers/typeof.js -function _typeof(o) { - "@babel/helpers - typeof"; - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) { - return typeof o$1; - } : function(o$1) { - return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1; - }, _typeof(o); -} - -//#endregion -//#region \0@oxc-project+runtime@0.99.0/helpers/toPrimitive.js -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); -} - -//#endregion -//#region \0@oxc-project+runtime@0.99.0/helpers/toPropertyKey.js -function toPropertyKey(t) { - var i = toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} - -//#endregion -//#region \0@oxc-project+runtime@0.99.0/helpers/defineProperty.js -function _defineProperty(e, r, t) { - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} - -//#endregion -//#region src/shared/hmr.ts -var HMRContext = class { - constructor(hmrClient$1, ownerPath) { - this.hmrClient = hmrClient$1; - this.ownerPath = ownerPath; - _defineProperty(this, "newListeners", void 0); - if (!hmrClient$1.dataMap.has(ownerPath)) hmrClient$1.dataMap.set(ownerPath, {}); - const mod = hmrClient$1.hotModulesMap.get(ownerPath); - if (mod) mod.callbacks = []; - const staleListeners = hmrClient$1.ctxToListenersMap.get(ownerPath); - if (staleListeners) for (const [event, staleFns] of staleListeners) { - const listeners = hmrClient$1.customListenersMap.get(event); - if (listeners) hmrClient$1.customListenersMap.set(event, listeners.filter((l) => !staleFns.includes(l))); - } - this.newListeners = /* @__PURE__ */ new Map(); - hmrClient$1.ctxToListenersMap.set(ownerPath, this.newListeners); - } - get data() { - return this.hmrClient.dataMap.get(this.ownerPath); - } - accept(deps, callback) { - if (typeof deps === "function" || !deps) this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod)); - else if (typeof deps === "string") this.acceptDeps([deps], ([mod]) => callback?.(mod)); - else if (Array.isArray(deps)) this.acceptDeps(deps, callback); - else throw new Error(`invalid hot.accept() usage.`); - } - acceptExports(_, callback) { - this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod)); - } - dispose(cb) { - this.hmrClient.disposeMap.set(this.ownerPath, cb); - } - prune(cb) { - this.hmrClient.pruneMap.set(this.ownerPath, cb); - } - decline() {} - invalidate(message) { - const firstInvalidatedBy = this.hmrClient.currentFirstInvalidatedBy ?? this.ownerPath; - this.hmrClient.notifyListeners("vite:invalidate", { - path: this.ownerPath, - message, - firstInvalidatedBy - }); - this.send("vite:invalidate", { - path: this.ownerPath, - message, - firstInvalidatedBy - }); - this.hmrClient.logger.debug(`invalidate ${this.ownerPath}${message ? `: ${message}` : ""}`); - } - on(event, cb) { - const addToMap = (map) => { - const existing = map.get(event) || []; - existing.push(cb); - map.set(event, existing); - }; - addToMap(this.hmrClient.customListenersMap); - addToMap(this.newListeners); - } - off(event, cb) { - const removeFromMap = (map) => { - const existing = map.get(event); - if (existing === void 0) return; - const pruned = existing.filter((l) => l !== cb); - if (pruned.length === 0) { - map.delete(event); - return; - } - map.set(event, pruned); - }; - removeFromMap(this.hmrClient.customListenersMap); - removeFromMap(this.newListeners); - } - send(event, data) { - this.hmrClient.send({ - type: "custom", - event, - data - }); - } - acceptDeps(deps, callback = () => {}) { - const mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || { - id: this.ownerPath, - callbacks: [] - }; - mod.callbacks.push({ - deps, - fn: callback - }); - this.hmrClient.hotModulesMap.set(this.ownerPath, mod); - } -}; -var HMRClient = class { - constructor(logger, transport$1, importUpdatedModule) { - this.logger = logger; - this.transport = transport$1; - this.importUpdatedModule = importUpdatedModule; - _defineProperty(this, "hotModulesMap", /* @__PURE__ */ new Map()); - _defineProperty(this, "disposeMap", /* @__PURE__ */ new Map()); - _defineProperty(this, "pruneMap", /* @__PURE__ */ new Map()); - _defineProperty(this, "dataMap", /* @__PURE__ */ new Map()); - _defineProperty(this, "customListenersMap", /* @__PURE__ */ new Map()); - _defineProperty(this, "ctxToListenersMap", /* @__PURE__ */ new Map()); - _defineProperty(this, "currentFirstInvalidatedBy", void 0); - _defineProperty(this, "updateQueue", []); - _defineProperty(this, "pendingUpdateQueue", false); - } - async notifyListeners(event, data) { - const cbs = this.customListenersMap.get(event); - if (cbs) await Promise.allSettled(cbs.map((cb) => cb(data))); - } - send(payload) { - this.transport.send(payload).catch((err) => { - this.logger.error(err); - }); - } - clear() { - this.hotModulesMap.clear(); - this.disposeMap.clear(); - this.pruneMap.clear(); - this.dataMap.clear(); - this.customListenersMap.clear(); - this.ctxToListenersMap.clear(); - } - async prunePaths(paths) { - await Promise.all(paths.map((path) => { - const disposer = this.disposeMap.get(path); - if (disposer) return disposer(this.dataMap.get(path)); - })); - await Promise.all(paths.map((path) => { - const fn = this.pruneMap.get(path); - if (fn) return fn(this.dataMap.get(path)); - })); - } - warnFailedUpdate(err, path) { - if (!(err instanceof Error) || !err.message.includes("fetch")) this.logger.error(err); - this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`); - } - /** - * buffer multiple hot updates triggered by the same src change - * so that they are invoked in the same order they were sent. - * (otherwise the order may be inconsistent because of the http request round trip) - */ - async queueUpdate(payload) { - this.updateQueue.push(this.fetchUpdate(payload)); - if (!this.pendingUpdateQueue) { - this.pendingUpdateQueue = true; - await Promise.resolve(); - this.pendingUpdateQueue = false; - const loading = [...this.updateQueue]; - this.updateQueue = []; - (await Promise.all(loading)).forEach((fn) => fn && fn()); - } - } - async fetchUpdate(update) { - const { path, acceptedPath, firstInvalidatedBy } = update; - const mod = this.hotModulesMap.get(path); - if (!mod) return; - let fetchedModule; - const isSelfUpdate = path === acceptedPath; - const qualifiedCallbacks = mod.callbacks.filter(({ deps }) => deps.includes(acceptedPath)); - if (isSelfUpdate || qualifiedCallbacks.length > 0) { - const disposer = this.disposeMap.get(acceptedPath); - if (disposer) await disposer(this.dataMap.get(acceptedPath)); - try { - fetchedModule = await this.importUpdatedModule(update); - } catch (e) { - this.warnFailedUpdate(e, acceptedPath); - } - } - return () => { - try { - this.currentFirstInvalidatedBy = firstInvalidatedBy; - for (const { deps, fn } of qualifiedCallbacks) fn(deps.map((dep) => dep === acceptedPath ? fetchedModule : void 0)); - const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`; - this.logger.debug(`hot updated: ${loggedPath}`); - } finally { - this.currentFirstInvalidatedBy = void 0; - } - }; - } -}; - -//#endregion -//#region ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/non-secure/index.js -let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; -let nanoid = (size = 21) => { - let id = ""; - let i = size | 0; - while (i--) id += urlAlphabet[Math.random() * 64 | 0]; - return id; -}; - -//#endregion -//#region src/shared/constants.ts -let SOURCEMAPPING_URL = "sourceMa"; -SOURCEMAPPING_URL += "ppingURL"; - -//#endregion -//#region src/shared/utils.ts -const isWindows = typeof process !== "undefined" && process.platform === "win32"; -const AsyncFunction = async function() {}.constructor; -function promiseWithResolvers() { - let resolve; - let reject; - return { - promise: new Promise((_resolve, _reject) => { - resolve = _resolve; - reject = _reject; - }), - resolve, - reject - }; -} - -//#endregion -//#region src/shared/moduleRunnerTransport.ts -function reviveInvokeError(e) { - const error = new Error(e.message || "Unknown invoke error"); - Object.assign(error, e, { runnerError: /* @__PURE__ */ new Error("RunnerError") }); - return error; -} -const createInvokeableTransport = (transport$1) => { - if (transport$1.invoke) return { - ...transport$1, - async invoke(name, data) { - const result = await transport$1.invoke({ - type: "custom", - event: "vite:invoke", - data: { - id: "send", - name, - data - } - }); - if ("error" in result) throw reviveInvokeError(result.error); - return result.result; - } - }; - if (!transport$1.send || !transport$1.connect) throw new Error("transport must implement send and connect when invoke is not implemented"); - const rpcPromises = /* @__PURE__ */ new Map(); - return { - ...transport$1, - connect({ onMessage, onDisconnection }) { - return transport$1.connect({ - onMessage(payload) { - if (payload.type === "custom" && payload.event === "vite:invoke") { - const data = payload.data; - if (data.id.startsWith("response:")) { - const invokeId = data.id.slice(9); - const promise = rpcPromises.get(invokeId); - if (!promise) return; - if (promise.timeoutId) clearTimeout(promise.timeoutId); - rpcPromises.delete(invokeId); - const { error, result } = data.data; - if (error) promise.reject(error); - else promise.resolve(result); - return; - } - } - onMessage(payload); - }, - onDisconnection - }); - }, - disconnect() { - rpcPromises.forEach((promise) => { - promise.reject(/* @__PURE__ */ new Error(`transport was disconnected, cannot call ${JSON.stringify(promise.name)}`)); - }); - rpcPromises.clear(); - return transport$1.disconnect?.(); - }, - send(data) { - return transport$1.send(data); - }, - async invoke(name, data) { - const promiseId = nanoid(); - const wrappedData = { - type: "custom", - event: "vite:invoke", - data: { - name, - id: `send:${promiseId}`, - data - } - }; - const sendPromise = transport$1.send(wrappedData); - const { promise, resolve, reject } = promiseWithResolvers(); - const timeout = transport$1.timeout ?? 6e4; - let timeoutId; - if (timeout > 0) { - timeoutId = setTimeout(() => { - rpcPromises.delete(promiseId); - reject(/* @__PURE__ */ new Error(`transport invoke timed out after ${timeout}ms (data: ${JSON.stringify(wrappedData)})`)); - }, timeout); - timeoutId?.unref?.(); - } - rpcPromises.set(promiseId, { - resolve, - reject, - name, - timeoutId - }); - if (sendPromise) sendPromise.catch((err) => { - clearTimeout(timeoutId); - rpcPromises.delete(promiseId); - reject(err); - }); - try { - return await promise; - } catch (err) { - throw reviveInvokeError(err); - } - } - }; -}; -const normalizeModuleRunnerTransport = (transport$1) => { - const invokeableTransport = createInvokeableTransport(transport$1); - let isConnected = !invokeableTransport.connect; - let connectingPromise; - return { - ...transport$1, - ...invokeableTransport.connect ? { async connect(onMessage) { - if (isConnected) return; - if (connectingPromise) { - await connectingPromise; - return; - } - const maybePromise = invokeableTransport.connect({ - onMessage: onMessage ?? (() => {}), - onDisconnection() { - isConnected = false; - } - }); - if (maybePromise) { - connectingPromise = maybePromise; - await connectingPromise; - connectingPromise = void 0; - } - isConnected = true; - } } : {}, - ...invokeableTransport.disconnect ? { async disconnect() { - if (!isConnected) return; - if (connectingPromise) await connectingPromise; - isConnected = false; - await invokeableTransport.disconnect(); - } } : {}, - async send(data) { - if (!invokeableTransport.send) return; - if (!isConnected) if (connectingPromise) await connectingPromise; - else throw new Error("send was called before connect"); - await invokeableTransport.send(data); - }, - async invoke(name, data) { - if (!isConnected) if (connectingPromise) await connectingPromise; - else throw new Error("invoke was called before connect"); - return invokeableTransport.invoke(name, data); - } - }; -}; -const createWebSocketModuleRunnerTransport = (options) => { - const pingInterval = options.pingInterval ?? 3e4; - let ws; - let pingIntervalId; - return { - async connect({ onMessage, onDisconnection }) { - const socket = options.createConnection(); - socket.addEventListener("message", async ({ data }) => { - onMessage(JSON.parse(data)); - }); - let isOpened = socket.readyState === socket.OPEN; - if (!isOpened) await new Promise((resolve, reject) => { - socket.addEventListener("open", () => { - isOpened = true; - resolve(); - }, { once: true }); - socket.addEventListener("close", async () => { - if (!isOpened) { - reject(/* @__PURE__ */ new Error("WebSocket closed without opened.")); - return; - } - onMessage({ - type: "custom", - event: "vite:ws:disconnect", - data: { webSocket: socket } - }); - onDisconnection(); - }); - }); - onMessage({ - type: "custom", - event: "vite:ws:connect", - data: { webSocket: socket } - }); - ws = socket; - pingIntervalId = setInterval(() => { - if (socket.readyState === socket.OPEN) socket.send(JSON.stringify({ type: "ping" })); - }, pingInterval); - }, - disconnect() { - clearInterval(pingIntervalId); - ws?.close(); - }, - send(data) { - ws.send(JSON.stringify(data)); - } - }; -}; - -//#endregion -//#region src/shared/hmrHandler.ts -function createHMRHandler(handler) { - const queue = new Queue(); - return (payload) => queue.enqueue(() => handler(payload)); -} -var Queue = class { - constructor() { - _defineProperty(this, "queue", []); - _defineProperty(this, "pending", false); - } - enqueue(promise) { - return new Promise((resolve, reject) => { - this.queue.push({ - promise, - resolve, - reject - }); - this.dequeue(); - }); - } - dequeue() { - if (this.pending) return false; - const item = this.queue.shift(); - if (!item) return false; - this.pending = true; - item.promise().then(item.resolve).catch(item.reject).finally(() => { - this.pending = false; - this.dequeue(); - }); - return true; - } -}; - -//#endregion -//#region src/client/overlay.ts -const hmrConfigName = __HMR_CONFIG_NAME__; -const base$1 = __BASE__ || "/"; -const cspNonce = "document" in globalThis ? document.querySelector("meta[property=csp-nonce]")?.nonce : void 0; -function h(e, attrs = {}, ...children) { - const elem = document.createElement(e); - for (const [k, v] of Object.entries(attrs)) if (v !== void 0) elem.setAttribute(k, v); - elem.append(...children); - return elem; -} -const templateStyle = ` -:host { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 99999; - --monospace: 'SFMono-Regular', Consolas, - 'Liberation Mono', Menlo, Courier, monospace; - --red: #ff5555; - --yellow: #e2aa53; - --purple: #cfa4ff; - --cyan: #2dd9da; - --dim: #c9c9c9; - - --window-background: #181818; - --window-color: #d8d8d8; -} - -.backdrop { - position: fixed; - z-index: 99999; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow-y: scroll; - margin: 0; - background: rgba(0, 0, 0, 0.66); -} - -.window { - font-family: var(--monospace); - line-height: 1.5; - max-width: 80vw; - color: var(--window-color); - box-sizing: border-box; - margin: 30px auto; - padding: 2.5vh 4vw; - position: relative; - background: var(--window-background); - border-radius: 6px 6px 8px 8px; - box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); - overflow: hidden; - border-top: 8px solid var(--red); - direction: ltr; - text-align: left; -} - -pre { - font-family: var(--monospace); - font-size: 16px; - margin-top: 0; - margin-bottom: 1em; - overflow-x: scroll; - scrollbar-width: none; -} - -pre::-webkit-scrollbar { - display: none; -} - -pre.frame::-webkit-scrollbar { - display: block; - height: 5px; -} - -pre.frame::-webkit-scrollbar-thumb { - background: #999; - border-radius: 5px; -} - -pre.frame { - scrollbar-width: thin; -} - -.message { - line-height: 1.3; - font-weight: 600; - white-space: pre-wrap; -} - -.message-body { - color: var(--red); -} - -.plugin { - color: var(--purple); -} - -.file { - color: var(--cyan); - margin-bottom: 0; - white-space: pre-wrap; - word-break: break-all; -} - -.frame { - color: var(--yellow); -} - -.stack { - font-size: 13px; - color: var(--dim); -} - -.tip { - font-size: 13px; - color: #999; - border-top: 1px dotted #999; - padding-top: 13px; - line-height: 1.8; -} - -code { - font-size: 13px; - font-family: var(--monospace); - color: var(--yellow); -} - -.file-link { - text-decoration: underline; - cursor: pointer; -} - -kbd { - line-height: 1.5; - font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - font-size: 0.75rem; - font-weight: 700; - background-color: rgb(38, 40, 44); - color: rgb(166, 167, 171); - padding: 0.15rem 0.3rem; - border-radius: 0.25rem; - border-width: 0.0625rem 0.0625rem 0.1875rem; - border-style: solid; - border-color: rgb(54, 57, 64); - border-image: initial; -} -`; -const createTemplate = () => h("div", { - class: "backdrop", - part: "backdrop" -}, h("div", { - class: "window", - part: "window" -}, h("pre", { - class: "message", - part: "message" -}, h("span", { - class: "plugin", - part: "plugin" -}), h("span", { - class: "message-body", - part: "message-body" -})), h("pre", { - class: "file", - part: "file" -}), h("pre", { - class: "frame", - part: "frame" -}), h("pre", { - class: "stack", - part: "stack" -}), h("div", { - class: "tip", - part: "tip" -}, "Click outside, press ", h("kbd", {}, "Esc"), " key, or fix the code to dismiss.", h("br"), "You can also disable this overlay by setting ", h("code", { part: "config-option-name" }, "server.hmr.overlay"), " to ", h("code", { part: "config-option-value" }, "false"), " in ", h("code", { part: "config-file-name" }, hmrConfigName), ".")), h("style", { nonce: cspNonce }, templateStyle)); -const fileRE = /(?:file:\/\/)?(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g; -const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm; -const { HTMLElement = class {} } = globalThis; -var ErrorOverlay = class extends HTMLElement { - constructor(err, links = true) { - super(); - _defineProperty(this, "root", void 0); - _defineProperty(this, "closeOnEsc", void 0); - this.root = this.attachShadow({ mode: "open" }); - this.root.appendChild(createTemplate()); - codeframeRE.lastIndex = 0; - const hasFrame = err.frame && codeframeRE.test(err.frame); - const message = hasFrame ? err.message.replace(codeframeRE, "") : err.message; - if (err.plugin) this.text(".plugin", `[plugin:${err.plugin}] `); - this.text(".message-body", message.trim()); - const [file] = (err.loc?.file || err.id || "unknown file").split(`?`); - if (err.loc) this.text(".file", `${file}:${err.loc.line}:${err.loc.column}`, links); - else if (err.id) this.text(".file", file); - if (hasFrame) this.text(".frame", err.frame.trim()); - this.text(".stack", err.stack, links); - this.root.querySelector(".window").addEventListener("click", (e) => { - e.stopPropagation(); - }); - this.addEventListener("click", () => { - this.close(); - }); - this.closeOnEsc = (e) => { - if (e.key === "Escape" || e.code === "Escape") this.close(); - }; - document.addEventListener("keydown", this.closeOnEsc); - } - text(selector, text, linkFiles = false) { - const el = this.root.querySelector(selector); - if (!linkFiles) el.textContent = text; - else { - let curIndex = 0; - let match; - fileRE.lastIndex = 0; - while (match = fileRE.exec(text)) { - const { 0: file, index } = match; - const frag = text.slice(curIndex, index); - el.appendChild(document.createTextNode(frag)); - const link = document.createElement("a"); - link.textContent = file; - link.className = "file-link"; - link.onclick = () => { - fetch(new URL(`${base$1}__open-in-editor?file=${encodeURIComponent(file)}`, import.meta.url)); - }; - el.appendChild(link); - curIndex += frag.length + file.length; - } - if (curIndex < text.length) el.appendChild(document.createTextNode(text.slice(curIndex))); - } - } - close() { - this.parentNode?.removeChild(this); - document.removeEventListener("keydown", this.closeOnEsc); - } -}; -const overlayId = "vite-error-overlay"; -const { customElements } = globalThis; -if (customElements && !customElements.get(overlayId)) customElements.define(overlayId, ErrorOverlay); - -//#endregion -//#region src/client/client.ts -console.debug("[vite] connecting..."); -const importMetaUrl = new URL(import.meta.url); -const serverHost = __SERVER_HOST__; -const socketProtocol = __HMR_PROTOCOL__ || (importMetaUrl.protocol === "https:" ? "wss" : "ws"); -const hmrPort = __HMR_PORT__; -const socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${hmrPort || importMetaUrl.port}${__HMR_BASE__}`; -const directSocketHost = __HMR_DIRECT_TARGET__; -const base = __BASE__ || "/"; -const hmrTimeout = __HMR_TIMEOUT__; -const wsToken = __WS_TOKEN__; -const transport = normalizeModuleRunnerTransport((() => { - let wsTransport = createWebSocketModuleRunnerTransport({ - createConnection: () => new WebSocket(`${socketProtocol}://${socketHost}?token=${wsToken}`, "vite-hmr"), - pingInterval: hmrTimeout - }); - return { - async connect(handlers) { - try { - await wsTransport.connect(handlers); - } catch (e) { - if (!hmrPort) { - wsTransport = createWebSocketModuleRunnerTransport({ - createConnection: () => new WebSocket(`${socketProtocol}://${directSocketHost}?token=${wsToken}`, "vite-hmr"), - pingInterval: hmrTimeout - }); - try { - await wsTransport.connect(handlers); - console.info("[vite] Direct websocket connection fallback. Check out https://vite.dev/config/server-options.html#server-hmr to remove the previous connection error."); - } catch (e$1) { - if (e$1 instanceof Error && e$1.message.includes("WebSocket closed without opened.")) { - const currentScriptHostURL = new URL(import.meta.url); - const currentScriptHost = currentScriptHostURL.host + currentScriptHostURL.pathname.replace(/@vite\/client$/, ""); - console.error(`[vite] failed to connect to websocket. -your current setup: - (browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server)\n (browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server)\nCheck out your Vite / network configuration and https://vite.dev/config/server-options.html#server-hmr .`); - } - } - return; - } - console.error(`[vite] failed to connect to websocket (${e}). `); - throw e; - } - }, - async disconnect() { - await wsTransport.disconnect(); - }, - send(data) { - wsTransport.send(data); - } - }; -})()); -let willUnload = false; -if (typeof window !== "undefined") window.addEventListener?.("beforeunload", () => { - willUnload = true; -}); -function cleanUrl(pathname) { - const url = new URL(pathname, "http://vite.dev"); - url.searchParams.delete("direct"); - return url.pathname + url.search; -} -let isFirstUpdate = true; -const outdatedLinkTags = /* @__PURE__ */ new WeakSet(); -const debounceReload = (time) => { - let timer; - return () => { - if (timer) { - clearTimeout(timer); - timer = null; - } - timer = setTimeout(() => { - location.reload(); - }, time); - }; -}; -const pageReload = debounceReload(20); -const hmrClient = new HMRClient({ - error: (err) => console.error("[vite]", err), - debug: (...msg) => console.debug("[vite]", ...msg) -}, transport, async function importUpdatedModule({ acceptedPath, timestamp, explicitImportRequired, isWithinCircularImport }) { - const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`); - const importPromise = import( - /* @vite-ignore */ - base + acceptedPathWithoutQuery.slice(1) + `?${explicitImportRequired ? "import&" : ""}t=${timestamp}${query ? `&${query}` : ""}` -); - if (isWithinCircularImport) importPromise.catch(() => { - console.info(`[hmr] ${acceptedPath} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order. To debug and break the circular import, you can run \`vite --debug hmr\` to log the circular dependency path if a file change triggered it.`); - pageReload(); - }); - return await importPromise; -}); -transport.connect(createHMRHandler(handleMessage)); -async function handleMessage(payload) { - switch (payload.type) { - case "connected": - console.debug(`[vite] connected.`); - break; - case "update": - await hmrClient.notifyListeners("vite:beforeUpdate", payload); - if (hasDocument) if (isFirstUpdate && hasErrorOverlay()) { - location.reload(); - return; - } else { - if (enableOverlay) clearErrorOverlay(); - isFirstUpdate = false; - } - await Promise.all(payload.updates.map(async (update) => { - if (update.type === "js-update") return hmrClient.queueUpdate(update); - const { path, timestamp } = update; - const searchUrl = cleanUrl(path); - const el = Array.from(document.querySelectorAll("link")).find((e) => !outdatedLinkTags.has(e) && cleanUrl(e.href).includes(searchUrl)); - if (!el) return; - const newPath = `${base}${searchUrl.slice(1)}${searchUrl.includes("?") ? "&" : "?"}t=${timestamp}`; - return new Promise((resolve) => { - const newLinkTag = el.cloneNode(); - newLinkTag.href = new URL(newPath, el.href).href; - const removeOldEl = () => { - el.remove(); - console.debug(`[vite] css hot updated: ${searchUrl}`); - resolve(); - }; - newLinkTag.addEventListener("load", removeOldEl); - newLinkTag.addEventListener("error", removeOldEl); - outdatedLinkTags.add(el); - el.after(newLinkTag); - }); - })); - await hmrClient.notifyListeners("vite:afterUpdate", payload); - break; - case "custom": - await hmrClient.notifyListeners(payload.event, payload.data); - if (payload.event === "vite:ws:disconnect") { - if (hasDocument && !willUnload) { - console.log(`[vite] server connection lost. Polling for restart...`); - const socket = payload.data.webSocket; - const url = new URL(socket.url); - url.search = ""; - await waitForSuccessfulPing(url.href); - location.reload(); - } - } - break; - case "full-reload": - await hmrClient.notifyListeners("vite:beforeFullReload", payload); - if (hasDocument) if (payload.path && payload.path.endsWith(".html")) { - const pagePath = decodeURI(location.pathname); - const payloadPath = base + payload.path.slice(1); - if (pagePath === payloadPath || payload.path === "/index.html" || pagePath.endsWith("/") && pagePath + "index.html" === payloadPath) pageReload(); - return; - } else pageReload(); - break; - case "prune": - await hmrClient.notifyListeners("vite:beforePrune", payload); - await hmrClient.prunePaths(payload.paths); - break; - case "error": - await hmrClient.notifyListeners("vite:error", payload); - if (hasDocument) { - const err = payload.err; - if (enableOverlay) createErrorOverlay(err); - else console.error(`[vite] Internal Server Error\n${err.message}\n${err.stack}`); - } - break; - case "ping": break; - default: return payload; - } -} -const enableOverlay = __HMR_ENABLE_OVERLAY__; -const hasDocument = "document" in globalThis; -function createErrorOverlay(err) { - clearErrorOverlay(); - const { customElements: customElements$1 } = globalThis; - if (customElements$1) { - const ErrorOverlayConstructor = customElements$1.get(overlayId); - document.body.appendChild(new ErrorOverlayConstructor(err)); - } -} -function clearErrorOverlay() { - document.querySelectorAll(overlayId).forEach((n) => n.close()); -} -function hasErrorOverlay() { - return document.querySelectorAll(overlayId).length; -} -function waitForSuccessfulPing(socketUrl) { - if (typeof SharedWorker === "undefined") { - const visibilityManager = { - currentState: document.visibilityState, - listeners: /* @__PURE__ */ new Set() - }; - const onVisibilityChange = () => { - visibilityManager.currentState = document.visibilityState; - for (const listener of visibilityManager.listeners) listener(visibilityManager.currentState); - }; - document.addEventListener("visibilitychange", onVisibilityChange); - return waitForSuccessfulPingInternal(socketUrl, visibilityManager); - } - const blob = new Blob([ - "\"use strict\";", - `const waitForSuccessfulPingInternal = ${waitForSuccessfulPingInternal.toString()};`, - `const fn = ${pingWorkerContentMain.toString()};`, - `fn(${JSON.stringify(socketUrl)})` - ], { type: "application/javascript" }); - const objURL = URL.createObjectURL(blob); - const sharedWorker = new SharedWorker(objURL); - return new Promise((resolve, reject) => { - const onVisibilityChange = () => { - sharedWorker.port.postMessage({ visibility: document.visibilityState }); - }; - document.addEventListener("visibilitychange", onVisibilityChange); - sharedWorker.port.addEventListener("message", (event) => { - document.removeEventListener("visibilitychange", onVisibilityChange); - sharedWorker.port.close(); - const data = event.data; - if (data.type === "error") { - reject(data.error); - return; - } - resolve(); - }); - onVisibilityChange(); - sharedWorker.port.start(); - }); -} -function pingWorkerContentMain(socketUrl) { - self.addEventListener("connect", (_event) => { - const port = _event.ports[0]; - if (!socketUrl) { - port.postMessage({ - type: "error", - error: /* @__PURE__ */ new Error("socketUrl not found") - }); - return; - } - const visibilityManager = { - currentState: "visible", - listeners: /* @__PURE__ */ new Set() - }; - port.addEventListener("message", (event) => { - const { visibility } = event.data; - visibilityManager.currentState = visibility; - console.debug("[vite] new window visibility", visibility); - for (const listener of visibilityManager.listeners) listener(visibility); - }); - port.start(); - console.debug("[vite] connected from window"); - waitForSuccessfulPingInternal(socketUrl, visibilityManager).then(() => { - console.debug("[vite] ping successful"); - try { - port.postMessage({ type: "success" }); - } catch (error) { - port.postMessage({ - type: "error", - error - }); - } - }, (error) => { - console.debug("[vite] error happened", error); - try { - port.postMessage({ - type: "error", - error - }); - } catch (error$1) { - port.postMessage({ - type: "error", - error: error$1 - }); - } - }); - }); -} -async function waitForSuccessfulPingInternal(socketUrl, visibilityManager, ms = 1e3) { - function wait(ms$1) { - return new Promise((resolve) => setTimeout(resolve, ms$1)); - } - async function ping() { - try { - const socket = new WebSocket(socketUrl, "vite-ping"); - return new Promise((resolve) => { - function onOpen() { - resolve(true); - close(); - } - function onError() { - resolve(false); - close(); - } - function close() { - socket.removeEventListener("open", onOpen); - socket.removeEventListener("error", onError); - socket.close(); - } - socket.addEventListener("open", onOpen); - socket.addEventListener("error", onError); - }); - } catch { - return false; - } - } - function waitForWindowShow(visibilityManager$1) { - return new Promise((resolve) => { - const onChange = (newVisibility) => { - if (newVisibility === "visible") { - resolve(); - visibilityManager$1.listeners.delete(onChange); - } - }; - visibilityManager$1.listeners.add(onChange); - }); - } - if (await ping()) return; - await wait(ms); - while (true) if (visibilityManager.currentState === "visible") { - if (await ping()) break; - await wait(ms); - } else await waitForWindowShow(visibilityManager); -} -const sheetsMap = /* @__PURE__ */ new Map(); -const linkSheetsMap = /* @__PURE__ */ new Map(); -if ("document" in globalThis) { - document.querySelectorAll("style[data-vite-dev-id]").forEach((el) => { - sheetsMap.set(el.getAttribute("data-vite-dev-id"), el); - }); - document.querySelectorAll("link[rel=\"stylesheet\"][data-vite-dev-id]").forEach((el) => { - linkSheetsMap.set(el.getAttribute("data-vite-dev-id"), el); - }); -} -let lastInsertedStyle; -function updateStyle(id, content) { - if (linkSheetsMap.has(id)) return; - let style = sheetsMap.get(id); - if (!style) { - style = document.createElement("style"); - style.setAttribute("type", "text/css"); - style.setAttribute("data-vite-dev-id", id); - style.textContent = content; - if (cspNonce) style.setAttribute("nonce", cspNonce); - if (!lastInsertedStyle) { - document.head.appendChild(style); - setTimeout(() => { - lastInsertedStyle = void 0; - }, 0); - } else lastInsertedStyle.insertAdjacentElement("afterend", style); - lastInsertedStyle = style; - } else style.textContent = content; - sheetsMap.set(id, style); -} -function removeStyle(id) { - if (linkSheetsMap.has(id)) { - document.querySelectorAll(`link[rel="stylesheet"][data-vite-dev-id]`).forEach((el) => { - if (el.getAttribute("data-vite-dev-id") === id) el.remove(); - }); - linkSheetsMap.delete(id); - } - const style = sheetsMap.get(id); - if (style) { - document.head.removeChild(style); - sheetsMap.delete(id); - } -} -function createHotContext(ownerPath) { - return new HMRContext(hmrClient, ownerPath); -} -/** -* urls here are dynamic import() urls that couldn't be statically analyzed -*/ -function injectQuery(url, queryToInject) { - if (url[0] !== "." && url[0] !== "/") return url; - const pathname = url.replace(/[?#].*$/, ""); - const { search, hash } = new URL(url, "http://vite.dev"); - return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`; -} - -//#endregion -export { ErrorOverlay, createHotContext, injectQuery, removeStyle, updateStyle }; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/client/env.mjs b/ThinFilm_Analyzer/frontend/node_modules/vite/dist/client/env.mjs deleted file mode 100644 index c28abfd3fceda6c4cbaf36bfbc5cb8bd857c8742..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/client/env.mjs +++ /dev/null @@ -1,19 +0,0 @@ -//#region src/client/env.ts -const context = (() => { - if (typeof globalThis !== "undefined") return globalThis; - else if (typeof self !== "undefined") return self; - else if (typeof window !== "undefined") return window; - else return Function("return this")(); -})(); -const defines = __DEFINES__; -Object.keys(defines).forEach((key) => { - const segments = key.split("."); - let target = context; - for (let i = 0; i < segments.length; i++) { - const segment = segments[i]; - if (i === segments.length - 1) target[segment] = defines[key]; - else target = target[segment] || (target[segment] = {}); - } -}); - -//#endregion \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/build.js b/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/build.js deleted file mode 100644 index cd247f6ee5c56a39db318bac151c7e89a6413d3a..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/build.js +++ /dev/null @@ -1,4 +0,0 @@ -import "./logger.js"; -import { A as toOutputFilePathInCss, C as onRollupLog, D as resolveBuilderOptions, E as resolveBuildPlugins, M as toOutputFilePathInJS, N as toOutputFilePathWithoutRuntime, O as resolveLibFilename, S as injectEnvironmentToHooks, T as resolveBuildOutputs, _ as build, b as createBuilder, g as BuildEnvironment, j as toOutputFilePathInHtml, k as resolveUserExternal, v as buildEnvironmentOptionsDefaults, w as resolveBuildEnvironmentOptions, x as createToImportMetaURLBasedRelativeRuntime, y as builderOptionsDefaults } from "./config.js"; - -export { createBuilder, resolveBuildPlugins }; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/build2.js b/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/build2.js deleted file mode 100644 index c7ecfa33c7ace4a9c27a844699f009a2fcf95388..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/build2.js +++ /dev/null @@ -1,5538 +0,0 @@ -import { i as __require, t as __commonJSMin } from "./chunk.js"; -import { t as require_lib } from "./lib.js"; - -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/fs.js -var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getFileSystem = getFileSystem; - exports.setFileSystem = setFileSystem; - let fileSystem = { - readFile: () => { - throw Error("readFile not implemented"); - }, - writeFile: () => { - throw Error("writeFile not implemented"); - } - }; - function setFileSystem(fs) { - fileSystem.readFile = fs.readFile; - fileSystem.writeFile = fs.writeFile; - } - function getFileSystem() { - return fileSystem; - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/unquote.js -var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = unquote; - const reg = /['"]/; - function unquote(str$1) { - if (!str$1) return ""; - if (reg.test(str$1.charAt(0))) str$1 = str$1.substr(1); - if (reg.test(str$1.charAt(str$1.length - 1))) str$1 = str$1.substr(0, str$1.length - 1); - return str$1; - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceValueSymbols.js -var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const matchValueName = /[$]?[\w-]+/g; - const replaceValueSymbols$2 = (value, replacements) => { - let matches; - while (matches = matchValueName.exec(value)) { - const replacement = replacements[matches[0]]; - if (replacement) { - value = value.slice(0, matches.index) + replacement + value.slice(matchValueName.lastIndex); - matchValueName.lastIndex -= matches[0].length - replacement.length; - } - } - return value; - }; - module.exports = replaceValueSymbols$2; -})); - -//#endregion -//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/replaceSymbols.js -var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const replaceValueSymbols$1 = require_replaceValueSymbols(); - const replaceSymbols$1 = (css, replacements) => { - css.walk((node) => { - if (node.type === "decl" && node.value) node.value = replaceValueSymbols$1(node.value.toString(), replacements); - else if (node.type === "rule" && node.selector) node.selector = replaceValueSymbols$1(node.selector.toString(), replacements); - else if (node.type === "atrule" && node.params) node.params = replaceValueSymbols$1(node.params.toString(), replacements); - }); - }; - module.exports = replaceSymbols$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/extractICSS.js -var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/; - const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/; - const getDeclsObject = (rule) => { - const object = {}; - rule.walkDecls((decl) => { - const before = decl.raws.before ? decl.raws.before.trim() : ""; - object[before + decl.prop] = decl.value; - }); - return object; - }; - /** - * - * @param {string} css - * @param {boolean} removeRules - * @param {'auto' | 'rule' | 'at-rule'} mode - */ - const extractICSS$2 = (css, removeRules = true, mode = "auto") => { - const icssImports = {}; - const icssExports = {}; - function addImports(node, path$2) { - const unquoted = path$2.replace(/'|"/g, ""); - icssImports[unquoted] = Object.assign(icssImports[unquoted] || {}, getDeclsObject(node)); - if (removeRules) node.remove(); - } - function addExports(node) { - Object.assign(icssExports, getDeclsObject(node)); - if (removeRules) node.remove(); - } - css.each((node) => { - if (node.type === "rule" && mode !== "at-rule") { - if (node.selector.slice(0, 7) === ":import") { - const matches = importPattern.exec(node.selector); - if (matches) addImports(node, matches[1]); - } - if (node.selector === ":export") addExports(node); - } - if (node.type === "atrule" && mode !== "rule") { - if (node.name === "icss-import") { - const matches = balancedQuotes.exec(node.params); - if (matches) addImports(node, matches[1]); - } - if (node.name === "icss-export") addExports(node); - } - }); - return { - icssImports, - icssExports - }; - }; - module.exports = extractICSS$2; -})); - -//#endregion -//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/createICSSRules.js -var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const createImports = (imports, postcss, mode = "rule") => { - return Object.keys(imports).map((path$2) => { - const aliases = imports[path$2]; - const declarations = Object.keys(aliases).map((key) => postcss.decl({ - prop: key, - value: aliases[key], - raws: { before: "\n " } - })); - const hasDeclarations = declarations.length > 0; - const rule = mode === "rule" ? postcss.rule({ - selector: `:import('${path$2}')`, - raws: { after: hasDeclarations ? "\n" : "" } - }) : postcss.atRule({ - name: "icss-import", - params: `'${path$2}'`, - raws: { after: hasDeclarations ? "\n" : "" } - }); - if (hasDeclarations) rule.append(declarations); - return rule; - }); - }; - const createExports = (exports$1, postcss, mode = "rule") => { - const declarations = Object.keys(exports$1).map((key) => postcss.decl({ - prop: key, - value: exports$1[key], - raws: { before: "\n " } - })); - if (declarations.length === 0) return []; - const rule = mode === "rule" ? postcss.rule({ - selector: `:export`, - raws: { after: "\n" } - }) : postcss.atRule({ - name: "icss-export", - raws: { after: "\n" } - }); - rule.append(declarations); - return [rule]; - }; - const createICSSRules$1 = (imports, exports$1, postcss, mode) => [...createImports(imports, postcss, mode), ...createExports(exports$1, postcss, mode)]; - module.exports = createICSSRules$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.6/node_modules/icss-utils/src/index.js -var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const replaceValueSymbols = require_replaceValueSymbols(); - const replaceSymbols = require_replaceSymbols(); - const extractICSS$1 = require_extractICSS(); - const createICSSRules = require_createICSSRules(); - module.exports = { - replaceValueSymbols, - replaceSymbols, - extractICSS: extractICSS$1, - createICSSRules - }; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/Parser.js -var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = void 0; - var _icssUtils = require_src$4(); - const importRegexp = /^:import\((.+)\)$/; - var Parser$1 = class { - constructor(pathFetcher, trace) { - this.pathFetcher = pathFetcher; - this.plugin = this.plugin.bind(this); - this.exportTokens = {}; - this.translations = {}; - this.trace = trace; - } - plugin() { - const parser$1 = this; - return { - postcssPlugin: "css-modules-parser", - async OnceExit(css) { - await Promise.all(parser$1.fetchAllImports(css)); - parser$1.linkImportedSymbols(css); - return parser$1.extractExports(css); - } - }; - } - fetchAllImports(css) { - let imports = []; - css.each((node) => { - if (node.type == "rule" && node.selector.match(importRegexp)) imports.push(this.fetchImport(node, css.source.input.from, imports.length)); - }); - return imports; - } - linkImportedSymbols(css) { - (0, _icssUtils.replaceSymbols)(css, this.translations); - } - extractExports(css) { - css.each((node) => { - if (node.type == "rule" && node.selector == ":export") this.handleExport(node); - }); - } - handleExport(exportNode) { - exportNode.each((decl) => { - if (decl.type == "decl") { - Object.keys(this.translations).forEach((translation) => { - decl.value = decl.value.replace(translation, this.translations[translation]); - }); - this.exportTokens[decl.prop] = decl.value; - } - }); - exportNode.remove(); - } - async fetchImport(importNode, relativeTo, depNr) { - const file = importNode.selector.match(importRegexp)[1]; - const depTrace = this.trace + String.fromCharCode(depNr); - const exports$1 = await this.pathFetcher(file, relativeTo, depTrace); - try { - importNode.each((decl) => { - if (decl.type == "decl") this.translations[decl.prop] = exports$1[decl.value]; - }); - importNode.remove(); - } catch (err) { - console.log(err); - } - } - }; - exports.default = Parser$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/saveJSON.js -var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = saveJSON; - var _fs$2 = require_fs(); - function saveJSON(cssFile, json) { - return new Promise((resolve, reject) => { - const { writeFile } = (0, _fs$2.getFileSystem)(); - writeFile(`${cssFile}.json`, JSON.stringify(json), (e) => e ? reject(e) : resolve(json)); - }); - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/lodash.camelcase@4.3.0/node_modules/lodash.camelcase/index.js -var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => { - /** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - /** Used as references for various `Number` constants. */ - var INFINITY = Infinity; - /** `Object#toString` result references. */ - var symbolTag = "[object Symbol]"; - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; - /** 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 rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23", rsComboSymbolsRange = "\\u20d0-\\u20f0", 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 = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]", 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 rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")", rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [ - rsNonAstral, - rsRegional, - rsSurrPair - ].join("|") + ")" + rsOptVar + reOptMod + ")*", 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 + "+" + rsOptLowerContr + "(?=" + [ - rsBreak, - rsUpper, - "$" - ].join("|") + ")", - rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [ - rsBreak, - rsUpper + rsLowerMisc, - "$" - ].join("|") + ")", - rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr, - rsUpper + "+" + rsOptUpperContr, - 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 + rsComboMarksRange + rsComboSymbolsRange + 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 map Latin Unicode letters to basic Latin letters. */ - var deburredLetters = { - "À": "A", - "Á": "A", - "Â": "A", - "Ã": "A", - "Ä": "A", - "Å": "A", - "à": "a", - "á": "a", - "â": "a", - "ã": "a", - "ä": "a", - "å": "a", - "Ç": "C", - "ç": "c", - "Ð": "D", - "ð": "d", - "È": "E", - "É": "E", - "Ê": "E", - "Ë": "E", - "è": "e", - "é": "e", - "ê": "e", - "ë": "e", - "Ì": "I", - "Í": "I", - "Î": "I", - "Ï": "I", - "ì": "i", - "í": "i", - "î": "i", - "ï": "i", - "Ñ": "N", - "ñ": "n", - "Ò": "O", - "Ó": "O", - "Ô": "O", - "Õ": "O", - "Ö": "O", - "Ø": "O", - "ò": "o", - "ó": "o", - "ô": "o", - "õ": "o", - "ö": "o", - "ø": "o", - "Ù": "U", - "Ú": "U", - "Û": "U", - "Ü": "U", - "ù": "u", - "ú": "u", - "û": "u", - "ü": "u", - "Ý": "Y", - "ý": "y", - "ÿ": "y", - "Æ": "Ae", - "æ": "ae", - "Þ": "Th", - "þ": "th", - "ß": "ss", - "Ā": "A", - "Ă": "A", - "Ą": "A", - "ā": "a", - "ă": "a", - "ą": "a", - "Ć": "C", - "Ĉ": "C", - "Ċ": "C", - "Č": "C", - "ć": "c", - "ĉ": "c", - "ċ": "c", - "č": "c", - "Ď": "D", - "Đ": "D", - "ď": "d", - "đ": "d", - "Ē": "E", - "Ĕ": "E", - "Ė": "E", - "Ę": "E", - "Ě": "E", - "ē": "e", - "ĕ": "e", - "ė": "e", - "ę": "e", - "ě": "e", - "Ĝ": "G", - "Ğ": "G", - "Ġ": "G", - "Ģ": "G", - "ĝ": "g", - "ğ": "g", - "ġ": "g", - "ģ": "g", - "Ĥ": "H", - "Ħ": "H", - "ĥ": "h", - "ħ": "h", - "Ĩ": "I", - "Ī": "I", - "Ĭ": "I", - "Į": "I", - "İ": "I", - "ĩ": "i", - "ī": "i", - "ĭ": "i", - "į": "i", - "ı": "i", - "Ĵ": "J", - "ĵ": "j", - "Ķ": "K", - "ķ": "k", - "ĸ": "k", - "Ĺ": "L", - "Ļ": "L", - "Ľ": "L", - "Ŀ": "L", - "Ł": "L", - "ĺ": "l", - "ļ": "l", - "ľ": "l", - "ŀ": "l", - "ł": "l", - "Ń": "N", - "Ņ": "N", - "Ň": "N", - "Ŋ": "N", - "ń": "n", - "ņ": "n", - "ň": "n", - "ŋ": "n", - "Ō": "O", - "Ŏ": "O", - "Ő": "O", - "ō": "o", - "ŏ": "o", - "ő": "o", - "Ŕ": "R", - "Ŗ": "R", - "Ř": "R", - "ŕ": "r", - "ŗ": "r", - "ř": "r", - "Ś": "S", - "Ŝ": "S", - "Ş": "S", - "Š": "S", - "ś": "s", - "ŝ": "s", - "ş": "s", - "š": "s", - "Ţ": "T", - "Ť": "T", - "Ŧ": "T", - "ţ": "t", - "ť": "t", - "ŧ": "t", - "Ũ": "U", - "Ū": "U", - "Ŭ": "U", - "Ů": "U", - "Ű": "U", - "Ų": "U", - "ũ": "u", - "ū": "u", - "ŭ": "u", - "ů": "u", - "ű": "u", - "ų": "u", - "Ŵ": "W", - "ŵ": "w", - "Ŷ": "Y", - "ŷ": "y", - "Ÿ": "Y", - "Ź": "Z", - "Ż": "Z", - "Ž": "Z", - "ź": "z", - "ż": "z", - "ž": "z", - "IJ": "IJ", - "ij": "ij", - "Œ": "Oe", - "œ": "oe", - "ʼn": "'n", - "ſ": "ss" - }; - /** 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$1 = freeGlobal || freeSelf || Function("return this")(); - /** - * 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 ? array.length : 0; - if (initAccum && length) accumulator = array[++index]; - while (++index < length) accumulator = iteratee(accumulator, array[index], index, array); - return accumulator; - } - /** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function asciiToArray(string$1) { - return string$1.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$1) { - return string$1.match(reAsciiWord) || []; - } - /** - * 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 ? void 0 : object[key]; - }; - } - /** - * 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); - /** - * 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$1) { - return reHasUnicode.test(string$1); - } - /** - * 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$1) { - return reHasUnicodeWord.test(string$1); - } - /** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function stringToArray(string$1) { - return hasUnicode(string$1) ? unicodeToArray(string$1) : asciiToArray(string$1); - } - /** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function unicodeToArray(string$1) { - return string$1.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$1) { - return string$1.match(reUnicodeWord) || []; - } - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = Object.prototype.toString; - /** Built-in value references. */ - var Symbol$1 = root$1.Symbol; - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0; - /** - * 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 `_.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) { - if (typeof value == "string") return value; - if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : ""; - var result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } - /** - * 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 === void 0 ? length : end; - return !start && end >= length ? array : baseSlice(array, start, end); - } - /** - * 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$1) { - string$1 = toString(string$1); - var strSymbols = hasUnicode(string$1) ? stringToArray(string$1) : void 0; - var chr = strSymbols ? strSymbols[0] : string$1.charAt(0); - var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string$1.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$1) { - return arrayReduce(words(deburr(string$1).replace(reApos, "")), callback, ""); - }; - } - /** - * 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 && typeof value == "object"; - } - /** - * 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) && objectToString.call(value) == symbolTag; - } - /** - * 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 process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - function toString(value) { - return value == null ? "" : baseToString(value); - } - /** - * 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$1, index) { - word$1 = word$1.toLowerCase(); - return result + (index ? capitalize(word$1) : word$1); - }); - /** - * 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$1) { - return upperFirst(toString(string$1).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$1) { - string$1 = toString(string$1); - return string$1 && string$1.replace(reLatin, deburrLetter).replace(reComboMark, ""); - } - /** - * Converts the first character of `string` to upper case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.upperFirst('fred'); - * // => 'Fred' - * - * _.upperFirst('FRED'); - * // => 'FRED' - */ - var upperFirst = createCaseFirst("toUpperCase"); - /** - * Splits `string` into an array of its words. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {RegExp|string} [pattern] The pattern to match words. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the words of `string`. - * @example - * - * _.words('fred, barney, & pebbles'); - * // => ['fred', 'barney', 'pebbles'] - * - * _.words('fred, barney, & pebbles', /[^, ]+/g); - * // => ['fred', 'barney', '&', 'pebbles'] - */ - function words(string$1, pattern, guard) { - string$1 = toString(string$1); - pattern = guard ? void 0 : pattern; - if (pattern === void 0) return hasUnicodeWord(string$1) ? unicodeWords(string$1) : asciiWords(string$1); - return string$1.match(pattern) || []; - } - module.exports = camelCase; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/localsConvention.js -var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.makeLocalsConventionReducer = makeLocalsConventionReducer; - var _lodash = _interopRequireDefault$22(require_lodash()); - function _interopRequireDefault$22(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - function dashesCamelCase(string$1) { - return string$1.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase()); - } - function makeLocalsConventionReducer(localsConvention, inputFile) { - const isFunc = typeof localsConvention === "function"; - return (tokens$1, [className$1, value]) => { - if (isFunc) { - const convention = localsConvention(className$1, value, inputFile); - tokens$1[convention] = value; - return tokens$1; - } - switch (localsConvention) { - case "camelCase": - tokens$1[className$1] = value; - tokens$1[(0, _lodash.default)(className$1)] = value; - break; - case "camelCaseOnly": - tokens$1[(0, _lodash.default)(className$1)] = value; - break; - case "dashes": - tokens$1[className$1] = value; - tokens$1[dashesCamelCase(className$1)] = value; - break; - case "dashesOnly": - tokens$1[dashesCamelCase(className$1)] = value; - break; - } - return tokens$1; - }; - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/FileSystemLoader.js -var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = void 0; - var _postcss$1 = _interopRequireDefault$21(__require("postcss")); - var _path = _interopRequireDefault$21(__require("path")); - var _Parser$1 = _interopRequireDefault$21(require_Parser()); - var _fs$1 = require_fs(); - function _interopRequireDefault$21(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - var Core = class Core { - constructor(plugins) { - this.plugins = plugins || Core.defaultPlugins; - } - async load(sourceString, sourcePath, trace, pathFetcher) { - const parser$1 = new _Parser$1.default(pathFetcher, trace); - const plugins = this.plugins.concat([parser$1.plugin()]); - return { - injectableSource: (await (0, _postcss$1.default)(plugins).process(sourceString, { from: sourcePath })).css, - exportTokens: parser$1.exportTokens - }; - } - }; - const traceKeySorter = (a, b) => { - if (a.length < b.length) return a < b.substring(0, a.length) ? -1 : 1; - if (a.length > b.length) return a.substring(0, b.length) <= b ? -1 : 1; - return a < b ? -1 : 1; - }; - var FileSystemLoader = class { - constructor(root$2, plugins, fileResolve) { - if (root$2 === "/" && process.platform === "win32") { - const cwdDrive = process.cwd().slice(0, 3); - if (!/^[A-Za-z]:\\$/.test(cwdDrive)) throw new Error(`Failed to obtain root from "${process.cwd()}".`); - root$2 = cwdDrive; - } - this.root = root$2; - this.fileResolve = fileResolve; - this.sources = {}; - this.traces = {}; - this.importNr = 0; - this.core = new Core(plugins); - this.tokensByFile = {}; - this.fs = (0, _fs$1.getFileSystem)(); - } - async fetch(_newPath, relativeTo, _trace) { - const newPath = _newPath.replace(/^["']|["']$/g, ""); - const trace = _trace || String.fromCharCode(this.importNr++); - const useFileResolve = typeof this.fileResolve === "function"; - const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve(); - if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) throw new Error("The returned path from the \"fileResolve\" option must be absolute."); - const relativeDir = _path.default.dirname(relativeTo); - const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath); - let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath); - if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) try { - fileRelativePath = __require.resolve(newPath); - } catch (e) {} - const tokens$1 = this.tokensByFile[fileRelativePath]; - if (tokens$1) return tokens$1; - return new Promise((resolve, reject) => { - this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => { - if (err) reject(err); - const { injectableSource, exportTokens } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this)); - this.sources[fileRelativePath] = injectableSource; - this.traces[trace] = fileRelativePath; - this.tokensByFile[fileRelativePath] = exportTokens; - resolve(exportTokens); - }); - }); - } - get finalSource() { - const traces = this.traces; - const sources = this.sources; - let written = /* @__PURE__ */ new Set(); - return Object.keys(traces).sort(traceKeySorter).map((key) => { - const filename = traces[key]; - if (written.has(filename)) return null; - written.add(filename); - return sources[filename]; - }).join(""); - } - }; - exports.default = FileSystemLoader; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/topologicalSort.js -var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const PERMANENT_MARKER = 2; - const TEMPORARY_MARKER = 1; - function createError(node, graph) { - const er = /* @__PURE__ */ new Error("Nondeterministic import's order"); - er.nodes = [node, graph[node].find((relatedNode) => graph[relatedNode].indexOf(node) > -1)]; - return er; - } - function walkGraph(node, graph, state, result, strict) { - if (state[node] === PERMANENT_MARKER) return; - if (state[node] === TEMPORARY_MARKER) { - if (strict) return createError(node, graph); - return; - } - state[node] = TEMPORARY_MARKER; - const children = graph[node]; - const length = children.length; - for (let i$1 = 0; i$1 < length; ++i$1) { - const error = walkGraph(children[i$1], graph, state, result, strict); - if (error instanceof Error) return error; - } - state[node] = PERMANENT_MARKER; - result.push(node); - } - function topologicalSort$1(graph, strict) { - const result = []; - const state = {}; - const nodes = Object.keys(graph); - const length = nodes.length; - for (let i$1 = 0; i$1 < length; ++i$1) { - const er = walkGraph(nodes[i$1], graph, state, result, strict); - if (er instanceof Error) return er; - } - return result; - } - module.exports = topologicalSort$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.6/node_modules/postcss-modules-extract-imports/src/index.js -var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const topologicalSort = require_topologicalSort(); - const matchImports$1 = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/; - const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/; - const VISITED_MARKER = 1; - /** - * :import('G') {} - * - * Rule - * composes: ... from 'A' - * composes: ... from 'B' - - * Rule - * composes: ... from 'A' - * composes: ... from 'A' - * composes: ... from 'C' - * - * Results in: - * - * graph: { - * G: [], - * A: [], - * B: ['A'], - * C: ['A'], - * } - */ - function addImportToGraph(importId, parentId, graph, visited) { - const siblingsId = parentId + "_siblings"; - const visitedId = parentId + "_" + importId; - if (visited[visitedId] !== VISITED_MARKER) { - if (!Array.isArray(visited[siblingsId])) visited[siblingsId] = []; - const siblings = visited[siblingsId]; - if (Array.isArray(graph[importId])) graph[importId] = graph[importId].concat(siblings); - else graph[importId] = siblings.slice(); - visited[visitedId] = VISITED_MARKER; - siblings.push(importId); - } - } - module.exports = (options = {}) => { - let importIndex = 0; - const createImportedName = typeof options.createImportedName !== "function" ? (importName) => `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` : options.createImportedName; - const failOnWrongOrder = options.failOnWrongOrder; - return { - postcssPlugin: "postcss-modules-extract-imports", - prepare() { - const graph = {}; - const visited = {}; - const existingImports = {}; - const importDecls = {}; - const imports = {}; - return { Once(root$2, postcss) { - root$2.walkRules((rule) => { - const matches = icssImport.exec(rule.selector); - if (matches) { - const [, doubleQuotePath, singleQuotePath] = matches; - const importPath = doubleQuotePath || singleQuotePath; - addImportToGraph(importPath, "root", graph, visited); - existingImports[importPath] = rule; - } - }); - root$2.walkDecls(/^composes$/, (declaration) => { - const multiple = declaration.value.split(","); - const values = []; - multiple.forEach((value) => { - const matches = value.trim().match(matchImports$1); - if (!matches) { - values.push(value); - return; - } - let tmpSymbols; - let [, symbols, doubleQuotePath, singleQuotePath, global$1] = matches; - if (global$1) tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`); - else { - const importPath = doubleQuotePath || singleQuotePath; - let parent = declaration.parent; - let parentIndexes = ""; - while (parent.type !== "root") { - parentIndexes = parent.parent.index(parent) + "_" + parentIndexes; - parent = parent.parent; - } - const { selector: selector$1 } = declaration.parent; - addImportToGraph(importPath, `_${parentIndexes}${selector$1}`, graph, visited); - importDecls[importPath] = declaration; - imports[importPath] = imports[importPath] || {}; - tmpSymbols = symbols.split(/\s+/).map((s) => { - if (!imports[importPath][s]) imports[importPath][s] = createImportedName(s, importPath); - return imports[importPath][s]; - }); - } - values.push(tmpSymbols.join(" ")); - }); - declaration.value = values.join(", "); - }); - const importsOrder = topologicalSort(graph, failOnWrongOrder); - if (importsOrder instanceof Error) throw importDecls[importsOrder.nodes.find((importPath) => importDecls.hasOwnProperty(importPath))].error("Failed to resolve order of composed modules " + importsOrder.nodes.map((importPath) => "`" + importPath + "`").join(", ") + ".", { - plugin: "postcss-modules-extract-imports", - word: "composes" - }); - let lastImportRule; - importsOrder.forEach((path$2) => { - const importedSymbols = imports[path$2]; - let rule = existingImports[path$2]; - if (!rule && importedSymbols) { - rule = postcss.rule({ - selector: `:import("${path$2}")`, - raws: { after: "\n" } - }); - if (lastImportRule) root$2.insertAfter(lastImportRule, rule); - else root$2.prepend(rule); - } - lastImportRule = rule; - if (!importedSymbols) return; - Object.keys(importedSymbols).forEach((importedSymbol) => { - rule.append(postcss.decl({ - value: importedSymbol, - prop: importedSymbols[importedSymbol], - raws: { before: "\n " } - })); - }); - }); - } }; - } - }; - }; - module.exports.postcss = true; -})); - -//#endregion -//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/wasm-hash.js -var require_wasm_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const MAX_SHORT_STRING$1 = Math.floor(65472 / 4) & -4; - var WasmHash = class { - /** - * @param {WebAssembly.Instance} instance wasm instance - * @param {WebAssembly.Instance[]} instancesPool pool of instances - * @param {number} chunkSize size of data chunks passed to wasm - * @param {number} digestSize size of digest returned by wasm - */ - constructor(instance, instancesPool, chunkSize, digestSize) { - const exports$1 = instance.exports; - exports$1.init(); - this.exports = exports$1; - this.mem = Buffer.from(exports$1.memory.buffer, 0, 65536); - this.buffered = 0; - this.instancesPool = instancesPool; - this.chunkSize = chunkSize; - this.digestSize = digestSize; - } - reset() { - this.buffered = 0; - this.exports.init(); - } - /** - * @param {Buffer | string} data data - * @param {BufferEncoding=} encoding encoding - * @returns {this} itself - */ - update(data, encoding) { - if (typeof data === "string") { - while (data.length > MAX_SHORT_STRING$1) { - this._updateWithShortString(data.slice(0, MAX_SHORT_STRING$1), encoding); - data = data.slice(MAX_SHORT_STRING$1); - } - this._updateWithShortString(data, encoding); - return this; - } - this._updateWithBuffer(data); - return this; - } - /** - * @param {string} data data - * @param {BufferEncoding=} encoding encoding - * @returns {void} - */ - _updateWithShortString(data, encoding) { - const { exports: exports$1, buffered, mem, chunkSize } = this; - let endPos; - if (data.length < 70) if (!encoding || encoding === "utf-8" || encoding === "utf8") { - endPos = buffered; - for (let i$1 = 0; i$1 < data.length; i$1++) { - const cc = data.charCodeAt(i$1); - if (cc < 128) mem[endPos++] = cc; - else if (cc < 2048) { - mem[endPos] = cc >> 6 | 192; - mem[endPos + 1] = cc & 63 | 128; - endPos += 2; - } else { - endPos += mem.write(data.slice(i$1), endPos, encoding); - break; - } - } - } else if (encoding === "latin1") { - endPos = buffered; - for (let i$1 = 0; i$1 < data.length; i$1++) { - const cc = data.charCodeAt(i$1); - mem[endPos++] = cc; - } - } else endPos = buffered + mem.write(data, buffered, encoding); - else endPos = buffered + mem.write(data, buffered, encoding); - if (endPos < chunkSize) this.buffered = endPos; - else { - const l = endPos & ~(this.chunkSize - 1); - exports$1.update(l); - const newBuffered = endPos - l; - this.buffered = newBuffered; - if (newBuffered > 0) mem.copyWithin(0, l, endPos); - } - } - /** - * @param {Buffer} data data - * @returns {void} - */ - _updateWithBuffer(data) { - const { exports: exports$1, buffered, mem } = this; - const length = data.length; - if (buffered + length < this.chunkSize) { - data.copy(mem, buffered, 0, length); - this.buffered += length; - } else { - const l = buffered + length & ~(this.chunkSize - 1); - if (l > 65536) { - let i$1 = 65536 - buffered; - data.copy(mem, buffered, 0, i$1); - exports$1.update(65536); - const stop = l - buffered - 65536; - while (i$1 < stop) { - data.copy(mem, 0, i$1, i$1 + 65536); - exports$1.update(65536); - i$1 += 65536; - } - data.copy(mem, 0, i$1, l - buffered); - exports$1.update(l - buffered - i$1); - } else { - data.copy(mem, buffered, 0, l - buffered); - exports$1.update(l); - } - const newBuffered = length + buffered - l; - this.buffered = newBuffered; - if (newBuffered > 0) data.copy(mem, 0, length - newBuffered, length); - } - } - digest(type) { - const { exports: exports$1, buffered, mem, digestSize } = this; - exports$1.final(buffered); - this.instancesPool.push(this); - const hex$1 = mem.toString("latin1", 0, digestSize); - if (type === "hex") return hex$1; - if (type === "binary" || !type) return Buffer.from(hex$1, "hex"); - return Buffer.from(hex$1, "hex").toString(type); - } - }; - const create$2 = (wasmModule, instancesPool, chunkSize, digestSize) => { - if (instancesPool.length > 0) { - const old = instancesPool.pop(); - old.reset(); - return old; - } else return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize); - }; - module.exports = create$2; - module.exports.MAX_SHORT_STRING = MAX_SHORT_STRING$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/xxhash64.js -var require_xxhash64 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const create$1 = require_wasm_hash(); - const xxhash64 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", "base64")); - module.exports = create$1.bind(null, xxhash64, [], 32, 16); -})); - -//#endregion -//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BatchedHash.js -var require_BatchedHash = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const MAX_SHORT_STRING = require_wasm_hash().MAX_SHORT_STRING; - var BatchedHash$1 = class { - constructor(hash$1) { - this.string = void 0; - this.encoding = void 0; - this.hash = hash$1; - } - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - if (this.string !== void 0) { - if (typeof data === "string" && inputEncoding === this.encoding && this.string.length + data.length < MAX_SHORT_STRING) { - this.string += data; - return this; - } - this.hash.update(this.string, this.encoding); - this.string = void 0; - } - if (typeof data === "string") if (data.length < MAX_SHORT_STRING && (!inputEncoding || !inputEncoding.startsWith("ba"))) { - this.string = data; - this.encoding = inputEncoding; - } else this.hash.update(data, inputEncoding); - else this.hash.update(data); - return this; - } - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - if (this.string !== void 0) this.hash.update(this.string, this.encoding); - return this.hash.digest(encoding); - } - }; - module.exports = BatchedHash$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/md4.js -var require_md4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const create = require_wasm_hash(); - const md4 = new WebAssembly.Module(Buffer.from("AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f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iw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", "base64")); - module.exports = create.bind(null, md4, [], 64, 32); -})); - -//#endregion -//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/hash/BulkUpdateDecorator.js -var require_BulkUpdateDecorator = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const BULK_SIZE = 2e3; - const digestCaches = {}; - var BulkUpdateDecorator$1 = class { - /** - * @param {Hash | function(): Hash} hashOrFactory function to create a hash - * @param {string=} hashKey key for caching - */ - constructor(hashOrFactory, hashKey) { - this.hashKey = hashKey; - if (typeof hashOrFactory === "function") { - this.hashFactory = hashOrFactory; - this.hash = void 0; - } else { - this.hashFactory = void 0; - this.hash = hashOrFactory; - } - this.buffer = ""; - } - /** - * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} - * @param {string|Buffer} data data - * @param {string=} inputEncoding data encoding - * @returns {this} updated hash - */ - update(data, inputEncoding) { - if (inputEncoding !== void 0 || typeof data !== "string" || data.length > BULK_SIZE) { - if (this.hash === void 0) this.hash = this.hashFactory(); - if (this.buffer.length > 0) { - this.hash.update(this.buffer); - this.buffer = ""; - } - this.hash.update(data, inputEncoding); - } else { - this.buffer += data; - if (this.buffer.length > BULK_SIZE) { - if (this.hash === void 0) this.hash = this.hashFactory(); - this.hash.update(this.buffer); - this.buffer = ""; - } - } - return this; - } - /** - * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} - * @param {string=} encoding encoding of the return value - * @returns {string|Buffer} digest - */ - digest(encoding) { - let digestCache; - const buffer = this.buffer; - if (this.hash === void 0) { - const cacheKey = `${this.hashKey}-${encoding}`; - digestCache = digestCaches[cacheKey]; - if (digestCache === void 0) digestCache = digestCaches[cacheKey] = /* @__PURE__ */ new Map(); - const cacheEntry = digestCache.get(buffer); - if (cacheEntry !== void 0) return cacheEntry; - this.hash = this.hashFactory(); - } - if (buffer.length > 0) this.hash.update(buffer); - const digestResult = this.hash.digest(encoding); - if (digestCache !== void 0) digestCache.set(buffer, digestResult); - return digestResult; - } - }; - module.exports = BulkUpdateDecorator$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/getHashDigest.js -var require_getHashDigest = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const baseEncodeTables = { - 26: "abcdefghijklmnopqrstuvwxyz", - 32: "123456789abcdefghjkmnpqrstuvwxyz", - 36: "0123456789abcdefghijklmnopqrstuvwxyz", - 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", - 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", - 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", - 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", - 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_" - }; - /** - * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian - * @param {number} divisor The divisor - * @return {number} Modulo (remainder) of the division - */ - function divmod32(uint32Array, divisor) { - let carry = 0; - for (let i$1 = uint32Array.length - 1; i$1 >= 0; i$1--) { - const value = carry * 4294967296 + uint32Array[i$1]; - carry = value % divisor; - uint32Array[i$1] = Math.floor(value / divisor); - } - return carry; - } - function encodeBufferToBase(buffer, base, length) { - const encodeTable = baseEncodeTables[base]; - if (!encodeTable) throw new Error("Unknown encoding base" + base); - const limit = Math.ceil(buffer.length * 8 / Math.log2(base)); - length = Math.min(length, limit); - const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4)); - buffer.copy(Buffer.from(uint32Array.buffer)); - let output = ""; - for (let i$1 = 0; i$1 < length; i$1++) output = encodeTable[divmod32(uint32Array, base)] + output; - return output; - } - let crypto = void 0; - let createXXHash64 = void 0; - let createMd4 = void 0; - let BatchedHash = void 0; - let BulkUpdateDecorator = void 0; - function getHashDigest$1(buffer, algorithm, digestType, maxLength) { - algorithm = algorithm || "xxhash64"; - maxLength = maxLength || 9999; - let hash$1; - if (algorithm === "xxhash64") { - if (createXXHash64 === void 0) { - createXXHash64 = require_xxhash64(); - if (BatchedHash === void 0) BatchedHash = require_BatchedHash(); - } - hash$1 = new BatchedHash(createXXHash64()); - } else if (algorithm === "md4") { - if (createMd4 === void 0) { - createMd4 = require_md4(); - if (BatchedHash === void 0) BatchedHash = require_BatchedHash(); - } - hash$1 = new BatchedHash(createMd4()); - } else if (algorithm === "native-md4") { - if (typeof crypto === "undefined") { - crypto = __require("crypto"); - if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator(); - } - hash$1 = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4"); - } else { - if (typeof crypto === "undefined") { - crypto = __require("crypto"); - if (BulkUpdateDecorator === void 0) BulkUpdateDecorator = require_BulkUpdateDecorator(); - } - hash$1 = new BulkUpdateDecorator(() => crypto.createHash(algorithm), algorithm); - } - hash$1.update(buffer); - if (digestType === "base26" || digestType === "base32" || digestType === "base36" || digestType === "base49" || digestType === "base52" || digestType === "base58" || digestType === "base62" || digestType === "base64safe") return encodeBufferToBase(hash$1.digest(), digestType === "base64safe" ? 64 : digestType.substr(4), maxLength); - return hash$1.digest(digestType || "hex").substr(0, maxLength); - } - module.exports = getHashDigest$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/loader-utils@3.3.1/node_modules/loader-utils/lib/interpolateName.js -var require_interpolateName = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const path$1 = __require("path"); - const getHashDigest = require_getHashDigest(); - function interpolateName$1(loaderContext, name, options = {}) { - let filename; - const hasQuery = loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1; - if (typeof name === "function") filename = name(loaderContext.resourcePath, hasQuery ? loaderContext.resourceQuery : void 0); - else filename = name || "[hash].[ext]"; - const context = options.context; - const content = options.content; - const regExp = options.regExp; - let ext = "bin"; - let basename = "file"; - let directory = ""; - let folder = ""; - let query = ""; - if (loaderContext.resourcePath) { - const parsed = path$1.parse(loaderContext.resourcePath); - let resourcePath = loaderContext.resourcePath; - if (parsed.ext) ext = parsed.ext.substr(1); - if (parsed.dir) { - basename = parsed.name; - resourcePath = parsed.dir + path$1.sep; - } - if (typeof context !== "undefined") { - directory = path$1.relative(context, resourcePath + "_").replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1"); - directory = directory.substr(0, directory.length - 1); - } else directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1"); - if (directory.length <= 1) directory = ""; - else folder = path$1.basename(directory); - } - if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) { - query = loaderContext.resourceQuery; - const hashIdx = query.indexOf("#"); - if (hashIdx >= 0) query = query.substr(0, hashIdx); - } - let url = filename; - if (content) url = url.replace(/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*(?:safe)?))?(?::(\d+))?\]/gi, (all, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10))); - url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query); - if (regExp && loaderContext.resourcePath) { - const match = loaderContext.resourcePath.match(new RegExp(regExp)); - match && match.forEach((matched, i$1) => { - url = url.replace(new RegExp("\\[" + i$1 + "\\]", "ig"), matched); - }); - } - if (typeof loaderContext.options === "object" && typeof loaderContext.options.customInterpolateName === "function") url = loaderContext.options.customInterpolateName.call(loaderContext, url, name, options); - return url; - } - module.exports = interpolateName$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/generic-names@4.0.0/node_modules/generic-names/index.js -var require_generic_names = /* @__PURE__ */ __commonJSMin(((exports, module) => { - var interpolateName = require_interpolateName(); - var path = __require("path"); - /** - * @param {string} pattern - * @param {object} options - * @param {string} options.context - * @param {string} options.hashPrefix - * @return {function} - */ - module.exports = function createGenerator(pattern, options) { - options = options || {}; - var context = options && typeof options.context === "string" ? options.context : process.cwd(); - var hashPrefix = options && typeof options.hashPrefix === "string" ? options.hashPrefix : ""; - /** - * @param {string} localName Usually a class name - * @param {string} filepath Absolute path - * @return {string} - */ - return function generate(localName, filepath) { - var name = pattern.replace(/\[local\]/gi, localName); - return interpolateName({ resourcePath: filepath }, name, { - content: hashPrefix + path.relative(context, filepath).replace(/\\/g, "/") + "\0" + localName, - context - }).replace(new RegExp("[^a-zA-Z0-9\\-_\xA0-￿]", "g"), "-").replace(/^((-?[0-9])|--)/, "_$1"); - }; - }; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/unesc.js -var require_unesc = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = unesc; - /** - * - * @param {string} str - * @returns {[string, number]|undefined} - */ - function gobbleHex(str$1) { - var lower = str$1.toLowerCase(); - var hex$1 = ""; - var spaceTerminated = false; - for (var i$1 = 0; i$1 < 6 && lower[i$1] !== void 0; i$1++) { - var code = lower.charCodeAt(i$1); - var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; - spaceTerminated = code === 32; - if (!valid) break; - hex$1 += lower[i$1]; - } - if (hex$1.length === 0) return; - var codePoint = parseInt(hex$1, 16); - if (codePoint >= 55296 && codePoint <= 57343 || codePoint === 0 || codePoint > 1114111) return ["�", hex$1.length + (spaceTerminated ? 1 : 0)]; - return [String.fromCodePoint(codePoint), hex$1.length + (spaceTerminated ? 1 : 0)]; - } - var CONTAINS_ESCAPE = /\\/; - function unesc(str$1) { - if (!CONTAINS_ESCAPE.test(str$1)) return str$1; - var ret = ""; - for (var i$1 = 0; i$1 < str$1.length; i$1++) { - if (str$1[i$1] === "\\") { - var gobbled = gobbleHex(str$1.slice(i$1 + 1, i$1 + 7)); - if (gobbled !== void 0) { - ret += gobbled[0]; - i$1 += gobbled[1]; - continue; - } - if (str$1[i$1 + 1] === "\\") { - ret += "\\"; - i$1++; - continue; - } - if (str$1.length === i$1 + 1) ret += str$1[i$1]; - continue; - } - ret += str$1[i$1]; - } - return ret; - } - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/getProp.js -var require_getProp = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = getProp; - function getProp(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key]; - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) return; - obj = obj[prop]; - } - return obj; - } - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/ensureObject.js -var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = ensureObject; - function ensureObject(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) props[_key - 1] = arguments[_key]; - while (props.length > 0) { - var prop = props.shift(); - if (!obj[prop]) obj[prop] = {}; - obj = obj[prop]; - } - } - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/stripComments.js -var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = stripComments; - function stripComments(str$1) { - var s = ""; - var commentStart = str$1.indexOf("/*"); - var lastEnd = 0; - while (commentStart >= 0) { - s = s + str$1.slice(lastEnd, commentStart); - var commentEnd = str$1.indexOf("*/", commentStart + 2); - if (commentEnd < 0) return s; - lastEnd = commentEnd + 2; - commentStart = str$1.indexOf("/*", lastEnd); - } - s = s + str$1.slice(lastEnd); - return s; - } - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/util/index.js -var require_util = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0; - var _unesc$1 = _interopRequireDefault$20(require_unesc()); - exports.unesc = _unesc$1["default"]; - var _getProp = _interopRequireDefault$20(require_getProp()); - exports.getProp = _getProp["default"]; - var _ensureObject = _interopRequireDefault$20(require_ensureObject()); - exports.ensureObject = _ensureObject["default"]; - var _stripComments = _interopRequireDefault$20(require_stripComments()); - exports.stripComments = _stripComments["default"]; - function _interopRequireDefault$20(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/node.js -var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _util$3 = require_util(); - function _defineProperties$6(target, props) { - for (var i$1 = 0; i$1 < props.length; i$1++) { - var descriptor = props[i$1]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass$6(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties$6(Constructor.prototype, protoProps); - if (staticProps) _defineProperties$6(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; - } - var cloneNode = function cloneNode$1(obj, parent) { - if (typeof obj !== "object" || obj === null) return obj; - var cloned = new obj.constructor(); - for (var i$1 in obj) { - if (!obj.hasOwnProperty(i$1)) continue; - var value = obj[i$1]; - if (i$1 === "parent" && typeof value === "object") { - if (parent) cloned[i$1] = parent; - } else if (value instanceof Array) cloned[i$1] = value.map(function(j) { - return cloneNode$1(j, cloned); - }); - else cloned[i$1] = cloneNode$1(value, cloned); - } - return cloned; - }; - var Node = /* @__PURE__ */ function() { - function Node$1(opts) { - if (opts === void 0) opts = {}; - Object.assign(this, opts); - this.spaces = this.spaces || {}; - this.spaces.before = this.spaces.before || ""; - this.spaces.after = this.spaces.after || ""; - } - var _proto = Node$1.prototype; - _proto.remove = function remove() { - if (this.parent) this.parent.removeChild(this); - this.parent = void 0; - return this; - }; - _proto.replaceWith = function replaceWith() { - if (this.parent) { - for (var index in arguments) this.parent.insertBefore(this, arguments[index]); - this.remove(); - } - return this; - }; - _proto.next = function next() { - return this.parent.at(this.parent.index(this) + 1); - }; - _proto.prev = function prev() { - return this.parent.at(this.parent.index(this) - 1); - }; - _proto.clone = function clone(overrides) { - if (overrides === void 0) overrides = {}; - var cloned = cloneNode(this); - for (var name in overrides) cloned[name] = overrides[name]; - return cloned; - }; - _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) this.raws = {}; - var originalValue = this[name]; - var originalEscaped = this.raws[name]; - this[name] = originalValue + value; - if (originalEscaped || valueEscaped !== value) this.raws[name] = (originalEscaped || originalValue) + valueEscaped; - else delete this.raws[name]; - }; - _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) this.raws = {}; - this[name] = value; - this.raws[name] = valueEscaped; - }; - _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { - this[name] = value; - if (this.raws) delete this.raws[name]; - }; - _proto.isAtPosition = function isAtPosition(line, column) { - if (this.source && this.source.start && this.source.end) { - if (this.source.start.line > line) return false; - if (this.source.end.line < line) return false; - if (this.source.start.line === line && this.source.start.column > column) return false; - if (this.source.end.line === line && this.source.end.column < column) return false; - return true; - } - }; - _proto.stringifyProperty = function stringifyProperty(name) { - return this.raws && this.raws[name] || this[name]; - }; - _proto.valueToString = function valueToString() { - return String(this.stringifyProperty("value")); - }; - _proto.toString = function toString$1() { - return [ - this.rawSpaceBefore, - this.valueToString(), - this.rawSpaceAfter - ].join(""); - }; - _createClass$6(Node$1, [{ - key: "rawSpaceBefore", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; - if (rawSpace === void 0) rawSpace = this.spaces && this.spaces.before; - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util$3.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.before = raw; - } - }, { - key: "rawSpaceAfter", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; - if (rawSpace === void 0) rawSpace = this.spaces.after; - return rawSpace || ""; - }, - set: function set(raw) { - (0, _util$3.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.after = raw; - } - }]); - return Node$1; - }(); - exports["default"] = Node; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/types.js -var require_types = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0; - var TAG = "tag"; - exports.TAG = TAG; - var STRING = "string"; - exports.STRING = STRING; - var SELECTOR = "selector"; - exports.SELECTOR = SELECTOR; - var ROOT = "root"; - exports.ROOT = ROOT; - var PSEUDO = "pseudo"; - exports.PSEUDO = PSEUDO; - var NESTING = "nesting"; - exports.NESTING = NESTING; - var ID$1 = "id"; - exports.ID = ID$1; - var COMMENT = "comment"; - exports.COMMENT = COMMENT; - var COMBINATOR = "combinator"; - exports.COMBINATOR = COMBINATOR; - var CLASS = "class"; - exports.CLASS = CLASS; - var ATTRIBUTE = "attribute"; - exports.ATTRIBUTE = ATTRIBUTE; - var UNIVERSAL = "universal"; - exports.UNIVERSAL = UNIVERSAL; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/container.js -var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _node$7 = _interopRequireDefault$19(require_node$1()); - var types$1 = _interopRequireWildcard$3(require_types()); - function _getRequireWildcardCache$3(nodeInterop) { - if (typeof WeakMap !== "function") return null; - var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); - var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache$3 = function _getRequireWildcardCache$4(nodeInterop$1) { - return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); - } - function _interopRequireWildcard$3(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) return obj; - if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj }; - var cache = _getRequireWildcardCache$3(nodeInterop); - if (cache && cache.has(obj)) return cache.get(obj); - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); - else newObj[key] = obj[key]; - } - newObj["default"] = obj; - if (cache) cache.set(obj, newObj); - return newObj; - } - function _interopRequireDefault$19(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _createForOfIteratorHelperLoose(o, allowArrayLike) { - var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; - if (it) return (it = it.call(o)).next.bind(it); - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i$1 = 0; - return function() { - if (i$1 >= o.length) return { done: true }; - return { - done: false, - value: o[i$1++] - }; - }; - } - 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 _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 _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i$1 = 0, arr2 = new Array(len); i$1 < len; i$1++) arr2[i$1] = arr[i$1]; - return arr2; - } - function _defineProperties$5(target, props) { - for (var i$1 = 0; i$1 < props.length; i$1++) { - var descriptor = props[i$1]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass$5(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties$5(Constructor.prototype, protoProps); - if (staticProps) _defineProperties$5(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; - } - function _inheritsLoose$13(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$13(subClass, superClass); - } - function _setPrototypeOf$13(o, p) { - _setPrototypeOf$13 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$13(o, p); - } - var Container = /* @__PURE__ */ function(_Node) { - _inheritsLoose$13(Container$1, _Node); - function Container$1(opts) { - var _this = _Node.call(this, opts) || this; - if (!_this.nodes) _this.nodes = []; - return _this; - } - var _proto = Container$1.prototype; - _proto.append = function append(selector$1) { - selector$1.parent = this; - this.nodes.push(selector$1); - return this; - }; - _proto.prepend = function prepend(selector$1) { - selector$1.parent = this; - this.nodes.unshift(selector$1); - for (var id$1 in this.indexes) this.indexes[id$1]++; - return this; - }; - _proto.at = function at$1(index) { - return this.nodes[index]; - }; - _proto.index = function index(child) { - if (typeof child === "number") return child; - return this.nodes.indexOf(child); - }; - _proto.removeChild = function removeChild(child) { - child = this.index(child); - this.at(child).parent = void 0; - this.nodes.splice(child, 1); - var index; - for (var id$1 in this.indexes) { - index = this.indexes[id$1]; - if (index >= child) this.indexes[id$1] = index - 1; - } - return this; - }; - _proto.removeAll = function removeAll() { - for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { - var node = _step.value; - node.parent = void 0; - } - this.nodes = []; - return this; - }; - _proto.empty = function empty() { - return this.removeAll(); - }; - _proto.insertAfter = function insertAfter(oldNode, newNode) { - var _this$nodes; - newNode.parent = this; - var oldIndex = this.index(oldNode); - var resetNode = []; - for (var i$1 = 2; i$1 < arguments.length; i$1++) resetNode.push(arguments[i$1]); - (_this$nodes = this.nodes).splice.apply(_this$nodes, [ - oldIndex + 1, - 0, - newNode - ].concat(resetNode)); - newNode.parent = this; - var index; - for (var id$1 in this.indexes) { - index = this.indexes[id$1]; - if (oldIndex < index) this.indexes[id$1] = index + arguments.length - 1; - } - return this; - }; - _proto.insertBefore = function insertBefore(oldNode, newNode) { - var _this$nodes2; - newNode.parent = this; - var oldIndex = this.index(oldNode); - var resetNode = []; - for (var i$1 = 2; i$1 < arguments.length; i$1++) resetNode.push(arguments[i$1]); - (_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [ - oldIndex, - 0, - newNode - ].concat(resetNode)); - newNode.parent = this; - var index; - for (var id$1 in this.indexes) { - index = this.indexes[id$1]; - if (index >= oldIndex) this.indexes[id$1] = index + arguments.length - 1; - } - return this; - }; - _proto._findChildAtPosition = function _findChildAtPosition(line, col) { - var found = void 0; - this.each(function(node) { - if (node.atPosition) { - var foundChild = node.atPosition(line, col); - if (foundChild) { - found = foundChild; - return false; - } - } else if (node.isAtPosition(line, col)) { - found = node; - return false; - } - }); - return found; - }; - _proto.atPosition = function atPosition(line, col) { - if (this.isAtPosition(line, col)) return this._findChildAtPosition(line, col) || this; - else return; - }; - _proto._inferEndPosition = function _inferEndPosition() { - if (this.last && this.last.source && this.last.source.end) { - this.source = this.source || {}; - this.source.end = this.source.end || {}; - Object.assign(this.source.end, this.last.source.end); - } - }; - _proto.each = function each(callback) { - if (!this.lastEach) this.lastEach = 0; - if (!this.indexes) this.indexes = {}; - this.lastEach++; - var id$1 = this.lastEach; - this.indexes[id$1] = 0; - if (!this.length) return; - var index, result; - while (this.indexes[id$1] < this.length) { - index = this.indexes[id$1]; - result = callback(this.at(index), index); - if (result === false) break; - this.indexes[id$1] += 1; - } - delete this.indexes[id$1]; - if (result === false) return false; - }; - _proto.walk = function walk(callback) { - return this.each(function(node, i$1) { - var result = callback(node, i$1); - if (result !== false && node.length) result = node.walk(callback); - if (result === false) return false; - }); - }; - _proto.walkAttributes = function walkAttributes(callback) { - var _this2 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.ATTRIBUTE) return callback.call(_this2, selector$1); - }); - }; - _proto.walkClasses = function walkClasses(callback) { - var _this3 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.CLASS) return callback.call(_this3, selector$1); - }); - }; - _proto.walkCombinators = function walkCombinators(callback) { - var _this4 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.COMBINATOR) return callback.call(_this4, selector$1); - }); - }; - _proto.walkComments = function walkComments(callback) { - var _this5 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.COMMENT) return callback.call(_this5, selector$1); - }); - }; - _proto.walkIds = function walkIds(callback) { - var _this6 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.ID) return callback.call(_this6, selector$1); - }); - }; - _proto.walkNesting = function walkNesting(callback) { - var _this7 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.NESTING) return callback.call(_this7, selector$1); - }); - }; - _proto.walkPseudos = function walkPseudos(callback) { - var _this8 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.PSEUDO) return callback.call(_this8, selector$1); - }); - }; - _proto.walkTags = function walkTags(callback) { - var _this9 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.TAG) return callback.call(_this9, selector$1); - }); - }; - _proto.walkUniversals = function walkUniversals(callback) { - var _this10 = this; - return this.walk(function(selector$1) { - if (selector$1.type === types$1.UNIVERSAL) return callback.call(_this10, selector$1); - }); - }; - _proto.split = function split(callback) { - var _this11 = this; - var current = []; - return this.reduce(function(memo, node, index) { - var split$1 = callback.call(_this11, node); - current.push(node); - if (split$1) { - memo.push(current); - current = []; - } else if (index === _this11.length - 1) memo.push(current); - return memo; - }, []); - }; - _proto.map = function map(callback) { - return this.nodes.map(callback); - }; - _proto.reduce = function reduce(callback, memo) { - return this.nodes.reduce(callback, memo); - }; - _proto.every = function every(callback) { - return this.nodes.every(callback); - }; - _proto.some = function some(callback) { - return this.nodes.some(callback); - }; - _proto.filter = function filter(callback) { - return this.nodes.filter(callback); - }; - _proto.sort = function sort(callback) { - return this.nodes.sort(callback); - }; - _proto.toString = function toString$1() { - return this.map(String).join(""); - }; - _createClass$5(Container$1, [ - { - key: "first", - get: function get() { - return this.at(0); - } - }, - { - key: "last", - get: function get() { - return this.at(this.length - 1); - } - }, - { - key: "length", - get: function get() { - return this.nodes.length; - } - } - ]); - return Container$1; - }(_node$7["default"]); - exports["default"] = Container; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/root.js -var require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _container$2 = _interopRequireDefault$18(require_container()); - var _types$13 = require_types(); - function _interopRequireDefault$18(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _defineProperties$4(target, props) { - for (var i$1 = 0; i$1 < props.length; i$1++) { - var descriptor = props[i$1]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass$4(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties$4(Constructor.prototype, protoProps); - if (staticProps) _defineProperties$4(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; - } - function _inheritsLoose$12(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$12(subClass, superClass); - } - function _setPrototypeOf$12(o, p) { - _setPrototypeOf$12 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$12(o, p); - } - var Root = /* @__PURE__ */ function(_Container) { - _inheritsLoose$12(Root$1, _Container); - function Root$1(opts) { - var _this = _Container.call(this, opts) || this; - _this.type = _types$13.ROOT; - return _this; - } - var _proto = Root$1.prototype; - _proto.toString = function toString$1() { - var str$1 = this.reduce(function(memo, selector$1) { - memo.push(String(selector$1)); - return memo; - }, []).join(","); - return this.trailingComma ? str$1 + "," : str$1; - }; - _proto.error = function error(message, options) { - if (this._error) return this._error(message, options); - else return new Error(message); - }; - _createClass$4(Root$1, [{ - key: "errorGenerator", - set: function set(handler) { - this._error = handler; - } - }]); - return Root$1; - }(_container$2["default"]); - exports["default"] = Root; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/selector.js -var require_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _container$1 = _interopRequireDefault$17(require_container()); - var _types$12 = require_types(); - function _interopRequireDefault$17(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$11(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$11(subClass, superClass); - } - function _setPrototypeOf$11(o, p) { - _setPrototypeOf$11 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$11(o, p); - } - var Selector = /* @__PURE__ */ function(_Container) { - _inheritsLoose$11(Selector$1, _Container); - function Selector$1(opts) { - var _this = _Container.call(this, opts) || this; - _this.type = _types$12.SELECTOR; - return _this; - } - return Selector$1; - }(_container$1["default"]); - exports["default"] = Selector; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js -/*! https://mths.be/cssesc v3.0.0 by @mathias */ -var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => { - var hasOwnProperty$1 = {}.hasOwnProperty; - var merge = function merge$1(options, defaults) { - if (!options) return defaults; - var result = {}; - for (var key in defaults) result[key] = hasOwnProperty$1.call(options, key) ? options[key] : defaults[key]; - return result; - }; - var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; - var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; - var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; - var cssesc = function cssesc$1(string$1, options) { - options = merge(options, cssesc$1.options); - if (options.quotes != "single" && options.quotes != "double") options.quotes = "single"; - var quote = options.quotes == "double" ? "\"" : "'"; - var isIdentifier$1 = options.isIdentifier; - var firstChar = string$1.charAt(0); - var output = ""; - var counter = 0; - var length = string$1.length; - while (counter < length) { - var character = string$1.charAt(counter++); - var codePoint = character.charCodeAt(); - var value = void 0; - if (codePoint < 32 || codePoint > 126) { - if (codePoint >= 55296 && codePoint <= 56319 && counter < length) { - var extra = string$1.charCodeAt(counter++); - if ((extra & 64512) == 56320) codePoint = ((codePoint & 1023) << 10) + (extra & 1023) + 65536; - else counter--; - } - value = "\\" + codePoint.toString(16).toUpperCase() + " "; - } else if (options.escapeEverything) if (regexAnySingleEscape.test(character)) value = "\\" + character; - else value = "\\" + codePoint.toString(16).toUpperCase() + " "; - else if (/[\t\n\f\r\x0B]/.test(character)) value = "\\" + codePoint.toString(16).toUpperCase() + " "; - else if (character == "\\" || !isIdentifier$1 && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier$1 && regexSingleEscape.test(character)) value = "\\" + character; - else value = character; - output += value; - } - if (isIdentifier$1) { - if (/^-[-\d]/.test(output)) output = "\\-" + output.slice(1); - else if (/\d/.test(firstChar)) output = "\\3" + firstChar + " " + output.slice(1); - } - output = output.replace(regexExcessiveSpaces, function($0, $1, $2) { - if ($1 && $1.length % 2) return $0; - return ($1 || "") + $2; - }); - if (!isIdentifier$1 && options.wrap) return quote + output + quote; - return output; - }; - cssesc.options = { - "escapeEverything": false, - "isIdentifier": false, - "quotes": "single", - "wrap": false - }; - cssesc.version = "3.0.0"; - module.exports = cssesc; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/className.js -var require_className = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc$2 = _interopRequireDefault$16(require_cssesc()); - var _util$2 = require_util(); - var _node$6 = _interopRequireDefault$16(require_node$1()); - var _types$11 = require_types(); - function _interopRequireDefault$16(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _defineProperties$3(target, props) { - for (var i$1 = 0; i$1 < props.length; i$1++) { - var descriptor = props[i$1]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass$3(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); - if (staticProps) _defineProperties$3(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; - } - function _inheritsLoose$10(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$10(subClass, superClass); - } - function _setPrototypeOf$10(o, p) { - _setPrototypeOf$10 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$10(o, p); - } - var ClassName = /* @__PURE__ */ function(_Node) { - _inheritsLoose$10(ClassName$1, _Node); - function ClassName$1(opts) { - var _this = _Node.call(this, opts) || this; - _this.type = _types$11.CLASS; - _this._constructed = true; - return _this; - } - var _proto = ClassName$1.prototype; - _proto.valueToString = function valueToString() { - return "." + _Node.prototype.valueToString.call(this); - }; - _createClass$3(ClassName$1, [{ - key: "value", - get: function get() { - return this._value; - }, - set: function set(v) { - if (this._constructed) { - var escaped = (0, _cssesc$2["default"])(v, { isIdentifier: true }); - if (escaped !== v) { - (0, _util$2.ensureObject)(this, "raws"); - this.raws.value = escaped; - } else if (this.raws) delete this.raws.value; - } - this._value = v; - } - }]); - return ClassName$1; - }(_node$6["default"]); - exports["default"] = ClassName; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/comment.js -var require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _node$5 = _interopRequireDefault$15(require_node$1()); - var _types$10 = require_types(); - function _interopRequireDefault$15(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$9(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$9(subClass, superClass); - } - function _setPrototypeOf$9(o, p) { - _setPrototypeOf$9 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$9(o, p); - } - var Comment = /* @__PURE__ */ function(_Node) { - _inheritsLoose$9(Comment$1, _Node); - function Comment$1(opts) { - var _this = _Node.call(this, opts) || this; - _this.type = _types$10.COMMENT; - return _this; - } - return Comment$1; - }(_node$5["default"]); - exports["default"] = Comment; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/id.js -var require_id = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _node$4 = _interopRequireDefault$14(require_node$1()); - var _types$9 = require_types(); - function _interopRequireDefault$14(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$8(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$8(subClass, superClass); - } - function _setPrototypeOf$8(o, p) { - _setPrototypeOf$8 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$8(o, p); - } - var ID = /* @__PURE__ */ function(_Node) { - _inheritsLoose$8(ID$2, _Node); - function ID$2(opts) { - var _this = _Node.call(this, opts) || this; - _this.type = _types$9.ID; - return _this; - } - var _proto = ID$2.prototype; - _proto.valueToString = function valueToString() { - return "#" + _Node.prototype.valueToString.call(this); - }; - return ID$2; - }(_node$4["default"]); - exports["default"] = ID; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/namespace.js -var require_namespace = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _cssesc$1 = _interopRequireDefault$13(require_cssesc()); - var _util$1 = require_util(); - var _node$3 = _interopRequireDefault$13(require_node$1()); - function _interopRequireDefault$13(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _defineProperties$2(target, props) { - for (var i$1 = 0; i$1 < props.length; i$1++) { - var descriptor = props[i$1]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass$2(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); - if (staticProps) _defineProperties$2(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; - } - function _inheritsLoose$7(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$7(subClass, superClass); - } - function _setPrototypeOf$7(o, p) { - _setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$7(o, p); - } - var Namespace = /* @__PURE__ */ function(_Node) { - _inheritsLoose$7(Namespace$1, _Node); - function Namespace$1() { - return _Node.apply(this, arguments) || this; - } - var _proto = Namespace$1.prototype; - _proto.qualifiedName = function qualifiedName(value) { - if (this.namespace) return this.namespaceString + "|" + value; - else return value; - }; - _proto.valueToString = function valueToString() { - return this.qualifiedName(_Node.prototype.valueToString.call(this)); - }; - _createClass$2(Namespace$1, [ - { - key: "namespace", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - if (namespace === true || namespace === "*" || namespace === "&") { - this._namespace = namespace; - if (this.raws) delete this.raws.namespace; - return; - } - var escaped = (0, _cssesc$1["default"])(namespace, { isIdentifier: true }); - this._namespace = namespace; - if (escaped !== namespace) { - (0, _util$1.ensureObject)(this, "raws"); - this.raws.namespace = escaped; - } else if (this.raws) delete this.raws.namespace; - } - }, - { - key: "ns", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - this.namespace = namespace; - } - }, - { - key: "namespaceString", - get: function get() { - if (this.namespace) { - var ns = this.stringifyProperty("namespace"); - if (ns === true) return ""; - else return ns; - } else return ""; - } - } - ]); - return Namespace$1; - }(_node$3["default"]); - exports["default"] = Namespace; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/tag.js -var require_tag = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _namespace$2 = _interopRequireDefault$12(require_namespace()); - var _types$8 = require_types(); - function _interopRequireDefault$12(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$6(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$6(subClass, superClass); - } - function _setPrototypeOf$6(o, p) { - _setPrototypeOf$6 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$6(o, p); - } - var Tag = /* @__PURE__ */ function(_Namespace) { - _inheritsLoose$6(Tag$1, _Namespace); - function Tag$1(opts) { - var _this = _Namespace.call(this, opts) || this; - _this.type = _types$8.TAG; - return _this; - } - return Tag$1; - }(_namespace$2["default"]); - exports["default"] = Tag; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/string.js -var require_string = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _node$2 = _interopRequireDefault$11(require_node$1()); - var _types$7 = require_types(); - function _interopRequireDefault$11(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$5(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$5(subClass, superClass); - } - function _setPrototypeOf$5(o, p) { - _setPrototypeOf$5 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$5(o, p); - } - var String$1 = /* @__PURE__ */ function(_Node) { - _inheritsLoose$5(String$2, _Node); - function String$2(opts) { - var _this = _Node.call(this, opts) || this; - _this.type = _types$7.STRING; - return _this; - } - return String$2; - }(_node$2["default"]); - exports["default"] = String$1; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/pseudo.js -var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _container = _interopRequireDefault$10(require_container()); - var _types$6 = require_types(); - function _interopRequireDefault$10(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$4(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$4(subClass, superClass); - } - function _setPrototypeOf$4(o, p) { - _setPrototypeOf$4 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$4(o, p); - } - var Pseudo = /* @__PURE__ */ function(_Container) { - _inheritsLoose$4(Pseudo$1, _Container); - function Pseudo$1(opts) { - var _this = _Container.call(this, opts) || this; - _this.type = _types$6.PSEUDO; - return _this; - } - var _proto = Pseudo$1.prototype; - _proto.toString = function toString$1() { - var params = this.length ? "(" + this.map(String).join(",") + ")" : ""; - return [ - this.rawSpaceBefore, - this.stringifyProperty("value"), - params, - this.rawSpaceAfter - ].join(""); - }; - return Pseudo$1; - }(_container["default"]); - exports["default"] = Pseudo; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js -var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => { - /** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - module.exports = __require("util").deprecate; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/attribute.js -var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - exports["default"] = void 0; - exports.unescapeValue = unescapeValue; - var _cssesc = _interopRequireDefault$9(require_cssesc()); - var _unesc = _interopRequireDefault$9(require_unesc()); - var _namespace$1 = _interopRequireDefault$9(require_namespace()); - var _types$5 = require_types(); - var _CSSESC_QUOTE_OPTIONS; - function _interopRequireDefault$9(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _defineProperties$1(target, props) { - for (var i$1 = 0; i$1 < props.length; i$1++) { - var descriptor = props[i$1]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass$1(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); - if (staticProps) _defineProperties$1(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; - } - function _inheritsLoose$3(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$3(subClass, superClass); - } - function _setPrototypeOf$3(o, p) { - _setPrototypeOf$3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$3(o, p); - } - var deprecate = require_node(); - var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; - var warnOfDeprecatedValueAssignment = deprecate(function() {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."); - var warnOfDeprecatedQuotedAssignment = deprecate(function() {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); - var warnOfDeprecatedConstructor = deprecate(function() {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); - function unescapeValue(value) { - var deprecatedUsage = false; - var quoteMark = null; - var unescaped = value; - var m = unescaped.match(WRAPPED_IN_QUOTES); - if (m) { - quoteMark = m[1]; - unescaped = m[2]; - } - unescaped = (0, _unesc["default"])(unescaped); - if (unescaped !== value) deprecatedUsage = true; - return { - deprecatedUsage, - unescaped, - quoteMark - }; - } - function handleDeprecatedContructorOpts(opts) { - if (opts.quoteMark !== void 0) return opts; - if (opts.value === void 0) return opts; - warnOfDeprecatedConstructor(); - var _unescapeValue = unescapeValue(opts.value), quoteMark = _unescapeValue.quoteMark, unescaped = _unescapeValue.unescaped; - if (!opts.raws) opts.raws = {}; - if (opts.raws.value === void 0) opts.raws.value = opts.value; - opts.value = unescaped; - opts.quoteMark = quoteMark; - return opts; - } - var Attribute = /* @__PURE__ */ function(_Namespace) { - _inheritsLoose$3(Attribute$1, _Namespace); - function Attribute$1(opts) { - var _this; - if (opts === void 0) opts = {}; - _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; - _this.type = _types$5.ATTRIBUTE; - _this.raws = _this.raws || {}; - Object.defineProperty(_this.raws, "unquoted", { - get: deprecate(function() { - return _this.value; - }, "attr.raws.unquoted is deprecated. Call attr.value instead."), - set: deprecate(function() { - return _this.value; - }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") - }); - _this._constructed = true; - return _this; - } - /** - * Returns the Attribute's value quoted such that it would be legal to use - * in the value of a css file. The original value's quotation setting - * used for stringification is left unchanged. See `setValue(value, options)` - * if you want to control the quote settings of a new value for the attribute. - * - * You can also change the quotation used for the current value by setting quoteMark. - * - * Options: - * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this - * option is not set, the original value for quoteMark will be used. If - * indeterminate, a double quote is used. The legal values are: - * * `null` - the value will be unquoted and characters will be escaped as necessary. - * * `'` - the value will be quoted with a single quote and single quotes are escaped. - * * `"` - the value will be quoted with a double quote and double quotes are escaped. - * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark - * over the quoteMark option value. - * * smart {boolean} - if true, will select a quote mark based on the value - * and the other options specified here. See the `smartQuoteMark()` - * method. - **/ - var _proto = Attribute$1.prototype; - _proto.getQuotedValue = function getQuotedValue(options) { - if (options === void 0) options = {}; - var cssescopts = CSSESC_QUOTE_OPTIONS[this._determineQuoteMark(options)]; - return (0, _cssesc["default"])(this._value, cssescopts); - }; - _proto._determineQuoteMark = function _determineQuoteMark(options) { - return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); - }; - _proto.setValue = function setValue(value, options) { - if (options === void 0) options = {}; - this._value = value; - this._quoteMark = this._determineQuoteMark(options); - this._syncRawValue(); - }; - _proto.smartQuoteMark = function smartQuoteMark(options) { - var v = this.value; - var numSingleQuotes = v.replace(/[^']/g, "").length; - var numDoubleQuotes = v.replace(/[^"]/g, "").length; - if (numSingleQuotes + numDoubleQuotes === 0) { - var escaped = (0, _cssesc["default"])(v, { isIdentifier: true }); - if (escaped === v) return Attribute$1.NO_QUOTE; - else { - var pref = this.preferredQuoteMark(options); - if (pref === Attribute$1.NO_QUOTE) { - var quote = this.quoteMark || options.quoteMark || Attribute$1.DOUBLE_QUOTE; - var opts = CSSESC_QUOTE_OPTIONS[quote]; - if ((0, _cssesc["default"])(v, opts).length < escaped.length) return quote; - } - return pref; - } - } else if (numDoubleQuotes === numSingleQuotes) return this.preferredQuoteMark(options); - else if (numDoubleQuotes < numSingleQuotes) return Attribute$1.DOUBLE_QUOTE; - else return Attribute$1.SINGLE_QUOTE; - }; - _proto.preferredQuoteMark = function preferredQuoteMark(options) { - var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; - if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; - if (quoteMark === void 0) quoteMark = Attribute$1.DOUBLE_QUOTE; - return quoteMark; - }; - _proto._syncRawValue = function _syncRawValue() { - var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); - if (rawValue === this._value) { - if (this.raws) delete this.raws.value; - } else this.raws.value = rawValue; - }; - _proto._handleEscapes = function _handleEscapes(prop, value) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(value, { isIdentifier: true }); - if (escaped !== value) this.raws[prop] = escaped; - else delete this.raws[prop]; - } - }; - _proto._spacesFor = function _spacesFor(name) { - var attrSpaces = { - before: "", - after: "" - }; - var spaces = this.spaces[name] || {}; - var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; - return Object.assign(attrSpaces, spaces, rawSpaces); - }; - _proto._stringFor = function _stringFor(name, spaceName, concat) { - if (spaceName === void 0) spaceName = name; - if (concat === void 0) concat = defaultAttrConcat; - var attrSpaces = this._spacesFor(spaceName); - return concat(this.stringifyProperty(name), attrSpaces); - }; - _proto.offsetOf = function offsetOf(name) { - var count = 1; - var attributeSpaces = this._spacesFor("attribute"); - count += attributeSpaces.before.length; - if (name === "namespace" || name === "ns") return this.namespace ? count : -1; - if (name === "attributeNS") return count; - count += this.namespaceString.length; - if (this.namespace) count += 1; - if (name === "attribute") return count; - count += this.stringifyProperty("attribute").length; - count += attributeSpaces.after.length; - var operatorSpaces = this._spacesFor("operator"); - count += operatorSpaces.before.length; - var operator = this.stringifyProperty("operator"); - if (name === "operator") return operator ? count : -1; - count += operator.length; - count += operatorSpaces.after.length; - var valueSpaces = this._spacesFor("value"); - count += valueSpaces.before.length; - var value = this.stringifyProperty("value"); - if (name === "value") return value ? count : -1; - count += value.length; - count += valueSpaces.after.length; - var insensitiveSpaces = this._spacesFor("insensitive"); - count += insensitiveSpaces.before.length; - if (name === "insensitive") return this.insensitive ? count : -1; - return -1; - }; - _proto.toString = function toString$1() { - var _this2 = this; - var selector$1 = [this.rawSpaceBefore, "["]; - selector$1.push(this._stringFor("qualifiedAttribute", "attribute")); - if (this.operator && (this.value || this.value === "")) { - selector$1.push(this._stringFor("operator")); - selector$1.push(this._stringFor("value")); - selector$1.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) { - if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) attrSpaces.before = " "; - return defaultAttrConcat(attrValue, attrSpaces); - })); - } - selector$1.push("]"); - selector$1.push(this.rawSpaceAfter); - return selector$1.join(""); - }; - _createClass$1(Attribute$1, [ - { - key: "quoted", - get: function get() { - var qm = this.quoteMark; - return qm === "'" || qm === "\""; - }, - set: function set(value) { - warnOfDeprecatedQuotedAssignment(); - } - }, - { - key: "quoteMark", - get: function get() { - return this._quoteMark; - }, - set: function set(quoteMark) { - if (!this._constructed) { - this._quoteMark = quoteMark; - return; - } - if (this._quoteMark !== quoteMark) { - this._quoteMark = quoteMark; - this._syncRawValue(); - } - } - }, - { - key: "qualifiedAttribute", - get: function get() { - return this.qualifiedName(this.raws.attribute || this.attribute); - } - }, - { - key: "insensitiveFlag", - get: function get() { - return this.insensitive ? "i" : ""; - } - }, - { - key: "value", - get: function get() { - return this._value; - }, - set: function set(v) { - if (this._constructed) { - var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, unescaped = _unescapeValue2.unescaped, quoteMark = _unescapeValue2.quoteMark; - if (deprecatedUsage) warnOfDeprecatedValueAssignment(); - if (unescaped === this._value && quoteMark === this._quoteMark) return; - this._value = unescaped; - this._quoteMark = quoteMark; - this._syncRawValue(); - } else this._value = v; - } - }, - { - key: "insensitive", - get: function get() { - return this._insensitive; - }, - set: function set(insensitive) { - if (!insensitive) { - this._insensitive = false; - if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0; - } - this._insensitive = insensitive; - } - }, - { - key: "attribute", - get: function get() { - return this._attribute; - }, - set: function set(name) { - this._handleEscapes("attribute", name); - this._attribute = name; - } - } - ]); - return Attribute$1; - }(_namespace$1["default"]); - exports["default"] = Attribute; - Attribute.NO_QUOTE = null; - Attribute.SINGLE_QUOTE = "'"; - Attribute.DOUBLE_QUOTE = "\""; - var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { - "'": { - quotes: "single", - wrap: true - }, - "\"": { - quotes: "double", - wrap: true - } - }, _CSSESC_QUOTE_OPTIONS[null] = { isIdentifier: true }, _CSSESC_QUOTE_OPTIONS); - function defaultAttrConcat(attrValue, attrSpaces) { - return "" + attrSpaces.before + attrValue + attrSpaces.after; - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/universal.js -var require_universal = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _namespace = _interopRequireDefault$8(require_namespace()); - var _types$4 = require_types(); - function _interopRequireDefault$8(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$2(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$2(subClass, superClass); - } - function _setPrototypeOf$2(o, p) { - _setPrototypeOf$2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$2(o, p); - } - var Universal = /* @__PURE__ */ function(_Namespace) { - _inheritsLoose$2(Universal$1, _Namespace); - function Universal$1(opts) { - var _this = _Namespace.call(this, opts) || this; - _this.type = _types$4.UNIVERSAL; - _this.value = "*"; - return _this; - } - return Universal$1; - }(_namespace["default"]); - exports["default"] = Universal; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/combinator.js -var require_combinator = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _node$1 = _interopRequireDefault$7(require_node$1()); - var _types$3 = require_types(); - function _interopRequireDefault$7(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose$1(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf$1(subClass, superClass); - } - function _setPrototypeOf$1(o, p) { - _setPrototypeOf$1 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf$1(o, p); - } - var Combinator = /* @__PURE__ */ function(_Node) { - _inheritsLoose$1(Combinator$1, _Node); - function Combinator$1(opts) { - var _this = _Node.call(this, opts) || this; - _this.type = _types$3.COMBINATOR; - return _this; - } - return Combinator$1; - }(_node$1["default"]); - exports["default"] = Combinator; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/nesting.js -var require_nesting = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _node = _interopRequireDefault$6(require_node$1()); - var _types$2 = require_types(); - function _interopRequireDefault$6(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - _setPrototypeOf(subClass, superClass); - } - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf$14(o$1, p$1) { - o$1.__proto__ = p$1; - return o$1; - }; - return _setPrototypeOf(o, p); - } - var Nesting = /* @__PURE__ */ function(_Node) { - _inheritsLoose(Nesting$1, _Node); - function Nesting$1(opts) { - var _this = _Node.call(this, opts) || this; - _this.type = _types$2.NESTING; - _this.value = "&"; - return _this; - } - return Nesting$1; - }(_node["default"]); - exports["default"] = Nesting; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/sortAscending.js -var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = sortAscending; - function sortAscending(list) { - return list.sort(function(a, b) { - return a - b; - }); - } - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenTypes.js -var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0; - var ampersand = 38; - exports.ampersand = ampersand; - var asterisk = 42; - exports.asterisk = asterisk; - var at = 64; - exports.at = at; - var comma = 44; - exports.comma = comma; - var colon = 58; - exports.colon = colon; - var semicolon = 59; - exports.semicolon = semicolon; - var openParenthesis = 40; - exports.openParenthesis = openParenthesis; - var closeParenthesis = 41; - exports.closeParenthesis = closeParenthesis; - var openSquare = 91; - exports.openSquare = openSquare; - var closeSquare = 93; - exports.closeSquare = closeSquare; - var dollar = 36; - exports.dollar = dollar; - var tilde = 126; - exports.tilde = tilde; - var caret = 94; - exports.caret = caret; - var plus = 43; - exports.plus = plus; - var equals = 61; - exports.equals = equals; - var pipe = 124; - exports.pipe = pipe; - var greaterThan = 62; - exports.greaterThan = greaterThan; - var space = 32; - exports.space = space; - var singleQuote = 39; - exports.singleQuote = singleQuote; - var doubleQuote = 34; - exports.doubleQuote = doubleQuote; - var slash = 47; - exports.slash = slash; - var bang = 33; - exports.bang = bang; - var backslash = 92; - exports.backslash = backslash; - var cr = 13; - exports.cr = cr; - var feed = 12; - exports.feed = feed; - var newline = 10; - exports.newline = newline; - var tab = 9; - exports.tab = tab; - var str = singleQuote; - exports.str = str; - var comment$1 = -1; - exports.comment = comment$1; - var word = -2; - exports.word = word; - var combinator$1 = -3; - exports.combinator = combinator$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/tokenize.js -var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - exports.FIELDS = void 0; - exports["default"] = tokenize; - var t = _interopRequireWildcard$2(require_tokenTypes()); - var _unescapable, _wordDelimiters; - function _getRequireWildcardCache$2(nodeInterop) { - if (typeof WeakMap !== "function") return null; - var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); - var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache$2 = function _getRequireWildcardCache$4(nodeInterop$1) { - return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); - } - function _interopRequireWildcard$2(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) return obj; - if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj }; - var cache = _getRequireWildcardCache$2(nodeInterop); - if (cache && cache.has(obj)) return cache.get(obj); - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); - else newObj[key] = obj[key]; - } - newObj["default"] = obj; - if (cache) cache.set(obj, newObj); - return newObj; - } - var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); - var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); - var hex = {}; - var hexChars = "0123456789abcdefABCDEF"; - for (var i = 0; i < hexChars.length; i++) hex[hexChars.charCodeAt(i)] = true; - /** - * Returns the last index of the bar css word - * @param {string} css The string in which the word begins - * @param {number} start The index into the string where word's first letter occurs - */ - function consumeWord(css, start) { - var next = start; - var code; - do { - code = css.charCodeAt(next); - if (wordDelimiters[code]) return next - 1; - else if (code === t.backslash) next = consumeEscape(css, next) + 1; - else next++; - } while (next < css.length); - return next - 1; - } - /** - * Returns the last index of the escape sequence - * @param {string} css The string in which the sequence begins - * @param {number} start The index into the string where escape character (`\`) occurs. - */ - function consumeEscape(css, start) { - var next = start; - var code = css.charCodeAt(next + 1); - if (unescapable[code]) {} else if (hex[code]) { - var hexDigits = 0; - do { - next++; - hexDigits++; - code = css.charCodeAt(next + 1); - } while (hex[code] && hexDigits < 6); - if (hexDigits < 6 && code === t.space) next++; - } else next++; - return next; - } - var FIELDS = { - TYPE: 0, - START_LINE: 1, - START_COL: 2, - END_LINE: 3, - END_COL: 4, - START_POS: 5, - END_POS: 6 - }; - exports.FIELDS = FIELDS; - function tokenize(input) { - var tokens$1 = []; - var css = input.css.valueOf(); - var length = css.length; - var offset = -1; - var line = 1; - var start = 0; - var end = 0; - var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; - function unclosed(what, fix) { - if (input.safe) { - css += fix; - next = css.length - 1; - } else throw input.error("Unclosed " + what, line, start - offset, start); - } - while (start < length) { - code = css.charCodeAt(start); - if (code === t.newline) { - offset = start; - line += 1; - } - switch (code) { - case t.space: - case t.tab: - case t.newline: - case t.cr: - case t.feed: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - if (code === t.newline) { - offset = next; - line += 1; - } - } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); - tokenType = t.space; - endLine = line; - endColumn = next - offset - 1; - end = next; - break; - case t.plus: - case t.greaterThan: - case t.tilde: - case t.pipe: - next = start; - do { - next += 1; - code = css.charCodeAt(next); - } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); - tokenType = t.combinator; - endLine = line; - endColumn = start - offset; - end = next; - break; - case t.asterisk: - case t.ampersand: - case t.bang: - case t.comma: - case t.equals: - case t.dollar: - case t.caret: - case t.openSquare: - case t.closeSquare: - case t.colon: - case t.semicolon: - case t.openParenthesis: - case t.closeParenthesis: - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - case t.singleQuote: - case t.doubleQuote: - quote = code === t.singleQuote ? "'" : "\""; - next = start; - do { - escaped = false; - next = css.indexOf(quote, next + 1); - if (next === -1) unclosed("quote", quote); - escapePos = next; - while (css.charCodeAt(escapePos - 1) === t.backslash) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped); - tokenType = t.str; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - default: - if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { - next = css.indexOf("*/", start + 2) + 1; - if (next === 0) unclosed("comment", "*/"); - content = css.slice(start, next + 1); - lines = content.split("\n"); - last = lines.length - 1; - if (last > 0) { - nextLine = line + last; - nextOffset = next - lines[last].length; - } else { - nextLine = line; - nextOffset = offset; - } - tokenType = t.comment; - line = nextLine; - endLine = nextLine; - endColumn = next - nextOffset; - } else if (code === t.slash) { - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - } else { - next = consumeWord(css, start); - tokenType = t.word; - endLine = line; - endColumn = next - offset; - } - end = next + 1; - break; - } - tokens$1.push([ - tokenType, - line, - start - offset, - endLine, - endColumn, - start, - end - ]); - if (nextOffset) { - offset = nextOffset; - nextOffset = null; - } - start = end; - } - return tokens$1; - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/parser.js -var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _root$1 = _interopRequireDefault$5(require_root()); - var _selector$1 = _interopRequireDefault$5(require_selector()); - var _className$1 = _interopRequireDefault$5(require_className()); - var _comment$1 = _interopRequireDefault$5(require_comment()); - var _id$1 = _interopRequireDefault$5(require_id()); - var _tag$1 = _interopRequireDefault$5(require_tag()); - var _string$1 = _interopRequireDefault$5(require_string()); - var _pseudo$1 = _interopRequireDefault$5(require_pseudo()); - var _attribute$1 = _interopRequireWildcard$1(require_attribute()); - var _universal$1 = _interopRequireDefault$5(require_universal()); - var _combinator$1 = _interopRequireDefault$5(require_combinator()); - var _nesting$1 = _interopRequireDefault$5(require_nesting()); - var _sortAscending = _interopRequireDefault$5(require_sortAscending()); - var _tokenize = _interopRequireWildcard$1(require_tokenize()); - var tokens = _interopRequireWildcard$1(require_tokenTypes()); - var types = _interopRequireWildcard$1(require_types()); - var _util = require_util(); - var _WHITESPACE_TOKENS, _Object$assign; - function _getRequireWildcardCache$1(nodeInterop) { - if (typeof WeakMap !== "function") return null; - var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); - var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache$1 = function _getRequireWildcardCache$4(nodeInterop$1) { - return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); - } - function _interopRequireWildcard$1(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) return obj; - if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj }; - var cache = _getRequireWildcardCache$1(nodeInterop); - if (cache && cache.has(obj)) return cache.get(obj); - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); - else newObj[key] = obj[key]; - } - newObj["default"] = obj; - if (cache) cache.set(obj, newObj); - return newObj; - } - function _interopRequireDefault$5(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - function _defineProperties(target, props) { - for (var i$1 = 0; i$1 < props.length; i$1++) { - var descriptor = props[i$1]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - Object.defineProperty(Constructor, "prototype", { writable: false }); - return Constructor; - } - var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); - var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); - function tokenStart(token) { - return { - line: token[_tokenize.FIELDS.START_LINE], - column: token[_tokenize.FIELDS.START_COL] - }; - } - function tokenEnd(token) { - return { - line: token[_tokenize.FIELDS.END_LINE], - column: token[_tokenize.FIELDS.END_COL] - }; - } - function getSource(startLine, startColumn, endLine, endColumn) { - return { - start: { - line: startLine, - column: startColumn - }, - end: { - line: endLine, - column: endColumn - } - }; - } - function getTokenSource(token) { - return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); - } - function getTokenSourceSpan(startToken, endToken) { - if (!startToken) return; - return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); - } - function unescapeProp(node, prop) { - var value = node[prop]; - if (typeof value !== "string") return; - if (value.indexOf("\\") !== -1) { - (0, _util.ensureObject)(node, "raws"); - node[prop] = (0, _util.unesc)(value); - if (node.raws[prop] === void 0) node.raws[prop] = value; - } - return node; - } - function indexesOf(array, item) { - var i$1 = -1; - var indexes = []; - while ((i$1 = array.indexOf(item, i$1 + 1)) !== -1) indexes.push(i$1); - return indexes; - } - function uniqs() { - var list = Array.prototype.concat.apply([], arguments); - return list.filter(function(item, i$1) { - return i$1 === list.indexOf(item); - }); - } - var Parser = /* @__PURE__ */ function() { - function Parser$2(rule, options) { - if (options === void 0) options = {}; - this.rule = rule; - this.options = Object.assign({ - lossy: false, - safe: false - }, options); - this.position = 0; - this.css = typeof this.rule === "string" ? this.rule : this.rule.selector; - this.tokens = (0, _tokenize["default"])({ - css: this.css, - error: this._errorGenerator(), - safe: this.options.safe - }); - var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); - this.root = new _root$1["default"]({ source: rootSource }); - this.root.errorGenerator = this._errorGenerator(); - var selector$1 = new _selector$1["default"]({ - source: { start: { - line: 1, - column: 1 - } }, - sourceIndex: 0 - }); - this.root.append(selector$1); - this.current = selector$1; - this.loop(); - } - var _proto = Parser$2.prototype; - _proto._errorGenerator = function _errorGenerator() { - var _this = this; - return function(message, errorOptions) { - if (typeof _this.rule === "string") return new Error(message); - return _this.rule.error(message, errorOptions); - }; - }; - _proto.attribute = function attribute$1() { - var attr = []; - var startingToken = this.currToken; - this.position++; - while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - attr.push(this.currToken); - this.position++; - } - if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[_tokenize.FIELDS.START_POS]); - var len = attr.length; - var node = { - source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - }; - if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) return this.expected("attribute", attr[0][_tokenize.FIELDS.START_POS]); - var pos = 0; - var spaceBefore = ""; - var commentBefore = ""; - var lastAdded = null; - var spaceAfterMeaningfulToken = false; - while (pos < len) { - var token = attr[pos]; - var content = this.content(token); - var next = attr[pos + 1]; - switch (token[_tokenize.FIELDS.TYPE]) { - case tokens.space: - spaceAfterMeaningfulToken = true; - if (this.options.lossy) break; - if (lastAdded) { - (0, _util.ensureObject)(node, "spaces", lastAdded); - var prevContent = node.spaces[lastAdded].after || ""; - node.spaces[lastAdded].after = prevContent + content; - var existingComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || null; - if (existingComment) node.raws.spaces[lastAdded].after = existingComment + content; - } else { - spaceBefore = spaceBefore + content; - commentBefore = commentBefore + content; - } - break; - case tokens.asterisk: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = "operator"; - } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { - if (spaceBefore) { - (0, _util.ensureObject)(node, "spaces", "attribute"); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ""; - } - if (commentBefore) { - (0, _util.ensureObject)(node, "raws", "spaces", "attribute"); - node.raws.spaces.attribute.before = spaceBefore; - commentBefore = ""; - } - node.namespace = (node.namespace || "") + content; - if ((0, _util.getProp)(node, "raws", "namespace") || null) node.raws.namespace += content; - lastAdded = "namespace"; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.dollar: if (lastAdded === "value") { - var oldRawValue = (0, _util.getProp)(node, "raws", "value"); - node.value += "$"; - if (oldRawValue) node.raws.value = oldRawValue + "$"; - break; - } - case tokens.caret: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = "operator"; - } - spaceAfterMeaningfulToken = false; - break; - case tokens.combinator: - if (content === "~" && next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = "operator"; - } - if (content !== "|") { - spaceAfterMeaningfulToken = false; - break; - } - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = "operator"; - } else if (!node.namespace && !node.attribute) node.namespace = true; - spaceAfterMeaningfulToken = false; - break; - case tokens.word: - if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && !node.operator && !node.namespace) { - node.namespace = content; - lastAdded = "namespace"; - } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { - if (spaceBefore) { - (0, _util.ensureObject)(node, "spaces", "attribute"); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ""; - } - if (commentBefore) { - (0, _util.ensureObject)(node, "raws", "spaces", "attribute"); - node.raws.spaces.attribute.before = commentBefore; - commentBefore = ""; - } - node.attribute = (node.attribute || "") + content; - if ((0, _util.getProp)(node, "raws", "attribute") || null) node.raws.attribute += content; - lastAdded = "attribute"; - } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { - var _unescaped = (0, _util.unesc)(content); - var _oldRawValue = (0, _util.getProp)(node, "raws", "value") || ""; - var oldValue = node.value || ""; - node.value = oldValue + _unescaped; - node.quoteMark = null; - if (_unescaped !== content || _oldRawValue) { - (0, _util.ensureObject)(node, "raws"); - node.raws.value = (_oldRawValue || oldValue) + content; - } - lastAdded = "value"; - } else { - var insensitive = content === "i" || content === "I"; - if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) { - node.insensitive = insensitive; - if (!insensitive || content === "I") { - (0, _util.ensureObject)(node, "raws"); - node.raws.insensitiveFlag = content; - } - lastAdded = "insensitive"; - if (spaceBefore) { - (0, _util.ensureObject)(node, "spaces", "insensitive"); - node.spaces.insensitive.before = spaceBefore; - spaceBefore = ""; - } - if (commentBefore) { - (0, _util.ensureObject)(node, "raws", "spaces", "insensitive"); - node.raws.spaces.insensitive.before = commentBefore; - commentBefore = ""; - } - } else if (node.value || node.value === "") { - lastAdded = "value"; - node.value += content; - if (node.raws.value) node.raws.value += content; - } - } - spaceAfterMeaningfulToken = false; - break; - case tokens.str: - if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[_tokenize.FIELDS.START_POS] }); - var _unescapeValue = (0, _attribute$1.unescapeValue)(content), unescaped = _unescapeValue.unescaped, quoteMark = _unescapeValue.quoteMark; - node.value = unescaped; - node.quoteMark = quoteMark; - lastAdded = "value"; - (0, _util.ensureObject)(node, "raws"); - node.raws.value = content; - spaceAfterMeaningfulToken = false; - break; - case tokens.equals: - if (!node.attribute) return this.expected("attribute", token[_tokenize.FIELDS.START_POS], content); - if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[_tokenize.FIELDS.START_POS] }); - node.operator = node.operator ? node.operator + content : content; - lastAdded = "operator"; - spaceAfterMeaningfulToken = false; - break; - case tokens.comment: - if (lastAdded) if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") { - var lastComment = (0, _util.getProp)(node, "spaces", lastAdded, "after") || ""; - var rawLastComment = (0, _util.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment; - (0, _util.ensureObject)(node, "raws", "spaces", lastAdded); - node.raws.spaces[lastAdded].after = rawLastComment + content; - } else { - var lastValue = node[lastAdded] || ""; - var rawLastValue = (0, _util.getProp)(node, "raws", lastAdded) || lastValue; - (0, _util.ensureObject)(node, "raws"); - node.raws[lastAdded] = rawLastValue + content; - } - else commentBefore = commentBefore + content; - break; - default: return this.error("Unexpected \"" + content + "\" found.", { index: token[_tokenize.FIELDS.START_POS] }); - } - pos++; - } - unescapeProp(node, "attribute"); - unescapeProp(node, "namespace"); - this.newNode(new _attribute$1["default"](node)); - this.position++; - }; - _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { - if (stopPosition < 0) stopPosition = this.tokens.length; - var startPosition = this.position; - var nodes = []; - var space$1 = ""; - var lastComment = void 0; - do - if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { - if (!this.options.lossy) space$1 += this.content(); - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { - var spaces = {}; - if (space$1) { - spaces.before = space$1; - space$1 = ""; - } - lastComment = new _comment$1["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - spaces - }); - nodes.push(lastComment); - } - while (++this.position < stopPosition); - if (space$1) { - if (lastComment) lastComment.spaces.after = space$1; - else if (!this.options.lossy) { - var firstToken = this.tokens[startPosition]; - var lastToken = this.tokens[this.position - 1]; - nodes.push(new _string$1["default"]({ - value: "", - source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: { - before: space$1, - after: "" - } - })); - } - } - return nodes; - }; - _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { - var _this2 = this; - if (requiredSpace === void 0) requiredSpace = false; - var space$1 = ""; - var rawSpace = ""; - nodes.forEach(function(n) { - var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); - var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); - space$1 += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); - rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); - }); - if (rawSpace === space$1) rawSpace = void 0; - return { - space: space$1, - rawSpace - }; - }; - _proto.isNamedCombinator = function isNamedCombinator(position) { - if (position === void 0) position = this.position; - return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; - }; - _proto.namedCombinator = function namedCombinator() { - if (this.isNamedCombinator()) { - var nameRaw = this.content(this.tokens[this.position + 1]); - var name = (0, _util.unesc)(nameRaw).toLowerCase(); - var raws = {}; - if (name !== nameRaw) raws.value = "/" + nameRaw + "/"; - var node = new _combinator$1["default"]({ - value: "/" + name + "/", - source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - raws - }); - this.position = this.position + 3; - return node; - } else this.unexpected(); - }; - _proto.combinator = function combinator$2() { - var _this3 = this; - if (this.content() === "|") return this.namespace(); - var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - if (nodes.length > 0) { - var last = this.current.last; - if (last) { - var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), space$1 = _this$convertWhitespa.space, rawSpace = _this$convertWhitespa.rawSpace; - if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace; - last.spaces.after += space$1; - } else nodes.forEach(function(n) { - return _this3.newNode(n); - }); - } - return; - } - var firstToken = this.currToken; - var spaceOrDescendantSelectorNodes = void 0; - if (nextSigTokenPos > this.position) spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - var node; - if (this.isNamedCombinator()) node = this.namedCombinator(); - else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { - node = new _combinator$1["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] - }); - this.position++; - } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {} else if (!spaceOrDescendantSelectorNodes) this.unexpected(); - if (node) { - if (spaceOrDescendantSelectorNodes) { - var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), _space = _this$convertWhitespa2.space, _rawSpace = _this$convertWhitespa2.rawSpace; - node.spaces.before = _space; - node.rawSpaceBefore = _rawSpace; - } - } else { - var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), _space2 = _this$convertWhitespa3.space, _rawSpace2 = _this$convertWhitespa3.rawSpace; - if (!_rawSpace2) _rawSpace2 = _space2; - var spaces = {}; - var raws = { spaces: {} }; - if (_space2.endsWith(" ") && _rawSpace2.endsWith(" ")) { - spaces.before = _space2.slice(0, _space2.length - 1); - raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); - } else if (_space2.startsWith(" ") && _rawSpace2.startsWith(" ")) { - spaces.after = _space2.slice(1); - raws.spaces.after = _rawSpace2.slice(1); - } else raws.value = _rawSpace2; - node = new _combinator$1["default"]({ - value: " ", - source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces, - raws - }); - } - if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { - node.spaces.after = this.optionalSpace(this.content()); - this.position++; - } - return this.newNode(node); - }; - _proto.comma = function comma$1() { - if (this.position === this.tokens.length - 1) { - this.root.trailingComma = true; - this.position++; - return; - } - this.current._inferEndPosition(); - var selector$1 = new _selector$1["default"]({ - source: { start: tokenStart(this.tokens[this.position + 1]) }, - sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] - }); - this.current.parent.append(selector$1); - this.current = selector$1; - this.position++; - }; - _proto.comment = function comment$2() { - var current = this.currToken; - this.newNode(new _comment$1["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.error = function error(message, opts) { - throw this.root.error(message, opts); - }; - _proto.missingBackslash = function missingBackslash() { - return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[_tokenize.FIELDS.START_POS] }); - }; - _proto.missingParenthesis = function missingParenthesis() { - return this.expected("opening parenthesis", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.missingSquareBracket = function missingSquareBracket() { - return this.expected("opening square bracket", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpected = function unexpected() { - return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.unexpectedPipe = function unexpectedPipe() { - return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.namespace = function namespace() { - var before = this.prevToken && this.content(this.prevToken) || true; - if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.position++; - return this.word(before); - } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { - this.position++; - return this.universal(before); - } - this.unexpectedPipe(); - }; - _proto.nesting = function nesting$1() { - if (this.nextToken) { - if (this.content(this.nextToken) === "|") { - this.position++; - return; - } - } - var current = this.currToken; - this.newNode(new _nesting$1["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.parentheses = function parentheses() { - var last = this.current.last; - var unbalanced = 1; - this.position++; - if (last && last.type === types.PSEUDO) { - var selector$1 = new _selector$1["default"]({ - source: { start: tokenStart(this.tokens[this.position]) }, - sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] - }); - var cache = this.current; - last.append(selector$1); - this.current = selector$1; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++; - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--; - if (unbalanced) this.parse(); - else { - this.current.source.end = tokenEnd(this.currToken); - this.current.parent.source.end = tokenEnd(this.currToken); - this.position++; - } - } - this.current = cache; - } else { - var parenStart = this.currToken; - var parenValue = "("; - var parenEnd; - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++; - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--; - parenEnd = this.currToken; - parenValue += this.parseParenthesisToken(this.currToken); - this.position++; - } - if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue); - else this.newNode(new _string$1["default"]({ - value: parenValue, - source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), - sourceIndex: parenStart[_tokenize.FIELDS.START_POS] - })); - } - if (unbalanced) return this.expected("closing parenthesis", this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.pseudo = function pseudo$1() { - var _this4 = this; - var pseudoStr = ""; - var startingToken = this.currToken; - while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { - pseudoStr += this.content(); - this.position++; - } - if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1); - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) { - pseudoStr += first; - _this4.newNode(new _pseudo$1["default"]({ - value: pseudoStr, - source: getTokenSourceSpan(startingToken, _this4.currToken), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - })); - if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) _this4.error("Misplaced parenthesis.", { index: _this4.nextToken[_tokenize.FIELDS.START_POS] }); - }); - else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[_tokenize.FIELDS.START_POS]); - }; - _proto.space = function space$1() { - var content = this.content(); - if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) { - return node.type === "comment"; - })) { - this.spaces = this.optionalSpace(content); - this.position++; - } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - this.current.last.spaces.after = this.optionalSpace(content); - this.position++; - } else this.combinator(); - }; - _proto.string = function string$1() { - var current = this.currToken; - this.newNode(new _string$1["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - _proto.universal = function universal$1(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === "|") { - this.position++; - return this.namespace(); - } - var current = this.currToken; - this.newNode(new _universal$1["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - }), namespace); - this.position++; - }; - _proto.splitWord = function splitWord(namespace, firstCallback) { - var _this5 = this; - var nextToken = this.nextToken; - var word$1 = this.content(); - while (nextToken && ~[ - tokens.dollar, - tokens.caret, - tokens.equals, - tokens.word - ].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { - this.position++; - var current = this.content(); - word$1 += current; - if (current.lastIndexOf("\\") === current.length - 1) { - var next = this.nextToken; - if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { - word$1 += this.requiredSpace(this.content(next)); - this.position++; - } - } - nextToken = this.nextToken; - } - var hasClass = indexesOf(word$1, ".").filter(function(i$1) { - var escapedDot = word$1[i$1 - 1] === "\\"; - var isKeyframesPercent = /^\d+\.\d+%$/.test(word$1); - return !escapedDot && !isKeyframesPercent; - }); - var hasId = indexesOf(word$1, "#").filter(function(i$1) { - return word$1[i$1 - 1] !== "\\"; - }); - var interpolations = indexesOf(word$1, "#{"); - if (interpolations.length) hasId = hasId.filter(function(hashIndex) { - return !~interpolations.indexOf(hashIndex); - }); - var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); - indices.forEach(function(ind, i$1) { - var index = indices[i$1 + 1] || word$1.length; - var value = word$1.slice(ind, index); - if (i$1 === 0 && firstCallback) return firstCallback.call(_this5, value, indices.length); - var node; - var current$1 = _this5.currToken; - var sourceIndex = current$1[_tokenize.FIELDS.START_POS] + indices[i$1]; - var source = getSource(current$1[1], current$1[2] + ind, current$1[3], current$1[2] + (index - 1)); - if (~hasClass.indexOf(ind)) { - var classNameOpts = { - value: value.slice(1), - source, - sourceIndex - }; - node = new _className$1["default"](unescapeProp(classNameOpts, "value")); - } else if (~hasId.indexOf(ind)) { - var idOpts = { - value: value.slice(1), - source, - sourceIndex - }; - node = new _id$1["default"](unescapeProp(idOpts, "value")); - } else { - var tagOpts = { - value, - source, - sourceIndex - }; - unescapeProp(tagOpts, "value"); - node = new _tag$1["default"](tagOpts); - } - _this5.newNode(node, namespace); - namespace = null; - }); - this.position++; - }; - _proto.word = function word$1(namespace) { - var nextToken = this.nextToken; - if (nextToken && this.content(nextToken) === "|") { - this.position++; - return this.namespace(); - } - return this.splitWord(namespace); - }; - _proto.loop = function loop() { - while (this.position < this.tokens.length) this.parse(true); - this.current._inferEndPosition(); - return this.root; - }; - _proto.parse = function parse(throwOnParenthesis) { - switch (this.currToken[_tokenize.FIELDS.TYPE]) { - case tokens.space: - this.space(); - break; - case tokens.comment: - this.comment(); - break; - case tokens.openParenthesis: - this.parentheses(); - break; - case tokens.closeParenthesis: - if (throwOnParenthesis) this.missingParenthesis(); - break; - case tokens.openSquare: - this.attribute(); - break; - case tokens.dollar: - case tokens.caret: - case tokens.equals: - case tokens.word: - this.word(); - break; - case tokens.colon: - this.pseudo(); - break; - case tokens.comma: - this.comma(); - break; - case tokens.asterisk: - this.universal(); - break; - case tokens.ampersand: - this.nesting(); - break; - case tokens.slash: - case tokens.combinator: - this.combinator(); - break; - case tokens.str: - this.string(); - break; - case tokens.closeSquare: this.missingSquareBracket(); - case tokens.semicolon: this.missingBackslash(); - default: this.unexpected(); - } - }; - _proto.expected = function expected(description, index, found) { - if (Array.isArray(description)) { - var last = description.pop(); - description = description.join(", ") + " or " + last; - } - var an = /^[aeiou]/.test(description[0]) ? "an" : "a"; - if (!found) return this.error("Expected " + an + " " + description + ".", { index }); - return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { index }); - }; - _proto.requiredSpace = function requiredSpace(space$1) { - return this.options.lossy ? " " : space$1; - }; - _proto.optionalSpace = function optionalSpace(space$1) { - return this.options.lossy ? "" : space$1; - }; - _proto.lossySpace = function lossySpace(space$1, required) { - if (this.options.lossy) return required ? " " : ""; - else return space$1; - }; - _proto.parseParenthesisToken = function parseParenthesisToken(token) { - var content = this.content(token); - if (token[_tokenize.FIELDS.TYPE] === tokens.space) return this.requiredSpace(content); - else return content; - }; - _proto.newNode = function newNode(node, namespace) { - if (namespace) { - if (/^ +$/.test(namespace)) { - if (!this.options.lossy) this.spaces = (this.spaces || "") + namespace; - namespace = true; - } - node.namespace = namespace; - unescapeProp(node, "namespace"); - } - if (this.spaces) { - node.spaces.before = this.spaces; - this.spaces = ""; - } - return this.current.append(node); - }; - _proto.content = function content(token) { - if (token === void 0) token = this.currToken; - return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); - }; - /** - * returns the index of the next non-whitespace, non-comment token. - * returns -1 if no meaningful token is found. - */ - _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { - if (startPosition === void 0) startPosition = this.position + 1; - var searchPosition = startPosition; - while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { - searchPosition++; - continue; - } else return searchPosition; - return -1; - }; - _createClass(Parser$2, [ - { - key: "currToken", - get: function get() { - return this.tokens[this.position]; - } - }, - { - key: "nextToken", - get: function get() { - return this.tokens[this.position + 1]; - } - }, - { - key: "prevToken", - get: function get() { - return this.tokens[this.position - 1]; - } - } - ]); - return Parser$2; - }(); - exports["default"] = Parser; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/processor.js -var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _parser = _interopRequireDefault$4(require_parser()); - function _interopRequireDefault$4(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - var Processor = /* @__PURE__ */ function() { - function Processor$1(func, options) { - this.func = func || function noop() {}; - this.funcRes = null; - this.options = options; - } - var _proto = Processor$1.prototype; - _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { - if (options === void 0) options = {}; - if (Object.assign({}, this.options, options).updateSelector === false) return false; - else return typeof rule !== "string"; - }; - _proto._isLossy = function _isLossy(options) { - if (options === void 0) options = {}; - if (Object.assign({}, this.options, options).lossless === false) return true; - else return false; - }; - _proto._root = function _root$2(rule, options) { - if (options === void 0) options = {}; - return new _parser["default"](rule, this._parseOptions(options)).root; - }; - _proto._parseOptions = function _parseOptions(options) { - return { lossy: this._isLossy(options) }; - }; - _proto._run = function _run(rule, options) { - var _this = this; - if (options === void 0) options = {}; - return new Promise(function(resolve, reject) { - try { - var root$2 = _this._root(rule, options); - Promise.resolve(_this.func(root$2)).then(function(transform) { - var string$1 = void 0; - if (_this._shouldUpdateSelector(rule, options)) { - string$1 = root$2.toString(); - rule.selector = string$1; - } - return { - transform, - root: root$2, - string: string$1 - }; - }).then(resolve, reject); - } catch (e) { - reject(e); - return; - } - }); - }; - _proto._runSync = function _runSync(rule, options) { - if (options === void 0) options = {}; - var root$2 = this._root(rule, options); - var transform = this.func(root$2); - if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call."); - var string$1 = void 0; - if (options.updateSelector && typeof rule !== "string") { - string$1 = root$2.toString(); - rule.selector = string$1; - } - return { - transform, - root: root$2, - string: string$1 - }; - }; - _proto.ast = function ast(rule, options) { - return this._run(rule, options).then(function(result) { - return result.root; - }); - }; - _proto.astSync = function astSync(rule, options) { - return this._runSync(rule, options).root; - }; - _proto.transform = function transform(rule, options) { - return this._run(rule, options).then(function(result) { - return result.transform; - }); - }; - _proto.transformSync = function transformSync(rule, options) { - return this._runSync(rule, options).transform; - }; - _proto.process = function process$1(rule, options) { - return this._run(rule, options).then(function(result) { - return result.string || result.root.toString(); - }); - }; - _proto.processSync = function processSync(rule, options) { - var result = this._runSync(rule, options); - return result.string || result.root.toString(); - }; - return Processor$1; - }(); - exports["default"] = Processor; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/constructors.js -var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0; - var _attribute = _interopRequireDefault$3(require_attribute()); - var _className = _interopRequireDefault$3(require_className()); - var _combinator = _interopRequireDefault$3(require_combinator()); - var _comment = _interopRequireDefault$3(require_comment()); - var _id = _interopRequireDefault$3(require_id()); - var _nesting = _interopRequireDefault$3(require_nesting()); - var _pseudo = _interopRequireDefault$3(require_pseudo()); - var _root = _interopRequireDefault$3(require_root()); - var _selector = _interopRequireDefault$3(require_selector()); - var _string = _interopRequireDefault$3(require_string()); - var _tag = _interopRequireDefault$3(require_tag()); - var _universal = _interopRequireDefault$3(require_universal()); - function _interopRequireDefault$3(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - var attribute = function attribute$1(opts) { - return new _attribute["default"](opts); - }; - exports.attribute = attribute; - var className = function className$1(opts) { - return new _className["default"](opts); - }; - exports.className = className; - var combinator = function combinator$2(opts) { - return new _combinator["default"](opts); - }; - exports.combinator = combinator; - var comment = function comment$2(opts) { - return new _comment["default"](opts); - }; - exports.comment = comment; - var id = function id$1(opts) { - return new _id["default"](opts); - }; - exports.id = id; - var nesting = function nesting$1(opts) { - return new _nesting["default"](opts); - }; - exports.nesting = nesting; - var pseudo = function pseudo$1(opts) { - return new _pseudo["default"](opts); - }; - exports.pseudo = pseudo; - var root = function root$2(opts) { - return new _root["default"](opts); - }; - exports.root = root; - var selector = function selector$1(opts) { - return new _selector["default"](opts); - }; - exports.selector = selector; - var string = function string$1(opts) { - return new _string["default"](opts); - }; - exports.string = string; - var tag = function tag$1(opts) { - return new _tag["default"](opts); - }; - exports.tag = tag; - var universal = function universal$1(opts) { - return new _universal["default"](opts); - }; - exports.universal = universal; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/guards.js -var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0; - exports.isContainer = isContainer; - exports.isIdentifier = void 0; - exports.isNamespace = isNamespace; - exports.isNesting = void 0; - exports.isNode = isNode; - exports.isPseudo = void 0; - exports.isPseudoClass = isPseudoClass; - exports.isPseudoElement = isPseudoElement; - exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0; - var _types$1 = require_types(); - var _IS_TYPE; - var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types$1.ATTRIBUTE] = true, _IS_TYPE[_types$1.CLASS] = true, _IS_TYPE[_types$1.COMBINATOR] = true, _IS_TYPE[_types$1.COMMENT] = true, _IS_TYPE[_types$1.ID] = true, _IS_TYPE[_types$1.NESTING] = true, _IS_TYPE[_types$1.PSEUDO] = true, _IS_TYPE[_types$1.ROOT] = true, _IS_TYPE[_types$1.SELECTOR] = true, _IS_TYPE[_types$1.STRING] = true, _IS_TYPE[_types$1.TAG] = true, _IS_TYPE[_types$1.UNIVERSAL] = true, _IS_TYPE); - function isNode(node) { - return typeof node === "object" && IS_TYPE[node.type]; - } - function isNodeType(type, node) { - return isNode(node) && node.type === type; - } - var isAttribute = isNodeType.bind(null, _types$1.ATTRIBUTE); - exports.isAttribute = isAttribute; - var isClassName = isNodeType.bind(null, _types$1.CLASS); - exports.isClassName = isClassName; - var isCombinator = isNodeType.bind(null, _types$1.COMBINATOR); - exports.isCombinator = isCombinator; - var isComment = isNodeType.bind(null, _types$1.COMMENT); - exports.isComment = isComment; - var isIdentifier = isNodeType.bind(null, _types$1.ID); - exports.isIdentifier = isIdentifier; - var isNesting = isNodeType.bind(null, _types$1.NESTING); - exports.isNesting = isNesting; - var isPseudo = isNodeType.bind(null, _types$1.PSEUDO); - exports.isPseudo = isPseudo; - var isRoot = isNodeType.bind(null, _types$1.ROOT); - exports.isRoot = isRoot; - var isSelector = isNodeType.bind(null, _types$1.SELECTOR); - exports.isSelector = isSelector; - var isString = isNodeType.bind(null, _types$1.STRING); - exports.isString = isString; - var isTag = isNodeType.bind(null, _types$1.TAG); - exports.isTag = isTag; - var isUniversal = isNodeType.bind(null, _types$1.UNIVERSAL); - exports.isUniversal = isUniversal; - function isPseudoElement(node) { - return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); - } - function isPseudoClass(node) { - return isPseudo(node) && !isPseudoElement(node); - } - function isContainer(node) { - return !!(isNode(node) && node.walk); - } - function isNamespace(node) { - return isAttribute(node) || isTag(node); - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/selectors/index.js -var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => { - exports.__esModule = true; - var _types = require_types(); - Object.keys(_types).forEach(function(key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _types[key]) return; - exports[key] = _types[key]; - }); - var _constructors = require_constructors(); - Object.keys(_constructors).forEach(function(key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _constructors[key]) return; - exports[key] = _constructors[key]; - }); - var _guards = require_guards(); - Object.keys(_guards).forEach(function(key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _guards[key]) return; - exports[key] = _guards[key]; - }); -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.0/node_modules/postcss-selector-parser/dist/index.js -var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => { - exports.__esModule = true; - exports["default"] = void 0; - var _processor = _interopRequireDefault$2(require_processor()); - var selectors = _interopRequireWildcard(require_selectors()); - function _getRequireWildcardCache(nodeInterop) { - if (typeof WeakMap !== "function") return null; - var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); - var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache = function _getRequireWildcardCache$4(nodeInterop$1) { - return nodeInterop$1 ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); - } - function _interopRequireWildcard(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) return obj; - if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj }; - var cache = _getRequireWildcardCache(nodeInterop); - if (cache && cache.has(obj)) return cache.get(obj); - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); - else newObj[key] = obj[key]; - } - newObj["default"] = obj; - if (cache) cache.set(obj, newObj); - return newObj; - } - function _interopRequireDefault$2(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - var parser = function parser$1(processor) { - return new _processor["default"](processor); - }; - Object.assign(parser, selectors); - var _default = parser; - exports["default"] = _default; - module.exports = exports.default; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.6/node_modules/postcss-modules-local-by-default/src/index.js -var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const selectorParser$1 = require_dist(); - const valueParser = require_lib(); - const { extractICSS } = require_src$4(); - const IGNORE_FILE_MARKER = "cssmodules-pure-no-check"; - const IGNORE_NEXT_LINE_MARKER = "cssmodules-pure-ignore"; - const isSpacing = (node) => node.type === "combinator" && node.value === " "; - const isPureCheckDisabled = (root$2) => { - for (const node of root$2.nodes) { - if (node.type !== "comment") return false; - if (node.text.trim().startsWith(IGNORE_FILE_MARKER)) return true; - } - return false; - }; - function getIgnoreComment(node) { - if (!node.parent) return; - const indexInParent = node.parent.index(node); - for (let i$1 = indexInParent - 1; i$1 >= 0; i$1--) { - const prevNode = node.parent.nodes[i$1]; - if (prevNode.type === "comment") { - if (prevNode.text.trimStart().startsWith(IGNORE_NEXT_LINE_MARKER)) return prevNode; - } else break; - } - } - function normalizeNodeArray(nodes) { - const array = []; - nodes.forEach((x) => { - if (Array.isArray(x)) normalizeNodeArray(x).forEach((item) => { - array.push(item); - }); - else if (x) array.push(x); - }); - if (array.length > 0 && isSpacing(array[array.length - 1])) array.pop(); - return array; - } - const isPureSelectorSymbol = Symbol("is-pure-selector"); - function localizeNode(rule, mode, localAliasMap) { - const transform = (node, context) => { - if (context.ignoreNextSpacing && !isSpacing(node)) throw new Error("Missing whitespace after " + context.ignoreNextSpacing); - if (context.enforceNoSpacing && isSpacing(node)) throw new Error("Missing whitespace before " + context.enforceNoSpacing); - let newNodes; - switch (node.type) { - case "root": { - let resultingGlobal; - context.hasPureGlobals = false; - newNodes = node.nodes.map((n) => { - const nContext = { - global: context.global, - lastWasSpacing: true, - hasLocals: false, - explicit: false - }; - n = transform(n, nContext); - if (typeof resultingGlobal === "undefined") resultingGlobal = nContext.global; - else if (resultingGlobal !== nContext.global) throw new Error("Inconsistent rule global/local result in rule \"" + node + "\" (multiple selectors must result in the same mode for the rule)"); - if (!nContext.hasLocals) context.hasPureGlobals = true; - return n; - }); - context.global = resultingGlobal; - node.nodes = normalizeNodeArray(newNodes); - break; - } - case "selector": - newNodes = node.map((childNode) => transform(childNode, context)); - node = node.clone(); - node.nodes = normalizeNodeArray(newNodes); - break; - case "combinator": - if (isSpacing(node)) { - if (context.ignoreNextSpacing) { - context.ignoreNextSpacing = false; - context.lastWasSpacing = false; - context.enforceNoSpacing = false; - return null; - } - context.lastWasSpacing = true; - return node; - } - break; - case "pseudo": { - let childContext; - const isNested = !!node.length; - const isScoped = node.value === ":local" || node.value === ":global"; - if (node.value === ":import" || node.value === ":export") context.hasLocals = true; - else if (isNested) { - if (isScoped) { - if (node.nodes.length === 0) throw new Error(`${node.value}() can't be empty`); - if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`); - childContext = { - global: node.value === ":global", - inside: node.value, - hasLocals: false, - explicit: true - }; - newNodes = node.map((childNode) => transform(childNode, childContext)).reduce((acc, next) => acc.concat(next.nodes), []); - if (newNodes.length) { - const { before, after } = node.spaces; - const first = newNodes[0]; - const last = newNodes[newNodes.length - 1]; - first.spaces = { - before, - after: first.spaces.after - }; - last.spaces = { - before: last.spaces.before, - after - }; - } - node = newNodes; - break; - } else { - childContext = { - global: context.global, - inside: context.inside, - lastWasSpacing: true, - hasLocals: false, - explicit: context.explicit - }; - newNodes = node.map((childNode) => { - const newContext = { - ...childContext, - enforceNoSpacing: false - }; - const result = transform(childNode, newContext); - childContext.global = newContext.global; - childContext.hasLocals = newContext.hasLocals; - return result; - }); - node = node.clone(); - node.nodes = normalizeNodeArray(newNodes); - if (childContext.hasLocals) context.hasLocals = true; - } - break; - } else if (isScoped) { - if (context.inside) throw new Error(`A ${node.value} is not allowed inside of a ${context.inside}(...)`); - const addBackSpacing = !!node.spaces.before; - context.ignoreNextSpacing = context.lastWasSpacing ? node.value : false; - context.enforceNoSpacing = context.lastWasSpacing ? false : node.value; - context.global = node.value === ":global"; - context.explicit = true; - return addBackSpacing ? selectorParser$1.combinator({ value: " " }) : null; - } - break; - } - case "id": - case "class": { - if (!node.value) throw new Error("Invalid class or id selector syntax"); - if (context.global) break; - const isImportedValue = localAliasMap.has(node.value); - if (!isImportedValue || isImportedValue && context.explicit) { - const innerNode = node.clone(); - innerNode.spaces = { - before: "", - after: "" - }; - node = selectorParser$1.pseudo({ - value: ":local", - nodes: [innerNode], - spaces: node.spaces - }); - context.hasLocals = true; - } - break; - } - case "nesting": if (node.value === "&") context.hasLocals = rule.parent[isPureSelectorSymbol]; - } - context.lastWasSpacing = false; - context.ignoreNextSpacing = false; - context.enforceNoSpacing = false; - return node; - }; - const rootContext = { - global: mode === "global", - hasPureGlobals: false - }; - rootContext.selector = selectorParser$1((root$2) => { - transform(root$2, rootContext); - }).processSync(rule, { - updateSelector: false, - lossless: true - }); - return rootContext; - } - function localizeDeclNode(node, context) { - switch (node.type) { - case "word": - if (context.localizeNextItem) { - if (!context.localAliasMap.has(node.value)) { - node.value = ":local(" + node.value + ")"; - context.localizeNextItem = false; - } - } - break; - case "function": - if (context.options && context.options.rewriteUrl && node.value.toLowerCase() === "url") node.nodes.map((nestedNode) => { - if (nestedNode.type !== "string" && nestedNode.type !== "word") return; - let newUrl = context.options.rewriteUrl(context.global, nestedNode.value); - switch (nestedNode.type) { - case "string": - if (nestedNode.quote === "'") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/'/g, "\\'"); - if (nestedNode.quote === "\"") newUrl = newUrl.replace(/(\\)/g, "\\$1").replace(/"/g, "\\\""); - break; - case "word": - newUrl = newUrl.replace(/("|'|\)|\\)/g, "\\$1"); - break; - } - nestedNode.value = newUrl; - }); - break; - } - return node; - } - const specialKeywords = [ - "none", - "inherit", - "initial", - "revert", - "revert-layer", - "unset" - ]; - function localizeDeclarationValues(localize, declaration, context) { - const valueNodes = valueParser(declaration.value); - valueNodes.walk((node, index, nodes) => { - if (node.type === "function" && (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env")) return false; - if (node.type === "word" && specialKeywords.includes(node.value.toLowerCase())) return; - nodes[index] = localizeDeclNode(node, { - options: context.options, - global: context.global, - localizeNextItem: localize && !context.global, - localAliasMap: context.localAliasMap - }); - }); - declaration.value = valueNodes.toString(); - } - const validIdent = /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-(?![0-9]))((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i; - const animationKeywords = { - $normal: 1, - $reverse: 1, - $alternate: 1, - "$alternate-reverse": 1, - $forwards: 1, - $backwards: 1, - $both: 1, - $infinite: 1, - $paused: 1, - $running: 1, - $ease: 1, - "$ease-in": 1, - "$ease-out": 1, - "$ease-in-out": 1, - $linear: 1, - "$step-end": 1, - "$step-start": 1, - $none: Infinity, - $initial: Infinity, - $inherit: Infinity, - $unset: Infinity, - $revert: Infinity, - "$revert-layer": Infinity - }; - function localizeDeclaration(declaration, context) { - if (/animation(-name)?$/i.test(declaration.prop)) { - let parsedAnimationKeywords = {}; - declaration.value = valueParser(declaration.value).walk((node) => { - if (node.type === "div") { - parsedAnimationKeywords = {}; - return; - } else if (node.type === "function" && node.value.toLowerCase() === "local" && node.nodes.length === 1) { - node.type = "word"; - node.value = node.nodes[0].value; - return localizeDeclNode(node, { - options: context.options, - global: context.global, - localizeNextItem: true, - localAliasMap: context.localAliasMap - }); - } else if (node.type === "function") { - if (node.value.toLowerCase() === "global" && node.nodes.length === 1) { - node.type = "word"; - node.value = node.nodes[0].value; - } - return false; - } else if (node.type !== "word") return; - const value = node.type === "word" ? node.value.toLowerCase() : null; - let shouldParseAnimationName = false; - if (value && validIdent.test(value)) if ("$" + value in animationKeywords) { - parsedAnimationKeywords["$" + value] = "$" + value in parsedAnimationKeywords ? parsedAnimationKeywords["$" + value] + 1 : 0; - shouldParseAnimationName = parsedAnimationKeywords["$" + value] >= animationKeywords["$" + value]; - } else shouldParseAnimationName = true; - return localizeDeclNode(node, { - options: context.options, - global: context.global, - localizeNextItem: shouldParseAnimationName && !context.global, - localAliasMap: context.localAliasMap - }); - }).toString(); - return; - } - if (/url\(/i.test(declaration.value)) return localizeDeclarationValues(false, declaration, context); - } - const isPureSelector = (context, rule) => { - if (!rule.parent || rule.type === "root") return !context.hasPureGlobals; - if (rule.type === "rule" && rule[isPureSelectorSymbol]) return rule[isPureSelectorSymbol] || isPureSelector(context, rule.parent); - return !context.hasPureGlobals || isPureSelector(context, rule.parent); - }; - const isNodeWithoutDeclarations = (rule) => { - if (rule.nodes.length > 0) return !rule.nodes.every((item) => item.type === "rule" || item.type === "atrule" && !isNodeWithoutDeclarations(item)); - return true; - }; - module.exports = (options = {}) => { - if (options && options.mode && options.mode !== "global" && options.mode !== "local" && options.mode !== "pure") throw new Error("options.mode must be either \"global\", \"local\" or \"pure\" (default \"local\")"); - const pureMode = options && options.mode === "pure"; - const globalMode = options && options.mode === "global"; - return { - postcssPlugin: "postcss-modules-local-by-default", - prepare() { - const localAliasMap = /* @__PURE__ */ new Map(); - return { Once(root$2) { - const { icssImports } = extractICSS(root$2, false); - const enforcePureMode = pureMode && !isPureCheckDisabled(root$2); - Object.keys(icssImports).forEach((key) => { - Object.keys(icssImports[key]).forEach((prop) => { - localAliasMap.set(prop, icssImports[key][prop]); - }); - }); - root$2.walkAtRules((atRule) => { - if (/keyframes$/i.test(atRule.name)) { - const globalMatch = /^\s*:global\s*\((.+)\)\s*$/.exec(atRule.params); - const localMatch = /^\s*:local\s*\((.+)\)\s*$/.exec(atRule.params); - let globalKeyframes = globalMode; - if (globalMatch) { - if (enforcePureMode) { - const ignoreComment = getIgnoreComment(atRule); - if (!ignoreComment) throw atRule.error("@keyframes :global(...) is not allowed in pure mode"); - else ignoreComment.remove(); - } - atRule.params = globalMatch[1]; - globalKeyframes = true; - } else if (localMatch) { - atRule.params = localMatch[0]; - globalKeyframes = false; - } else if (atRule.params && !globalMode && !localAliasMap.has(atRule.params)) atRule.params = ":local(" + atRule.params + ")"; - atRule.walkDecls((declaration) => { - localizeDeclaration(declaration, { - localAliasMap, - options, - global: globalKeyframes - }); - }); - } else if (/scope$/i.test(atRule.name)) { - if (atRule.params) { - const ignoreComment = pureMode ? getIgnoreComment(atRule) : void 0; - if (ignoreComment) ignoreComment.remove(); - atRule.params = atRule.params.split("to").map((item) => { - const selector$1 = item.trim().slice(1, -1).trim(); - const context = localizeNode(selector$1, options.mode, localAliasMap); - context.options = options; - context.localAliasMap = localAliasMap; - if (enforcePureMode && context.hasPureGlobals && !ignoreComment) throw atRule.error("Selector in at-rule\"" + selector$1 + "\" is not pure (pure selectors must contain at least one local class or id)"); - return `(${context.selector})`; - }).join(" to "); - } - atRule.nodes.forEach((declaration) => { - if (declaration.type === "decl") localizeDeclaration(declaration, { - localAliasMap, - options, - global: globalMode - }); - }); - } else if (atRule.nodes) atRule.nodes.forEach((declaration) => { - if (declaration.type === "decl") localizeDeclaration(declaration, { - localAliasMap, - options, - global: globalMode - }); - }); - }); - root$2.walkRules((rule) => { - if (rule.parent && rule.parent.type === "atrule" && /keyframes$/i.test(rule.parent.name)) return; - const context = localizeNode(rule, options.mode, localAliasMap); - context.options = options; - context.localAliasMap = localAliasMap; - const ignoreComment = enforcePureMode ? getIgnoreComment(rule) : void 0; - const isNotPure = enforcePureMode && !isPureSelector(context, rule); - if (isNotPure && isNodeWithoutDeclarations(rule) && !ignoreComment) throw rule.error("Selector \"" + rule.selector + "\" is not pure (pure selectors must contain at least one local class or id)"); - else if (ignoreComment) ignoreComment.remove(); - if (pureMode) rule[isPureSelectorSymbol] = !isNotPure; - rule.selector = context.selector; - if (rule.nodes) rule.nodes.forEach((declaration) => localizeDeclaration(declaration, context)); - }); - } }; - } - }; - }; - module.exports.postcss = true; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.6/node_modules/postcss-modules-scope/src/index.js -var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const selectorParser = require_dist(); - const hasOwnProperty = Object.prototype.hasOwnProperty; - function isNestedRule(rule) { - if (!rule.parent || rule.parent.type === "root") return false; - if (rule.parent.type === "rule") return true; - return isNestedRule(rule.parent); - } - function getSingleLocalNamesForComposes(root$2, rule) { - if (isNestedRule(rule)) throw new Error(`composition is not allowed in nested rule \n\n${rule}`); - return root$2.nodes.map((node) => { - if (node.type !== "selector" || node.nodes.length !== 1) throw new Error(`composition is only allowed when selector is single :local class name not in "${root$2}"`); - node = node.nodes[0]; - if (node.type !== "pseudo" || node.value !== ":local" || node.nodes.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird"); - node = node.first; - if (node.type !== "selector" || node.length !== 1) throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird"); - node = node.first; - if (node.type !== "class") throw new Error("composition is only allowed when selector is single :local class name not in \"" + root$2 + "\", \"" + node + "\" is weird"); - return node.value; - }); - } - const unescapeRegExp = new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)", "ig"); - function unescape(str$1) { - return str$1.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => { - const high = "0x" + escaped - 65536; - return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320); - }); - } - const plugin = (options = {}) => { - const generateScopedName = options && options.generateScopedName || plugin.generateScopedName; - const generateExportEntry = options && options.generateExportEntry || plugin.generateExportEntry; - const exportGlobals = options && options.exportGlobals; - return { - postcssPlugin: "postcss-modules-scope", - Once(root$2, { rule }) { - const exports$1 = Object.create(null); - function exportScopedName(name, rawName, node) { - const scopedName = generateScopedName(rawName ? rawName : name, root$2.source.input.from, root$2.source.input.css, node); - const { key, value } = generateExportEntry(rawName ? rawName : name, scopedName, root$2.source.input.from, root$2.source.input.css, node); - exports$1[key] = exports$1[key] || []; - if (exports$1[key].indexOf(value) < 0) exports$1[key].push(value); - return scopedName; - } - function localizeNode$1(node) { - switch (node.type) { - case "selector": - node.nodes = node.map((item) => localizeNode$1(item)); - return node; - case "class": return selectorParser.className({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) }); - case "id": return selectorParser.id({ value: exportScopedName(node.value, node.raws && node.raws.value ? node.raws.value : null, node) }); - case "attribute": if (node.attribute === "class" && node.operator === "=") return selectorParser.attribute({ - attribute: node.attribute, - operator: node.operator, - quoteMark: "'", - value: exportScopedName(node.value, null, null) - }); - } - throw new Error(`${node.type} ("${node}") is not allowed in a :local block`); - } - function traverseNode(node) { - switch (node.type) { - case "pseudo": if (node.value === ":local") { - if (node.nodes.length !== 1) throw new Error("Unexpected comma (\",\") in :local block"); - const selector$1 = localizeNode$1(node.first); - selector$1.first.spaces = node.spaces; - const nextNode = node.next(); - if (nextNode && nextNode.type === "combinator" && nextNode.value === " " && /\\[A-F0-9]{1,6}$/.test(selector$1.last.value)) selector$1.last.spaces.after = " "; - node.replaceWith(selector$1); - return; - } - case "root": - case "selector": - node.each((item) => traverseNode(item)); - break; - case "id": - case "class": - if (exportGlobals) exports$1[node.value] = [node.value]; - break; - } - return node; - } - const importedNames = {}; - root$2.walkRules(/^:import\(.+\)$/, (rule$1) => { - rule$1.walkDecls((decl) => { - importedNames[decl.prop] = true; - }); - }); - root$2.walkRules((rule$1) => { - let parsedSelector = selectorParser().astSync(rule$1); - rule$1.selector = traverseNode(parsedSelector.clone()).toString(); - rule$1.walkDecls(/^(composes|compose-with)$/i, (decl) => { - const localNames = getSingleLocalNamesForComposes(parsedSelector, decl.parent); - decl.value.split(",").forEach((value) => { - value.trim().split(/\s+/).forEach((className$1) => { - const global$1 = /^global\(([^)]+)\)$/.exec(className$1); - if (global$1) localNames.forEach((exportedName) => { - exports$1[exportedName].push(global$1[1]); - }); - else if (hasOwnProperty.call(importedNames, className$1)) localNames.forEach((exportedName) => { - exports$1[exportedName].push(className$1); - }); - else if (hasOwnProperty.call(exports$1, className$1)) localNames.forEach((exportedName) => { - exports$1[className$1].forEach((item) => { - exports$1[exportedName].push(item); - }); - }); - else throw decl.error(`referenced class name "${className$1}" in ${decl.prop} not found`); - }); - }); - decl.remove(); - }); - rule$1.walkDecls((decl) => { - if (!/:local\s*\((.+?)\)/.test(decl.value)) return; - let tokens$1 = decl.value.split(/(,|'[^']*'|"[^"]*")/); - tokens$1 = tokens$1.map((token, idx) => { - if (idx === 0 || tokens$1[idx - 1] === ",") { - let result = token; - const localMatch = /:local\s*\((.+?)\)/.exec(token); - if (localMatch) { - const input = localMatch.input; - const matchPattern = localMatch[0]; - const matchVal = localMatch[1]; - const newVal = exportScopedName(matchVal); - result = input.replace(matchPattern, newVal); - } else return token; - return result; - } else return token; - }); - decl.value = tokens$1.join(""); - }); - }); - root$2.walkAtRules(/keyframes$/i, (atRule) => { - const localMatch = /^\s*:local\s*\((.+?)\)\s*$/.exec(atRule.params); - if (!localMatch) return; - atRule.params = exportScopedName(localMatch[1]); - }); - root$2.walkAtRules(/scope$/i, (atRule) => { - if (atRule.params) atRule.params = atRule.params.split("to").map((item) => { - const selector$1 = item.trim().slice(1, -1).trim(); - if (!/^\s*:local\s*\((.+?)\)\s*$/.exec(selector$1)) return `(${selector$1})`; - return `(${traverseNode(selectorParser().astSync(selector$1)).toString()})`; - }).join(" to "); - }); - const exportedNames = Object.keys(exports$1); - if (exportedNames.length > 0) { - const exportRule = rule({ selector: ":export" }); - exportedNames.forEach((exportedName) => exportRule.append({ - prop: exportedName, - value: exports$1[exportedName].join(" "), - raws: { before: "\n " } - })); - root$2.append(exportRule); - } - } - }; - }; - plugin.postcss = true; - plugin.generateScopedName = function(name, path$2) { - return `_${path$2.replace(/\.[^./\\]+$/, "").replace(/[\W_]+/g, "_").replace(/^_|_$/g, "")}__${name}`.trim(); - }; - plugin.generateExportEntry = function(name, scopedName) { - return { - key: unescape(name), - value: unescape(scopedName) - }; - }; - module.exports = plugin; -})); - -//#endregion -//#region ../../node_modules/.pnpm/string-hash@1.1.3/node_modules/string-hash/index.js -var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => { - function hash(str$1) { - var hash$1 = 5381, i$1 = str$1.length; - while (i$1) hash$1 = hash$1 * 33 ^ str$1.charCodeAt(--i$1); - return hash$1 >>> 0; - } - module.exports = hash; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.6/node_modules/postcss-modules-values/src/index.js -var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const ICSSUtils = require_src$4(); - const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; - const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/; - const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; - module.exports = (options) => { - let importIndex = 0; - const createImportedName = options && options.createImportedName || ((importName) => `i__const_${importName.replace(/\W/g, "_")}_${importIndex++}`); - return { - postcssPlugin: "postcss-modules-values", - prepare(result) { - const importAliases = []; - const definitions = {}; - return { Once(root$2, postcss) { - root$2.walkAtRules(/value/i, (atRule) => { - const matches = atRule.params.match(matchImports); - if (matches) { - let [, aliases, path$2] = matches; - if (definitions[path$2]) path$2 = definitions[path$2]; - const imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, "$1").split(/\s*,\s*/).map((alias) => { - const tokens$1 = matchImport.exec(alias); - if (tokens$1) { - const [, theirName, myName = theirName] = tokens$1; - const importedName = createImportedName(myName); - definitions[myName] = importedName; - return { - theirName, - importedName - }; - } else throw new Error(`@import statement "${alias}" is invalid!`); - }); - importAliases.push({ - path: path$2, - imports - }); - atRule.remove(); - return; - } - if (atRule.params.indexOf("@value") !== -1) result.warn("Invalid value definition: " + atRule.params); - let [, key, value] = `${atRule.params}${atRule.raws.between}`.match(matchValueDefinition); - const normalizedValue = value.replace(/\/\*((?!\*\/).*?)\*\//g, ""); - if (normalizedValue.length === 0) { - result.warn("Invalid value definition: " + atRule.params); - atRule.remove(); - return; - } - if (!/^\s+$/.test(normalizedValue)) value = value.trim(); - definitions[key] = ICSSUtils.replaceValueSymbols(value, definitions); - atRule.remove(); - }); - if (!Object.keys(definitions).length) return; - ICSSUtils.replaceSymbols(root$2, definitions); - const exportDeclarations = Object.keys(definitions).map((key) => postcss.decl({ - value: definitions[key], - prop: key, - raws: { before: "\n " } - })); - if (exportDeclarations.length > 0) { - const exportRule = postcss.rule({ - selector: ":export", - raws: { after: "\n" } - }); - exportRule.append(exportDeclarations); - root$2.prepend(exportRule); - } - importAliases.reverse().forEach(({ path: path$2, imports }) => { - const importRule = postcss.rule({ - selector: `:import(${path$2})`, - raws: { after: "\n" } - }); - imports.forEach(({ theirName, importedName }) => { - importRule.append({ - value: theirName, - prop: importedName, - raws: { before: "\n " } - }); - }); - root$2.prepend(importRule); - }); - } }; - } - }; - }; - module.exports.postcss = true; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/scoping.js -var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.behaviours = void 0; - exports.getDefaultPlugins = getDefaultPlugins; - exports.getDefaultScopeBehaviour = getDefaultScopeBehaviour; - exports.getScopedNameGenerator = getScopedNameGenerator; - var _postcssModulesExtractImports = _interopRequireDefault$1(require_src$3()); - var _genericNames = _interopRequireDefault$1(require_generic_names()); - var _postcssModulesLocalByDefault = _interopRequireDefault$1(require_src$2()); - var _postcssModulesScope = _interopRequireDefault$1(require_src$1()); - var _stringHash = _interopRequireDefault$1(require_string_hash()); - var _postcssModulesValues = _interopRequireDefault$1(require_src()); - function _interopRequireDefault$1(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - const behaviours = { - LOCAL: "local", - GLOBAL: "global" - }; - exports.behaviours = behaviours; - function getDefaultPlugins({ behaviour, generateScopedName, exportGlobals }) { - const scope = (0, _postcssModulesScope.default)({ - generateScopedName, - exportGlobals - }); - return { - [behaviours.LOCAL]: [ - _postcssModulesValues.default, - (0, _postcssModulesLocalByDefault.default)({ mode: "local" }), - _postcssModulesExtractImports.default, - scope - ], - [behaviours.GLOBAL]: [ - _postcssModulesValues.default, - (0, _postcssModulesLocalByDefault.default)({ mode: "global" }), - _postcssModulesExtractImports.default, - scope - ] - }[behaviour]; - } - function isValidBehaviour(behaviour) { - return Object.keys(behaviours).map((key) => behaviours[key]).indexOf(behaviour) > -1; - } - function getDefaultScopeBehaviour(scopeBehaviour) { - return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL; - } - function generateScopedNameDefault(name, filename, css) { - const i$1 = css.indexOf(`.${name}`); - const lineNumber = css.substr(0, i$1).split(/[\r\n]/).length; - return `_${name}_${(0, _stringHash.default)(css).toString(36).substr(0, 5)}_${lineNumber}`; - } - function getScopedNameGenerator(generateScopedName, hashPrefix) { - const scopedNameGenerator = generateScopedName || generateScopedNameDefault; - if (typeof scopedNameGenerator === "function") return scopedNameGenerator; - return (0, _genericNames.default)(scopedNameGenerator, { - context: process.cwd(), - hashPrefix - }); - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/pluginFactory.js -var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.makePlugin = makePlugin; - var _postcss = _interopRequireDefault(__require("postcss")); - var _unquote = _interopRequireDefault(require_unquote()); - var _Parser = _interopRequireDefault(require_Parser()); - var _saveJSON = _interopRequireDefault(require_saveJSON()); - var _localsConvention = require_localsConvention(); - var _FileSystemLoader = _interopRequireDefault(require_FileSystemLoader()); - var _scoping = require_scoping(); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - const PLUGIN_NAME = "postcss-modules"; - function isGlobalModule(globalModules, inputFile) { - return globalModules.some((regex) => inputFile.match(regex)); - } - function getDefaultPluginsList(opts, inputFile) { - const globalModulesList = opts.globalModulePaths || null; - const exportGlobals = opts.exportGlobals || false; - const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour); - const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix); - if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) return (0, _scoping.getDefaultPlugins)({ - behaviour: _scoping.behaviours.GLOBAL, - generateScopedName, - exportGlobals - }); - return (0, _scoping.getDefaultPlugins)({ - behaviour: defaultBehaviour, - generateScopedName, - exportGlobals - }); - } - function getLoader(opts, plugins) { - const root$2 = typeof opts.root === "undefined" ? "/" : opts.root; - return typeof opts.Loader === "function" ? new opts.Loader(root$2, plugins, opts.resolve) : new _FileSystemLoader.default(root$2, plugins, opts.resolve); - } - function isOurPlugin(plugin$1) { - return plugin$1.postcssPlugin === PLUGIN_NAME; - } - function makePlugin(opts) { - return { - postcssPlugin: PLUGIN_NAME, - async OnceExit(css, { result }) { - const getJSON = opts.getJSON || _saveJSON.default; - const inputFile = css.source.input.file; - const pluginList = getDefaultPluginsList(opts, inputFile); - const resultPluginIndex = result.processor.plugins.findIndex((plugin$1) => isOurPlugin(plugin$1)); - if (resultPluginIndex === -1) throw new Error("Plugin missing from options."); - const loader = getLoader(opts, [...result.processor.plugins.slice(0, resultPluginIndex), ...pluginList]); - const fetcher = async (file, relativeTo, depTrace) => { - const unquoteFile = (0, _unquote.default)(file); - return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace); - }; - const parser$1 = new _Parser.default(fetcher); - await (0, _postcss.default)([...pluginList, parser$1.plugin()]).process(css, { from: inputFile }); - const out = loader.finalSource; - if (out) css.prepend(out); - if (opts.localsConvention) { - const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile); - parser$1.exportTokens = Object.entries(parser$1.exportTokens).reduce(reducer, {}); - } - result.messages.push({ - type: "export", - plugin: "postcss-modules", - exportTokens: parser$1.exportTokens - }); - return getJSON(css.source.input.file, parser$1.exportTokens, result.opts.to); - } - }; - } -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.6/node_modules/postcss-modules/build/index.js -var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => { - var _fs = __require("fs"); - var _fs2 = require_fs(); - var _pluginFactory = require_pluginFactory(); - (0, _fs2.setFileSystem)({ - readFile: _fs.readFile, - writeFile: _fs.writeFile - }); - module.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts); - module.exports.postcss = true; -})); - -//#endregion -export default require_build(); - -export { }; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/chunk.js b/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/chunk.js deleted file mode 100644 index f92a15ee62a18fcfee534a2d4f6ad5aa6d147355..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/chunk.js +++ /dev/null @@ -1,48 +0,0 @@ -import { createRequire } from "node:module"; - -//#region rolldown:runtime -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res); -var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); -var __export = (all, symbols) => { - let target = {}; - for (var name in all) { - __defProp(target, name, { - get: all[name], - enumerable: true - }); - } - if (symbols) { - __defProp(target, Symbol.toStringTag, { value: "Module" }); - } - return target; -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { - key = keys[i]; - if (!__hasOwnProp.call(to, key) && key !== except) { - __defProp(to, key, { - get: ((k) => from[k]).bind(null, key), - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - }); - } - } - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { - value: mod, - enumerable: true -}) : target, mod)); -var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod); -var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode); -var __require = /* @__PURE__ */ createRequire(import.meta.url); - -//#endregion -export { __toCommonJS as a, __require as i, __esmMin as n, __toDynamicImportESM as o, __export as r, __toESM as s, __commonJSMin as t }; \ No newline at end of file diff --git a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/config.js b/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/config.js deleted file mode 100644 index 2b39a20c497ee5c9f1cefdf1781df9955b50b97d..0000000000000000000000000000000000000000 --- a/ThinFilm_Analyzer/frontend/node_modules/vite/dist/node/chunks/config.js +++ /dev/null @@ -1,35978 +0,0 @@ -import { a as __toCommonJS, i as __require, n as __esmMin, o as __toDynamicImportESM, r as __export, s as __toESM, t as __commonJSMin } from "./chunk.js"; -import { A as OPTIMIZABLE_ENTRY_RE, C as ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, D as JS_TYPES_RE, E as FS_PREFIX, F as defaultAllowedOrigins, I as loopbackHosts, L as wildcardHosts, M as SPECIAL_QUERY_RE, N as VERSION, O as KNOWN_ASSET_TYPES, P as VITE_PACKAGE_DIR, R as require_picocolors, S as ENV_PUBLIC_PATH, T as ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, _ as DEFAULT_SERVER_CONDITIONS, a as CLIENT_ENTRY, b as DEV_PROD_CONDITION, c as DEFAULT_ASSETS_INLINE_LIMIT, d as DEFAULT_CLIENT_MAIN_FIELDS, f as DEFAULT_CONFIG_FILES, g as DEFAULT_PREVIEW_PORT, h as DEFAULT_EXTERNAL_CONDITIONS, i as CLIENT_DIR, j as ROLLUP_HOOKS, k as METADATA_FILENAME, l as DEFAULT_ASSETS_RE, m as DEFAULT_EXTENSIONS, n as createLogger, o as CLIENT_PUBLIC_PATH, p as DEFAULT_DEV_PORT, r as printServerUrls, s as CSS_LANGS_RE, t as LogLevels, u as DEFAULT_CLIENT_CONDITIONS, v as DEFAULT_SERVER_MAIN_FIELDS, w as ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, x as ENV_ENTRY, y as DEP_VERSION_RE } from "./logger.js"; -import { builtinModules, createRequire } from "node:module"; -import { parseAst, parseAstAsync } from "rollup/parseAst"; -import * as fs$1 from "node:fs"; -import fs, { existsSync, promises, readFileSync } from "node:fs"; -import path, { basename, dirname, extname, isAbsolute, join, normalize, posix, relative, resolve, sep } from "node:path"; -import fsp, { constants } from "node:fs/promises"; -import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url"; -import { format, formatWithOptions, inspect, promisify, stripVTControlCharacters } from "node:util"; -import { performance as performance$1 } from "node:perf_hooks"; -import crypto from "node:crypto"; -import picomatch from "picomatch"; -import esbuild, { build, formatMessages, transform } from "esbuild"; -import os from "node:os"; -import net from "node:net"; -import childProcess, { exec, execFile, execSync } from "node:child_process"; -import { promises as promises$1 } from "node:dns"; -import { isatty } from "node:tty"; -import path$1, { basename as basename$1, dirname as dirname$1, extname as extname$1, isAbsolute as isAbsolute$1, join as join$1, posix as posix$1, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 } from "path"; -import { existsSync as existsSync$1, readFileSync as readFileSync$1, readdirSync, statSync } from "fs"; -import { fdir } from "fdir"; -import { gzip } from "node:zlib"; -import readline from "node:readline"; -import { createRequire as createRequire$1 } from "module"; -import { MessageChannel, Worker } from "node:worker_threads"; -import isModuleSyncConditionEnabled from "#module-sync-enabled"; -import assert from "node:assert"; -import process$1 from "node:process"; -import v8 from "node:v8"; -import { escapePath, glob, globSync, isDynamicPattern } from "tinyglobby"; -import { Buffer as Buffer$1 } from "node:buffer"; -import { EventEmitter } from "node:events"; -import { STATUS_CODES, createServer, get } from "node:http"; -import { createServer as createServer$1, get as get$1 } from "node:https"; -import { ESModulesEvaluator, ModuleRunner, createNodeImportMeta } from "vite/module-runner"; -import zlib from "zlib"; -import * as qs from "node:querystring"; - -//#region src/shared/constants.ts -/** -* Prefix for resolved Ids that are not valid browser import specifiers -*/ -const VALID_ID_PREFIX = `/@id/`; -/** -* Plugins that use 'virtual modules' (e.g. for helper functions), prefix the -* module ID with `\0`, a convention from the rollup ecosystem. -* This prevents other plugins from trying to process the id (like node resolution), -* and core features like sourcemaps can use this info to differentiate between -* virtual modules and regular files. -* `\0` is not a permitted char in import URLs so we have to replace them during -* import analysis. The id will be decoded back before entering the plugins pipeline. -* These encoded virtual ids are also prefixed by the VALID_ID_PREFIX, so virtual -* modules in the browser end up encoded as `/@id/__x00__{id}` -*/ -const NULL_BYTE_PLACEHOLDER = `__x00__`; -let SOURCEMAPPING_URL = "sourceMa"; -SOURCEMAPPING_URL += "ppingURL"; -const MODULE_RUNNER_SOURCEMAPPING_SOURCE = "//# sourceMappingSource=vite-generated"; -const ERR_OUTDATED_OPTIMIZED_DEP = "ERR_OUTDATED_OPTIMIZED_DEP"; - -//#endregion -//#region src/shared/utils.ts -const isWindows = typeof process !== "undefined" && process.platform === "win32"; -/** -* Prepend `/@id/` and replace null byte so the id is URL-safe. -* This is prepended to resolved ids that are not valid browser -* import specifiers by the importAnalysis plugin. -*/ -function wrapId(id) { - return id.startsWith(VALID_ID_PREFIX) ? id : VALID_ID_PREFIX + id.replace("\0", NULL_BYTE_PLACEHOLDER); -} -/** -* Undo {@link wrapId}'s `/@id/` and null byte replacements. -*/ -function unwrapId(id) { - return id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, "\0") : id; -} -const windowsSlashRE = /\\/g; -function slash(p) { - return p.replace(windowsSlashRE, "/"); -} -const postfixRE = /[?#].*$/; -function cleanUrl(url$3) { - return url$3.replace(postfixRE, ""); -} -function splitFileAndPostfix(path$13) { - const file = cleanUrl(path$13); - return { - file, - postfix: path$13.slice(file.length) - }; -} -function withTrailingSlash(path$13) { - if (path$13[path$13.length - 1] !== "/") return `${path$13}/`; - return path$13; -} -function promiseWithResolvers() { - let resolve$4; - let reject; - return { - promise: new Promise((_resolve, _reject) => { - resolve$4 = _resolve; - reject = _reject; - }), - resolve: resolve$4, - reject - }; -} - -//#endregion -//#region src/module-runner/importMetaResolver.ts -const customizationHookNamespace = "vite-module-runner:import-meta-resolve/v1/"; -const customizationHooksModule = ` - -export async function resolve(specifier, context, nextResolve) { - if (specifier.startsWith(${JSON.stringify(customizationHookNamespace)})) { - const data = specifier.slice(${JSON.stringify(customizationHookNamespace)}.length) - const [parsedSpecifier, parsedImporter] = JSON.parse(data) - specifier = parsedSpecifier - context.parentURL = parsedImporter - } - return nextResolve(specifier, context) -} - -`; -function customizationHookResolve(specifier, context, nextResolve) { - if (specifier.startsWith(customizationHookNamespace)) { - const data = specifier.slice(42); - const [parsedSpecifier, parsedImporter] = JSON.parse(data); - specifier = parsedSpecifier; - context.parentURL = parsedImporter; - } - return nextResolve(specifier, context); -} -async function createImportMetaResolver() { - let module$1; - try { - module$1 = (await import("node:module")).Module; - } catch { - return; - } - if (!module$1) return; - if (module$1.registerHooks) { - module$1.registerHooks({ resolve: customizationHookResolve }); - return importMetaResolveWithCustomHook; - } - if (!module$1.register) return; - try { - const hookModuleContent = `data:text/javascript,${encodeURI(customizationHooksModule)}`; - module$1.register(hookModuleContent); - } catch (e$1) { - if ("code" in e$1 && e$1.code === "ERR_NETWORK_IMPORT_DISALLOWED") return; - throw e$1; - } - return importMetaResolveWithCustomHook; -} -function importMetaResolveWithCustomHook(specifier, importer) { - return import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`); -} -const importMetaResolveWithCustomHookString = ` - - (() => { - const resolve = 'resolve' - return (specifier, importer) => - import.meta[resolve]( - \`${customizationHookNamespace}\${JSON.stringify([specifier, importer])}\`, - ) - })() - -`; - -//#endregion -//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs -var comma = ",".charCodeAt(0); -var semicolon = ";".charCodeAt(0); -var chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var intToChar = new Uint8Array(64); -var charToInt = new Uint8Array(128); -for (let i$1 = 0; i$1 < chars$1.length; i$1++) { - const c = chars$1.charCodeAt(i$1); - intToChar[i$1] = c; - charToInt[c] = i$1; -} -function decodeInteger(reader, relative$3) { - let value$1 = 0; - let shift = 0; - let integer = 0; - do { - integer = charToInt[reader.next()]; - value$1 |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value$1 & 1; - value$1 >>>= 1; - if (shouldNegate) value$1 = -2147483648 | -value$1; - return relative$3 + value$1; -} -function encodeInteger(builder, num, relative$3) { - let delta = num - relative$3; - delta = delta < 0 ? -delta << 1 | 1 : delta << 1; - do { - let clamped = delta & 31; - delta >>>= 5; - if (delta > 0) clamped |= 32; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; -} -function hasMoreVlq(reader, max) { - if (reader.pos >= max) return false; - return reader.peek() !== comma; -} -var bufLength = 1024 * 16; -var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) { - return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString(); -} } : { decode(buf) { - let out = ""; - for (let i$1 = 0; i$1 < buf.length; i$1++) out += String.fromCharCode(buf[i$1]); - return out; -} }; -var StringWriter = class { - constructor() { - this.pos = 0; - this.out = ""; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -}; -var StringReader = class { - constructor(buffer) { - this.pos = 0; - this.buffer = buffer; - } - next() { - return this.buffer.charCodeAt(this.pos++); - } - peek() { - return this.buffer.charCodeAt(this.pos); - } - indexOf(char) { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -}; -function decode(mappings) { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - do { - const semi = reader.indexOf(";"); - const line = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - while (reader.pos < semi) { - let seg; - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) sorted = false; - lastCol = genColumn; - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [ - genColumn, - sourcesIndex, - sourceLine, - sourceColumn, - namesIndex - ]; - } else seg = [ - genColumn, - sourcesIndex, - sourceLine, - sourceColumn - ]; - } else seg = [genColumn]; - line.push(seg); - reader.pos++; - } - if (!sorted) sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - return decoded; -} -function sort(line) { - line.sort(sortComparator$1); -} -function sortComparator$1(a, b) { - return a[0] - b[0]; -} -function encode$1(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i$1 = 0; i$1 < decoded.length; i$1++) { - const line = decoded[i$1]; - if (i$1 > 0) writer.write(semicolon); - if (line.length === 0) continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); -} - -//#endregion -//#region ../../node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs -const schemeRegex = /^[\w+.-]+:\/\//; -/** -* Matches the parts of a URL: -* 1. Scheme, including ":", guaranteed. -* 2. User/password, including "@", optional. -* 3. Host, guaranteed. -* 4. Port, including ":", optional. -* 5. Path, including "/", optional. -* 6. Query, including "?", optional. -* 7. Hash, including "#", optional. -*/ -const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; -/** -* File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start -* with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). -* -* 1. Host, optional. -* 2. Path, which may include "/", guaranteed. -* 3. Query, including "?", optional. -* 4. Hash, including "#", optional. -*/ -const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; -function isAbsoluteUrl(input) { - return schemeRegex.test(input); -} -function isSchemeRelativeUrl(input) { - return input.startsWith("//"); -} -function isAbsolutePath(input) { - return input.startsWith("/"); -} -function isFileUrl(input) { - return input.startsWith("file:"); -} -function isRelative(input) { - return /^[.?#]/.test(input); -} -function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || "", match[3], match[4] || "", match[5] || "/", match[6] || "", match[7] || ""); -} -function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path$13 = match[2]; - return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path$13) ? path$13 : "/" + path$13, match[3] || "", match[4] || ""); -} -function makeUrl(scheme, user, host, port, path$13, query, hash$1) { - return { - scheme, - user, - host, - port, - path: path$13, - query, - hash: hash$1, - type: 7 - }; -} -function parseUrl$3(input) { - if (isSchemeRelativeUrl(input)) { - const url$4 = parseAbsoluteUrl("http:" + input); - url$4.scheme = ""; - url$4.type = 6; - return url$4; - } - if (isAbsolutePath(input)) { - const url$4 = parseAbsoluteUrl("http://foo.com" + input); - url$4.scheme = ""; - url$4.host = ""; - url$4.type = 5; - return url$4; - } - if (isFileUrl(input)) return parseFileUrl(input); - if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input); - const url$3 = parseAbsoluteUrl("http://foo.com/" + input); - url$3.scheme = ""; - url$3.host = ""; - url$3.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1; - return url$3; -} -function stripPathFilename(path$13) { - if (path$13.endsWith("/..")) return path$13; - const index = path$13.lastIndexOf("/"); - return path$13.slice(0, index + 1); -} -function mergePaths(url$3, base) { - normalizePath$4(base, base.type); - if (url$3.path === "/") url$3.path = base.path; - else url$3.path = stripPathFilename(base.path) + url$3.path; -} -/** -* The path can have empty directories "//", unneeded parents "foo/..", or current directory -* "foo/.". We need to normalize to a standard representation. -*/ -function normalizePath$4(url$3, type) { - const rel = type <= 4; - const pieces = url$3.path.split("/"); - let pointer = 1; - let positive = 0; - let addTrailingSlash = false; - for (let i$1 = 1; i$1 < pieces.length; i$1++) { - const piece = pieces[i$1]; - if (!piece) { - addTrailingSlash = true; - continue; - } - addTrailingSlash = false; - if (piece === ".") continue; - if (piece === "..") { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } else if (rel) pieces[pointer++] = piece; - continue; - } - pieces[pointer++] = piece; - positive++; - } - let path$13 = ""; - for (let i$1 = 1; i$1 < pointer; i$1++) path$13 += "/" + pieces[i$1]; - if (!path$13 || addTrailingSlash && !path$13.endsWith("/..")) path$13 += "/"; - url$3.path = path$13; -} -/** -* Attempts to resolve `input` URL/path relative to `base`. -*/ -function resolve$3(input, base) { - if (!input && !base) return ""; - const url$3 = parseUrl$3(input); - let inputType = url$3.type; - if (base && inputType !== 7) { - const baseUrl = parseUrl$3(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1: url$3.hash = baseUrl.hash; - case 2: url$3.query = baseUrl.query; - case 3: - case 4: mergePaths(url$3, baseUrl); - case 5: - url$3.user = baseUrl.user; - url$3.host = baseUrl.host; - url$3.port = baseUrl.port; - case 6: url$3.scheme = baseUrl.scheme; - } - if (baseType > inputType) inputType = baseType; - } - normalizePath$4(url$3, inputType); - const queryHash = url$3.query + url$3.hash; - switch (inputType) { - case 2: - case 3: return queryHash; - case 4: { - const path$13 = url$3.path.slice(1); - if (!path$13) return queryHash || "."; - if (isRelative(base || input) && !isRelative(path$13)) return "./" + path$13 + queryHash; - return path$13 + queryHash; - } - case 5: return url$3.path + queryHash; - default: return url$3.scheme + "//" + url$3.user + url$3.host + url$3.port + url$3.path + queryHash; - } -} - -//#endregion -//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs -function stripFilename(path$13) { - if (!path$13) return ""; - const index = path$13.lastIndexOf("/"); - return path$13.slice(0, index + 1); -} -function resolver(mapUrl, sourceRoot) { - const from = stripFilename(mapUrl); - const prefix = sourceRoot ? sourceRoot + "/" : ""; - return (source) => resolve$3(prefix + (source || ""), from); -} -var COLUMN$1 = 0; -var SOURCES_INDEX$1 = 1; -var SOURCE_LINE$1 = 2; -var SOURCE_COLUMN$1 = 3; -var NAMES_INDEX$1 = 4; -function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) return mappings; - if (!owned) mappings = mappings.slice(); - for (let i$1 = unsortedIndex; i$1 < mappings.length; i$1 = nextUnsortedSegmentLine(mappings, i$1 + 1)) mappings[i$1] = sortSegments(mappings[i$1], owned); - return mappings; -} -function nextUnsortedSegmentLine(mappings, start) { - for (let i$1 = start; i$1 < mappings.length; i$1++) if (!isSorted(mappings[i$1])) return i$1; - return mappings.length; -} -function isSorted(line) { - for (let j = 1; j < line.length; j++) if (line[j][COLUMN$1] < line[j - 1][COLUMN$1]) return false; - return true; -} -function sortSegments(line, owned) { - if (!owned) line = line.slice(); - return line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[COLUMN$1] - b[COLUMN$1]; -} -var found = false; -function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + (high - low >> 1); - const cmp = haystack[mid][COLUMN$1] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) low = mid + 1; - else high = mid - 1; - } - found = false; - return low - 1; -} -function upperBound(haystack, needle, index) { - for (let i$1 = index + 1; i$1 < haystack.length; index = i$1++) if (haystack[i$1][COLUMN$1] !== needle) break; - return index; -} -function lowerBound(haystack, needle, index) { - for (let i$1 = index - 1; i$1 >= 0; index = i$1--) if (haystack[i$1][COLUMN$1] !== needle) break; - return index; -} -function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1 - }; -} -function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN$1] === needle; - return lastIndex; - } - if (needle >= lastNeedle) low = lastIndex === -1 ? 0 : lastIndex; - else high = lastIndex; - } - state.lastKey = key; - state.lastNeedle = needle; - return state.lastIndex = binarySearch(haystack, needle, low, high); -} -function parse$14(map$1) { - return typeof map$1 === "string" ? JSON.parse(map$1) : map$1; -} -var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)"; -var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)"; -var LEAST_UPPER_BOUND = -1; -var GREATEST_LOWER_BOUND = 1; -var TraceMap = class { - constructor(map$1, mapUrl) { - const isString$1 = typeof map$1 === "string"; - if (!isString$1 && map$1._decodedMemo) return map$1; - const parsed = parse$14(map$1); - const { version: version$2, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version$2; - this.file = file; - this.names = names || []; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0; - const resolve$4 = resolver(mapUrl, sourceRoot); - this.resolvedSources = sources.map(resolve$4); - const { mappings } = parsed; - if (typeof mappings === "string") { - this._encoded = mappings; - this._decoded = void 0; - } else if (Array.isArray(mappings)) { - this._encoded = void 0; - this._decoded = maybeSort(mappings, isString$1); - } else if (parsed.sections) throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); - else throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); - this._decodedMemo = memoizedState(); - this._bySources = void 0; - this._bySourceMemos = void 0; - } -}; -function cast$1(map$1) { - return map$1; -} -function encodedMappings(map$1) { - var _a, _b; - return (_b = (_a = cast$1(map$1))._encoded) != null ? _b : _a._encoded = encode$1(cast$1(map$1)._decoded); -} -function decodedMappings(map$1) { - var _a; - return (_a = cast$1(map$1))._decoded || (_a._decoded = decode(cast$1(map$1)._encoded)); -} -function traceSegment(map$1, line, column) { - const decoded = decodedMappings(map$1); - if (line >= decoded.length) return null; - const segments = decoded[line]; - const index = traceSegmentInternal(segments, cast$1(map$1)._decodedMemo, line, column, GREATEST_LOWER_BOUND); - return index === -1 ? null : segments[index]; -} -function originalPositionFor(map$1, needle) { - let { line, column, bias } = needle; - line--; - if (line < 0) throw new Error(LINE_GTR_ZERO); - if (column < 0) throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map$1); - if (line >= decoded.length) return OMapping(null, null, null, null); - const segments = decoded[line]; - const index = traceSegmentInternal(segments, cast$1(map$1)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (index === -1) return OMapping(null, null, null, null); - const segment = segments[index]; - if (segment.length === 1) return OMapping(null, null, null, null); - const { names, resolvedSources } = map$1; - return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null); -} -function decodedMap(map$1) { - return clone(map$1, decodedMappings(map$1)); -} -function encodedMap(map$1) { - return clone(map$1, encodedMappings(map$1)); -} -function clone(map$1, mappings) { - return { - version: map$1.version, - file: map$1.file, - names: map$1.names, - sourceRoot: map$1.sourceRoot, - sources: map$1.sources, - sourcesContent: map$1.sourcesContent, - mappings, - ignoreList: map$1.ignoreList || map$1.x_google_ignoreList - }; -} -function OMapping(source, line, column, name) { - return { - source, - line, - column, - name - }; -} -function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - else if (bias === LEAST_UPPER_BOUND) index++; - if (index === -1 || index === segments.length) return -1; - return index; -} - -//#endregion -//#region ../../node_modules/.pnpm/@jridgewell+gen-mapping@0.3.12/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs -var SetArray = class { - constructor() { - this._indexes = { __proto__: null }; - this.array = []; - } -}; -function cast(set) { - return set; -} -function get$2(setarr, key) { - return cast(setarr)._indexes[key]; -} -function put(setarr, key) { - const index = get$2(setarr, key); - if (index !== void 0) return index; - const { array, _indexes: indexes } = cast(setarr); - return indexes[key] = array.push(key) - 1; -} -function remove(setarr, key) { - const index = get$2(setarr, key); - if (index === void 0) return; - const { array, _indexes: indexes } = cast(setarr); - for (let i$1 = index + 1; i$1 < array.length; i$1++) { - const k = array[i$1]; - array[i$1 - 1] = k; - indexes[k]--; - } - indexes[key] = void 0; - array.pop(); -} -var COLUMN = 0; -var SOURCES_INDEX = 1; -var SOURCE_LINE = 2; -var SOURCE_COLUMN = 3; -var NAMES_INDEX = 4; -var NO_NAME = -1; -var GenMapping = class { - constructor({ file, sourceRoot } = {}) { - this._names = new SetArray(); - this._sources = new SetArray(); - this._sourcesContent = []; - this._mappings = []; - this.file = file; - this.sourceRoot = sourceRoot; - this._ignoreList = new SetArray(); - } -}; -function cast2(map$1) { - return map$1; -} -var maybeAddSegment = (map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { - return addSegmentInternal(true, map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content); -}; -function setSourceContent(map$1, source, content) { - const { _sources: sources, _sourcesContent: sourcesContent } = cast2(map$1); - const index = put(sources, source); - sourcesContent[index] = content; -} -function setIgnore(map$1, source, ignore = true) { - const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast2(map$1); - const index = put(sources, source); - if (index === sourcesContent.length) sourcesContent[index] = null; - if (ignore) put(ignoreList, index); - else remove(ignoreList, index); -} -function toDecodedMap(map$1) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast2(map$1); - removeEmptyFinalLines(mappings); - return { - version: 3, - file: map$1.file || void 0, - names: names.array, - sourceRoot: map$1.sourceRoot || void 0, - sources: sources.array, - sourcesContent, - mappings, - ignoreList: ignoreList.array - }; -} -function toEncodedMap(map$1) { - const decoded = toDecodedMap(map$1); - return Object.assign({}, decoded, { mappings: encode$1(decoded.mappings) }); -} -function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map$1); - const line = getIndex(mappings, genLine); - const index = getColumnIndex(line, genColumn); - if (!source) { - if (skipable && skipSourceless(line, index)) return; - return insert(line, index, [genColumn]); - } - assert$2(sourceLine); - assert$2(sourceColumn); - const sourcesIndex = put(sources, source); - const namesIndex = name ? put(names, name) : NO_NAME; - if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null; - if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return; - return insert(line, index, name ? [ - genColumn, - sourcesIndex, - sourceLine, - sourceColumn, - namesIndex - ] : [ - genColumn, - sourcesIndex, - sourceLine, - sourceColumn - ]); -} -function assert$2(_val) {} -function getIndex(arr, index) { - for (let i$1 = arr.length; i$1 <= index; i$1++) arr[i$1] = []; - return arr[index]; -} -function getColumnIndex(line, genColumn) { - let index = line.length; - for (let i$1 = index - 1; i$1 >= 0; index = i$1--) if (genColumn >= line[i$1][COLUMN]) break; - return index; -} -function insert(array, index, value$1) { - for (let i$1 = array.length; i$1 > index; i$1--) array[i$1] = array[i$1 - 1]; - array[index] = value$1; -} -function removeEmptyFinalLines(mappings) { - const { length } = mappings; - let len = length; - for (let i$1 = len - 1; i$1 >= 0; len = i$1, i$1--) if (mappings[i$1].length > 0) break; - if (len < length) mappings.length = len; -} -function skipSourceless(line, index) { - if (index === 0) return true; - return line[index - 1].length === 1; -} -function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { - if (index === 0) return false; - const prev = line[index - 1]; - if (prev.length === 1) return false; - return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); -} - -//#endregion -//#region ../../node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs -var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false); -var EMPTY_SOURCES = []; -function SegmentObject(source, line, column, name, content, ignore) { - return { - source, - line, - column, - name, - content, - ignore - }; -} -function Source(map$1, sources, source, content, ignore) { - return { - map: map$1, - sources, - source, - content, - ignore - }; -} -function MapSource(map$1, sources) { - return Source(map$1, sources, "", null, false); -} -function OriginalSource(source, content, ignore) { - return Source(null, EMPTY_SOURCES, source, content, ignore); -} -function traceMappings(tree) { - const gen = new GenMapping({ file: tree.map.file }); - const { sources: rootSources, map: map$1 } = tree; - const rootNames = map$1.names; - const rootMappings = decodedMappings(map$1); - for (let i$1 = 0; i$1 < rootMappings.length; i$1++) { - const segments = rootMappings[i$1]; - for (let j = 0; j < segments.length; j++) { - const segment = segments[j]; - const genCol = segment[0]; - let traced = SOURCELESS_MAPPING; - if (segment.length !== 1) { - const source2 = rootSources[segment[1]]; - traced = originalPositionFor$1(source2, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ""); - if (traced == null) continue; - } - const { column, line, name, content, source, ignore } = traced; - maybeAddSegment(gen, i$1, genCol, source, line, column, name); - if (source && content != null) setSourceContent(gen, source, content); - if (ignore) setIgnore(gen, source, true); - } - } - return gen; -} -function originalPositionFor$1(source, line, column, name) { - if (!source.map) return SegmentObject(source.source, line, column, name, source.content, source.ignore); - const segment = traceSegment(source.map, line, column); - if (segment == null) return null; - if (segment.length === 1) return SOURCELESS_MAPPING; - return originalPositionFor$1(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); -} -function asArray(value$1) { - if (Array.isArray(value$1)) return value$1; - return [value$1]; -} -function buildSourceMapTree(input, loader$1) { - const maps = asArray(input).map((m) => new TraceMap(m, "")); - const map$1 = maps.pop(); - for (let i$1 = 0; i$1 < maps.length; i$1++) if (maps[i$1].sources.length > 1) throw new Error(`Transformation map ${i$1} must have exactly one source file. -Did you specify these with the most recent transformation maps first?`); - let tree = build$2(map$1, loader$1, "", 0); - for (let i$1 = maps.length - 1; i$1 >= 0; i$1--) tree = MapSource(maps[i$1], [tree]); - return tree; -} -function build$2(map$1, loader$1, importer, importerDepth) { - const { resolvedSources, sourcesContent, ignoreList } = map$1; - const depth = importerDepth + 1; - return MapSource(map$1, resolvedSources.map((sourceFile, i$1) => { - const ctx = { - importer, - depth, - source: sourceFile || "", - content: void 0, - ignore: void 0 - }; - const sourceMap = loader$1(ctx.source, ctx); - const { source, content, ignore } = ctx; - if (sourceMap) return build$2(new TraceMap(sourceMap, source), loader$1, source, depth); - return OriginalSource(source, content !== void 0 ? content : sourcesContent ? sourcesContent[i$1] : null, ignore !== void 0 ? ignore : ignoreList ? ignoreList.includes(i$1) : false); - })); -} -var SourceMap$1 = class { - constructor(map$1, options$1) { - const out = options$1.decodedMappings ? toDecodedMap(map$1) : toEncodedMap(map$1); - this.version = out.version; - this.file = out.file; - this.mappings = out.mappings; - this.names = out.names; - this.ignoreList = out.ignoreList; - this.sourceRoot = out.sourceRoot; - this.sources = out.sources; - if (!options$1.excludeContent) this.sourcesContent = out.sourcesContent; - } - toString() { - return JSON.stringify(this); - } -}; -function remapping(input, loader$1, options$1) { - const opts = typeof options$1 === "object" ? options$1 : { - excludeContent: !!options$1, - decodedMappings: false - }; - return new SourceMap$1(traceMappings(buildSourceMapTree(input, loader$1)), opts); -} - -//#endregion -//#region ../../node_modules/.pnpm/obug@1.0.2_ms@2.1.3/node_modules/obug/dist/core.js -function coerce(value$1) { - if (value$1 instanceof Error) return value$1.stack || value$1.message; - return value$1; -} -function selectColor(colors$36, namespace) { - let hash$1 = 0; - for (let i$1 = 0; i$1 < namespace.length; i$1++) { - hash$1 = (hash$1 << 5) - hash$1 + namespace.charCodeAt(i$1); - hash$1 |= 0; - } - return colors$36[Math.abs(hash$1) % colors$36.length]; -} -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] === "*")) if (template[templateIndex] === "*") { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; - } else { - searchIndex++; - templateIndex++; - } - else if (starIndex !== -1) { - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else return false; - while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++; - return templateIndex === template.length; -} -function humanize(value$1) { - if (value$1 >= 1e3) return `${(value$1 / 1e3).toFixed(1)}s`; - return `${value$1}ms`; -} -function setup(useColors$1, colors$36, log$3, load$2, save$1, formatArgs$1, init$2) { - const createDebug$1 = (namespace) => { - let prevTime; - let enableOverride; - let namespacesCache; - let enabledCache; - const debug$18 = (...args) => { - if (!debug$18.enabled) return; - const curr = Date.now(); - debug$18.diff = curr - (prevTime || curr); - debug$18.prev = prevTime; - debug$18.curr = curr; - prevTime = curr; - args[0] = coerce(args[0]); - if (typeof args[0] !== "string") args.unshift("%O"); - let index = 0; - args[0] = args[0].replace(/%([a-z%])/gi, (match, format$3) => { - if (match === "%%") return "%"; - index++; - const formatter = createDebug$1.formatters[format$3]; - if (typeof formatter === "function") { - const value$1 = args[index]; - match = formatter.call(debug$18, value$1); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug$1.formatArgs.call(debug$18, args); - (debug$18.log || createDebug$1.log).apply(debug$18, args); - }; - function extend(namespace$1, delimiter = ":") { - const newDebug = createDebug$1(this.namespace + delimiter + namespace$1); - newDebug.log = this.log; - return newDebug; - } - debug$18.namespace = namespace; - debug$18.useColors = useColors$1; - debug$18.color = selectColor(colors$36, namespace); - debug$18.extend = extend; - debug$18.log = log$3; - Object.defineProperty(debug$18, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride != null) return enableOverride; - if (namespacesCache !== createDebug$1.namespaces) { - namespacesCache = createDebug$1.namespaces; - enabledCache = createDebug$1.enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - init$2 && init$2(debug$18); - return debug$18; - }; - function enable(namespaces) { - save$1(namespaces); - createDebug$1.namespaces = namespaces; - createDebug$1.names = []; - createDebug$1.skips = []; - const split = namespaces.trim().replace(/\s+/g, ",").split(",").filter(Boolean); - for (const ns of split) if (ns[0] === "-") createDebug$1.skips.push(ns.slice(1)); - else createDebug$1.names.push(ns); - } - function disable() { - const namespaces = [...createDebug$1.names, ...createDebug$1.skips.map((namespace) => `-${namespace}`)].join(","); - createDebug$1.enable(""); - return namespaces; - } - function enabled(name) { - for (const skip of createDebug$1.skips) if (matchesTemplate(name, skip)) return false; - for (const ns of createDebug$1.names) if (matchesTemplate(name, ns)) return true; - return false; - } - createDebug$1.namespaces = ""; - createDebug$1.formatters = {}; - createDebug$1.enable = enable; - createDebug$1.disable = disable; - createDebug$1.enabled = enabled; - createDebug$1.names = []; - createDebug$1.skips = []; - createDebug$1.selectColor = (ns) => selectColor(colors$36, ns); - createDebug$1.formatArgs = formatArgs$1; - createDebug$1.log = log$3; - createDebug$1.enable(load$2()); - return createDebug$1; -} -var init_core = __esmMin((() => {})); - -//#endregion -//#region ../../node_modules/.pnpm/obug@1.0.2_ms@2.1.3/node_modules/obug/dist/node.js -var node_exports = /* @__PURE__ */ __export({ - createDebug: () => createDebug, - default: () => node_default, - formatArgs: () => formatArgs, - log: () => log$2, - "module.exports": () => createDebug -}); -function log$2(...args) { - process.stderr.write(`${formatWithOptions(inspectOpts, ...args)}\n`); -} -function load$1() { - return process.env.DEBUG || ""; -} -function save(namespaces) { - if (namespaces) process.env.DEBUG = namespaces; - else delete process.env.DEBUG; -} -function useColors() { - return "colors" in inspectOpts ? Boolean(inspectOpts.colors) : isatty(process.stderr.fd); -} -function formatArgs(args) { - const { namespace: name, useColors: useColors$1 } = this; - if (useColors$1) { - 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+${humanize$1(this.diff)}\u001B[0m`); - } else args[0] = `${getDate()}${name} ${args[0]}`; -} -function getDate() { - if (inspectOpts.hideDate) return ""; - return `${(/* @__PURE__ */ new Date()).toISOString()} `; -} -function init$1(debug$18) { - debug$18.inspectOpts = Object.assign({}, inspectOpts); -} -var require$1, colors$35, inspectOpts, humanize$1, createDebug, node_default; -var init_node = __esmMin((() => { - init_core(); - require$1 = createRequire(import.meta.url); - colors$35 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [ - 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 - ] : [ - 6, - 2, - 3, - 4, - 5, - 1 - ]; - inspectOpts = Object.keys(process.env).filter((key) => { - return /^debug_/i.test(key); - }).reduce((obj, key) => { - const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_, k) => k.toUpperCase()); - let value$1 = process.env[key]; - if (value$1 === "null") value$1 = null; - else if (/^yes|on|true|enabled$/i.test(value$1)) value$1 = true; - else if (/^no|off|false|disabled$/i.test(value$1)) value$1 = false; - else value$1 = Number(value$1); - obj[prop] = value$1; - return obj; - }, {}); - ; - try { - humanize$1 = require$1("ms"); - } catch (_unused) { - humanize$1 = humanize; - } - createDebug = setup(useColors(), colors$35, log$2, load$1, save, formatArgs, init$1); - createDebug.inspectOpts = inspectOpts; - createDebug.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); - }; - createDebug.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return inspect(v, this.inspectOpts); - }; - node_default = createDebug; - createDebug.default = createDebug; - createDebug.debug = createDebug; -})); - -//#endregion -//#region ../../node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef {{ -skip: () => void; -remove: () => void; -replace: (node: BaseNode) => void; -}} WalkerContext */ -var WalkerBase$1 = class { - constructor() { - /** @type {boolean} */ - this.should_skip = false; - /** @type {boolean} */ - this.should_remove = false; - /** @type {BaseNode | null} */ - this.replacement = null; - /** @type {WalkerContext} */ - this.context = { - skip: () => this.should_skip = true, - remove: () => this.should_remove = true, - replace: (node) => this.replacement = node - }; - } - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - * @param {BaseNode} node - */ - replace(parent, prop, index, node) { - if (parent) if (index !== null) parent[prop][index] = node; - else parent[prop] = node; - } - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - */ - remove(parent, prop, index) { - if (parent) if (index !== null) parent[prop].splice(index, 1); - else delete parent[prop]; - } -}; -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ -/** @typedef {( -* this: WalkerContext, -* node: BaseNode, -* parent: BaseNode, -* key: string, -* index: number -* ) => void} SyncHandler */ -var SyncWalker$1 = class extends WalkerBase$1 { - /** - * - * @param {SyncHandler} enter - * @param {SyncHandler} leave - */ - constructor(enter, leave) { - super(); - /** @type {SyncHandler} */ - this.enter = enter; - /** @type {SyncHandler} */ - this.leave = leave; - } - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {BaseNode} - */ - visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - this.enter.call(this.context, node, parent, prop, index); - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - if (this.should_remove) this.remove(parent, prop, index); - const skipped = this.should_skip; - const removed = this.should_remove; - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.replacement = _replacement; - if (skipped) return node; - if (removed) return null; - } - for (const key in node) { - const value$1 = node[key]; - if (typeof value$1 !== "object") continue; - else if (Array.isArray(value$1)) { - for (let i$1 = 0; i$1 < value$1.length; i$1 += 1) if (value$1[i$1] !== null && typeof value$1[i$1].type === "string") { - if (!this.visit(value$1[i$1], node, key, i$1)) i$1--; - } - } else if (value$1 !== null && typeof value$1.type === "string") this.visit(value$1, node, key, null); - } - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - this.leave.call(this.context, node, parent, prop, index); - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - if (this.should_remove) this.remove(parent, prop, index); - const removed = this.should_remove; - this.replacement = _replacement; - this.should_remove = _should_remove; - if (removed) return null; - } - } - return node; - } -}; -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ -/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ -/** -* -* @param {BaseNode} ast -* @param {{ -* enter?: SyncHandler -* leave?: SyncHandler -* }} walker -* @returns {BaseNode} -*/ -function walk$2(ast, { enter, leave }) { - return new SyncWalker$1(enter, leave).visit(ast, null); -} - -//#endregion -//#region ../../node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.43.0/node_modules/@rollup/pluginutils/dist/es/index.js -const extractors = { - ArrayPattern(names, param) { - for (const element of param.elements) if (element) extractors[element.type](names, element); - }, - AssignmentPattern(names, param) { - extractors[param.left.type](names, param.left); - }, - Identifier(names, param) { - names.push(param.name); - }, - MemberExpression() {}, - ObjectPattern(names, param) { - for (const prop of param.properties) if (prop.type === "RestElement") extractors.RestElement(names, prop); - else extractors[prop.value.type](names, prop.value); - }, - RestElement(names, param) { - extractors[param.argument.type](names, param.argument); - } -}; -const extractAssignedNames = function extractAssignedNames$1(param) { - const names = []; - extractors[param.type](names, param); - return names; -}; -const blockDeclarations = { - const: true, - let: true -}; -var Scope = class { - constructor(options$1 = {}) { - this.parent = options$1.parent; - this.isBlockScope = !!options$1.block; - this.declarations = Object.create(null); - if (options$1.params) options$1.params.forEach((param) => { - extractAssignedNames(param).forEach((name) => { - this.declarations[name] = true; - }); - }); - } - addDeclaration(node, isBlockDeclaration, isVar) { - if (!isBlockDeclaration && this.isBlockScope) this.parent.addDeclaration(node, isBlockDeclaration, isVar); - else if (node.id) extractAssignedNames(node.id).forEach((name) => { - this.declarations[name] = true; - }); - } - contains(name) { - return this.declarations[name] || (this.parent ? this.parent.contains(name) : false); - } -}; -const attachScopes = function attachScopes$1(ast, propertyName = "scope") { - let scope = new Scope(); - walk$2(ast, { - enter(n$2, parent) { - const node = n$2; - if (/(?:Function|Class)Declaration/.test(node.type)) scope.addDeclaration(node, false, false); - if (node.type === "VariableDeclaration") { - const { kind } = node; - const isBlockDeclaration = blockDeclarations[kind]; - node.declarations.forEach((declaration) => { - scope.addDeclaration(declaration, isBlockDeclaration, true); - }); - } - let newScope; - if (node.type.includes("Function")) { - const func = node; - newScope = new Scope({ - parent: scope, - block: false, - params: func.params - }); - if (func.type === "FunctionExpression" && func.id) newScope.addDeclaration(func, false, false); - } - if (/For(?:In|Of)?Statement/.test(node.type)) newScope = new Scope({ - parent: scope, - block: true - }); - if (node.type === "BlockStatement" && !parent.type.includes("Function")) newScope = new Scope({ - parent: scope, - block: true - }); - if (node.type === "CatchClause") newScope = new Scope({ - parent: scope, - params: node.param ? [node.param] : [], - block: true - }); - if (newScope) { - Object.defineProperty(node, propertyName, { - value: newScope, - configurable: true - }); - scope = newScope; - } - }, - leave(n$2) { - if (n$2[propertyName]) scope = scope.parent; - } - }); - return scope; -}; -function isArray(arg) { - return Array.isArray(arg); -} -function ensureArray(thing) { - if (isArray(thing)) return thing; - if (thing == null) return []; - return [thing]; -} -const normalizePathRegExp = new RegExp(`\\${win32.sep}`, "g"); -const normalizePath$3 = function normalizePath$5(filename) { - return filename.replace(normalizePathRegExp, posix$1.sep); -}; -function getMatcherString$1(id, resolutionBase) { - if (resolutionBase === false || isAbsolute$1(id) || id.startsWith("**")) return normalizePath$3(id); - const basePath = normalizePath$3(resolve$1(resolutionBase || "")).replace(/[-^$*+?.()|[\]{}]/g, "\\$&"); - return posix$1.join(basePath, normalizePath$3(id)); -} -const createFilter$2 = function createFilter$3(include, exclude, options$1) { - const resolutionBase = options$1 && options$1.resolve; - const getMatcher = (id) => id instanceof RegExp ? id : { test: (what) => { - return picomatch(getMatcherString$1(id, resolutionBase), { dot: true })(what); - } }; - const includeMatchers = ensureArray(include).map(getMatcher); - const excludeMatchers = ensureArray(exclude).map(getMatcher); - if (!includeMatchers.length && !excludeMatchers.length) return (id) => typeof id === "string" && !id.includes("\0"); - return function result(id) { - if (typeof id !== "string") return false; - if (id.includes("\0")) return false; - const pathId = normalizePath$3(id); - for (let i$1 = 0; i$1 < excludeMatchers.length; ++i$1) { - const matcher = excludeMatchers[i$1]; - if (matcher instanceof RegExp) matcher.lastIndex = 0; - if (matcher.test(pathId)) return false; - } - for (let i$1 = 0; i$1 < includeMatchers.length; ++i$1) { - const matcher = includeMatchers[i$1]; - if (matcher instanceof RegExp) matcher.lastIndex = 0; - if (matcher.test(pathId)) return true; - } - return !includeMatchers.length; - }; -}; -const forbiddenIdentifiers = new Set(`break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl`.split(" ")); -forbiddenIdentifiers.add(""); -const makeLegalIdentifier = function makeLegalIdentifier$1(str) { - let identifier = str.replace(/-(\w)/g, (_, letter) => letter.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g, "_"); - if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) identifier = `_${identifier}`; - return identifier || "_"; -}; -function stringify$4(obj) { - return (JSON.stringify(obj) || "undefined").replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`); -} -function serializeArray(arr, indent, baseIndent) { - let output = "["; - const separator = indent ? `\n${baseIndent}${indent}` : ""; - for (let i$1 = 0; i$1 < arr.length; i$1++) { - const key = arr[i$1]; - output += `${i$1 > 0 ? "," : ""}${separator}${serialize(key, indent, baseIndent + indent)}`; - } - return `${output}${indent ? `\n${baseIndent}` : ""}]`; -} -function serializeObject(obj, indent, baseIndent) { - let output = "{"; - const separator = indent ? `\n${baseIndent}${indent}` : ""; - const entries = Object.entries(obj); - for (let i$1 = 0; i$1 < entries.length; i$1++) { - const [key, value$1] = entries[i$1]; - const stringKey = makeLegalIdentifier(key) === key ? key : stringify$4(key); - output += `${i$1 > 0 ? "," : ""}${separator}${stringKey}:${indent ? " " : ""}${serialize(value$1, indent, baseIndent + indent)}`; - } - return `${output}${indent ? `\n${baseIndent}` : ""}}`; -} -function serialize(obj, indent, baseIndent) { - if (typeof obj === "object" && obj !== null) { - if (Array.isArray(obj)) return serializeArray(obj, indent, baseIndent); - if (obj instanceof Date) return `new Date(${obj.getTime()})`; - if (obj instanceof RegExp) return obj.toString(); - return serializeObject(obj, indent, baseIndent); - } - if (typeof obj === "number") { - if (obj === Infinity) return "Infinity"; - if (obj === -Infinity) return "-Infinity"; - if (obj === 0) return 1 / obj === Infinity ? "0" : "-0"; - if (obj !== obj) return "NaN"; - } - if (typeof obj === "symbol") { - const key = Symbol.keyFor(obj); - if (key !== void 0) return `Symbol.for(${stringify$4(key)})`; - } - if (typeof obj === "bigint") return `${obj}n`; - return stringify$4(obj); -} -const hasStringIsWellFormed = "isWellFormed" in String.prototype; -function isWellFormedString(input) { - if (hasStringIsWellFormed) return input.isWellFormed(); - return !/\p{Surrogate}/u.test(input); -} -const dataToEsm = function dataToEsm$1(data, options$1 = {}) { - var _a, _b; - const t$1 = options$1.compact ? "" : "indent" in options$1 ? options$1.indent : " "; - const _ = options$1.compact ? "" : " "; - const n$2 = options$1.compact ? "" : "\n"; - const declarationType = options$1.preferConst ? "const" : "var"; - if (options$1.namedExports === false || typeof data !== "object" || Array.isArray(data) || data instanceof Date || data instanceof RegExp || data === null) { - const code = serialize(data, options$1.compact ? null : t$1, ""); - return `export default${_ || (/^[{[\-\/]/.test(code) ? "" : " ")}${code};`; - } - let maxUnderbarPrefixLength = 0; - for (const key of Object.keys(data)) { - const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a === void 0 ? void 0 : _a[0].length) !== null && _b !== void 0 ? _b : 0; - if (underbarPrefixLength > maxUnderbarPrefixLength) maxUnderbarPrefixLength = underbarPrefixLength; - } - const arbitraryNamePrefix = `${"_".repeat(maxUnderbarPrefixLength + 1)}arbitrary`; - let namedExportCode = ""; - const defaultExportRows = []; - const arbitraryNameExportRows = []; - for (const [key, value$1] of Object.entries(data)) if (key === makeLegalIdentifier(key)) { - if (options$1.objectShorthand) defaultExportRows.push(key); - else defaultExportRows.push(`${key}:${_}${key}`); - namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value$1, options$1.compact ? null : t$1, "")};${n$2}`; - } else { - defaultExportRows.push(`${stringify$4(key)}:${_}${serialize(value$1, options$1.compact ? null : t$1, "")}`); - if (options$1.includeArbitraryNames && isWellFormedString(key)) { - const variableName = `${arbitraryNamePrefix}${arbitraryNameExportRows.length}`; - namedExportCode += `${declarationType} ${variableName}${_}=${_}${serialize(value$1, options$1.compact ? null : t$1, "")};${n$2}`; - arbitraryNameExportRows.push(`${variableName} as ${JSON.stringify(key)}`); - } - } - const arbitraryExportCode = arbitraryNameExportRows.length > 0 ? `export${_}{${n$2}${t$1}${arbitraryNameExportRows.join(`,${n$2}${t$1}`)}${n$2}};${n$2}` : ""; - const defaultExportCode = `export default${_}{${n$2}${t$1}${defaultExportRows.join(`,${n$2}${t$1}`)}${n$2}};${n$2}`; - return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`; -}; - -//#endregion -//#region src/shared/builtin.ts -function createIsBuiltin(builtins) { - const plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin === "string")); - const regexBuiltins = builtins.filter((builtin) => typeof builtin !== "string"); - return (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id)); -} - -//#endregion -//#region src/node/packages.ts -let pnp; -if (process.versions.pnp) try { - pnp = createRequire( - /** #__KEEP__ */ - import.meta.url - )("pnpapi"); -} catch {} -function invalidatePackageData(packageCache, pkgPath) { - const pkgDir = normalizePath(path.dirname(pkgPath)); - packageCache.forEach((pkg, cacheKey) => { - if (pkg.dir === pkgDir) packageCache.delete(cacheKey); - }); -} -function resolvePackageData(pkgName, basedir, preserveSymlinks = false, packageCache) { - if (pnp) { - const cacheKey = getRpdCacheKey(pkgName, basedir, preserveSymlinks); - if (packageCache?.has(cacheKey)) return packageCache.get(cacheKey); - try { - const pkg = pnp.resolveToUnqualified(pkgName, basedir, { considerBuiltins: false }); - if (!pkg) return null; - const pkgData = loadPackageData(path.join(pkg, "package.json")); - packageCache?.set(cacheKey, pkgData); - return pkgData; - } catch { - return null; - } - } - const originalBasedir = basedir; - while (basedir) { - if (packageCache) { - const cached = getRpdCache(packageCache, pkgName, basedir, originalBasedir, preserveSymlinks); - if (cached) return cached; - } - const pkg = path.join(basedir, "node_modules", pkgName, "package.json"); - try { - if (fs.existsSync(pkg)) { - const pkgData = loadPackageData(preserveSymlinks ? pkg : safeRealpathSync(pkg)); - if (packageCache) setRpdCache(packageCache, pkgData, pkgName, basedir, originalBasedir, preserveSymlinks); - return pkgData; - } - } catch {} - const nextBasedir = path.dirname(basedir); - if (nextBasedir === basedir) break; - basedir = nextBasedir; - } - return null; -} -function findNearestPackageData(basedir, packageCache) { - const originalBasedir = basedir; - while (basedir) { - if (packageCache) { - const cached = getFnpdCache(packageCache, basedir, originalBasedir); - if (cached) return cached; - } - const pkgPath = path.join(basedir, "package.json"); - if (tryStatSync(pkgPath)?.isFile()) try { - const pkgData = loadPackageData(pkgPath); - if (packageCache) setFnpdCache(packageCache, pkgData, basedir, originalBasedir); - return pkgData; - } catch {} - const nextBasedir = path.dirname(basedir); - if (nextBasedir === basedir) break; - basedir = nextBasedir; - } - return null; -} -function findNearestMainPackageData(basedir, packageCache) { - const nearestPackage = findNearestPackageData(basedir, packageCache); - return nearestPackage && (nearestPackage.data.name ? nearestPackage : findNearestMainPackageData(path.dirname(nearestPackage.dir), packageCache)); -} -function loadPackageData(pkgPath) { - const data = JSON.parse(stripBomTag(fs.readFileSync(pkgPath, "utf-8"))); - const pkgDir = normalizePath(path.dirname(pkgPath)); - const { sideEffects } = data; - let hasSideEffects; - if (typeof sideEffects === "boolean") hasSideEffects = () => sideEffects; - else if (Array.isArray(sideEffects)) if (sideEffects.length <= 0) hasSideEffects = () => false; - else hasSideEffects = createFilter(sideEffects.map((sideEffect) => { - if (sideEffect.includes("/")) return sideEffect; - return `**/${sideEffect}`; - }), null, { resolve: pkgDir }); - else hasSideEffects = () => null; - const resolvedCache = {}; - return { - dir: pkgDir, - data, - hasSideEffects, - setResolvedCache(key, entry, options$1) { - resolvedCache[getResolveCacheKey(key, options$1)] = entry; - }, - getResolvedCache(key, options$1) { - return resolvedCache[getResolveCacheKey(key, options$1)]; - } - }; -} -function getResolveCacheKey(key, options$1) { - return [ - key, - options$1.isRequire ? "1" : "0", - options$1.conditions.join("_"), - options$1.extensions.join("_"), - options$1.mainFields.join("_") - ].join("|"); -} -function findNearestNodeModules(basedir) { - while (basedir) { - const pkgPath = path.join(basedir, "node_modules"); - if (tryStatSync(pkgPath)?.isDirectory()) return pkgPath; - const nextBasedir = path.dirname(basedir); - if (nextBasedir === basedir) break; - basedir = nextBasedir; - } - return null; -} -function watchPackageDataPlugin(packageCache) { - const watchQueue = /* @__PURE__ */ new Set(); - const watchedDirs = /* @__PURE__ */ new Set(); - const watchFileStub = (id) => { - watchQueue.add(id); - }; - let watchFile = watchFileStub; - const setPackageData = packageCache.set.bind(packageCache); - packageCache.set = (id, pkg) => { - if (!isInNodeModules(pkg.dir) && !watchedDirs.has(pkg.dir)) { - watchedDirs.add(pkg.dir); - watchFile(path.join(pkg.dir, "package.json")); - } - return setPackageData(id, pkg); - }; - return { - name: "vite:watch-package-data", - buildStart() { - watchFile = this.addWatchFile.bind(this); - watchQueue.forEach(watchFile); - watchQueue.clear(); - }, - buildEnd() { - watchFile = watchFileStub; - }, - watchChange(id) { - if (id.endsWith("/package.json")) invalidatePackageData(packageCache, path.normalize(id)); - } - }; -} -/** -* Get cached `resolvePackageData` value based on `basedir`. When one is found, -* and we've already traversed some directories between `basedir` and `originalBasedir`, -* we cache the value for those in-between directories as well. -* -* This makes it so the fs is only read once for a shared `basedir`. -*/ -function getRpdCache(packageCache, pkgName, basedir, originalBasedir, preserveSymlinks) { - const cacheKey = getRpdCacheKey(pkgName, basedir, preserveSymlinks); - const pkgData = packageCache.get(cacheKey); - if (pkgData) { - traverseBetweenDirs(originalBasedir, basedir, (dir) => { - packageCache.set(getRpdCacheKey(pkgName, dir, preserveSymlinks), pkgData); - }); - return pkgData; - } -} -function setRpdCache(packageCache, pkgData, pkgName, basedir, originalBasedir, preserveSymlinks) { - packageCache.set(getRpdCacheKey(pkgName, basedir, preserveSymlinks), pkgData); - traverseBetweenDirs(originalBasedir, basedir, (dir) => { - packageCache.set(getRpdCacheKey(pkgName, dir, preserveSymlinks), pkgData); - }); -} -function getRpdCacheKey(pkgName, basedir, preserveSymlinks) { - return `rpd_${pkgName}_${basedir}_${preserveSymlinks}`; -} -/** -* Get cached `findNearestPackageData` value based on `basedir`. When one is found, -* and we've already traversed some directories between `basedir` and `originalBasedir`, -* we cache the value for those in-between directories as well. -* -* This makes it so the fs is only read once for a shared `basedir`. -*/ -function getFnpdCache(packageCache, basedir, originalBasedir) { - const cacheKey = getFnpdCacheKey(basedir); - const pkgData = packageCache.get(cacheKey); - if (pkgData) { - traverseBetweenDirs(originalBasedir, basedir, (dir) => { - packageCache.set(getFnpdCacheKey(dir), pkgData); - }); - return pkgData; - } -} -function setFnpdCache(packageCache, pkgData, basedir, originalBasedir) { - packageCache.set(getFnpdCacheKey(basedir), pkgData); - traverseBetweenDirs(originalBasedir, basedir, (dir) => { - packageCache.set(getFnpdCacheKey(dir), pkgData); - }); -} -function getFnpdCacheKey(basedir) { - return `fnpd_${basedir}`; -} -/** -* Traverse between `longerDir` (inclusive) and `shorterDir` (exclusive) and call `cb` for each dir. -* @param longerDir Longer dir path, e.g. `/User/foo/bar/baz` -* @param shorterDir Shorter dir path, e.g. `/User/foo` -*/ -function traverseBetweenDirs(longerDir, shorterDir, cb) { - while (longerDir !== shorterDir) { - cb(longerDir); - longerDir = path.dirname(longerDir); - } -} - -//#endregion -//#region src/node/utils.ts -var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1); -init_node(); -const createFilter = createFilter$2; -const replaceSlashOrColonRE = /[/:]/g; -const replaceDotRE = /\./g; -const replaceNestedIdRE = /\s*>\s*/g; -const replaceHashRE = /#/g; -const flattenId = (id) => { - return limitFlattenIdLength(id.replace(replaceSlashOrColonRE, "_").replace(replaceDotRE, "__").replace(replaceNestedIdRE, "___").replace(replaceHashRE, "____")); -}; -const FLATTEN_ID_HASH_LENGTH = 8; -const FLATTEN_ID_MAX_FILE_LENGTH = 170; -const limitFlattenIdLength = (id, limit = FLATTEN_ID_MAX_FILE_LENGTH) => { - if (id.length <= limit) return id; - return id.slice(0, limit - (FLATTEN_ID_HASH_LENGTH + 1)) + "_" + getHash(id); -}; -const normalizeId = (id) => id.replace(replaceNestedIdRE, " > "); -const NODE_BUILTIN_NAMESPACE = "node:"; -const BUN_BUILTIN_NAMESPACE = "bun:"; -const nodeBuiltins = builtinModules.filter((id) => !id.includes(":")); -const isBuiltinCache = /* @__PURE__ */ new WeakMap(); -function isBuiltin(builtins, id) { - let isBuiltin$1 = isBuiltinCache.get(builtins); - if (!isBuiltin$1) { - isBuiltin$1 = createIsBuiltin(builtins); - isBuiltinCache.set(builtins, isBuiltin$1); - } - return isBuiltin$1(id); -} -const nodeLikeBuiltins = [ - ...nodeBuiltins, - /* @__PURE__ */ new RegExp(`^${NODE_BUILTIN_NAMESPACE}`), - /* @__PURE__ */ new RegExp(`^${BUN_BUILTIN_NAMESPACE}`) -]; -function isNodeLikeBuiltin(id) { - return isBuiltin(nodeLikeBuiltins, id); -} -function isNodeBuiltin(id) { - if (id.startsWith(NODE_BUILTIN_NAMESPACE)) return true; - return nodeBuiltins.includes(id); -} -function isInNodeModules(id) { - return id.includes("node_modules"); -} -function moduleListContains(moduleList, id) { - return moduleList?.some((m) => m === id || id.startsWith(withTrailingSlash(m))); -} -function isOptimizable(id, optimizeDeps$1) { - const { extensions: extensions$1 } = optimizeDeps$1; - return OPTIMIZABLE_ENTRY_RE.test(id) || (extensions$1?.some((ext) => id.endsWith(ext)) ?? false); -} -const bareImportRE = /^(?![a-zA-Z]:)[\w@](?!.*:\/\/)/; -const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//; -const _dirname = path.dirname(fileURLToPath( - /** #__KEEP__ */ - import.meta.url -)); -const rollupVersion = resolvePackageData("rollup", _dirname, true)?.data.version ?? ""; -const filter = process.env.VITE_DEBUG_FILTER; -const DEBUG = process.env.DEBUG; -function createDebugger(namespace, options$1 = {}) { - const log$3 = node_default(namespace); - const { onlyWhenFocused, depth } = options$1; - if (depth && log$3.inspectOpts && log$3.inspectOpts.depth == null) log$3.inspectOpts.depth = options$1.depth; - let enabled = log$3.enabled; - if (enabled && onlyWhenFocused) enabled = !!DEBUG?.includes(typeof onlyWhenFocused === "string" ? onlyWhenFocused : namespace); - if (enabled) return (...args) => { - if (!filter || args.some((a) => a?.includes?.(filter))) log$3(...args); - }; -} -function testCaseInsensitiveFS() { - if (!CLIENT_ENTRY.endsWith("client.mjs")) throw new Error(`cannot test case insensitive FS, CLIENT_ENTRY const doesn't contain client.mjs`); - if (!fs.existsSync(CLIENT_ENTRY)) throw new Error("cannot test case insensitive FS, CLIENT_ENTRY does not point to an existing file: " + CLIENT_ENTRY); - return fs.existsSync(CLIENT_ENTRY.replace("client.mjs", "cLiEnT.mjs")); -} -const isCaseInsensitiveFS = testCaseInsensitiveFS(); -const VOLUME_RE = /^[A-Z]:/i; -function normalizePath(id) { - return path.posix.normalize(isWindows ? slash(id) : id); -} -function fsPathFromId(id) { - const fsPath = normalizePath(id.startsWith(FS_PREFIX) ? id.slice(FS_PREFIX.length) : id); - return fsPath[0] === "/" || VOLUME_RE.test(fsPath) ? fsPath : `/${fsPath}`; -} -function fsPathFromUrl(url$3) { - return fsPathFromId(cleanUrl(url$3)); -} -/** -* Check if dir is a parent of file -* -* Warning: parameters are not validated, only works with normalized absolute paths -* -* @param dir - normalized absolute path -* @param file - normalized absolute path -* @returns true if dir is a parent of file -*/ -function isParentDirectory(dir, file) { - dir = withTrailingSlash(dir); - return file.startsWith(dir) || isCaseInsensitiveFS && file.toLowerCase().startsWith(dir.toLowerCase()); -} -/** -* Check if 2 file name are identical -* -* Warning: parameters are not validated, only works with normalized absolute paths -* -* @param file1 - normalized absolute path -* @param file2 - normalized absolute path -* @returns true if both files url are identical -*/ -function isSameFilePath(file1, file2) { - return file1 === file2 || isCaseInsensitiveFS && file1.toLowerCase() === file2.toLowerCase(); -} -const externalRE = /^([a-z]+:)?\/\//; -const isExternalUrl = (url$3) => externalRE.test(url$3); -const dataUrlRE = /^\s*data:/i; -const isDataUrl = (url$3) => dataUrlRE.test(url$3); -const virtualModuleRE = /^virtual-module:.*/; -const virtualModulePrefix = "virtual-module:"; -const knownJsSrcRE = /\.(?:[jt]sx?|m[jt]s|vue|marko|svelte|astro|imba|mdx)(?:$|\?)/; -const isJSRequest = (url$3) => { - url$3 = cleanUrl(url$3); - if (knownJsSrcRE.test(url$3)) return true; - if (!path.extname(url$3) && url$3[url$3.length - 1] !== "/") return true; - return false; -}; -const isCSSRequest = (request) => CSS_LANGS_RE.test(request); -const importQueryRE = /(\?|&)import=?(?:&|$)/; -const directRequestRE$1 = /(\?|&)direct=?(?:&|$)/; -const internalPrefixes = [ - FS_PREFIX, - VALID_ID_PREFIX, - CLIENT_PUBLIC_PATH, - ENV_PUBLIC_PATH -]; -const InternalPrefixRE = /* @__PURE__ */ new RegExp(`^(?:${internalPrefixes.join("|")})`); -const trailingSeparatorRE = /[?&]$/; -const isImportRequest = (url$3) => importQueryRE.test(url$3); -const isInternalRequest = (url$3) => InternalPrefixRE.test(url$3); -function removeImportQuery(url$3) { - return url$3.replace(importQueryRE, "$1").replace(trailingSeparatorRE, ""); -} -function removeDirectQuery(url$3) { - return url$3.replace(directRequestRE$1, "$1").replace(trailingSeparatorRE, ""); -} -const urlRE = /(\?|&)url(?:&|$)/; -const rawRE = /(\?|&)raw(?:&|$)/; -function removeUrlQuery(url$3) { - return url$3.replace(urlRE, "$1").replace(trailingSeparatorRE, ""); -} -function injectQuery(url$3, queryToInject) { - const { file, postfix } = splitFileAndPostfix(url$3); - return `${isWindows ? slash(file) : file}?${queryToInject}${postfix[0] === "?" ? `&${postfix.slice(1)}` : postfix}`; -} -const timestampRE = /\bt=\d{13}&?\b/; -function removeTimestampQuery(url$3) { - return url$3.replace(timestampRE, "").replace(trailingSeparatorRE, ""); -} -async function asyncReplace(input, re, replacer) { - let match; - let remaining = input; - let rewritten = ""; - while (match = re.exec(remaining)) { - rewritten += remaining.slice(0, match.index); - rewritten += await replacer(match); - remaining = remaining.slice(match.index + match[0].length); - } - rewritten += remaining; - return rewritten; -} -function timeFrom(start, subtract = 0) { - const time = performance$1.now() - start - subtract; - const timeString = (time.toFixed(2) + `ms`).padEnd(5, " "); - if (time < 10) return import_picocolors$33.default.green(timeString); - else if (time < 50) return import_picocolors$33.default.yellow(timeString); - else return import_picocolors$33.default.red(timeString); -} -/** -* pretty url for logging. -*/ -function prettifyUrl(url$3, root) { - url$3 = removeTimestampQuery(url$3); - const isAbsoluteFile = url$3.startsWith(root); - if (isAbsoluteFile || url$3.startsWith(FS_PREFIX)) { - const file = path.posix.relative(root, isAbsoluteFile ? url$3 : fsPathFromId(url$3)); - return import_picocolors$33.default.dim(file); - } else return import_picocolors$33.default.dim(url$3); -} -function isObject(value$1) { - return Object.prototype.toString.call(value$1) === "[object Object]"; -} -function isDefined(value$1) { - return value$1 != null; -} -function tryStatSync(file) { - try { - return fs.statSync(file, { throwIfNoEntry: false }); - } catch {} -} -function lookupFile(dir, fileNames) { - while (dir) { - for (const fileName of fileNames) { - const fullPath = path.join(dir, fileName); - if (tryStatSync(fullPath)?.isFile()) return fullPath; - } - const parentDir$1 = path.dirname(dir); - if (parentDir$1 === dir) return; - dir = parentDir$1; - } -} -function isFilePathESM(filePath, packageCache) { - if (/\.m[jt]s$/.test(filePath)) return true; - else if (/\.c[jt]s$/.test(filePath)) return false; - else try { - return findNearestPackageData(path.dirname(filePath), packageCache)?.data.type === "module"; - } catch { - return false; - } -} -const splitRE = /\r?\n/g; -const range = 2; -function pad$1(source, n$2 = 2) { - return source.split(splitRE).map((l) => ` `.repeat(n$2) + l).join(`\n`); -} -function posToNumber(source, pos) { - if (typeof pos === "number") return pos; - const lines = source.split(splitRE); - const { line, column } = pos; - let start = 0; - for (let i$1 = 0; i$1 < line - 1 && i$1 < lines.length; i$1++) start += lines[i$1].length + 1; - return start + column; -} -function numberToPos(source, offset$1) { - if (typeof offset$1 !== "number") return offset$1; - if (offset$1 > source.length) throw new Error(`offset is longer than source length! offset ${offset$1} > length ${source.length}`); - const lines = source.slice(0, offset$1).split(splitRE); - return { - line: lines.length, - column: lines[lines.length - 1].length - }; -} -const MAX_DISPLAY_LEN = 120; -const ELLIPSIS = "..."; -function generateCodeFrame(source, start = 0, end) { - start = Math.max(posToNumber(source, start), 0); - end = Math.min(end !== void 0 ? posToNumber(source, end) : start, source.length); - const lastPosLine = end !== void 0 ? numberToPos(source, end).line : numberToPos(source, start).line + range; - const lineNumberWidth = Math.max(3, String(lastPosLine).length + 1); - const lines = source.split(splitRE); - let count = 0; - const res = []; - for (let i$1 = 0; i$1 < lines.length; i$1++) { - count += lines[i$1].length; - if (count >= start) { - for (let j = i$1 - range; j <= i$1 + range || end > count; j++) { - if (j < 0 || j >= lines.length) continue; - const line = j + 1; - const lineLength = lines[j].length; - const pad$2 = Math.max(start - (count - lineLength), 0); - const underlineLength = Math.max(1, end > count ? lineLength - pad$2 : end - start); - let displayLine = lines[j]; - let underlinePad = pad$2; - if (lineLength > MAX_DISPLAY_LEN) { - let startIdx = 0; - if (j === i$1) { - if (underlineLength > MAX_DISPLAY_LEN) startIdx = pad$2; - else { - const center = pad$2 + Math.floor(underlineLength / 2); - startIdx = Math.max(0, center - Math.floor(MAX_DISPLAY_LEN / 2)); - } - underlinePad = Math.max(0, pad$2 - startIdx) + (startIdx > 0 ? 3 : 0); - } - const prefix = startIdx > 0 ? ELLIPSIS : ""; - const suffix = lineLength - startIdx > MAX_DISPLAY_LEN ? ELLIPSIS : ""; - const sliceLen = MAX_DISPLAY_LEN - prefix.length - suffix.length; - displayLine = prefix + displayLine.slice(startIdx, startIdx + sliceLen) + suffix; - } - res.push(`${line}${" ".repeat(lineNumberWidth - String(line).length)}| ${displayLine}`); - if (j === i$1) { - const underline = "^".repeat(Math.min(underlineLength, MAX_DISPLAY_LEN)); - res.push(`${" ".repeat(lineNumberWidth)}| ` + " ".repeat(underlinePad) + underline); - } else if (j > i$1) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - const underline = "^".repeat(Math.min(length, MAX_DISPLAY_LEN)); - res.push(`${" ".repeat(lineNumberWidth)}| ` + underline); - } - count += lineLength + 1; - } - } - break; - } - count++; - } - return res.join("\n"); -} -function isFileReadable(filename) { - if (!tryStatSync(filename)) return false; - try { - fs.accessSync(filename, fs.constants.R_OK); - return true; - } catch { - return false; - } -} -const splitFirstDirRE = /(.+?)[\\/](.+)/; -/** -* Delete every file and subdirectory. **The given directory must exist.** -* Pass an optional `skip` array to preserve files under the root directory. -*/ -function emptyDir(dir, skip) { - const skipInDir = []; - let nested = null; - if (skip?.length) for (const file of skip) if (path.dirname(file) !== ".") { - const matched = splitFirstDirRE.exec(file); - if (matched) { - nested ??= /* @__PURE__ */ new Map(); - const [, nestedDir, skipPath] = matched; - let nestedSkip = nested.get(nestedDir); - if (!nestedSkip) { - nestedSkip = []; - nested.set(nestedDir, nestedSkip); - } - if (!nestedSkip.includes(skipPath)) nestedSkip.push(skipPath); - } - } else skipInDir.push(file); - for (const file of fs.readdirSync(dir)) { - if (skipInDir.includes(file)) continue; - if (nested?.has(file)) emptyDir(path.resolve(dir, file), nested.get(file)); - else fs.rmSync(path.resolve(dir, file), { - recursive: true, - force: true - }); - } -} -function copyDir(srcDir, destDir) { - fs.mkdirSync(destDir, { recursive: true }); - for (const file of fs.readdirSync(srcDir)) { - const srcFile = path.resolve(srcDir, file); - if (srcFile === destDir) continue; - const destFile = path.resolve(destDir, file); - if (fs.statSync(srcFile).isDirectory()) copyDir(srcFile, destFile); - else fs.copyFileSync(srcFile, destFile); - } -} -const ERR_SYMLINK_IN_RECURSIVE_READDIR = "ERR_SYMLINK_IN_RECURSIVE_READDIR"; -async function recursiveReaddir(dir) { - if (!fs.existsSync(dir)) return []; - let dirents; - try { - dirents = await fsp.readdir(dir, { withFileTypes: true }); - } catch (e$1) { - if (e$1.code === "EACCES") return []; - throw e$1; - } - if (dirents.some((dirent) => dirent.isSymbolicLink())) { - const err$2 = /* @__PURE__ */ new Error("Symbolic links are not supported in recursiveReaddir"); - err$2.code = ERR_SYMLINK_IN_RECURSIVE_READDIR; - throw err$2; - } - return (await Promise.all(dirents.map((dirent) => { - const res = path.resolve(dir, dirent.name); - return dirent.isDirectory() ? recursiveReaddir(res) : normalizePath(res); - }))).flat(1); -} -let safeRealpathSync = isWindows ? windowsSafeRealPathSync : fs.realpathSync.native; -const windowsNetworkMap = /* @__PURE__ */ new Map(); -function windowsMappedRealpathSync(path$13) { - const realPath = fs.realpathSync.native(path$13); - if (realPath.startsWith("\\\\")) { - for (const [network, volume] of windowsNetworkMap) if (realPath.startsWith(network)) return realPath.replace(network, volume); - } - return realPath; -} -const parseNetUseRE = /^\w* +(\w:) +([^ ]+)\s/; -let firstSafeRealPathSyncRun = false; -function windowsSafeRealPathSync(path$13) { - if (!firstSafeRealPathSyncRun) { - optimizeSafeRealPathSync(); - firstSafeRealPathSyncRun = true; - } - return fs.realpathSync(path$13); -} -function optimizeSafeRealPathSync() { - try { - fs.realpathSync.native(path.resolve("./")); - } catch (error$1) { - if (error$1.message.includes("EISDIR: illegal operation on a directory")) { - safeRealpathSync = fs.realpathSync; - return; - } - } - exec("net use", (error$1, stdout) => { - if (error$1) return; - const lines = stdout.split("\n"); - for (const line of lines) { - const m = parseNetUseRE.exec(line); - if (m) windowsNetworkMap.set(m[2], m[1]); - } - if (windowsNetworkMap.size === 0) safeRealpathSync = fs.realpathSync.native; - else safeRealpathSync = windowsMappedRealpathSync; - }); -} -function ensureWatchedFile(watcher, file, root) { - if (file && !file.startsWith(withTrailingSlash(root)) && !file.includes("\0") && fs.existsSync(file)) watcher.add(path.resolve(file)); -} -function joinSrcset(ret) { - return ret.map(({ url: url$3, descriptor }) => url$3 + (descriptor ? ` ${descriptor}` : "")).join(", "); -} -/** -This regex represents a loose rule of an “image candidate string” and "image set options". - -@see https://html.spec.whatwg.org/multipage/images.html#srcset-attribute -@see https://drafts.csswg.org/css-images-4/#image-set-notation - -The Regex has named capturing groups `url` and `descriptor`. -The `url` group can be: -* any CSS function -* CSS string (single or double-quoted) -* URL string (unquoted) -The `descriptor` is anything after the space and before the comma. -*/ -const imageCandidateRegex = /(?:^|\s|(?<=,))(?[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?\w[^,]+))?(?:,|$)/g; -const escapedSpaceCharacters = /(?: |\\t|\\n|\\f|\\r)+/g; -function parseSrcset(string) { - const matches$2 = string.trim().replace(escapedSpaceCharacters, " ").replace(/\r?\n/, "").replace(/,\s+/, ", ").replaceAll(/\s+/g, " ").matchAll(imageCandidateRegex); - return Array.from(matches$2, ({ groups: groups$1 }) => ({ - url: groups$1?.url?.trim() ?? "", - descriptor: groups$1?.descriptor?.trim() ?? "" - })).filter(({ url: url$3 }) => !!url$3); -} -function processSrcSet(srcs, replacer) { - return Promise.all(parseSrcset(srcs).map(async ({ url: url$3, descriptor }) => ({ - url: await replacer({ - url: url$3, - descriptor - }), - descriptor - }))).then(joinSrcset); -} -function processSrcSetSync(srcs, replacer) { - return joinSrcset(parseSrcset(srcs).map(({ url: url$3, descriptor }) => ({ - url: replacer({ - url: url$3, - descriptor - }), - descriptor - }))); -} -const windowsDriveRE = /^[A-Z]:/; -const replaceWindowsDriveRE = /^([A-Z]):\//; -const linuxAbsolutePathRE = /^\/[^/]/; -function escapeToLinuxLikePath(path$13) { - if (windowsDriveRE.test(path$13)) return path$13.replace(replaceWindowsDriveRE, "/windows/$1/"); - if (linuxAbsolutePathRE.test(path$13)) return `/linux${path$13}`; - return path$13; -} -const revertWindowsDriveRE = /^\/windows\/([A-Z])\//; -function unescapeToLinuxLikePath(path$13) { - if (path$13.startsWith("/linux/")) return path$13.slice(6); - if (path$13.startsWith("/windows/")) return path$13.replace(revertWindowsDriveRE, "$1:/"); - return path$13; -} -const nullSourceMap = { - names: [], - sources: [], - mappings: "", - version: 3 -}; -/** -* Combines multiple sourcemaps into a single sourcemap. -* Note that the length of sourcemapList must be 2. -*/ -function combineSourcemaps(filename, sourcemapList) { - if (sourcemapList.length === 0 || sourcemapList.every((m) => m.sources.length === 0)) return { ...nullSourceMap }; - sourcemapList = sourcemapList.map((sourcemap) => { - const newSourcemaps = { ...sourcemap }; - newSourcemaps.sources = sourcemap.sources.map((source) => source ? escapeToLinuxLikePath(source) : null); - if (sourcemap.sourceRoot) newSourcemaps.sourceRoot = escapeToLinuxLikePath(sourcemap.sourceRoot); - return newSourcemaps; - }); - const escapedFilename = escapeToLinuxLikePath(filename); - let map$1; - let mapIndex = 1; - if (sourcemapList.slice(0, -1).find((m) => m.sources.length !== 1) === void 0) map$1 = remapping(sourcemapList, () => null); - else map$1 = remapping(sourcemapList[0], function loader$1(sourcefile) { - if (sourcefile === escapedFilename && sourcemapList[mapIndex]) return sourcemapList[mapIndex++]; - else return null; - }); - if (!map$1.file) delete map$1.file; - map$1.sources = map$1.sources.map((source) => source ? unescapeToLinuxLikePath(source) : source); - map$1.file = filename; - return map$1; -} -function unique(arr) { - return Array.from(new Set(arr)); -} -/** -* Returns resolved localhost address when `dns.lookup` result differs from DNS -* -* `dns.lookup` result is same when defaultResultOrder is `verbatim`. -* Even if defaultResultOrder is `ipv4first`, `dns.lookup` result maybe same. -* For example, when IPv6 is not supported on that machine/network. -*/ -async function getLocalhostAddressIfDiffersFromDNS() { - const [nodeResult, dnsResult] = await Promise.all([promises$1.lookup("localhost"), promises$1.lookup("localhost", { verbatim: true })]); - return nodeResult.family === dnsResult.family && nodeResult.address === dnsResult.address ? void 0 : nodeResult.address; -} -function diffDnsOrderChange(oldUrls, newUrls) { - return !(oldUrls === newUrls || oldUrls && newUrls && arrayEqual(oldUrls.local, newUrls.local) && arrayEqual(oldUrls.network, newUrls.network)); -} -async function resolveHostname(optionsHost) { - let host; - if (optionsHost === void 0 || optionsHost === false) host = "localhost"; - else if (optionsHost === true) host = void 0; - else host = optionsHost; - let name = host === void 0 || wildcardHosts.has(host) ? "localhost" : host; - if (host === "localhost") { - const localhostAddr = await getLocalhostAddressIfDiffersFromDNS(); - if (localhostAddr) name = localhostAddr; - } - return { - host, - name - }; -} -function extractHostnamesFromCerts(certs) { - const certList = certs ? arraify(certs) : []; - if (certList.length === 0) return []; - return unique(certList.map((cert) => { - try { - return new crypto.X509Certificate(cert); - } catch { - return null; - } - }).flatMap((cert) => cert?.subjectAltName ? extractHostnamesFromSubjectAltName(cert.subjectAltName) : [])); -} -function resolveServerUrls(server, options$1, hostname, httpsOptions, config$2) { - const address = server.address(); - const isAddressInfo = (x) => x?.address; - if (!isAddressInfo(address)) return { - local: [], - network: [] - }; - const local = []; - const network = []; - const protocol = options$1.https ? "https" : "http"; - const port = address.port; - const base = config$2.rawBase === "./" || config$2.rawBase === "" ? "/" : config$2.rawBase; - if (hostname.host !== void 0 && !wildcardHosts.has(hostname.host)) { - let hostnameName = hostname.name; - if (hostnameName.includes(":")) hostnameName = `[${hostnameName}]`; - const address$1 = `${protocol}://${hostnameName}:${port}${base}`; - if (loopbackHosts.has(hostname.host)) local.push(address$1); - else network.push(address$1); - } else Object.values(os.networkInterfaces()).flatMap((nInterface) => nInterface ?? []).filter((detail) => detail.address && detail.family === "IPv4").forEach((detail) => { - let host = detail.address.replace("127.0.0.1", hostname.name); - if (host.includes(":")) host = `[${host}]`; - const url$3 = `${protocol}://${host}:${port}${base}`; - if (detail.address.includes("127.0.0.1")) local.push(url$3); - else network.push(url$3); - }); - const hostnamesFromCert = extractHostnamesFromCerts(httpsOptions?.cert); - if (hostnamesFromCert.length > 0) { - const existings = new Set([...local, ...network]); - local.push(...hostnamesFromCert.map((hostname$1) => `${protocol}://${hostname$1}:${port}${base}`).filter((url$3) => !existings.has(url$3))); - } - return { - local, - network - }; -} -function extractHostnamesFromSubjectAltName(subjectAltName) { - const hostnames = []; - let remaining = subjectAltName; - while (remaining) { - const nameEndIndex = remaining.indexOf(":"); - const name = remaining.slice(0, nameEndIndex); - remaining = remaining.slice(nameEndIndex + 1); - if (!remaining) break; - const isQuoted = remaining[0] === "\""; - let value$1; - if (isQuoted) { - const endQuoteIndex = remaining.indexOf("\"", 1); - value$1 = JSON.parse(remaining.slice(0, endQuoteIndex + 1)); - remaining = remaining.slice(endQuoteIndex + 1); - } else { - const maybeEndIndex = remaining.indexOf(","); - const endIndex = maybeEndIndex === -1 ? remaining.length : maybeEndIndex; - value$1 = remaining.slice(0, endIndex); - remaining = remaining.slice(endIndex); - } - remaining = remaining.slice(1).trimStart(); - if (name === "DNS" && value$1 !== "[::1]" && !(value$1.startsWith("*.") && net.isIPv4(value$1.slice(2)))) hostnames.push(value$1.replace("*", "vite")); - } - return hostnames; -} -function arraify(target) { - return Array.isArray(target) ? target : [target]; -} -const multilineCommentsRE = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g; -const singlelineCommentsRE = /\/\/.*/g; -const requestQuerySplitRE = /\?(?!.*[/|}])/; -const requestQueryMaybeEscapedSplitRE = /\\?\?(?!.*[/|}])/; -const blankReplacer = (match) => " ".repeat(match.length); -function getHash(text, length = 8) { - const h = crypto.hash("sha256", text, "hex").substring(0, length); - if (length <= 64) return h; - return h.padEnd(length, "_"); -} -function emptyCssComments(raw) { - return raw.replace(multilineCommentsRE, blankReplacer); -} -function backwardCompatibleWorkerPlugins(plugins$1) { - if (Array.isArray(plugins$1)) return plugins$1; - if (typeof plugins$1 === "function") return plugins$1(); - return []; -} -function deepClone(value$1) { - if (Array.isArray(value$1)) return value$1.map((v) => deepClone(v)); - if (isObject(value$1)) { - const cloned = {}; - for (const key in value$1) cloned[key] = deepClone(value$1[key]); - return cloned; - } - if (typeof value$1 === "function") return value$1; - if (value$1 instanceof RegExp) return new RegExp(value$1); - if (typeof value$1 === "object" && value$1 != null) throw new Error("Cannot deep clone non-plain object"); - return value$1; -} -function mergeWithDefaultsRecursively(defaults, values) { - const merged = defaults; - for (const key in values) { - const value$1 = values[key]; - if (value$1 === void 0) continue; - const existing = merged[key]; - if (existing === void 0) { - merged[key] = value$1; - continue; - } - if (isObject(existing) && isObject(value$1)) { - merged[key] = mergeWithDefaultsRecursively(existing, value$1); - continue; - } - merged[key] = value$1; - } - return merged; -} -const environmentPathRE = /^environments\.[^.]+$/; -function mergeWithDefaults(defaults, values) { - return mergeWithDefaultsRecursively(deepClone(defaults), values); -} -function mergeConfigRecursively(defaults, overrides, rootPath) { - const merged = { ...defaults }; - for (const key in overrides) { - const value$1 = overrides[key]; - if (value$1 == null) continue; - const existing = merged[key]; - if (existing == null) { - merged[key] = value$1; - continue; - } - if (key === "alias" && (rootPath === "resolve" || rootPath === "")) { - merged[key] = mergeAlias(existing, value$1); - continue; - } else if (key === "assetsInclude" && rootPath === "") { - merged[key] = [].concat(existing, value$1); - continue; - } else if (((key === "noExternal" || key === "external") && (rootPath === "ssr" || rootPath === "resolve") || key === "allowedHosts" && rootPath === "server") && (existing === true || value$1 === true)) { - merged[key] = true; - continue; - } else if (key === "plugins" && rootPath === "worker") { - merged[key] = () => [...backwardCompatibleWorkerPlugins(existing), ...backwardCompatibleWorkerPlugins(value$1)]; - continue; - } else if (key === "server" && rootPath === "server.hmr") { - merged[key] = value$1; - continue; - } - if (Array.isArray(existing) || Array.isArray(value$1)) { - merged[key] = [...arraify(existing), ...arraify(value$1)]; - continue; - } - if (isObject(existing) && isObject(value$1)) { - merged[key] = mergeConfigRecursively(existing, value$1, rootPath && !environmentPathRE.test(rootPath) ? `${rootPath}.${key}` : key); - continue; - } - merged[key] = value$1; - } - return merged; -} -function mergeConfig(defaults, overrides, isRoot = true) { - if (typeof defaults === "function" || typeof overrides === "function") throw new Error(`Cannot merge config in form of callback`); - return mergeConfigRecursively(defaults, overrides, isRoot ? "" : "."); -} -function mergeAlias(a, b) { - if (!a) return b; - if (!b) return a; - if (isObject(a) && isObject(b)) return { - ...a, - ...b - }; - return [...normalizeAlias(b), ...normalizeAlias(a)]; -} -function normalizeAlias(o$1 = []) { - return Array.isArray(o$1) ? o$1.map(normalizeSingleAlias) : Object.keys(o$1).map((find$1) => normalizeSingleAlias({ - find: find$1, - replacement: o$1[find$1] - })); -} -function normalizeSingleAlias({ find: find$1, replacement, customResolver }) { - if (typeof find$1 === "string" && find$1.endsWith("/") && replacement.endsWith("/")) { - find$1 = find$1.slice(0, find$1.length - 1); - replacement = replacement.slice(0, replacement.length - 1); - } - const alias$2 = { - find: find$1, - replacement - }; - if (customResolver) alias$2.customResolver = customResolver; - return alias$2; -} -/** -* Transforms transpiled code result where line numbers aren't altered, -* so we can skip sourcemap generation during dev -*/ -function transformStableResult(s, id, config$2) { - return { - code: s.toString(), - map: config$2.command === "build" && config$2.build.sourcemap ? s.generateMap({ - hires: "boundary", - source: id - }) : null - }; -} -async function asyncFlatten(arr) { - do - arr = (await Promise.all(arr)).flat(Infinity); - while (arr.some((v) => v?.then)); - return arr; -} -function stripBomTag(content) { - if (content.charCodeAt(0) === 65279) return content.slice(1); - return content; -} -const windowsDrivePathPrefixRE = /^[A-Za-z]:[/\\]/; -/** -* path.isAbsolute also returns true for drive relative paths on windows (e.g. /something) -* this function returns false for them but true for absolute paths (e.g. C:/something) -*/ -const isNonDriveRelativeAbsolutePath = (p) => { - if (!isWindows) return p[0] === "/"; - return windowsDrivePathPrefixRE.test(p); -}; -/** -* Determine if a file is being requested with the correct case, to ensure -* consistent behavior between dev and prod and across operating systems. -*/ -function shouldServeFile(filePath, root) { - if (!isCaseInsensitiveFS) return true; - return hasCorrectCase(filePath, root); -} -/** -* Note that we can't use realpath here, because we don't want to follow -* symlinks. -*/ -function hasCorrectCase(file, assets) { - if (file === assets) return true; - const parent = path.dirname(file); - if (fs.readdirSync(parent).includes(path.basename(file))) return hasCorrectCase(parent, assets); - return false; -} -function joinUrlSegments(a, b) { - if (!a || !b) return a || b || ""; - if (a.endsWith("/")) a = a.substring(0, a.length - 1); - if (b[0] !== "/") b = "/" + b; - return a + b; -} -function removeLeadingSlash(str) { - return str[0] === "/" ? str.slice(1) : str; -} -function stripBase(path$13, base) { - if (path$13 === base) return "/"; - const devBase = withTrailingSlash(base); - return path$13.startsWith(devBase) ? path$13.slice(devBase.length - 1) : path$13; -} -function arrayEqual(a, b) { - if (a === b) return true; - if (a.length !== b.length) return false; - for (let i$1 = 0; i$1 < a.length; i$1++) if (a[i$1] !== b[i$1]) return false; - return true; -} -function evalValue(rawValue) { - return new Function(` - var console, exports, global, module, process, require - return (\n${rawValue}\n) - `)(); -} -function getNpmPackageName(importPath) { - const parts = importPath.split("/"); - if (parts[0][0] === "@") { - if (!parts[1]) return null; - return `${parts[0]}/${parts[1]}`; - } else return parts[0]; -} -function getPkgName(name) { - return name[0] === "@" ? name.split("/")[1] : name; -} -const escapeRegexRE$1 = /[-/\\^$*+?.()|[\]{}]/g; -function escapeRegex(str) { - return str.replace(escapeRegexRE$1, "\\$&"); -} -function getPackageManagerCommand(type = "install") { - const packageManager = process.env.npm_config_user_agent?.split(" ")[0].split("/")[0] || "npm"; - switch (type) { - case "install": return packageManager === "npm" ? "npm install" : `${packageManager} add`; - case "uninstall": return packageManager === "npm" ? "npm uninstall" : `${packageManager} remove`; - case "update": return packageManager === "yarn" ? "yarn upgrade" : `${packageManager} update`; - default: throw new TypeError(`Unknown command type: ${type}`); - } -} -function isDevServer(server) { - return "pluginContainer" in server; -} -function createSerialPromiseQueue() { - let previousTask; - return { async run(f$1) { - const thisTask = f$1(); - const depTasks = Promise.all([previousTask, thisTask]); - previousTask = depTasks; - const [, result] = await depTasks; - if (previousTask === depTasks) previousTask = void 0; - return result; - } }; -} -function sortObjectKeys(obj) { - const sorted = {}; - for (const key of Object.keys(obj).sort()) sorted[key] = obj[key]; - return sorted; -} -function displayTime(time) { - if (time < 1e3) return `${time}ms`; - time = time / 1e3; - if (time < 60) return `${time.toFixed(2)}s`; - const mins = Math.floor(time / 60); - const seconds = Math.round(time % 60); - if (seconds === 60) return `${mins + 1}m`; - return `${mins}m${seconds < 1 ? "" : ` ${seconds}s`}`; -} -/** -* Encodes the URI path portion (ignores part after ? or #) -*/ -function encodeURIPath(uri) { - if (uri.startsWith("data:")) return uri; - const filePath = cleanUrl(uri); - const postfix = filePath !== uri ? uri.slice(filePath.length) : ""; - return encodeURI(filePath) + postfix; -} -/** -* Like `encodeURIPath`, but only replacing `%` as `%25`. This is useful for environments -* that can handle un-encoded URIs, where `%` is the only ambiguous character. -*/ -function partialEncodeURIPath(uri) { - if (uri.startsWith("data:")) return uri; - const filePath = cleanUrl(uri); - const postfix = filePath !== uri ? uri.slice(filePath.length) : ""; - return filePath.replaceAll("%", "%25") + postfix; -} -function decodeURIIfPossible(input) { - try { - return decodeURI(input); - } catch { - return; - } -} -const sigtermCallbacks = /* @__PURE__ */ new Set(); -const parentSigtermCallback = async (signal, exitCode) => { - await Promise.all([...sigtermCallbacks].map((cb) => cb(signal, exitCode))); -}; -const setupSIGTERMListener = (callback) => { - if (sigtermCallbacks.size === 0) { - process.once("SIGTERM", parentSigtermCallback); - if (process.env.CI !== "true") process.stdin.on("end", parentSigtermCallback); - } - sigtermCallbacks.add(callback); -}; -const teardownSIGTERMListener = (callback) => { - sigtermCallbacks.delete(callback); - if (sigtermCallbacks.size === 0) { - process.off("SIGTERM", parentSigtermCallback); - if (process.env.CI !== "true") process.stdin.off("end", parentSigtermCallback); - } -}; -function getServerUrlByHost(resolvedUrls, host) { - if (typeof host === "string") { - const matchedUrl = [...resolvedUrls?.local ?? [], ...resolvedUrls?.network ?? []].find((url$3) => url$3.includes(host)); - if (matchedUrl) return matchedUrl; - } - return resolvedUrls?.local[0] ?? resolvedUrls?.network[0]; -} -let lastDateNow = 0; -/** -* Similar to `Date.now()`, but strictly monotonically increasing. -* -* This function will never return the same value. -* Thus, the value may differ from the actual time. -* -* related: https://github.com/vitejs/vite/issues/19804 -*/ -function monotonicDateNow() { - const now = Date.now(); - if (now > lastDateNow) { - lastDateNow = now; - return lastDateNow; - } - lastDateNow++; - return lastDateNow; -} - -//#endregion -//#region src/node/plugin.ts -async function resolveEnvironmentPlugins(environment) { - const environmentPlugins = []; - for (const plugin of environment.getTopLevelConfig().plugins) { - if (plugin.applyToEnvironment) { - const applied = await plugin.applyToEnvironment(environment); - if (!applied) continue; - if (applied !== true) { - environmentPlugins.push(...(await asyncFlatten(arraify(applied))).filter(Boolean)); - continue; - } - } - environmentPlugins.push(plugin); - } - return environmentPlugins; -} -/** -* @experimental -*/ -function perEnvironmentPlugin(name, applyToEnvironment) { - return { - name, - applyToEnvironment - }; -} - -//#endregion -//#region ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js -var require_commondir = /* @__PURE__ */ __commonJSMin(((exports, module) => { - var path$12 = __require("path"); - module.exports = function(basedir, relfiles) { - if (relfiles) var files = relfiles.map(function(r$1) { - return path$12.resolve(basedir, r$1); - }); - else var files = basedir; - var res = files.slice(1).reduce(function(ps, file) { - if (!file.match(/^([A-Za-z]:)?\/|\\/)) throw new Error("relative path without a basedir"); - var xs = file.split(/\/+|\\+/); - for (var i$1 = 0; ps[i$1] === xs[i$1] && i$1 < Math.min(ps.length, xs.length); i$1++); - return ps.slice(0, i$1); - }, files[0].split(/\/+|\\+/)); - return res.length > 1 ? res.join("/") : "/"; - }; -})); - -//#endregion -//#region ../../node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs -var BitSet = class BitSet { - constructor(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; - } - add(n$2) { - this.bits[n$2 >> 5] |= 1 << (n$2 & 31); - } - has(n$2) { - return !!(this.bits[n$2 >> 5] & 1 << (n$2 & 31)); - } -}; -var Chunk = class Chunk { - constructor(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - this.intro = ""; - this.outro = ""; - this.content = content; - this.storeName = false; - this.edited = false; - this.previous = null; - this.next = null; - } - appendLeft(content) { - this.outro += content; - } - appendRight(content) { - this.intro = this.intro + content; - } - clone() { - const chunk = new Chunk(this.start, this.end, this.original); - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - return chunk; - } - contains(index) { - return this.start < index && index < this.end; - } - eachNext(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } - } - eachPrevious(fn) { - let chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } - } - edit(content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ""; - this.outro = ""; - } - this.storeName = storeName; - this.edited = true; - return this; - } - prependLeft(content) { - this.outro = content + this.outro; - } - prependRight(content) { - this.intro = content + this.intro; - } - reset() { - this.intro = ""; - this.outro = ""; - if (this.edited) { - this.content = this.original; - this.storeName = false; - this.edited = false; - } - } - split(index) { - const sliceIndex = index - this.start; - const originalBefore = this.original.slice(0, sliceIndex); - const originalAfter = this.original.slice(sliceIndex); - this.original = originalBefore; - const newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ""; - this.end = index; - if (this.edited) { - newChunk.edit("", false); - this.content = ""; - } else this.content = originalBefore; - newChunk.next = this.next; - if (newChunk.next) newChunk.next.previous = newChunk; - newChunk.previous = this; - this.next = newChunk; - return newChunk; - } - toString() { - return this.intro + this.content + this.outro; - } - trimEnd(rx) { - this.outro = this.outro.replace(rx, ""); - if (this.outro.length) return true; - const trimmed = this.content.replace(rx, ""); - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit("", void 0, true); - if (this.edited) this.edit(trimmed, this.storeName, true); - } - return true; - } else { - this.edit("", void 0, true); - this.intro = this.intro.replace(rx, ""); - if (this.intro.length) return true; - } - } - trimStart(rx) { - this.intro = this.intro.replace(rx, ""); - if (this.intro.length) return true; - const trimmed = this.content.replace(rx, ""); - if (trimmed.length) { - if (trimmed !== this.content) { - const newChunk = this.split(this.end - trimmed.length); - if (this.edited) newChunk.edit(trimmed, this.storeName, true); - this.edit("", void 0, true); - } - return true; - } else { - this.edit("", void 0, true); - this.outro = this.outro.replace(rx, ""); - if (this.outro.length) return true; - } - } -}; -function getBtoa() { - if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); - else if (typeof Buffer === "function") return (str) => Buffer.from(str, "utf-8").toString("base64"); - else return () => { - throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported."); - }; -} -const btoa$1 = /* @__PURE__ */ getBtoa(); -var SourceMap = class { - constructor(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = encode$1(properties.mappings); - if (typeof properties.x_google_ignoreList !== "undefined") this.x_google_ignoreList = properties.x_google_ignoreList; - if (typeof properties.debugId !== "undefined") this.debugId = properties.debugId; - } - toString() { - return JSON.stringify(this); - } - toUrl() { - return "data:application/json;charset=utf-8;base64," + btoa$1(this.toString()); - } -}; -function guessIndent(code) { - const lines = code.split("\n"); - const tabbed = lines.filter((line) => /^\t+/.test(line)); - const spaced = lines.filter((line) => /^ {2,}/.test(line)); - if (tabbed.length === 0 && spaced.length === 0) return null; - if (tabbed.length >= spaced.length) return " "; - const min$1 = spaced.reduce((previous, current) => { - const numSpaces = /^ +/.exec(current)[0].length; - return Math.min(numSpaces, previous); - }, Infinity); - return new Array(min$1 + 1).join(" "); -} -function getRelativePath(from, to) { - const fromParts = from.split(/[/\\]/); - const toParts = to.split(/[/\\]/); - fromParts.pop(); - while (fromParts[0] === toParts[0]) { - fromParts.shift(); - toParts.shift(); - } - if (fromParts.length) { - let i$1 = fromParts.length; - while (i$1--) fromParts[i$1] = ".."; - } - return fromParts.concat(toParts).join("/"); -} -const toString$1 = Object.prototype.toString; -function isObject$2(thing) { - return toString$1.call(thing) === "[object Object]"; -} -function getLocator(source) { - const originalLines = source.split("\n"); - const lineOffsets = []; - for (let i$1 = 0, pos = 0; i$1 < originalLines.length; i$1++) { - lineOffsets.push(pos); - pos += originalLines[i$1].length + 1; - } - return function locate(index) { - let i$1 = 0; - let j = lineOffsets.length; - while (i$1 < j) { - const m = i$1 + j >> 1; - if (index < lineOffsets[m]) j = m; - else i$1 = m + 1; - } - const line = i$1 - 1; - return { - line, - column: index - lineOffsets[line] - }; - }; -} -const wordRegex = /\w/; -var Mappings = class { - constructor(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; - } - addEdit(sourceIndex, content, loc, nameIndex) { - if (content.length) { - const contentLengthMinusOne = content.length - 1; - let contentLineEnd = content.indexOf("\n", 0); - let previousContentLineEnd = -1; - while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { - const segment$1 = [ - this.generatedCodeColumn, - sourceIndex, - loc.line, - loc.column - ]; - if (nameIndex >= 0) segment$1.push(nameIndex); - this.rawSegments.push(segment$1); - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - previousContentLineEnd = contentLineEnd; - contentLineEnd = content.indexOf("\n", contentLineEnd + 1); - } - const segment = [ - this.generatedCodeColumn, - sourceIndex, - loc.line, - loc.column - ]; - if (nameIndex >= 0) segment.push(nameIndex); - this.rawSegments.push(segment); - this.advance(content.slice(previousContentLineEnd + 1)); - } else if (this.pending) { - this.rawSegments.push(this.pending); - this.advance(content); - } - this.pending = null; - } - addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { - let originalCharIndex = chunk.start; - let first$2 = true; - let charInHiresBoundary = false; - while (originalCharIndex < chunk.end) { - if (original[originalCharIndex] === "\n") { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first$2 = true; - charInHiresBoundary = false; - } else { - if (this.hires || first$2 || sourcemapLocations.has(originalCharIndex)) { - const segment = [ - this.generatedCodeColumn, - sourceIndex, - loc.line, - loc.column - ]; - if (this.hires === "boundary") if (wordRegex.test(original[originalCharIndex])) { - if (!charInHiresBoundary) { - this.rawSegments.push(segment); - charInHiresBoundary = true; - } - } else { - this.rawSegments.push(segment); - charInHiresBoundary = false; - } - else this.rawSegments.push(segment); - } - loc.column += 1; - this.generatedCodeColumn += 1; - first$2 = false; - } - originalCharIndex += 1; - } - this.pending = null; - } - advance(str) { - if (!str) return; - const lines = str.split("\n"); - if (lines.length > 1) { - for (let i$1 = 0; i$1 < lines.length - 1; i$1++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } - this.generatedCodeColumn = 0; - } - this.generatedCodeColumn += lines[lines.length - 1].length; - } -}; -const n$1 = "\n"; -const warned = { - insertLeft: false, - insertRight: false, - storeName: false -}; -var MagicString = class MagicString { - constructor(string, options$1 = {}) { - const chunk = new Chunk(0, string.length, string); - Object.defineProperties(this, { - original: { - writable: true, - value: string - }, - outro: { - writable: true, - value: "" - }, - intro: { - writable: true, - value: "" - }, - firstChunk: { - writable: true, - value: chunk - }, - lastChunk: { - writable: true, - value: chunk - }, - lastSearchedChunk: { - writable: true, - value: chunk - }, - byStart: { - writable: true, - value: {} - }, - byEnd: { - writable: true, - value: {} - }, - filename: { - writable: true, - value: options$1.filename - }, - indentExclusionRanges: { - writable: true, - value: options$1.indentExclusionRanges - }, - sourcemapLocations: { - writable: true, - value: new BitSet() - }, - storedNames: { - writable: true, - value: {} - }, - indentStr: { - writable: true, - value: void 0 - }, - ignoreList: { - writable: true, - value: options$1.ignoreList - }, - offset: { - writable: true, - value: options$1.offset || 0 - } - }); - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; - } - addSourcemapLocation(char) { - this.sourcemapLocations.add(char); - } - append(content) { - if (typeof content !== "string") throw new TypeError("outro content must be a string"); - this.outro += content; - return this; - } - appendLeft(index, content) { - index = index + this.offset; - if (typeof content !== "string") throw new TypeError("inserted content must be a string"); - this._split(index); - const chunk = this.byEnd[index]; - if (chunk) chunk.appendLeft(content); - else this.intro += content; - return this; - } - appendRight(index, content) { - index = index + this.offset; - if (typeof content !== "string") throw new TypeError("inserted content must be a string"); - this._split(index); - const chunk = this.byStart[index]; - if (chunk) chunk.appendRight(content); - else this.outro += content; - return this; - } - clone() { - const cloned = new MagicString(this.original, { - filename: this.filename, - offset: this.offset - }); - let originalChunk = this.firstChunk; - let clonedChunk = cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone(); - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - const nextOriginalChunk = originalChunk.next; - const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - clonedChunk = nextClonedChunk; - } - originalChunk = nextOriginalChunk; - } - cloned.lastChunk = clonedChunk; - if (this.indentExclusionRanges) cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - cloned.intro = this.intro; - cloned.outro = this.outro; - return cloned; - } - generateDecodedMap(options$1) { - options$1 = options$1 || {}; - const sourceIndex = 0; - const names = Object.keys(this.storedNames); - const mappings = new Mappings(options$1.hires); - const locate = getLocator(this.original); - if (this.intro) mappings.advance(this.intro); - this.firstChunk.eachNext((chunk) => { - const loc = locate(chunk.start); - if (chunk.intro.length) mappings.advance(chunk.intro); - if (chunk.edited) mappings.addEdit(sourceIndex, chunk.content, loc, chunk.storeName ? names.indexOf(chunk.original) : -1); - else mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); - if (chunk.outro.length) mappings.advance(chunk.outro); - }); - if (this.outro) mappings.advance(this.outro); - return { - file: options$1.file ? options$1.file.split(/[/\\]/).pop() : void 0, - sources: [options$1.source ? getRelativePath(options$1.file || "", options$1.source) : options$1.file || ""], - sourcesContent: options$1.includeContent ? [this.original] : void 0, - names, - mappings: mappings.raw, - x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0 - }; - } - generateMap(options$1) { - return new SourceMap(this.generateDecodedMap(options$1)); - } - _ensureindentStr() { - if (this.indentStr === void 0) this.indentStr = guessIndent(this.original); - } - _getRawIndentString() { - this._ensureindentStr(); - return this.indentStr; - } - getIndentString() { - this._ensureindentStr(); - return this.indentStr === null ? " " : this.indentStr; - } - indent(indentStr, options$1) { - const pattern = /^[^\r\n]/gm; - if (isObject$2(indentStr)) { - options$1 = indentStr; - indentStr = void 0; - } - if (indentStr === void 0) { - this._ensureindentStr(); - indentStr = this.indentStr || " "; - } - if (indentStr === "") return this; - options$1 = options$1 || {}; - const isExcluded = {}; - if (options$1.exclude) (typeof options$1.exclude[0] === "number" ? [options$1.exclude] : options$1.exclude).forEach((exclusion) => { - for (let i$1 = exclusion[0]; i$1 < exclusion[1]; i$1 += 1) isExcluded[i$1] = true; - }); - let shouldIndentNextCharacter = options$1.indentStart !== false; - const replacer = (match) => { - if (shouldIndentNextCharacter) return `${indentStr}${match}`; - shouldIndentNextCharacter = true; - return match; - }; - this.intro = this.intro.replace(pattern, replacer); - let charIndex = 0; - let chunk = this.firstChunk; - while (chunk) { - const end = chunk.end; - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); - if (chunk.content.length) shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === "\n"; - } - } else { - charIndex = chunk.start; - while (charIndex < end) { - if (!isExcluded[charIndex]) { - const char = this.original[charIndex]; - if (char === "\n") shouldIndentNextCharacter = true; - else if (char !== "\r" && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - if (charIndex === chunk.start) chunk.prependRight(indentStr); - else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } - } - } - charIndex += 1; - } - } - charIndex = chunk.end; - chunk = chunk.next; - } - this.outro = this.outro.replace(pattern, replacer); - return this; - } - insert() { - throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"); - } - insertLeft(index, content) { - if (!warned.insertLeft) { - console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"); - warned.insertLeft = true; - } - return this.appendLeft(index, content); - } - insertRight(index, content) { - if (!warned.insertRight) { - console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"); - warned.insertRight = true; - } - return this.prependRight(index, content); - } - move(start, end, index) { - start = start + this.offset; - end = end + this.offset; - index = index + this.offset; - if (index >= start && index <= end) throw new Error("Cannot move a selection inside itself"); - this._split(start); - this._split(end); - this._split(index); - const first$2 = this.byStart[start]; - const last = this.byEnd[end]; - const oldLeft = first$2.previous; - const oldRight = last.next; - const newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) return this; - const newLeft = newRight ? newRight.previous : this.lastChunk; - if (oldLeft) oldLeft.next = oldRight; - if (oldRight) oldRight.previous = oldLeft; - if (newLeft) newLeft.next = first$2; - if (newRight) newRight.previous = last; - if (!first$2.previous) this.firstChunk = last.next; - if (!last.next) { - this.lastChunk = first$2.previous; - this.lastChunk.next = null; - } - first$2.previous = newLeft; - last.next = newRight || null; - if (!newLeft) this.firstChunk = first$2; - if (!newRight) this.lastChunk = last; - return this; - } - overwrite(start, end, content, options$1) { - options$1 = options$1 || {}; - return this.update(start, end, content, { - ...options$1, - overwrite: !options$1.contentOnly - }); - } - update(start, end, content, options$1) { - start = start + this.offset; - end = end + this.offset; - if (typeof content !== "string") throw new TypeError("replacement content must be a string"); - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - if (end > this.original.length) throw new Error("end is out of bounds"); - if (start === end) throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead"); - this._split(start); - this._split(end); - if (options$1 === true) { - if (!warned.storeName) { - console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"); - warned.storeName = true; - } - options$1 = { storeName: true }; - } - const storeName = options$1 !== void 0 ? options$1.storeName : false; - const overwrite = options$1 !== void 0 ? options$1.overwrite : false; - if (storeName) { - const original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { - writable: true, - value: true, - enumerable: true - }); - } - const first$2 = this.byStart[start]; - const last = this.byEnd[end]; - if (first$2) { - let chunk = first$2; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) throw new Error("Cannot overwrite across a split point"); - chunk = chunk.next; - chunk.edit("", false); - } - first$2.edit(content, storeName, !overwrite); - } else { - const newChunk = new Chunk(start, end, "").edit(content, storeName); - last.next = newChunk; - newChunk.previous = last; - } - return this; - } - prepend(content) { - if (typeof content !== "string") throw new TypeError("outro content must be a string"); - this.intro = content + this.intro; - return this; - } - prependLeft(index, content) { - index = index + this.offset; - if (typeof content !== "string") throw new TypeError("inserted content must be a string"); - this._split(index); - const chunk = this.byEnd[index]; - if (chunk) chunk.prependLeft(content); - else this.intro = content + this.intro; - return this; - } - prependRight(index, content) { - index = index + this.offset; - if (typeof content !== "string") throw new TypeError("inserted content must be a string"); - this._split(index); - const chunk = this.byStart[index]; - if (chunk) chunk.prependRight(content); - else this.outro = content + this.outro; - return this; - } - remove(start, end) { - start = start + this.offset; - end = end + this.offset; - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - if (start === end) return this; - if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds"); - if (start > end) throw new Error("end must be greater than start"); - this._split(start); - this._split(end); - let chunk = this.byStart[start]; - while (chunk) { - chunk.intro = ""; - chunk.outro = ""; - chunk.edit(""); - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - reset(start, end) { - start = start + this.offset; - end = end + this.offset; - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - if (start === end) return this; - if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds"); - if (start > end) throw new Error("end must be greater than start"); - this._split(start); - this._split(end); - let chunk = this.byStart[start]; - while (chunk) { - chunk.reset(); - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - } - lastChar() { - if (this.outro.length) return this.outro[this.outro.length - 1]; - let chunk = this.lastChunk; - do { - if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; - if (chunk.content.length) return chunk.content[chunk.content.length - 1]; - if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; - } while (chunk = chunk.previous); - if (this.intro.length) return this.intro[this.intro.length - 1]; - return ""; - } - lastLine() { - let lineIndex = this.outro.lastIndexOf(n$1); - if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); - let lineStr = this.outro; - let chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n$1); - if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.outro + lineStr; - } - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n$1); - if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; - lineStr = chunk.content + lineStr; - } - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n$1); - if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; - lineStr = chunk.intro + lineStr; - } - } while (chunk = chunk.previous); - lineIndex = this.intro.lastIndexOf(n$1); - if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; - return this.intro + lineStr; - } - slice(start = 0, end = this.original.length - this.offset) { - start = start + this.offset; - end = end + this.offset; - if (this.original.length !== 0) { - while (start < 0) start += this.original.length; - while (end < 0) end += this.original.length; - } - let result = ""; - let chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - if (chunk.start < end && chunk.end >= end) return result; - chunk = chunk.next; - } - if (chunk && chunk.edited && chunk.start !== start) throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); - const startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) result += chunk.intro; - const containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); - const sliceStart = startChunk === chunk ? start - chunk.start : 0; - const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - result += chunk.content.slice(sliceStart, sliceEnd); - if (chunk.outro && (!containsEnd || chunk.end === end)) result += chunk.outro; - if (containsEnd) break; - chunk = chunk.next; - } - return result; - } - snip(start, end) { - const clone$1 = this.clone(); - clone$1.remove(0, start); - clone$1.remove(end, clone$1.original.length); - return clone$1; - } - _split(index) { - if (this.byStart[index] || this.byEnd[index]) return; - let chunk = this.lastSearchedChunk; - let previousChunk = chunk; - const searchForward = index > chunk.end; - while (chunk) { - if (chunk.contains(index)) return this._splitChunk(chunk, index); - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - if (chunk === previousChunk) return; - previousChunk = chunk; - } - } - _splitChunk(chunk, index) { - if (chunk.edited && chunk.content.length) { - const loc = getLocator(this.original)(index); - throw new Error(`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`); - } - const newChunk = chunk.split(index); - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - if (chunk === this.lastChunk) this.lastChunk = newChunk; - this.lastSearchedChunk = chunk; - return true; - } - toString() { - let str = this.intro; - let chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - return str + this.outro; - } - isEmpty() { - let chunk = this.firstChunk; - do - if (chunk.intro.length && chunk.intro.trim() || chunk.content.length && chunk.content.trim() || chunk.outro.length && chunk.outro.trim()) return false; - while (chunk = chunk.next); - return true; - } - length() { - let chunk = this.firstChunk; - let length = 0; - do - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - while (chunk = chunk.next); - return length; - } - trimLines() { - return this.trim("[\\r\\n]"); - } - trim(charType) { - return this.trimStart(charType).trimEnd(charType); - } - trimEndAborted(charType) { - const rx = /* @__PURE__ */ new RegExp((charType || "\\s") + "+$"); - this.outro = this.outro.replace(rx, ""); - if (this.outro.length) return true; - let chunk = this.lastChunk; - do { - const end = chunk.end; - const aborted = chunk.trimEnd(rx); - if (chunk.end !== end) { - if (this.lastChunk === chunk) this.lastChunk = chunk.next; - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - if (aborted) return true; - chunk = chunk.previous; - } while (chunk); - return false; - } - trimEnd(charType) { - this.trimEndAborted(charType); - return this; - } - trimStartAborted(charType) { - const rx = /* @__PURE__ */ new RegExp("^" + (charType || "\\s") + "+"); - this.intro = this.intro.replace(rx, ""); - if (this.intro.length) return true; - let chunk = this.firstChunk; - do { - const end = chunk.end; - const aborted = chunk.trimStart(rx); - if (chunk.end !== end) { - if (chunk === this.lastChunk) this.lastChunk = chunk.next; - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - if (aborted) return true; - chunk = chunk.next; - } while (chunk); - return false; - } - trimStart(charType) { - this.trimStartAborted(charType); - return this; - } - hasChanged() { - return this.original !== this.toString(); - } - _replaceRegexp(searchValue, replacement) { - function getReplacement(match, str) { - if (typeof replacement === "string") return replacement.replace(/\$(\$|&|\d+)/g, (_, i$1) => { - if (i$1 === "$") return "$"; - if (i$1 === "&") return match[0]; - if (+i$1 < match.length) return match[+i$1]; - return `$${i$1}`; - }); - else return replacement(...match, match.index, str, match.groups); - } - function matchAll$1(re, str) { - let match; - const matches$2 = []; - while (match = re.exec(str)) matches$2.push(match); - return matches$2; - } - if (searchValue.global) matchAll$1(searchValue, this.original).forEach((match) => { - if (match.index != null) { - const replacement$1 = getReplacement(match, this.original); - if (replacement$1 !== match[0]) this.overwrite(match.index, match.index + match[0].length, replacement$1); - } - }); - else { - const match = this.original.match(searchValue); - if (match && match.index != null) { - const replacement$1 = getReplacement(match, this.original); - if (replacement$1 !== match[0]) this.overwrite(match.index, match.index + match[0].length, replacement$1); - } - } - return this; - } - _replaceString(string, replacement) { - const { original } = this; - const index = original.indexOf(string); - if (index !== -1) { - if (typeof replacement === "function") replacement = replacement(string, index, original); - if (string !== replacement) this.overwrite(index, index + string.length, replacement); - } - return this; - } - replace(searchValue, replacement) { - if (typeof searchValue === "string") return this._replaceString(searchValue, replacement); - return this._replaceRegexp(searchValue, replacement); - } - _replaceAllString(string, replacement) { - const { original } = this; - const stringLength = string.length; - for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) { - const previous = original.slice(index, index + stringLength); - let _replacement = replacement; - if (typeof replacement === "function") _replacement = replacement(previous, index, original); - if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement); - } - return this; - } - replaceAll(searchValue, replacement) { - if (typeof searchValue === "string") return this._replaceAllString(searchValue, replacement); - if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument"); - return this._replaceRegexp(searchValue, replacement); - } -}; - -//#endregion -//#region ../../node_modules/.pnpm/is-reference@1.2.1/node_modules/is-reference/dist/is-reference.js -var require_is_reference = /* @__PURE__ */ __commonJSMin(((exports, module) => { - (function(global$1, factory) { - typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global$1 = global$1 || self, global$1.isReference = factory()); - })(exports, (function() { - "use strict"; - function isReference$1(node, parent) { - if (node.type === "MemberExpression") return !node.computed && isReference$1(node.object, node); - if (node.type === "Identifier") { - if (!parent) return true; - switch (parent.type) { - case "MemberExpression": return parent.computed || node === parent.object; - case "MethodDefinition": return parent.computed; - case "FieldDefinition": return parent.computed || node === parent.value; - case "Property": return parent.computed || node === parent.value; - case "ExportSpecifier": - case "ImportSpecifier": return node === parent.local; - case "LabeledStatement": - case "BreakStatement": - case "ContinueStatement": return false; - default: return true; - } - } - return false; - } - return isReference$1; - })); -})); - -//#endregion -//#region ../../node_modules/.pnpm/@rollup+plugin-commonjs@29.0.0_rollup@4.43.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js -var import_commondir = /* @__PURE__ */ __toESM(require_commondir(), 1); -var import_is_reference = /* @__PURE__ */ __toESM(require_is_reference(), 1); -var version$1 = "29.0.0"; -var peerDependencies = { rollup: "^2.68.0||^3.0.0||^4.0.0" }; -function tryParse(parse$15, code, id) { - try { - return parse$15(code, { allowReturnOutsideFunction: true }); - } catch (err$2) { - err$2.message += ` in ${id}`; - throw err$2; - } -} -const firstpassGlobal = /\b(?:require|module|exports|global)\b/; -const firstpassNoGlobal = /\b(?:require|module|exports)\b/; -function hasCjsKeywords(code, ignoreGlobal) { - return (ignoreGlobal ? firstpassNoGlobal : firstpassGlobal).test(code); -} -function analyzeTopLevelStatements(parse$15, code, id) { - const ast = tryParse(parse$15, code, id); - let isEsModule = false; - let hasDefaultExport = false; - let hasNamedExports = false; - for (const node of ast.body) switch (node.type) { - case "ExportDefaultDeclaration": - isEsModule = true; - hasDefaultExport = true; - break; - case "ExportNamedDeclaration": - isEsModule = true; - if (node.declaration) hasNamedExports = true; - else for (const specifier of node.specifiers) if (specifier.exported.name === "default") hasDefaultExport = true; - else hasNamedExports = true; - break; - case "ExportAllDeclaration": - isEsModule = true; - if (node.exported && node.exported.name === "default") hasDefaultExport = true; - else hasNamedExports = true; - break; - case "ImportDeclaration": - isEsModule = true; - break; - } - return { - isEsModule, - hasDefaultExport, - hasNamedExports, - ast - }; -} -function deconflict(scopes, globals, identifier) { - let i$1 = 1; - let deconflicted = makeLegalIdentifier(identifier); - const hasConflicts = () => scopes.some((scope) => scope.contains(deconflicted)) || globals.has(deconflicted); - while (hasConflicts()) { - deconflicted = makeLegalIdentifier(`${identifier}_${i$1}`); - i$1 += 1; - } - for (const scope of scopes) scope.declarations[deconflicted] = true; - return deconflicted; -} -function getName(id) { - const name = makeLegalIdentifier(basename$1(id, extname$1(id))); - if (name !== "index") return name; - return makeLegalIdentifier(basename$1(dirname$1(id))); -} -function normalizePathSlashes(path$13) { - return path$13.replace(/\\/g, "/"); -} -const getVirtualPathForDynamicRequirePath = (path$13, commonDir) => `/${normalizePathSlashes(relative$1(commonDir, path$13))}`; -function capitalize(name) { - return name[0].toUpperCase() + name.slice(1); -} -function getStrictRequiresFilter({ strictRequires }) { - switch (strictRequires) { - case void 0: - case true: return { - strictRequiresFilter: () => true, - detectCyclesAndConditional: false - }; - case "auto": - case "debug": - case null: return { - strictRequiresFilter: () => false, - detectCyclesAndConditional: true - }; - case false: return { - strictRequiresFilter: () => false, - detectCyclesAndConditional: false - }; - default: - if (typeof strictRequires === "string" || Array.isArray(strictRequires)) return { - strictRequiresFilter: createFilter$2(strictRequires), - detectCyclesAndConditional: false - }; - throw new Error("Unexpected value for \"strictRequires\" option."); - } -} -function getPackageEntryPoint(dirPath) { - let entryPoint = "index.js"; - try { - if (existsSync$1(join$1(dirPath, "package.json"))) entryPoint = JSON.parse(readFileSync$1(join$1(dirPath, "package.json"), { encoding: "utf8" })).main || entryPoint; - } catch (ignored) {} - return entryPoint; -} -function isDirectory$1(path$13) { - try { - if (statSync(path$13).isDirectory()) return true; - } catch (ignored) {} - return false; -} -function getDynamicRequireModules(patterns, dynamicRequireRoot) { - const dynamicRequireModules = /* @__PURE__ */ new Map(); - const dirNames = /* @__PURE__ */ new Set(); - for (const pattern of !patterns || Array.isArray(patterns) ? patterns || [] : [patterns]) { - const isNegated = pattern.startsWith("!"); - const modifyMap = (targetPath, resolvedPath) => isNegated ? dynamicRequireModules.delete(targetPath) : dynamicRequireModules.set(targetPath, resolvedPath); - for (const path$13 of new fdir().withBasePath().withDirs().glob(isNegated ? pattern.substr(1) : pattern).crawl(relative$1(".", dynamicRequireRoot)).sync().sort((a, b) => a.localeCompare(b, "en"))) { - const resolvedPath = resolve$1(path$13); - const requirePath = normalizePathSlashes(resolvedPath); - if (isDirectory$1(resolvedPath)) { - dirNames.add(resolvedPath); - const modulePath = resolve$1(join$1(resolvedPath, getPackageEntryPoint(path$13))); - modifyMap(requirePath, modulePath); - modifyMap(normalizePathSlashes(modulePath), modulePath); - } else { - dirNames.add(dirname$1(resolvedPath)); - modifyMap(requirePath, resolvedPath); - } - } - } - return { - commonDir: dirNames.size ? (0, import_commondir.default)([...dirNames, dynamicRequireRoot]) : null, - dynamicRequireModules - }; -} -const FAILED_REQUIRE_ERROR = `throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');`; -const COMMONJS_REQUIRE_EXPORT = "commonjsRequire"; -const CREATE_COMMONJS_REQUIRE_EXPORT = "createCommonjsRequire"; -function getDynamicModuleRegistry(isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, ignoreDynamicRequires) { - if (!isDynamicRequireModulesEnabled) return `export function ${COMMONJS_REQUIRE_EXPORT}(path) { - ${FAILED_REQUIRE_ERROR} -}`; - return `${[...dynamicRequireModules.values()].map((id, index) => `import ${id.endsWith(".json") ? `json${index}` : `{ __require as require${index} }`} from ${JSON.stringify(id)};`).join("\n")} - -var dynamicModules; - -function getDynamicModules() { - return dynamicModules || (dynamicModules = { -${[...dynamicRequireModules.keys()].map((id, index) => `\t\t${JSON.stringify(getVirtualPathForDynamicRequirePath(id, commonDir))}: ${id.endsWith(".json") ? `function () { return json${index}; }` : `require${index}`}`).join(",\n")} - }); -} - -export function ${CREATE_COMMONJS_REQUIRE_EXPORT}(originalModuleDir) { - function handleRequire(path) { - var resolvedPath = commonjsResolve(path, originalModuleDir); - if (resolvedPath !== null) { - return getDynamicModules()[resolvedPath](); - } - ${ignoreDynamicRequires ? "return require(path);" : FAILED_REQUIRE_ERROR} - } - handleRequire.resolve = function (path) { - var resolvedPath = commonjsResolve(path, originalModuleDir); - if (resolvedPath !== null) { - return resolvedPath; - } - return require.resolve(path); - } - return handleRequire; -} - -function commonjsResolve (path, originalModuleDir) { - var shouldTryNodeModules = isPossibleNodeModulesPath(path); - path = normalize(path); - var relPath; - if (path[0] === '/') { - originalModuleDir = ''; - } - var modules = getDynamicModules(); - var checkedExtensions = ['', '.js', '.json']; - while (true) { - if (!shouldTryNodeModules) { - relPath = normalize(originalModuleDir + '/' + path); - } else { - relPath = normalize(originalModuleDir + '/node_modules/' + path); - } - - if (relPath.endsWith('/..')) { - break; // Travelled too far up, avoid infinite loop - } - - for (var extensionIndex = 0; extensionIndex < checkedExtensions.length; extensionIndex++) { - var resolvedPath = relPath + checkedExtensions[extensionIndex]; - if (modules[resolvedPath]) { - return resolvedPath; - } - } - if (!shouldTryNodeModules) break; - var nextDir = normalize(originalModuleDir + '/..'); - if (nextDir === originalModuleDir) break; - originalModuleDir = nextDir; - } - return null; -} - -function isPossibleNodeModulesPath (modulePath) { - var c0 = modulePath[0]; - if (c0 === '/' || c0 === '\\\\') return false; - var c1 = modulePath[1], c2 = modulePath[2]; - if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) || - (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false; - if (c1 === ':' && (c2 === '/' || c2 === '\\\\')) return false; - return true; -} - -function normalize (path) { - path = path.replace(/\\\\/g, '/'); - var parts = path.split('/'); - var slashed = parts[0] === ''; - for (var i = 1; i < parts.length; i++) { - if (parts[i] === '.' || parts[i] === '') { - parts.splice(i--, 1); - } - } - for (var i = 1; i < parts.length; i++) { - if (parts[i] !== '..') continue; - if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') { - parts.splice(--i, 2); - i--; - } - } - path = parts.join('/'); - if (slashed && path[0] !== '/') path = '/' + path; - else if (path.length === 0) path = '.'; - return path; -}`; -} -const isWrappedId = (id, suffix) => id.endsWith(suffix); -const wrapId$1 = (id, suffix) => `\0${id}${suffix}`; -const unwrapId$1 = (wrappedId, suffix) => wrappedId.slice(1, -suffix.length); -const PROXY_SUFFIX = "?commonjs-proxy"; -const WRAPPED_SUFFIX = "?commonjs-wrapped"; -const EXTERNAL_SUFFIX = "?commonjs-external"; -const EXPORTS_SUFFIX = "?commonjs-exports"; -const MODULE_SUFFIX = "?commonjs-module"; -const ENTRY_SUFFIX = "?commonjs-entry"; -const ES_IMPORT_SUFFIX = "?commonjs-es-import"; -const DYNAMIC_MODULES_ID = "\0commonjs-dynamic-modules"; -const HELPERS_ID = "\0commonjsHelpers.js"; -const IS_WRAPPED_COMMONJS = "withRequireFunction"; -const HELPERS = ` -export var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -export function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -export function getDefaultExportFromNamespaceIfPresent (n) { - return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; -} - -export function getDefaultExportFromNamespaceIfNotNamed (n) { - return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; -} - -export function getAugmentedNamespace(n) { - if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n; - var f = n.default; - if (typeof f == "function") { - var a = function a () { - var isInstance = false; - try { - isInstance = this instanceof a; - } catch {} - if (isInstance) { - return Reflect.construct(f, arguments, this.constructor); - } - return f.apply(this, arguments); - }; - a.prototype = f.prototype; - } else a = {}; - Object.defineProperty(a, '__esModule', {value: true}); - Object.keys(n).forEach(function (k) { - var d = Object.getOwnPropertyDescriptor(n, k); - Object.defineProperty(a, k, d.get ? d : { - enumerable: true, - get: function () { - return n[k]; - } - }); - }); - return a; -} -`; -function getHelpersModule() { - return HELPERS; -} -function getUnknownRequireProxy(id, requireReturnsDefault) { - if (requireReturnsDefault === true || id.endsWith(".json")) return `export { default } from ${JSON.stringify(id)};`; - const name = getName(id); - const exported = requireReturnsDefault === "auto" ? `import { getDefaultExportFromNamespaceIfNotNamed } from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(${name});` : requireReturnsDefault === "preferred" ? `import { getDefaultExportFromNamespaceIfPresent } from "${HELPERS_ID}"; export default /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(${name});` : !requireReturnsDefault ? `import { getAugmentedNamespace } from "${HELPERS_ID}"; export default /*@__PURE__*/getAugmentedNamespace(${name});` : `export default ${name};`; - return `import * as ${name} from ${JSON.stringify(id)}; ${exported}`; -} -async function getStaticRequireProxy(id, requireReturnsDefault, loadModule) { - const name = getName(id); - const { meta: { commonjs: commonjsMeta } } = await loadModule({ id }); - if (!commonjsMeta) return getUnknownRequireProxy(id, requireReturnsDefault); - if (commonjsMeta.isCommonJS) return `export { __moduleExports as default } from ${JSON.stringify(id)};`; - if (!requireReturnsDefault) return `import { getAugmentedNamespace } from "${HELPERS_ID}"; import * as ${name} from ${JSON.stringify(id)}; export default /*@__PURE__*/getAugmentedNamespace(${name});`; - if (requireReturnsDefault !== true && (requireReturnsDefault === "namespace" || !commonjsMeta.hasDefaultExport || requireReturnsDefault === "auto" && commonjsMeta.hasNamedExports)) return `import * as ${name} from ${JSON.stringify(id)}; export default ${name};`; - return `export { default } from ${JSON.stringify(id)};`; -} -function getEntryProxy(id, defaultIsModuleExports, getModuleInfo, shebang) { - const { meta: { commonjs: commonjsMeta }, hasDefaultExport } = getModuleInfo(id); - if (!commonjsMeta || commonjsMeta.isCommonJS !== IS_WRAPPED_COMMONJS) { - const stringifiedId = JSON.stringify(id); - let code = `export * from ${stringifiedId};`; - if (hasDefaultExport) code += `export { default } from ${stringifiedId};`; - return shebang + code; - } - const result = getEsImportProxy(id, defaultIsModuleExports, true); - return { - ...result, - code: shebang + result.code - }; -} -function getEsImportProxy(id, defaultIsModuleExports, moduleSideEffects) { - const name = getName(id); - const exportsName = `${name}Exports`; - const requireModule = `require${capitalize(name)}`; - let code = `import { getDefaultExportFromCjs } from "${HELPERS_ID}";\nimport { __require as ${requireModule} } from ${JSON.stringify(id)};\nvar ${exportsName} = ${moduleSideEffects ? "" : "/*@__PURE__*/ "}${requireModule}();\nexport { ${exportsName} as __moduleExports };`; - if (defaultIsModuleExports === true) code += `\nexport { ${exportsName} as default };`; - else if (defaultIsModuleExports === false) code += `\nexport default ${exportsName}.default;`; - else code += `\nexport default /*@__PURE__*/getDefaultExportFromCjs(${exportsName});`; - return { - code, - syntheticNamedExports: "__moduleExports" - }; -} -function getExternalBuiltinRequireProxy(id) { - return `import { createRequire } from 'node:module'; -const require = createRequire(import.meta.url); -export function __require() { return require(${JSON.stringify(id)}); }`; -} -function getCandidatesForExtension(resolved, extension$1) { - return [resolved + extension$1, `${resolved}${sep$1}index${extension$1}`]; -} -function getCandidates(resolved, extensions$1) { - return extensions$1.reduce((paths, extension$1) => paths.concat(getCandidatesForExtension(resolved, extension$1)), [resolved]); -} -function resolveExtensions(importee, importer, extensions$1) { - if (importee[0] !== "." || !importer) return void 0; - const candidates = getCandidates(resolve$1(dirname$1(importer), importee), extensions$1); - for (let i$1 = 0; i$1 < candidates.length; i$1 += 1) try { - if (statSync(candidates[i$1]).isFile()) return { id: candidates[i$1] }; - } catch (err$2) {} -} -function getResolveId(extensions$1, isPossibleCjsId) { - const currentlyResolving = /* @__PURE__ */ new Map(); - return { - currentlyResolving, - async resolveId(importee, importer, resolveOptions) { - if (resolveOptions.custom?.["node-resolve"]?.isRequire) return null; - const currentlyResolvingForParent = currentlyResolving.get(importer); - if (currentlyResolvingForParent && currentlyResolvingForParent.has(importee)) { - this.warn({ - code: "THIS_RESOLVE_WITHOUT_OPTIONS", - message: "It appears a plugin has implemented a \"resolveId\" hook that uses \"this.resolve\" without forwarding the third \"options\" parameter of \"resolveId\". This is problematic as it can lead to wrong module resolutions especially for the node-resolve plugin and in certain cases cause early exit errors for the commonjs plugin.\nIn rare cases, this warning can appear if the same file is both imported and required from the same mixed ES/CommonJS module, in which case it can be ignored.", - url: "https://rollupjs.org/guide/en/#resolveid" - }); - return null; - } - if (isWrappedId(importee, WRAPPED_SUFFIX)) return unwrapId$1(importee, WRAPPED_SUFFIX); - if (importee.endsWith(ENTRY_SUFFIX) || isWrappedId(importee, MODULE_SUFFIX) || isWrappedId(importee, EXPORTS_SUFFIX) || isWrappedId(importee, PROXY_SUFFIX) || isWrappedId(importee, ES_IMPORT_SUFFIX) || isWrappedId(importee, EXTERNAL_SUFFIX) || importee.startsWith(HELPERS_ID) || importee === DYNAMIC_MODULES_ID) return importee; - if (importer) { - if (importer === DYNAMIC_MODULES_ID || isWrappedId(importer, PROXY_SUFFIX) || isWrappedId(importer, ES_IMPORT_SUFFIX) || importer.endsWith(ENTRY_SUFFIX)) return importee; - if (isWrappedId(importer, EXTERNAL_SUFFIX)) { - if (!await this.resolve(importee, importer, Object.assign({ skipSelf: true }, resolveOptions))) return null; - return { - id: importee, - external: true - }; - } - } - if (importee.startsWith("\0")) return null; - const resolved = await this.resolve(importee, importer, Object.assign({ skipSelf: true }, resolveOptions)) || resolveExtensions(importee, importer, extensions$1); - if (!resolved || resolved.external || resolved.id.endsWith(ENTRY_SUFFIX) || isWrappedId(resolved.id, ES_IMPORT_SUFFIX) || !isPossibleCjsId(resolved.id)) return resolved; - const moduleInfo = await this.load(resolved); - const { meta: { commonjs: commonjsMeta } } = moduleInfo; - if (commonjsMeta) { - const { isCommonJS } = commonjsMeta; - if (isCommonJS) { - if (resolveOptions.isEntry) { - moduleInfo.moduleSideEffects = true; - return resolved.id + ENTRY_SUFFIX; - } - if (isCommonJS === IS_WRAPPED_COMMONJS) return { - id: wrapId$1(resolved.id, ES_IMPORT_SUFFIX), - meta: { commonjs: { resolved } } - }; - } - } - return resolved; - } - }; -} -function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving, requireNodeBuiltins) { - const knownCjsModuleTypes = Object.create(null); - const requiredIds = Object.create(null); - const unconditionallyRequiredIds = Object.create(null); - const dependencies = Object.create(null); - const getDependencies = (id) => dependencies[id] || (dependencies[id] = /* @__PURE__ */ new Set()); - const isCyclic = (id) => { - const dependenciesToCheck = new Set(getDependencies(id)); - for (const dependency of dependenciesToCheck) { - if (dependency === id) return true; - for (const childDependency of getDependencies(dependency)) dependenciesToCheck.add(childDependency); - } - return false; - }; - const fullyAnalyzedModules = Object.create(null); - const getTypeForFullyAnalyzedModule = (id) => { - const knownType = knownCjsModuleTypes[id]; - if (knownType !== true || !detectCyclesAndConditional || fullyAnalyzedModules[id]) return knownType; - if (isCyclic(id)) return knownCjsModuleTypes[id] = IS_WRAPPED_COMMONJS; - return knownType; - }; - const setInitialParentType = (id, initialCommonJSType) => { - if (fullyAnalyzedModules[id]) return; - knownCjsModuleTypes[id] = initialCommonJSType; - if (detectCyclesAndConditional && knownCjsModuleTypes[id] === true && requiredIds[id] && !unconditionallyRequiredIds[id]) knownCjsModuleTypes[id] = IS_WRAPPED_COMMONJS; - }; - const analyzeRequiredModule = async (parentId, resolved, isConditional, loadModule) => { - const childId = resolved.id; - requiredIds[childId] = true; - if (!(isConditional || knownCjsModuleTypes[parentId] === IS_WRAPPED_COMMONJS)) unconditionallyRequiredIds[childId] = true; - getDependencies(parentId).add(childId); - if (!isCyclic(childId)) await loadModule(resolved); - }; - const getTypeForImportedModule = async (resolved, loadModule) => { - if (resolved.id in knownCjsModuleTypes) return knownCjsModuleTypes[resolved.id]; - const { meta: { commonjs: commonjs$1 } } = await loadModule(resolved); - return commonjs$1 && commonjs$1.isCommonJS || false; - }; - return { - getWrappedIds: () => Object.keys(knownCjsModuleTypes).filter((id) => knownCjsModuleTypes[id] === IS_WRAPPED_COMMONJS), - isRequiredId: (id) => requiredIds[id], - async shouldTransformCachedModule({ id: parentId, resolvedSources, meta: { commonjs: parentMeta } }) { - if (!(parentMeta && parentMeta.isCommonJS)) knownCjsModuleTypes[parentId] = false; - if (isWrappedId(parentId, ES_IMPORT_SUFFIX)) return false; - const parentRequires = parentMeta && parentMeta.requires; - if (parentRequires) { - setInitialParentType(parentId, parentMeta.initialCommonJSType); - await Promise.all(parentRequires.map(({ resolved, isConditional }) => analyzeRequiredModule(parentId, resolved, isConditional, this.load))); - if (getTypeForFullyAnalyzedModule(parentId) !== parentMeta.isCommonJS) return true; - for (const { resolved: { id } } of parentRequires) if (getTypeForFullyAnalyzedModule(id) !== parentMeta.isRequiredCommonJS[id]) return true; - fullyAnalyzedModules[parentId] = true; - for (const { resolved: { id } } of parentRequires) fullyAnalyzedModules[id] = true; - } - const parentRequireSet = new Set((parentRequires || []).map(({ resolved: { id } }) => id)); - return (await Promise.all(Object.keys(resolvedSources).map((source) => resolvedSources[source]).filter(({ id, external }) => !(external || parentRequireSet.has(id))).map(async (resolved) => { - if (isWrappedId(resolved.id, ES_IMPORT_SUFFIX)) return await getTypeForImportedModule((await this.load(resolved)).meta.commonjs.resolved, this.load) !== IS_WRAPPED_COMMONJS; - return await getTypeForImportedModule(resolved, this.load) === IS_WRAPPED_COMMONJS; - }))).some((shouldTransform) => shouldTransform); - }, - resolveRequireSourcesAndUpdateMeta: (rollupContext) => async (parentId, isParentCommonJS, parentMeta, sources) => { - parentMeta.initialCommonJSType = isParentCommonJS; - parentMeta.requires = []; - parentMeta.isRequiredCommonJS = Object.create(null); - setInitialParentType(parentId, isParentCommonJS); - const currentlyResolvingForParent = currentlyResolving.get(parentId) || /* @__PURE__ */ new Set(); - currentlyResolving.set(parentId, currentlyResolvingForParent); - const requireTargets = await Promise.all(sources.map(async ({ source, isConditional }) => { - if (source.startsWith("\0")) return { - id: source, - allowProxy: false - }; - currentlyResolvingForParent.add(source); - const resolved = await rollupContext.resolve(source, parentId, { - skipSelf: false, - custom: { "node-resolve": { isRequire: true } } - }) || resolveExtensions(source, parentId, extensions$1); - currentlyResolvingForParent.delete(source); - if (!resolved) return { - id: wrapId$1(source, EXTERNAL_SUFFIX), - allowProxy: false - }; - const childId = resolved.id; - if (resolved.external) return { - id: wrapId$1(childId, EXTERNAL_SUFFIX), - allowProxy: false - }; - parentMeta.requires.push({ - resolved, - isConditional - }); - await analyzeRequiredModule(parentId, resolved, isConditional, rollupContext.load); - return { - id: childId, - allowProxy: true - }; - })); - parentMeta.isCommonJS = getTypeForFullyAnalyzedModule(parentId); - fullyAnalyzedModules[parentId] = true; - return requireTargets.map(({ id: dependencyId, allowProxy }, index) => { - let isCommonJS = parentMeta.isRequiredCommonJS[dependencyId] = getTypeForFullyAnalyzedModule(dependencyId); - const isExternalWrapped = isWrappedId(dependencyId, EXTERNAL_SUFFIX); - let resolvedDependencyId = dependencyId; - if (requireNodeBuiltins === true) { - if (parentMeta.isCommonJS === IS_WRAPPED_COMMONJS && !allowProxy && isExternalWrapped) { - if (unwrapId$1(dependencyId, EXTERNAL_SUFFIX).startsWith("node:")) { - isCommonJS = IS_WRAPPED_COMMONJS; - parentMeta.isRequiredCommonJS[dependencyId] = isCommonJS; - } - } else if (isExternalWrapped && !allowProxy) { - const actualExternalId = unwrapId$1(dependencyId, EXTERNAL_SUFFIX); - if (actualExternalId.startsWith("node:")) resolvedDependencyId = actualExternalId; - } - } - const isWrappedCommonJS = isCommonJS === IS_WRAPPED_COMMONJS; - fullyAnalyzedModules[dependencyId] = true; - const moduleInfo = isWrappedCommonJS && !isExternalWrapped ? rollupContext.getModuleInfo(dependencyId) : null; - return { - wrappedModuleSideEffects: !isWrappedCommonJS ? false : moduleInfo?.moduleSideEffects ?? true, - source: sources[index].source, - id: allowProxy ? wrapId$1(resolvedDependencyId, isWrappedCommonJS ? WRAPPED_SUFFIX : PROXY_SUFFIX) : resolvedDependencyId, - isCommonJS - }; - }); - }, - isCurrentlyResolving(source, parentId) { - const currentlyResolvingForParent = currentlyResolving.get(parentId); - return currentlyResolvingForParent && currentlyResolvingForParent.has(source); - } - }; -} -function validateVersion(actualVersion, peerDependencyVersion, name) { - const versionRegexp = /\^(\d+\.\d+\.\d+)/g; - let minMajor = Infinity; - let minMinor = Infinity; - let minPatch = Infinity; - let foundVersion; - while (foundVersion = versionRegexp.exec(peerDependencyVersion)) { - const [foundMajor, foundMinor, foundPatch] = foundVersion[1].split(".").map(Number); - if (foundMajor < minMajor) { - minMajor = foundMajor; - minMinor = foundMinor; - minPatch = foundPatch; - } - } - if (!actualVersion) throw new Error(`Insufficient ${name} version: "@rollup/plugin-commonjs" requires at least ${name}@${minMajor}.${minMinor}.${minPatch}.`); - const [major, minor, patch] = actualVersion.split(".").map(Number); - if (major < minMajor || major === minMajor && (minor < minMinor || minor === minMinor && patch < minPatch)) throw new Error(`Insufficient ${name} version: "@rollup/plugin-commonjs" requires at least ${name}@${minMajor}.${minMinor}.${minPatch} but found ${name}@${actualVersion}.`); -} -const operators = { - "==": (x) => equals(x.left, x.right, false), - "!=": (x) => not(operators["=="](x)), - "===": (x) => equals(x.left, x.right, true), - "!==": (x) => not(operators["==="](x)), - "!": (x) => isFalsy(x.argument), - "&&": (x) => isTruthy(x.left) && isTruthy(x.right), - "||": (x) => isTruthy(x.left) || isTruthy(x.right) -}; -function not(value$1) { - return value$1 === null ? value$1 : !value$1; -} -function equals(a, b, strict) { - if (a.type !== b.type) return null; - if (a.type === "Literal") return strict ? a.value === b.value : a.value == b.value; - return null; -} -function isTruthy(node) { - if (!node) return false; - if (node.type === "Literal") return !!node.value; - if (node.type === "ParenthesizedExpression") return isTruthy(node.expression); - if (node.operator in operators) return operators[node.operator](node); - return null; -} -function isFalsy(node) { - return not(isTruthy(node)); -} -function getKeypath(node) { - const parts = []; - while (node.type === "MemberExpression") { - if (node.computed) return null; - parts.unshift(node.property.name); - node = node.object; - } - if (node.type !== "Identifier") return null; - const { name } = node; - parts.unshift(name); - return { - name, - keypath: parts.join(".") - }; -} -const KEY_COMPILED_ESM = "__esModule"; -function getDefineCompiledEsmType(node) { - const definedPropertyWithExports = getDefinePropertyCallName(node, "exports"); - const definedProperty = definedPropertyWithExports || getDefinePropertyCallName(node, "module.exports"); - if (definedProperty && definedProperty.key === KEY_COMPILED_ESM) return isTruthy(definedProperty.value) ? definedPropertyWithExports ? "exports" : "module" : false; - return false; -} -function getDefinePropertyCallName(node, targetName) { - const { callee: { object, property } } = node; - if (!object || object.type !== "Identifier" || object.name !== "Object") return; - if (!property || property.type !== "Identifier" || property.name !== "defineProperty") return; - if (node.arguments.length !== 3) return; - const targetNames = targetName.split("."); - const [target, key, value$1] = node.arguments; - if (targetNames.length === 1) { - if (target.type !== "Identifier" || target.name !== targetNames[0]) return; - } - if (targetNames.length === 2) { - if (target.type !== "MemberExpression" || target.object.name !== targetNames[0] || target.property.name !== targetNames[1]) return; - } - if (value$1.type !== "ObjectExpression" || !value$1.properties) return; - const valueProperty = value$1.properties.find((p) => p.key && p.key.name === "value"); - if (!valueProperty || !valueProperty.value) return; - return { - key: key.value, - value: valueProperty.value - }; -} -function isShorthandProperty(parent) { - return parent && parent.type === "Property" && parent.shorthand; -} -function wrapCode(magicString, uses, moduleName, exportsName, indentExclusionRanges) { - const args = []; - const passedArgs = []; - if (uses.module) { - args.push("module"); - passedArgs.push(moduleName); - } - if (uses.exports) { - args.push("exports"); - passedArgs.push(uses.module ? `${moduleName}.exports` : exportsName); - } - magicString.trim().indent(" ", { exclude: indentExclusionRanges }).prepend(`(function (${args.join(", ")}) {\n`).append(` \n} (${passedArgs.join(", ")}));`); -} -function rewriteExportsAndGetExportsBlock(magicString, moduleName, exportsName, exportedExportsName, wrapped, moduleExportsAssignments, firstTopLevelModuleExportsAssignment, exportsAssignmentsByName, topLevelAssignments, defineCompiledEsmExpressions, deconflictedExportNames, code, HELPERS_NAME, exportMode, defaultIsModuleExports, usesRequireWrapper, requireName) { - const exports$1 = []; - const exportDeclarations = []; - if (usesRequireWrapper) getExportsWhenUsingRequireWrapper(magicString, wrapped, exportMode, exports$1, moduleExportsAssignments, exportsAssignmentsByName, moduleName, exportsName, requireName, defineCompiledEsmExpressions); - else if (exportMode === "replace") getExportsForReplacedModuleExports(magicString, exports$1, exportDeclarations, moduleExportsAssignments, firstTopLevelModuleExportsAssignment, exportsName, defaultIsModuleExports, HELPERS_NAME); - else { - if (exportMode === "module") { - exportDeclarations.push(`var ${exportedExportsName} = ${moduleName}.exports`); - exports$1.push(`${exportedExportsName} as __moduleExports`); - } else exports$1.push(`${exportsName} as __moduleExports`); - if (wrapped) exportDeclarations.push(getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME)); - else getExports(magicString, exports$1, exportDeclarations, moduleExportsAssignments, exportsAssignmentsByName, deconflictedExportNames, topLevelAssignments, moduleName, exportsName, exportedExportsName, defineCompiledEsmExpressions, HELPERS_NAME, defaultIsModuleExports, exportMode); - } - if (exports$1.length) exportDeclarations.push(`export { ${exports$1.join(", ")} }`); - return `\n\n${exportDeclarations.join(";\n")};`; -} -function getExportsWhenUsingRequireWrapper(magicString, wrapped, exportMode, exports$1, moduleExportsAssignments, exportsAssignmentsByName, moduleName, exportsName, requireName, defineCompiledEsmExpressions) { - exports$1.push(`${requireName} as __require`); - if (wrapped) return; - if (exportMode === "replace") rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, exportsName); - else { - rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, `${moduleName}.exports`); - for (const [exportName, { nodes }] of exportsAssignmentsByName) for (const { node, type } of nodes) magicString.overwrite(node.start, node.left.end, `${exportMode === "module" && type === "module" ? `${moduleName}.exports` : exportsName}.${exportName}`); - replaceDefineCompiledEsmExpressionsAndGetIfRestorable(defineCompiledEsmExpressions, magicString, exportMode, moduleName, exportsName); - } -} -function getExportsForReplacedModuleExports(magicString, exports$1, exportDeclarations, moduleExportsAssignments, firstTopLevelModuleExportsAssignment, exportsName, defaultIsModuleExports, HELPERS_NAME) { - for (const { left } of moduleExportsAssignments) magicString.overwrite(left.start, left.end, exportsName); - magicString.prependRight(firstTopLevelModuleExportsAssignment.left.start, "var "); - exports$1.push(`${exportsName} as __moduleExports`); - exportDeclarations.push(getDefaultExportDeclaration(exportsName, defaultIsModuleExports, HELPERS_NAME)); -} -function getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME) { - return `export default ${defaultIsModuleExports === true ? exportedExportsName : defaultIsModuleExports === false ? `${exportedExportsName}.default` : `/*@__PURE__*/${HELPERS_NAME}.getDefaultExportFromCjs(${exportedExportsName})`}`; -} -function getExports(magicString, exports$1, exportDeclarations, moduleExportsAssignments, exportsAssignmentsByName, deconflictedExportNames, topLevelAssignments, moduleName, exportsName, exportedExportsName, defineCompiledEsmExpressions, HELPERS_NAME, defaultIsModuleExports, exportMode) { - let deconflictedDefaultExportName; - for (const { left } of moduleExportsAssignments) magicString.overwrite(left.start, left.end, `${moduleName}.exports`); - for (const [exportName, { nodes }] of exportsAssignmentsByName) { - const deconflicted = deconflictedExportNames[exportName]; - let needsDeclaration = true; - for (const { node, type } of nodes) { - let replacement = `${deconflicted} = ${exportMode === "module" && type === "module" ? `${moduleName}.exports` : exportsName}.${exportName}`; - if (needsDeclaration && topLevelAssignments.has(node)) { - replacement = `var ${replacement}`; - needsDeclaration = false; - } - magicString.overwrite(node.start, node.left.end, replacement); - } - if (needsDeclaration) magicString.prepend(`var ${deconflicted};\n`); - if (exportName === "default") deconflictedDefaultExportName = deconflicted; - else exports$1.push(exportName === deconflicted ? exportName : `${deconflicted} as ${exportName}`); - } - const isRestorableCompiledEsm = replaceDefineCompiledEsmExpressionsAndGetIfRestorable(defineCompiledEsmExpressions, magicString, exportMode, moduleName, exportsName); - if (defaultIsModuleExports === false || defaultIsModuleExports === "auto" && isRestorableCompiledEsm && moduleExportsAssignments.length === 0) exports$1.push(`${deconflictedDefaultExportName || exportedExportsName} as default`); - else if (defaultIsModuleExports === true || !isRestorableCompiledEsm && moduleExportsAssignments.length === 0) exports$1.push(`${exportedExportsName} as default`); - else exportDeclarations.push(getDefaultExportDeclaration(exportedExportsName, defaultIsModuleExports, HELPERS_NAME)); -} -function rewriteModuleExportsAssignments(magicString, moduleExportsAssignments, exportsName) { - for (const { left } of moduleExportsAssignments) magicString.overwrite(left.start, left.end, exportsName); -} -function replaceDefineCompiledEsmExpressionsAndGetIfRestorable(defineCompiledEsmExpressions, magicString, exportMode, moduleName, exportsName) { - let isRestorableCompiledEsm = false; - for (const { node, type } of defineCompiledEsmExpressions) { - isRestorableCompiledEsm = true; - const moduleExportsExpression = node.type === "CallExpression" ? node.arguments[0] : node.left.object; - magicString.overwrite(moduleExportsExpression.start, moduleExportsExpression.end, exportMode === "module" && type === "module" ? `${moduleName}.exports` : exportsName); - } - return isRestorableCompiledEsm; -} -function isRequireExpression(node, scope) { - if (!node) return false; - if (node.type !== "CallExpression") return false; - if (node.arguments.length === 0) return false; - return isRequire(node.callee, scope); -} -function isRequire(node, scope) { - return node.type === "Identifier" && node.name === "require" && !scope.contains("require") || node.type === "MemberExpression" && isModuleRequire(node, scope); -} -function isModuleRequire({ object, property }, scope) { - return object.type === "Identifier" && object.name === "module" && property.type === "Identifier" && property.name === "require" && !scope.contains("module"); -} -function hasDynamicArguments(node) { - return node.arguments.length > 1 || node.arguments[0].type !== "Literal" && (node.arguments[0].type !== "TemplateLiteral" || node.arguments[0].expressions.length > 0); -} -const reservedMethod = { - resolve: true, - cache: true, - main: true -}; -function isNodeRequirePropertyAccess(parent) { - return parent && parent.property && reservedMethod[parent.property.name]; -} -function getRequireStringArg(node) { - return node.arguments[0].type === "Literal" ? node.arguments[0].value : node.arguments[0].quasis[0].value.cooked; -} -function getRequireHandlers() { - const requireExpressions = []; - function addRequireExpression(sourceId, node, scope, usesReturnValue, isInsideTryBlock, isInsideConditional, toBeRemoved) { - requireExpressions.push({ - sourceId, - node, - scope, - usesReturnValue, - isInsideTryBlock, - isInsideConditional, - toBeRemoved - }); - } - async function rewriteRequireExpressionsAndGetImportBlock(magicString, topLevelDeclarations, reassignedNames, helpersName, dynamicRequireName, moduleName, exportsName, id, exportMode, resolveRequireSourcesAndUpdateMeta, needsRequireWrapper, isEsModule, isDynamicRequireModulesEnabled, getIgnoreTryCatchRequireStatementMode, commonjsMeta) { - const imports = []; - imports.push(`import * as ${helpersName} from "${HELPERS_ID}"`); - if (dynamicRequireName) imports.push(`import { ${isDynamicRequireModulesEnabled ? CREATE_COMMONJS_REQUIRE_EXPORT : COMMONJS_REQUIRE_EXPORT} as ${dynamicRequireName} } from "${DYNAMIC_MODULES_ID}"`); - if (exportMode === "module") imports.push(`import { __module as ${moduleName} } from ${JSON.stringify(wrapId$1(id, MODULE_SUFFIX))}`, `var ${exportsName} = ${moduleName}.exports`); - else if (exportMode === "exports") imports.push(`import { __exports as ${exportsName} } from ${JSON.stringify(wrapId$1(id, EXPORTS_SUFFIX))}`); - const requiresBySource = collectSources(requireExpressions); - processRequireExpressions(imports, await resolveRequireSourcesAndUpdateMeta(id, needsRequireWrapper ? IS_WRAPPED_COMMONJS : !isEsModule, commonjsMeta, Object.keys(requiresBySource).map((source) => { - return { - source, - isConditional: requiresBySource[source].every((require$2) => require$2.isInsideConditional) - }; - })), requiresBySource, getIgnoreTryCatchRequireStatementMode, magicString); - return imports.length ? `${imports.join(";\n")};\n\n` : ""; - } - return { - addRequireExpression, - rewriteRequireExpressionsAndGetImportBlock - }; -} -function collectSources(requireExpressions) { - const requiresBySource = Object.create(null); - for (const requireExpression of requireExpressions) { - const { sourceId } = requireExpression; - if (!requiresBySource[sourceId]) requiresBySource[sourceId] = []; - requiresBySource[sourceId].push(requireExpression); - } - return requiresBySource; -} -function processRequireExpressions(imports, requireTargets, requiresBySource, getIgnoreTryCatchRequireStatementMode, magicString) { - const generateRequireName = getGenerateRequireName(); - for (const { source, id: resolvedId, isCommonJS, wrappedModuleSideEffects } of requireTargets) { - const requires = requiresBySource[source]; - const name = generateRequireName(requires); - let usesRequired = false; - let needsImport = false; - for (const { node, usesReturnValue, toBeRemoved, isInsideTryBlock } of requires) { - const { canConvertRequire, shouldRemoveRequire } = isInsideTryBlock && isWrappedId(resolvedId, EXTERNAL_SUFFIX) ? getIgnoreTryCatchRequireStatementMode(source) : { - canConvertRequire: true, - shouldRemoveRequire: false - }; - if (shouldRemoveRequire) if (usesReturnValue) magicString.overwrite(node.start, node.end, "undefined"); - else magicString.remove(toBeRemoved.start, toBeRemoved.end); - else if (canConvertRequire) { - needsImport = true; - if (isCommonJS === IS_WRAPPED_COMMONJS) magicString.overwrite(node.start, node.end, `${wrappedModuleSideEffects ? "" : "/*@__PURE__*/ "}${name}()`); - else if (usesReturnValue) { - usesRequired = true; - magicString.overwrite(node.start, node.end, name); - } else magicString.remove(toBeRemoved.start, toBeRemoved.end); - } - } - if (needsImport) if (isCommonJS === IS_WRAPPED_COMMONJS) imports.push(`import { __require as ${name} } from ${JSON.stringify(resolvedId)}`); - else imports.push(`import ${usesRequired ? `${name} from ` : ""}${JSON.stringify(resolvedId)}`); - } -} -function getGenerateRequireName() { - let uid = 0; - return (requires) => { - let name; - const hasNameConflict = ({ scope }) => scope.contains(name); - do { - name = `require$$${uid}`; - uid += 1; - } while (requires.some(hasNameConflict)); - return name; - }; -} -const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/; -const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/; -async function transformCommonjs(parse$15, code, id, isEsModule, ignoreGlobal, ignoreRequire, ignoreDynamicRequires, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, astCache, defaultIsModuleExports, needsRequireWrapper, resolveRequireSourcesAndUpdateMeta, isRequired, checkDynamicRequire, commonjsMeta) { - const ast = astCache || tryParse(parse$15, code, id); - const magicString = new MagicString(code); - const uses = { - module: false, - exports: false, - global: false, - require: false - }; - const virtualDynamicRequirePath = isDynamicRequireModulesEnabled && getVirtualPathForDynamicRequirePath(dirname$1(id), commonDir); - let scope = attachScopes(ast, "scope"); - let lexicalDepth = 0; - let programDepth = 0; - let classBodyDepth = 0; - let currentTryBlockEnd = null; - let shouldWrap = false; - const globals = /* @__PURE__ */ new Set(); - let currentConditionalNodeEnd = null; - const conditionalNodes = /* @__PURE__ */ new Set(); - const { addRequireExpression, rewriteRequireExpressionsAndGetImportBlock } = getRequireHandlers(); - const reassignedNames = /* @__PURE__ */ new Set(); - const topLevelDeclarations = []; - const skippedNodes = /* @__PURE__ */ new Set(); - const moduleAccessScopes = new Set([scope]); - const exportsAccessScopes = new Set([scope]); - const moduleExportsAssignments = []; - let firstTopLevelModuleExportsAssignment = null; - const exportsAssignmentsByName = /* @__PURE__ */ new Map(); - const topLevelAssignments = /* @__PURE__ */ new Set(); - const topLevelDefineCompiledEsmExpressions = []; - const replacedGlobal = []; - const replacedThis = []; - const replacedDynamicRequires = []; - const importedVariables = /* @__PURE__ */ new Set(); - const indentExclusionRanges = []; - walk$2(ast, { - enter(node, parent) { - if (skippedNodes.has(node)) { - this.skip(); - return; - } - if (currentTryBlockEnd !== null && node.start > currentTryBlockEnd) currentTryBlockEnd = null; - if (currentConditionalNodeEnd !== null && node.start > currentConditionalNodeEnd) currentConditionalNodeEnd = null; - if (currentConditionalNodeEnd === null && conditionalNodes.has(node)) currentConditionalNodeEnd = node.end; - programDepth += 1; - if (node.scope) ({scope} = node); - if (functionType.test(node.type)) lexicalDepth += 1; - if (sourceMap) { - magicString.addSourcemapLocation(node.start); - magicString.addSourcemapLocation(node.end); - } - switch (node.type) { - case "AssignmentExpression": - if (node.left.type === "MemberExpression") { - const flattened = getKeypath(node.left); - if (!flattened || scope.contains(flattened.name)) return; - const exportsPatternMatch = exportsPattern.exec(flattened.keypath); - if (!exportsPatternMatch || flattened.keypath === "exports") return; - const [, exportName] = exportsPatternMatch; - uses[flattened.name] = true; - if (flattened.keypath === "module.exports") { - moduleExportsAssignments.push(node); - if (programDepth > 3) moduleAccessScopes.add(scope); - else if (!firstTopLevelModuleExportsAssignment) firstTopLevelModuleExportsAssignment = node; - } else if (exportName === KEY_COMPILED_ESM) if (programDepth > 3) shouldWrap = true; - else topLevelDefineCompiledEsmExpressions.push({ - node, - type: flattened.name - }); - else { - const exportsAssignments = exportsAssignmentsByName.get(exportName) || { - nodes: [], - scopes: /* @__PURE__ */ new Set() - }; - exportsAssignments.nodes.push({ - node, - type: flattened.name - }); - exportsAssignments.scopes.add(scope); - exportsAccessScopes.add(scope); - exportsAssignmentsByName.set(exportName, exportsAssignments); - if (programDepth <= 3) topLevelAssignments.add(node); - } - skippedNodes.add(node.left); - } else for (const name of extractAssignedNames(node.left)) reassignedNames.add(name); - return; - case "CallExpression": { - const defineCompiledEsmType = getDefineCompiledEsmType(node); - if (defineCompiledEsmType) { - if (programDepth === 3 && parent.type === "ExpressionStatement") { - skippedNodes.add(node.arguments[0]); - topLevelDefineCompiledEsmExpressions.push({ - node, - type: defineCompiledEsmType - }); - } else shouldWrap = true; - return; - } - if (isDynamicRequireModulesEnabled && node.callee.object && isRequire(node.callee.object, scope) && node.callee.property.name === "resolve") { - checkDynamicRequire(node.start); - uses.require = true; - replacedDynamicRequires.push(node.callee.object); - skippedNodes.add(node.callee); - return; - } - if (!isRequireExpression(node, scope)) { - const keypath = getKeypath(node.callee); - if (keypath && importedVariables.has(keypath.name)) currentConditionalNodeEnd = Infinity; - return; - } - skippedNodes.add(node.callee); - uses.require = true; - if (hasDynamicArguments(node)) { - if (isDynamicRequireModulesEnabled) checkDynamicRequire(node.start); - if (!ignoreDynamicRequires) replacedDynamicRequires.push(node.callee); - return; - } - const requireStringArg = getRequireStringArg(node); - if (!ignoreRequire(requireStringArg)) { - addRequireExpression(requireStringArg, node, scope, parent.type !== "ExpressionStatement", currentTryBlockEnd !== null, currentConditionalNodeEnd !== null, parent.type === "ExpressionStatement" && (!currentConditionalNodeEnd || currentTryBlockEnd !== null && currentTryBlockEnd < currentConditionalNodeEnd) ? parent : node); - if (parent.type === "VariableDeclarator" && parent.id.type === "Identifier") for (const name of extractAssignedNames(parent.id)) importedVariables.add(name); - } - return; - } - case "ClassBody": - classBodyDepth += 1; - return; - case "ConditionalExpression": - case "IfStatement": - if (isFalsy(node.test)) skippedNodes.add(node.consequent); - else if (isTruthy(node.test)) { - if (node.alternate) skippedNodes.add(node.alternate); - } else { - conditionalNodes.add(node.consequent); - if (node.alternate) conditionalNodes.add(node.alternate); - } - return; - case "ArrowFunctionExpression": - case "FunctionDeclaration": - case "FunctionExpression": - if (currentConditionalNodeEnd === null && !(parent.type === "CallExpression" && parent.callee === node)) currentConditionalNodeEnd = node.end; - return; - case "Identifier": { - const { name } = node; - if (!(0, import_is_reference.default)(node, parent) || scope.contains(name) || parent.type === "PropertyDefinition" && parent.key === node) return; - switch (name) { - case "require": - uses.require = true; - if (isNodeRequirePropertyAccess(parent)) return; - if (!ignoreDynamicRequires) { - if (isShorthandProperty(parent)) { - skippedNodes.add(parent.value); - magicString.prependRight(node.start, "require: "); - } - replacedDynamicRequires.push(node); - } - return; - case "module": - case "exports": - shouldWrap = true; - uses[name] = true; - return; - case "global": - uses.global = true; - if (!ignoreGlobal) replacedGlobal.push(node); - return; - case "define": - magicString.overwrite(node.start, node.end, "undefined", { storeName: true }); - return; - default: - globals.add(name); - return; - } - } - case "LogicalExpression": - if (node.operator === "&&") { - if (isFalsy(node.left)) skippedNodes.add(node.right); - else if (!isTruthy(node.left)) conditionalNodes.add(node.right); - } else if (node.operator === "||") { - if (isTruthy(node.left)) skippedNodes.add(node.right); - else if (!isFalsy(node.left)) conditionalNodes.add(node.right); - } - return; - case "MemberExpression": - if (!isDynamicRequireModulesEnabled && isModuleRequire(node, scope)) { - uses.require = true; - replacedDynamicRequires.push(node); - skippedNodes.add(node.object); - skippedNodes.add(node.property); - } - return; - case "ReturnStatement": - if (lexicalDepth === 0) shouldWrap = true; - return; - case "ThisExpression": - if (lexicalDepth === 0 && !classBodyDepth) { - uses.global = true; - if (!ignoreGlobal) replacedThis.push(node); - } - return; - case "TryStatement": - if (currentTryBlockEnd === null) currentTryBlockEnd = node.block.end; - if (currentConditionalNodeEnd === null) currentConditionalNodeEnd = node.end; - return; - case "UnaryExpression": - if (node.operator === "typeof") { - const flattened = getKeypath(node.argument); - if (!flattened) return; - if (scope.contains(flattened.name)) return; - if (!isEsModule && (flattened.keypath === "module.exports" || flattened.keypath === "module" || flattened.keypath === "exports")) magicString.overwrite(node.start, node.end, `'object'`, { storeName: false }); - } - return; - case "VariableDeclaration": - if (!scope.parent) topLevelDeclarations.push(node); - return; - case "TemplateElement": if (node.value.raw.includes("\n")) indentExclusionRanges.push([node.start, node.end]); - } - }, - leave(node) { - programDepth -= 1; - if (node.scope) scope = scope.parent; - if (functionType.test(node.type)) lexicalDepth -= 1; - if (node.type === "ClassBody") classBodyDepth -= 1; - } - }); - const nameBase = getName(id); - const exportsName = deconflict([...exportsAccessScopes], globals, nameBase); - const moduleName = deconflict([...moduleAccessScopes], globals, `${nameBase}Module`); - const requireName = deconflict([scope], globals, `require${capitalize(nameBase)}`); - const isRequiredName = deconflict([scope], globals, `hasRequired${capitalize(nameBase)}`); - const helpersName = deconflict([scope], globals, "commonjsHelpers"); - const dynamicRequireName = replacedDynamicRequires.length > 0 && deconflict([scope], globals, isDynamicRequireModulesEnabled ? CREATE_COMMONJS_REQUIRE_EXPORT : COMMONJS_REQUIRE_EXPORT); - const deconflictedExportNames = Object.create(null); - for (const [exportName, { scopes }] of exportsAssignmentsByName) deconflictedExportNames[exportName] = deconflict([...scopes], globals, exportName); - for (const node of replacedGlobal) magicString.overwrite(node.start, node.end, `${helpersName}.commonjsGlobal`, { storeName: true }); - for (const node of replacedThis) magicString.overwrite(node.start, node.end, exportsName, { storeName: true }); - for (const node of replacedDynamicRequires) magicString.overwrite(node.start, node.end, isDynamicRequireModulesEnabled ? `${dynamicRequireName}(${JSON.stringify(virtualDynamicRequirePath)})` : dynamicRequireName, { - contentOnly: true, - storeName: true - }); - shouldWrap = !isEsModule && (shouldWrap || uses.exports && moduleExportsAssignments.length > 0); - if (!(shouldWrap || isRequired || needsRequireWrapper || uses.module || uses.exports || uses.require || topLevelDefineCompiledEsmExpressions.length > 0) && (ignoreGlobal || !uses.global)) return { meta: { commonjs: { isCommonJS: false } } }; - let leadingComment = ""; - if (code.startsWith("/*")) { - const commentEnd = code.indexOf("*/", 2) + 2; - leadingComment = `${code.slice(0, commentEnd)}\n`; - magicString.remove(0, commentEnd).trim(); - } - let shebang = ""; - if (code.startsWith("#!")) { - const shebangEndPosition = code.indexOf("\n") + 1; - shebang = code.slice(0, shebangEndPosition); - magicString.remove(0, shebangEndPosition).trim(); - } - const exportMode = isEsModule ? "none" : shouldWrap ? uses.module ? "module" : "exports" : firstTopLevelModuleExportsAssignment ? exportsAssignmentsByName.size === 0 && topLevelDefineCompiledEsmExpressions.length === 0 ? "replace" : "module" : moduleExportsAssignments.length === 0 ? "exports" : "module"; - const exportedExportsName = exportMode === "module" ? deconflict([], globals, `${nameBase}Exports`) : exportsName; - const importBlock = await rewriteRequireExpressionsAndGetImportBlock(magicString, topLevelDeclarations, reassignedNames, helpersName, dynamicRequireName, moduleName, exportsName, id, exportMode, resolveRequireSourcesAndUpdateMeta, needsRequireWrapper, isEsModule, isDynamicRequireModulesEnabled, getIgnoreTryCatchRequireStatementMode, commonjsMeta); - const usesRequireWrapper = commonjsMeta.isCommonJS === IS_WRAPPED_COMMONJS; - const exportBlock = isEsModule ? "" : rewriteExportsAndGetExportsBlock(magicString, moduleName, exportsName, exportedExportsName, shouldWrap, moduleExportsAssignments, firstTopLevelModuleExportsAssignment, exportsAssignmentsByName, topLevelAssignments, topLevelDefineCompiledEsmExpressions, deconflictedExportNames, code, helpersName, exportMode, defaultIsModuleExports, usesRequireWrapper, requireName); - if (shouldWrap) wrapCode(magicString, uses, moduleName, exportsName, indentExclusionRanges); - if (usesRequireWrapper) { - magicString.trim().indent(" ", { exclude: indentExclusionRanges }); - const exported = exportMode === "module" ? `${moduleName}.exports` : exportsName; - magicString.prepend(`var ${isRequiredName}; - -function ${requireName} () { -\tif (${isRequiredName}) return ${exported}; -\t${isRequiredName} = 1; -`).append(` -\treturn ${exported}; -}`); - if (exportMode === "replace") magicString.prepend(`var ${exportsName};\n`); - } - magicString.trim().prepend(shebang + leadingComment + importBlock).append(exportBlock); - return { - code: magicString.toString(), - map: sourceMap ? magicString.generateMap() : null, - syntheticNamedExports: isEsModule || usesRequireWrapper ? false : "__moduleExports", - meta: { commonjs: { - ...commonjsMeta, - shebang - } } - }; -} -const PLUGIN_NAME = "commonjs"; -function commonjs(options$1 = {}) { - const { ignoreGlobal, ignoreDynamicRequires, requireReturnsDefault: requireReturnsDefaultOption, defaultIsModuleExports: defaultIsModuleExportsOption, esmExternals, requireNodeBuiltins = false } = options$1; - const extensions$1 = options$1.extensions || [".js"]; - const filter$1 = createFilter$2(options$1.include, options$1.exclude); - const isPossibleCjsId = (id) => { - const extName = extname$1(id); - return extName === ".cjs" || extensions$1.includes(extName) && filter$1(id); - }; - const { strictRequiresFilter, detectCyclesAndConditional } = getStrictRequiresFilter(options$1); - const getRequireReturnsDefault = typeof requireReturnsDefaultOption === "function" ? requireReturnsDefaultOption : () => requireReturnsDefaultOption; - let esmExternalIds; - const isEsmExternal = typeof esmExternals === "function" ? esmExternals : Array.isArray(esmExternals) ? (esmExternalIds = new Set(esmExternals), (id) => esmExternalIds.has(id)) : () => esmExternals; - const getDefaultIsModuleExports = typeof defaultIsModuleExportsOption === "function" ? defaultIsModuleExportsOption : () => typeof defaultIsModuleExportsOption === "boolean" ? defaultIsModuleExportsOption : "auto"; - const dynamicRequireRoot = typeof options$1.dynamicRequireRoot === "string" ? resolve$1(options$1.dynamicRequireRoot) : process.cwd(); - const { commonDir, dynamicRequireModules } = getDynamicRequireModules(options$1.dynamicRequireTargets, dynamicRequireRoot); - const isDynamicRequireModulesEnabled = dynamicRequireModules.size > 0; - const ignoreRequire = typeof options$1.ignore === "function" ? options$1.ignore : Array.isArray(options$1.ignore) ? (id) => options$1.ignore.includes(id) : () => false; - const getIgnoreTryCatchRequireStatementMode = (id) => { - const mode = typeof options$1.ignoreTryCatch === "function" ? options$1.ignoreTryCatch(id) : Array.isArray(options$1.ignoreTryCatch) ? options$1.ignoreTryCatch.includes(id) : typeof options$1.ignoreTryCatch !== "undefined" ? options$1.ignoreTryCatch : true; - return { - canConvertRequire: mode !== "remove" && mode !== true, - shouldRemoveRequire: mode === "remove" - }; - }; - const { currentlyResolving, resolveId } = getResolveId(extensions$1, isPossibleCjsId); - const sourceMap = options$1.sourceMap !== false; - let requireResolver; - function transformAndCheckExports(code, id) { - const normalizedId = normalizePathSlashes(id); - const { isEsModule, hasDefaultExport, hasNamedExports, ast } = analyzeTopLevelStatements(this.parse, code, id); - const commonjsMeta = this.getModuleInfo(id).meta.commonjs || {}; - if (hasDefaultExport) commonjsMeta.hasDefaultExport = true; - if (hasNamedExports) commonjsMeta.hasNamedExports = true; - if (!dynamicRequireModules.has(normalizedId) && (!(hasCjsKeywords(code, ignoreGlobal) || requireResolver.isRequiredId(id)) || isEsModule && !options$1.transformMixedEsModules)) { - commonjsMeta.isCommonJS = false; - return { meta: { commonjs: commonjsMeta } }; - } - const needsRequireWrapper = !isEsModule && (dynamicRequireModules.has(normalizedId) || strictRequiresFilter(id)); - const checkDynamicRequire = (position) => { - const normalizedDynamicRequireRoot = normalizePathSlashes(dynamicRequireRoot); - if (normalizedId.indexOf(normalizedDynamicRequireRoot) !== 0) this.error({ - code: "DYNAMIC_REQUIRE_OUTSIDE_ROOT", - normalizedId, - normalizedDynamicRequireRoot, - message: `"${normalizedId}" contains dynamic require statements but it is not within the current dynamicRequireRoot "${normalizedDynamicRequireRoot}". You should set dynamicRequireRoot to "${dirname$1(normalizedId)}" or one of its parent directories.` - }, position); - }; - return transformCommonjs(this.parse, code, id, isEsModule, ignoreGlobal || isEsModule, ignoreRequire, ignoreDynamicRequires && !isDynamicRequireModulesEnabled, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, ast, getDefaultIsModuleExports(id), needsRequireWrapper, requireResolver.resolveRequireSourcesAndUpdateMeta(this), requireResolver.isRequiredId(id), checkDynamicRequire, commonjsMeta); - } - return { - name: PLUGIN_NAME, - version: version$1, - options(rawOptions) { - const plugins$1 = Array.isArray(rawOptions.plugins) ? [...rawOptions.plugins] : rawOptions.plugins ? [rawOptions.plugins] : []; - plugins$1.unshift({ - name: "commonjs--resolver", - resolveId - }); - return { - ...rawOptions, - plugins: plugins$1 - }; - }, - buildStart({ plugins: plugins$1 }) { - validateVersion(this.meta.rollupVersion, peerDependencies.rollup, "rollup"); - const nodeResolve = plugins$1.find(({ name }) => name === "node-resolve"); - if (nodeResolve) validateVersion(nodeResolve.version, "^13.0.6", "@rollup/plugin-node-resolve"); - if (options$1.namedExports != null) this.warn("The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically."); - requireResolver = getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving, requireNodeBuiltins); - }, - buildEnd() { - if (options$1.strictRequires === "debug") { - const wrappedIds = requireResolver.getWrappedIds(); - if (wrappedIds.length) this.warn({ - code: "WRAPPED_IDS", - ids: wrappedIds, - message: `The commonjs plugin automatically wrapped the following files:\n[\n${wrappedIds.map((id) => `\t${JSON.stringify(relative$1(process.cwd(), id))}`).join(",\n")}\n]` - }); - else this.warn({ - code: "WRAPPED_IDS", - ids: wrappedIds, - message: "The commonjs plugin did not wrap any files." - }); - } - }, - async load(id) { - if (id === HELPERS_ID) return getHelpersModule(); - if (isWrappedId(id, MODULE_SUFFIX)) { - const name = getName(unwrapId$1(id, MODULE_SUFFIX)); - return { - code: `var ${name} = {exports: {}}; export {${name} as __module}`, - meta: { commonjs: { isCommonJS: false } } - }; - } - if (isWrappedId(id, EXPORTS_SUFFIX)) { - const name = getName(unwrapId$1(id, EXPORTS_SUFFIX)); - return { - code: `var ${name} = {}; export {${name} as __exports}`, - meta: { commonjs: { isCommonJS: false } } - }; - } - if (isWrappedId(id, EXTERNAL_SUFFIX)) { - const actualId = unwrapId$1(id, EXTERNAL_SUFFIX); - if (requireNodeBuiltins === true && actualId.startsWith("node:")) return getExternalBuiltinRequireProxy(actualId); - return getUnknownRequireProxy(actualId, isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true); - } - if (id.endsWith(ENTRY_SUFFIX)) { - const acutalId = id.slice(0, -15); - const { meta: { commonjs: commonjsMeta } } = this.getModuleInfo(acutalId); - const shebang = commonjsMeta?.shebang ?? ""; - return getEntryProxy(acutalId, getDefaultIsModuleExports(acutalId), this.getModuleInfo, shebang); - } - if (isWrappedId(id, ES_IMPORT_SUFFIX)) { - const actualId = unwrapId$1(id, ES_IMPORT_SUFFIX); - return getEsImportProxy(actualId, getDefaultIsModuleExports(actualId), (await this.load({ id: actualId })).moduleSideEffects); - } - if (id === DYNAMIC_MODULES_ID) return getDynamicModuleRegistry(isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, ignoreDynamicRequires); - if (isWrappedId(id, PROXY_SUFFIX)) { - const actualId = unwrapId$1(id, PROXY_SUFFIX); - return getStaticRequireProxy(actualId, getRequireReturnsDefault(actualId), this.load); - } - return null; - }, - shouldTransformCachedModule(...args) { - return requireResolver.shouldTransformCachedModule.call(this, ...args); - }, - transform(code, id) { - if (!isPossibleCjsId(id)) return null; - try { - return transformAndCheckExports.call(this, code, id); - } catch (err$2) { - return this.error(err$2, err$2.pos); - } - } - }; -} - -//#endregion -//#region src/node/environment.ts -/** -* Creates a function that hides the complexities of a WeakMap with an initial value -* to implement object metadata. Used by plugins to implement cross hooks per -* environment metadata -* -* @experimental -*/ -function perEnvironmentState(initial) { - const stateMap = /* @__PURE__ */ new WeakMap(); - return function(context) { - const { environment } = context; - let state = stateMap.get(environment); - if (!state) { - state = initial(environment); - stateMap.set(environment, state); - } - return state; - }; -} - -//#endregion -//#region src/node/plugins/reporter.ts -var import_picocolors$32 = /* @__PURE__ */ __toESM(require_picocolors(), 1); -const groups = [ - { - name: "Assets", - color: import_picocolors$32.default.green - }, - { - name: "CSS", - color: import_picocolors$32.default.magenta - }, - { - name: "JS", - color: import_picocolors$32.default.cyan - } -]; -const COMPRESSIBLE_ASSETS_RE = /\.(?:html|json|svg|txt|xml|xhtml|wasm)$/; -function buildReporterPlugin(config$2) { - const compress = promisify(gzip); - const numberFormatter = new Intl.NumberFormat("en", { - maximumFractionDigits: 2, - minimumFractionDigits: 2 - }); - const displaySize = (bytes) => { - return `${numberFormatter.format(bytes / 1e3)} kB`; - }; - const tty = process.stdout.isTTY && !process.env.CI; - const shouldLogInfo = LogLevels[config$2.logLevel || "info"] >= LogLevels.info; - const modulesReporter = shouldLogInfo ? perEnvironmentState((environment) => { - let hasTransformed = false; - let transformedCount = 0; - const logTransform = throttle((id) => { - writeLine(`transforming (${transformedCount}) ${import_picocolors$32.default.dim(path.relative(config$2.root, id))}`); - }); - return { - reset() { - transformedCount = 0; - }, - register(id) { - transformedCount++; - if (!tty) { - if (!hasTransformed) config$2.logger.info(`transforming...`); - } else { - if (id.includes(`?`)) return; - logTransform(id); - } - hasTransformed = true; - }, - log() { - if (tty) clearLine$1(); - environment.logger.info(`${import_picocolors$32.default.green(`✓`)} ${transformedCount} modules transformed.`); - } - }; - }) : void 0; - const chunksReporter = perEnvironmentState((environment) => { - let hasRenderedChunk = false; - let hasCompressChunk = false; - let chunkCount = 0; - let compressedCount = 0; - async function getCompressedSize(code) { - if (environment.config.consumer !== "client" || !environment.config.build.reportCompressedSize) return null; - if (shouldLogInfo && !hasCompressChunk) { - if (!tty) config$2.logger.info("computing gzip size..."); - else writeLine("computing gzip size (0)..."); - hasCompressChunk = true; - } - const compressed = await compress(typeof code === "string" ? code : Buffer.from(code)); - compressedCount++; - if (shouldLogInfo && tty) writeLine(`computing gzip size (${compressedCount})...`); - return compressed.length; - } - return { - reset() { - chunkCount = 0; - compressedCount = 0; - }, - register() { - chunkCount++; - if (shouldLogInfo) { - if (!tty) { - if (!hasRenderedChunk) environment.logger.info("rendering chunks..."); - } else writeLine(`rendering chunks (${chunkCount})...`); - hasRenderedChunk = true; - } - }, - async log(output, outDir) { - const chunkLimit = environment.config.build.chunkSizeWarningLimit; - let hasLargeChunks = false; - if (shouldLogInfo) { - const entries = (await Promise.all(Object.values(output).map(async (chunk) => { - if (chunk.type === "chunk") return { - name: chunk.fileName, - group: "JS", - size: Buffer.byteLength(chunk.code), - compressedSize: await getCompressedSize(chunk.code), - mapSize: chunk.map ? Buffer.byteLength(chunk.map.toString()) : null - }; - else { - if (chunk.fileName.endsWith(".map")) return null; - const isCSS = chunk.fileName.endsWith(".css"); - const isCompressible = isCSS || COMPRESSIBLE_ASSETS_RE.test(chunk.fileName); - return { - name: chunk.fileName, - group: isCSS ? "CSS" : "Assets", - size: Buffer.byteLength(chunk.source), - mapSize: null, - compressedSize: isCompressible ? await getCompressedSize(chunk.source) : null - }; - } - }))).filter(isDefined); - if (tty) clearLine$1(); - let longest = 0; - let biggestSize = 0; - let biggestMap = 0; - let biggestCompressSize = 0; - for (const entry of entries) { - if (entry.name.length > longest) longest = entry.name.length; - if (entry.size > biggestSize) biggestSize = entry.size; - if (entry.mapSize && entry.mapSize > biggestMap) biggestMap = entry.mapSize; - if (entry.compressedSize && entry.compressedSize > biggestCompressSize) biggestCompressSize = entry.compressedSize; - } - const sizePad = displaySize(biggestSize).length; - const mapPad = displaySize(biggestMap).length; - const compressPad = displaySize(biggestCompressSize).length; - const relativeOutDir = normalizePath(path.relative(config$2.root, path.resolve(config$2.root, outDir ?? environment.config.build.outDir))); - const assetsDir = path.join(environment.config.build.assetsDir, "/"); - for (const group of groups) { - const filtered = entries.filter((e$1) => e$1.group === group.name); - if (!filtered.length) continue; - for (const entry of filtered.sort((a, z) => a.size - z.size)) { - const isLarge = group.name === "JS" && entry.size / 1e3 > chunkLimit; - if (isLarge) hasLargeChunks = true; - const sizeColor = isLarge ? import_picocolors$32.default.yellow : import_picocolors$32.default.dim; - let log$3 = import_picocolors$32.default.dim(withTrailingSlash(relativeOutDir)); - log$3 += !config$2.build.lib && entry.name.startsWith(withTrailingSlash(assetsDir)) ? import_picocolors$32.default.dim(assetsDir) + group.color(entry.name.slice(assetsDir.length).padEnd(longest + 2 - assetsDir.length)) : group.color(entry.name.padEnd(longest + 2)); - log$3 += import_picocolors$32.default.bold(sizeColor(displaySize(entry.size).padStart(sizePad))); - if (entry.compressedSize) log$3 += import_picocolors$32.default.dim(` │ gzip: ${displaySize(entry.compressedSize).padStart(compressPad)}`); - if (entry.mapSize) log$3 += import_picocolors$32.default.dim(` │ map: ${displaySize(entry.mapSize).padStart(mapPad)}`); - config$2.logger.info(log$3); - } - } - } else hasLargeChunks = Object.values(output).some((chunk) => { - return chunk.type === "chunk" && chunk.code.length / 1e3 > chunkLimit; - }); - if (hasLargeChunks && environment.config.build.minify && !config$2.build.lib && environment.config.consumer === "client") environment.logger.warn(import_picocolors$32.default.yellow(`\n(!) Some chunks are larger than ${chunkLimit} kB after minification. Consider:\n- Using dynamic import() to code-split the application\n- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks\n- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.`)); - } - }; - }); - return { - name: "vite:reporter", - sharedDuringBuild: true, - perEnvironmentStartEndDuringDev: true, - ...modulesReporter ? { - transform(_, id) { - modulesReporter(this).register(id); - }, - buildStart() { - modulesReporter(this).reset(); - }, - buildEnd() { - modulesReporter(this).log(); - } - } : {}, - renderStart() { - chunksReporter(this).reset(); - }, - renderChunk(_, chunk, options$1) { - if (!options$1.inlineDynamicImports) for (const id of chunk.moduleIds) { - const module$1 = this.getModuleInfo(id); - if (!module$1) continue; - if (module$1.importers.length && module$1.dynamicImporters.length) { - if (module$1.dynamicImporters.some((id$1) => !isInNodeModules(id$1) && chunk.moduleIds.includes(id$1))) this.warn(`\n(!) ${module$1.id} is dynamically imported by ${module$1.dynamicImporters.join(", ")} but also statically imported by ${module$1.importers.join(", ")}, dynamic import will not move module into another chunk.\n`); - } - } - chunksReporter(this).register(); - }, - generateBundle() { - if (shouldLogInfo && tty) clearLine$1(); - }, - async writeBundle({ dir }, output) { - await chunksReporter(this).log(output, dir); - } - }; -} -function writeLine(output) { - clearLine$1(); - if (output.length < process.stdout.columns) process.stdout.write(output); - else process.stdout.write(output.substring(0, process.stdout.columns - 1)); -} -function clearLine$1() { - process.stdout.clearLine(0); - process.stdout.cursorTo(0); -} -function throttle(fn) { - let timerHandle = null; - return (...args) => { - if (timerHandle) return; - fn(...args); - timerHandle = setTimeout(() => { - timerHandle = null; - }, 100); - }; -} - -//#endregion -//#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.3/node_modules/tsconfck/src/util.js -const POSIX_SEP_RE = new RegExp("\\" + path.posix.sep, "g"); -const NATIVE_SEP_RE = new RegExp("\\" + path.sep, "g"); -/** @type {Map}*/ -const PATTERN_REGEX_CACHE = /* @__PURE__ */ new Map(); -const GLOB_ALL_PATTERN = `**/*`; -const TS_EXTENSIONS = [ - ".ts", - ".tsx", - ".mts", - ".cts" -]; -const TSJS_EXTENSIONS = TS_EXTENSIONS.concat([ - ".js", - ".jsx", - ".mjs", - ".cjs" -]); -const TS_EXTENSIONS_RE_GROUP = `\\.(?:${TS_EXTENSIONS.map((ext) => ext.substring(1)).join("|")})`; -const TSJS_EXTENSIONS_RE_GROUP = `\\.(?:${TSJS_EXTENSIONS.map((ext) => ext.substring(1)).join("|")})`; -const IS_POSIX = path.posix.sep === path.sep; -/** -* @template T -* @returns {{resolve:(result:T)=>void, reject:(error:any)=>void, promise: Promise}} -*/ -function makePromise() { - let resolve$4, reject; - return { - promise: new Promise((res, rej) => { - resolve$4 = res; - reject = rej; - }), - resolve: resolve$4, - reject - }; -} -/** -* @param {string} filename -* @param {import('./cache.js').TSConfckCache} [cache] -* @returns {Promise} -*/ -async function resolveTSConfigJson(filename, cache$1) { - if (path.extname(filename) !== ".json") return; - const tsconfig = path.resolve(filename); - if (cache$1 && (cache$1.hasParseResult(tsconfig) || cache$1.hasParseResult(filename))) return tsconfig; - return promises.stat(tsconfig).then((stat$4) => { - if (stat$4.isFile() || stat$4.isFIFO()) return tsconfig; - else throw new Error(`${filename} exists but is not a regular file.`); - }); -} -/** -* -* @param {string} dir an absolute directory path -* @returns {boolean} if dir path includes a node_modules segment -*/ -const isInNodeModules$1 = IS_POSIX ? (dir) => dir.includes("/node_modules/") : (dir) => dir.match(/[/\\]node_modules[/\\]/); -/** -* convert posix separator to native separator -* -* eg. -* windows: C:/foo/bar -> c:\foo\bar -* linux: /foo/bar -> /foo/bar -* -* @param {string} filename with posix separators -* @returns {string} filename with native separators -*/ -const posix2native = IS_POSIX ? (filename) => filename : (filename) => filename.replace(POSIX_SEP_RE, path.sep); -/** -* convert native separator to posix separator -* -* eg. -* windows: C:\foo\bar -> c:/foo/bar -* linux: /foo/bar -> /foo/bar -* -* @param {string} filename - filename with native separators -* @returns {string} filename with posix separators -*/ -const native2posix = IS_POSIX ? (filename) => filename : (filename) => filename.replace(NATIVE_SEP_RE, path.posix.sep); -/** -* converts params to native separator, resolves path and converts native back to posix -* -* needed on windows to handle posix paths in tsconfig -* -* @param dir {string|null} directory to resolve from -* @param filename {string} filename or pattern to resolve -* @returns string -*/ -const resolve2posix = IS_POSIX ? (dir, filename) => dir ? path.resolve(dir, filename) : path.resolve(filename) : (dir, filename) => native2posix(dir ? path.resolve(posix2native(dir), posix2native(filename)) : path.resolve(posix2native(filename))); -/** -* -* @param {import('./public.d.ts').TSConfckParseResult} result -* @param {import('./public.d.ts').TSConfckParseOptions} [options] -* @returns {string[]} -*/ -function resolveReferencedTSConfigFiles(result, options$1) { - const dir = path.dirname(result.tsconfigFile); - return result.tsconfig.references.map((ref) => { - return resolve2posix(dir, ref.path.endsWith(".json") ? ref.path : path.join(ref.path, options$1?.configName ?? "tsconfig.json")); - }); -} -/** -* @param {string} filename -* @param {import('./public.d.ts').TSConfckParseResult} result -* @returns {import('./public.d.ts').TSConfckParseResult} -*/ -function resolveSolutionTSConfig(filename, result) { - if (result.referenced && (result.tsconfig.compilerOptions?.allowJs ? TSJS_EXTENSIONS : TS_EXTENSIONS).some((ext) => filename.endsWith(ext)) && !isIncluded(filename, result)) { - const solutionTSConfig = result.referenced.find((referenced) => isIncluded(filename, referenced)); - if (solutionTSConfig) return solutionTSConfig; - } - return result; -} -/** -* -* @param {string} filename -* @param {import('./public.d.ts').TSConfckParseResult} result -* @returns {boolean} -*/ -function isIncluded(filename, result) { - const dir = native2posix(path.dirname(result.tsconfigFile)); - const files = (result.tsconfig.files || []).map((file) => resolve2posix(dir, file)); - const absoluteFilename = resolve2posix(null, filename); - if (files.includes(filename)) return true; - const allowJs = result.tsconfig.compilerOptions?.allowJs; - if (isGlobMatch(absoluteFilename, dir, result.tsconfig.include || (result.tsconfig.files ? [] : [GLOB_ALL_PATTERN]), allowJs)) return !isGlobMatch(absoluteFilename, dir, result.tsconfig.exclude || [], allowJs); - return false; -} -/** -* test filenames agains glob patterns in tsconfig -* -* @param filename {string} posix style abolute path to filename to test -* @param dir {string} posix style absolute path to directory of tsconfig containing patterns -* @param patterns {string[]} glob patterns to match against -* @param allowJs {boolean} allowJs setting in tsconfig to include js extensions in checks -* @returns {boolean} true when at least one pattern matches filename -*/ -function isGlobMatch(filename, dir, patterns, allowJs) { - const extensions$1 = allowJs ? TSJS_EXTENSIONS : TS_EXTENSIONS; - return patterns.some((pattern) => { - let lastWildcardIndex = pattern.length; - let hasWildcard = false; - let hasExtension = false; - let hasSlash = false; - let lastSlashIndex = -1; - for (let i$1 = pattern.length - 1; i$1 > -1; i$1--) { - const c = pattern[i$1]; - if (!hasWildcard) { - if (c === "*" || c === "?") { - lastWildcardIndex = i$1; - hasWildcard = true; - } - } - if (!hasSlash) { - if (c === ".") hasExtension = true; - else if (c === "/") { - lastSlashIndex = i$1; - hasSlash = true; - } - } - if (hasWildcard && hasSlash) break; - } - if (!hasExtension && (!hasWildcard || lastWildcardIndex < lastSlashIndex)) { - pattern += `${pattern.endsWith("/") ? "" : "/"}${GLOB_ALL_PATTERN}`; - lastWildcardIndex = pattern.length - 1; - hasWildcard = true; - } - if (lastWildcardIndex < pattern.length - 1 && !filename.endsWith(pattern.slice(lastWildcardIndex + 1))) return false; - if (pattern.endsWith("*") && !extensions$1.some((ext) => filename.endsWith(ext))) return false; - if (pattern === GLOB_ALL_PATTERN) return filename.startsWith(`${dir}/`); - const resolvedPattern = resolve2posix(dir, pattern); - let firstWildcardIndex = -1; - for (let i$1 = 0; i$1 < resolvedPattern.length; i$1++) if (resolvedPattern[i$1] === "*" || resolvedPattern[i$1] === "?") { - firstWildcardIndex = i$1; - hasWildcard = true; - break; - } - if (firstWildcardIndex > 1 && !filename.startsWith(resolvedPattern.slice(0, firstWildcardIndex - 1))) return false; - if (!hasWildcard) return filename === resolvedPattern; - else if (firstWildcardIndex + GLOB_ALL_PATTERN.length === resolvedPattern.length - (pattern.length - 1 - lastWildcardIndex) && resolvedPattern.slice(firstWildcardIndex, firstWildcardIndex + GLOB_ALL_PATTERN.length) === GLOB_ALL_PATTERN) return true; - if (PATTERN_REGEX_CACHE.has(resolvedPattern)) return PATTERN_REGEX_CACHE.get(resolvedPattern).test(filename); - const regex = pattern2regex(resolvedPattern, allowJs); - PATTERN_REGEX_CACHE.set(resolvedPattern, regex); - return regex.test(filename); - }); -} -/** -* @param {string} resolvedPattern -* @param {boolean} allowJs -* @returns {RegExp} -*/ -function pattern2regex(resolvedPattern, allowJs) { - let regexStr = "^"; - for (let i$1 = 0; i$1 < resolvedPattern.length; i$1++) { - const char = resolvedPattern[i$1]; - if (char === "?") { - regexStr += "[^\\/]"; - continue; - } - if (char === "*") { - if (resolvedPattern[i$1 + 1] === "*" && resolvedPattern[i$1 + 2] === "/") { - i$1 += 2; - regexStr += "(?:[^\\/]*\\/)*"; - continue; - } - regexStr += "[^\\/]*"; - continue; - } - if ("/.+^${}()|[]\\".includes(char)) regexStr += `\\`; - regexStr += char; - } - if (resolvedPattern.endsWith("*")) regexStr += allowJs ? TSJS_EXTENSIONS_RE_GROUP : TS_EXTENSIONS_RE_GROUP; - regexStr += "$"; - return new RegExp(regexStr); -} -/** -* replace tokens like ${configDir} -* @param {import('./public.d.ts').TSConfckParseResult} result -*/ -function replaceTokens(result) { - if (result.tsconfig) result.tsconfig = JSON.parse(JSON.stringify(result.tsconfig).replaceAll(/"\${configDir}/g, `"${native2posix(path.dirname(result.tsconfigFile))}`)); -} - -//#endregion -//#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.3/node_modules/tsconfck/src/find.js -/** -* find the closest tsconfig.json file -* -* @param {string} filename - path to file to find tsconfig for (absolute or relative to cwd) -* @param {import('./public.d.ts').TSConfckFindOptions} [options] - options -* @returns {Promise} absolute path to closest tsconfig.json or null if not found -*/ -async function find(filename, options$1) { - let dir = path.dirname(path.resolve(filename)); - if (options$1?.ignoreNodeModules && isInNodeModules$1(dir)) return null; - const cache$1 = options$1?.cache; - const configName = options$1?.configName ?? "tsconfig.json"; - if (cache$1?.hasConfigPath(dir, configName)) return cache$1.getConfigPath(dir, configName); - const { promise, resolve: resolve$4, reject } = makePromise(); - if (options$1?.root && !path.isAbsolute(options$1.root)) options$1.root = path.resolve(options$1.root); - findUp(dir, { - promise, - resolve: resolve$4, - reject - }, options$1); - return promise; -} -/** -* -* @param {string} dir -* @param {{promise:Promise,resolve:(result:string|null)=>void,reject:(err:any)=>void}} madePromise -* @param {import('./public.d.ts').TSConfckFindOptions} [options] - options -*/ -function findUp(dir, { resolve: resolve$4, reject, promise }, options$1) { - const { cache: cache$1, root, configName } = options$1 ?? {}; - if (cache$1) if (cache$1.hasConfigPath(dir, configName)) { - let cached; - try { - cached = cache$1.getConfigPath(dir, configName); - } catch (e$1) { - reject(e$1); - return; - } - if (cached?.then) cached.then(resolve$4).catch(reject); - else resolve$4(cached); - } else cache$1.setConfigPath(dir, promise, configName); - const tsconfig = path.join(dir, options$1?.configName ?? "tsconfig.json"); - fs.stat(tsconfig, (err$2, stats) => { - if (stats && (stats.isFile() || stats.isFIFO())) resolve$4(tsconfig); - else if (err$2?.code !== "ENOENT") reject(err$2); - else { - let parent; - if (root === dir || (parent = path.dirname(dir)) === dir) resolve$4(null); - else findUp(parent, { - promise, - resolve: resolve$4, - reject - }, options$1); - } - }); -} - -//#endregion -//#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.3/node_modules/tsconfck/src/to-json.js -/** -* convert content of tsconfig.json to regular json -* -* @param {string} tsconfigJson - content of tsconfig.json -* @returns {string} content as regular json, comments and dangling commas have been replaced with whitespace -*/ -function toJson(tsconfigJson) { - const stripped = stripDanglingComma(stripJsonComments(stripBom(tsconfigJson))); - if (stripped.trim() === "") return "{}"; - else return stripped; -} -/** -* replace dangling commas from pseudo-json string with single space -* implementation heavily inspired by strip-json-comments -* -* @param {string} pseudoJson -* @returns {string} -*/ -function stripDanglingComma(pseudoJson) { - let insideString = false; - let offset$1 = 0; - let result = ""; - let danglingCommaPos = null; - for (let i$1 = 0; i$1 < pseudoJson.length; i$1++) { - const currentCharacter = pseudoJson[i$1]; - if (currentCharacter === "\"") { - if (!isEscaped(pseudoJson, i$1)) insideString = !insideString; - } - if (insideString) { - danglingCommaPos = null; - continue; - } - if (currentCharacter === ",") { - danglingCommaPos = i$1; - continue; - } - if (danglingCommaPos) { - if (currentCharacter === "}" || currentCharacter === "]") { - result += pseudoJson.slice(offset$1, danglingCommaPos) + " "; - offset$1 = danglingCommaPos + 1; - danglingCommaPos = null; - } else if (!currentCharacter.match(/\s/)) danglingCommaPos = null; - } - } - return result + pseudoJson.substring(offset$1); -} -/** -* -* @param {string} jsonString -* @param {number} quotePosition -* @returns {boolean} -*/ -function isEscaped(jsonString, quotePosition) { - let index = quotePosition - 1; - let backslashCount = 0; - while (jsonString[index] === "\\") { - index -= 1; - backslashCount += 1; - } - return Boolean(backslashCount % 2); -} -/** -* -* @param {string} string -* @param {number?} start -* @param {number?} end -*/ -function strip(string, start, end) { - return string.slice(start, end).replace(/\S/g, " "); -} -const singleComment = Symbol("singleComment"); -const multiComment = Symbol("multiComment"); -/** -* @param {string} jsonString -* @returns {string} -*/ -function stripJsonComments(jsonString) { - let isInsideString = false; - /** @type {false | symbol} */ - let isInsideComment = false; - let offset$1 = 0; - let result = ""; - for (let index = 0; index < jsonString.length; index++) { - const currentCharacter = jsonString[index]; - const nextCharacter = jsonString[index + 1]; - if (!isInsideComment && currentCharacter === "\"") { - if (!isEscaped(jsonString, index)) isInsideString = !isInsideString; - } - if (isInsideString) continue; - if (!isInsideComment && currentCharacter + nextCharacter === "//") { - result += jsonString.slice(offset$1, index); - offset$1 = index; - isInsideComment = singleComment; - index++; - } else if (isInsideComment === singleComment && currentCharacter + nextCharacter === "\r\n") { - index++; - isInsideComment = false; - result += strip(jsonString, offset$1, index); - offset$1 = index; - } else if (isInsideComment === singleComment && currentCharacter === "\n") { - isInsideComment = false; - result += strip(jsonString, offset$1, index); - offset$1 = index; - } else if (!isInsideComment && currentCharacter + nextCharacter === "/*") { - result += jsonString.slice(offset$1, index); - offset$1 = index; - isInsideComment = multiComment; - index++; - } else if (isInsideComment === multiComment && currentCharacter + nextCharacter === "*/") { - index++; - isInsideComment = false; - result += strip(jsonString, offset$1, index + 1); - offset$1 = index + 1; - } - } - return result + (isInsideComment ? strip(jsonString.slice(offset$1)) : jsonString.slice(offset$1)); -} -/** -* @param {string} string -* @returns {string} -*/ -function stripBom(string) { - if (string.charCodeAt(0) === 65279) return string.slice(1); - return string; -} - -//#endregion -//#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.3/node_modules/tsconfck/src/parse.js -const not_found_result = { - tsconfigFile: null, - tsconfig: {} -}; -/** -* parse the closest tsconfig.json file -* -* @param {string} filename - path to a tsconfig .json or a source file or directory (absolute or relative to cwd) -* @param {import('./public.d.ts').TSConfckParseOptions} [options] - options -* @returns {Promise} -* @throws {TSConfckParseError} -*/ -async function parse$13(filename, options$1) { - /** @type {import('./cache.js').TSConfckCache} */ - const cache$1 = options$1?.cache; - if (cache$1?.hasParseResult(filename)) return getParsedDeep(filename, cache$1, options$1); - const { resolve: resolve$4, reject, promise } = makePromise(); - cache$1?.setParseResult(filename, promise, true); - try { - let tsconfigFile = await resolveTSConfigJson(filename, cache$1) || await find(filename, options$1); - if (!tsconfigFile) { - resolve$4(not_found_result); - return promise; - } - let result; - if (filename !== tsconfigFile && cache$1?.hasParseResult(tsconfigFile)) result = await getParsedDeep(tsconfigFile, cache$1, options$1); - else { - result = await parseFile$1(tsconfigFile, cache$1, filename === tsconfigFile); - await Promise.all([parseExtends(result, cache$1), parseReferences(result, options$1)]); - } - replaceTokens(result); - resolve$4(resolveSolutionTSConfig(filename, result)); - } catch (e$1) { - reject(e$1); - } - return promise; -} -/** -* ensure extends and references are parsed -* -* @param {string} filename - cached file -* @param {import('./cache.js').TSConfckCache} cache - cache -* @param {import('./public.d.ts').TSConfckParseOptions} options - options -*/ -async function getParsedDeep(filename, cache$1, options$1) { - const result = await cache$1.getParseResult(filename); - if (result.tsconfig.extends && !result.extended || result.tsconfig.references && !result.referenced) { - const promise = Promise.all([parseExtends(result, cache$1), parseReferences(result, options$1)]).then(() => result); - cache$1.setParseResult(filename, promise, true); - return promise; - } - return result; -} -/** -* -* @param {string} tsconfigFile - path to tsconfig file -* @param {import('./cache.js').TSConfckCache} [cache] - cache -* @param {boolean} [skipCache] - skip cache -* @returns {Promise} -*/ -async function parseFile$1(tsconfigFile, cache$1, skipCache) { - if (!skipCache && cache$1?.hasParseResult(tsconfigFile) && !cache$1.getParseResult(tsconfigFile)._isRootFile_) return cache$1.getParseResult(tsconfigFile); - const promise = promises.readFile(tsconfigFile, "utf-8").then(toJson).then((json) => { - const parsed = JSON.parse(json); - applyDefaults(parsed, tsconfigFile); - return { - tsconfigFile, - tsconfig: normalizeTSConfig(parsed, path.dirname(tsconfigFile)) - }; - }).catch((e$1) => { - throw new TSConfckParseError(`parsing ${tsconfigFile} failed: ${e$1}`, "PARSE_FILE", tsconfigFile, e$1); - }); - if (!skipCache && (!cache$1?.hasParseResult(tsconfigFile) || !cache$1.getParseResult(tsconfigFile)._isRootFile_)) cache$1?.setParseResult(tsconfigFile, promise); - return promise; -} -/** -* normalize to match the output of ts.parseJsonConfigFileContent -* -* @param {any} tsconfig - typescript tsconfig output -* @param {string} dir - directory -*/ -function normalizeTSConfig(tsconfig, dir) { - const baseUrl = tsconfig.compilerOptions?.baseUrl; - if (baseUrl && !baseUrl.startsWith("${") && !path.isAbsolute(baseUrl)) tsconfig.compilerOptions.baseUrl = resolve2posix(dir, baseUrl); - return tsconfig; -} -/** -* -* @param {import('./public.d.ts').TSConfckParseResult} result -* @param {import('./public.d.ts').TSConfckParseOptions} [options] -* @returns {Promise} -*/ -async function parseReferences(result, options$1) { - if (!result.tsconfig.references) return; - const referencedFiles = resolveReferencedTSConfigFiles(result, options$1); - const referenced = await Promise.all(referencedFiles.map((file) => parseFile$1(file, options$1?.cache))); - await Promise.all(referenced.map((ref) => parseExtends(ref, options$1?.cache))); - referenced.forEach((ref) => { - ref.solution = result; - replaceTokens(ref); - }); - result.referenced = referenced; -} -/** -* @param {import('./public.d.ts').TSConfckParseResult} result -* @param {import('./cache.js').TSConfckCache}[cache] -* @returns {Promise} -*/ -async function parseExtends(result, cache$1) { - if (!result.tsconfig.extends) return; - /** @type {import('./public.d.ts').TSConfckParseResult[]} */ - const extended = [{ - tsconfigFile: result.tsconfigFile, - tsconfig: JSON.parse(JSON.stringify(result.tsconfig)) - }]; - let pos = 0; - /** @type {string[]} */ - const extendsPath = []; - let currentBranchDepth = 0; - while (pos < extended.length) { - const extending = extended[pos]; - extendsPath.push(extending.tsconfigFile); - if (extending.tsconfig.extends) { - currentBranchDepth += 1; - /** @type {string[]} */ - let resolvedExtends; - if (!Array.isArray(extending.tsconfig.extends)) resolvedExtends = [resolveExtends(extending.tsconfig.extends, extending.tsconfigFile)]; - else resolvedExtends = extending.tsconfig.extends.reverse().map((ex) => resolveExtends(ex, extending.tsconfigFile)); - const circularExtends = resolvedExtends.find((tsconfigFile) => extendsPath.includes(tsconfigFile)); - if (circularExtends) throw new TSConfckParseError(`Circular dependency in "extends": ${extendsPath.concat([circularExtends]).join(" -> ")}`, "EXTENDS_CIRCULAR", result.tsconfigFile); - extended.splice(pos + 1, 0, ...await Promise.all(resolvedExtends.map((file) => parseFile$1(file, cache$1)))); - } else { - extendsPath.splice(-currentBranchDepth); - currentBranchDepth = 0; - } - pos = pos + 1; - } - result.extended = extended; - for (const ext of result.extended.slice(1)) extendTSConfig(result, ext); -} -/** -* -* @param {string} extended -* @param {string} from -* @returns {string} -*/ -function resolveExtends(extended, from) { - if ([".", ".."].includes(extended)) extended = extended + "/tsconfig.json"; - const req$4 = createRequire$1(from); - let error$1; - try { - return req$4.resolve(extended); - } catch (e$1) { - error$1 = e$1; - } - if (extended[0] !== "." && !path.isAbsolute(extended)) try { - return req$4.resolve(`${extended}/tsconfig.json`); - } catch (e$1) { - error$1 = e$1; - } - throw new TSConfckParseError(`failed to resolve "extends":"${extended}" in ${from}`, "EXTENDS_RESOLVE", from, error$1); -} -const EXTENDABLE_KEYS = [ - "compilerOptions", - "files", - "include", - "exclude", - "watchOptions", - "compileOnSave", - "typeAcquisition", - "buildOptions" -]; -/** -* -* @param {import('./public.d.ts').TSConfckParseResult} extending -* @param {import('./public.d.ts').TSConfckParseResult} extended -* @returns void -*/ -function extendTSConfig(extending, extended) { - const extendingConfig = extending.tsconfig; - const extendedConfig = extended.tsconfig; - const relativePath = native2posix(path.relative(path.dirname(extending.tsconfigFile), path.dirname(extended.tsconfigFile))); - for (const key of Object.keys(extendedConfig).filter((key$1) => EXTENDABLE_KEYS.includes(key$1))) if (key === "compilerOptions") { - if (!extendingConfig.compilerOptions) extendingConfig.compilerOptions = {}; - for (const option of Object.keys(extendedConfig.compilerOptions)) { - if (Object.prototype.hasOwnProperty.call(extendingConfig.compilerOptions, option)) continue; - extendingConfig.compilerOptions[option] = rebaseRelative(option, extendedConfig.compilerOptions[option], relativePath); - } - } else if (extendingConfig[key] === void 0) if (key === "watchOptions") { - extendingConfig.watchOptions = {}; - for (const option of Object.keys(extendedConfig.watchOptions)) extendingConfig.watchOptions[option] = rebaseRelative(option, extendedConfig.watchOptions[option], relativePath); - } else extendingConfig[key] = rebaseRelative(key, extendedConfig[key], relativePath); -} -const REBASE_KEYS = [ - "files", - "include", - "exclude", - "baseUrl", - "rootDir", - "rootDirs", - "typeRoots", - "outDir", - "outFile", - "declarationDir", - "excludeDirectories", - "excludeFiles" -]; -/** @typedef {string | string[]} PathValue */ -/** -* -* @param {string} key -* @param {PathValue} value -* @param {string} prependPath -* @returns {PathValue} -*/ -function rebaseRelative(key, value$1, prependPath) { - if (!REBASE_KEYS.includes(key)) return value$1; - if (Array.isArray(value$1)) return value$1.map((x) => rebasePath(x, prependPath)); - else return rebasePath(value$1, prependPath); -} -/** -* -* @param {string} value -* @param {string} prependPath -* @returns {string} -*/ -function rebasePath(value$1, prependPath) { - if (path.isAbsolute(value$1) || value$1.startsWith("${configDir}")) return value$1; - else return path.posix.normalize(path.posix.join(prependPath, value$1)); -} -var TSConfckParseError = class TSConfckParseError extends Error { - /** - * error code - * @type {string} - */ - code; - /** - * error cause - * @type { Error | undefined} - */ - cause; - /** - * absolute path of tsconfig file where the error happened - * @type {string} - */ - tsconfigFile; - /** - * - * @param {string} message - error message - * @param {string} code - error code - * @param {string} tsconfigFile - path to tsconfig file - * @param {Error?} cause - cause of this error - */ - constructor(message, code, tsconfigFile, cause) { - super(message); - Object.setPrototypeOf(this, TSConfckParseError.prototype); - this.name = TSConfckParseError.name; - this.code = code; - this.cause = cause; - this.tsconfigFile = tsconfigFile; - } -}; -/** -* -* @param {any} tsconfig -* @param {string} tsconfigFile -*/ -function applyDefaults(tsconfig, tsconfigFile) { - if (isJSConfig(tsconfigFile)) tsconfig.compilerOptions = { - ...DEFAULT_JSCONFIG_COMPILER_OPTIONS, - ...tsconfig.compilerOptions - }; -} -const DEFAULT_JSCONFIG_COMPILER_OPTIONS = { - allowJs: true, - maxNodeModuleJsDepth: 2, - allowSyntheticDefaultImports: true, - skipLibCheck: true, - noEmit: true -}; -/** -* @param {string} configFileName -*/ -function isJSConfig(configFileName) { - return path.basename(configFileName) === "jsconfig.json"; -} - -//#endregion -//#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.3/node_modules/tsconfck/src/parse-native.js -/** @typedef TSDiagnosticError { -code: number; -category: number; -messageText: string; -start?: number; -} TSDiagnosticError */ - -//#endregion -//#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.9.3/node_modules/tsconfck/src/cache.js -/** @template T */ -var TSConfckCache = class { - /** - * clear cache, use this if you have a long running process and tsconfig files have been added,changed or deleted - */ - clear() { - this.#configPaths.clear(); - this.#parsed.clear(); - } - /** - * has cached closest config for files in dir - * @param {string} dir - * @param {string} [configName=tsconfig.json] - * @returns {boolean} - */ - hasConfigPath(dir, configName = "tsconfig.json") { - return this.#configPaths.has(`${dir}/${configName}`); - } - /** - * get cached closest tsconfig for files in dir - * @param {string} dir - * @param {string} [configName=tsconfig.json] - * @returns {Promise|string|null} - * @throws {unknown} if cached value is an error - */ - getConfigPath(dir, configName = "tsconfig.json") { - const key = `${dir}/${configName}`; - const value$1 = this.#configPaths.get(key); - if (value$1 == null || value$1.length || value$1.then) return value$1; - else throw value$1; - } - /** - * has parsed tsconfig for file - * @param {string} file - * @returns {boolean} - */ - hasParseResult(file) { - return this.#parsed.has(file); - } - /** - * get parsed tsconfig for file - * @param {string} file - * @returns {Promise|T} - * @throws {unknown} if cached value is an error - */ - getParseResult(file) { - const value$1 = this.#parsed.get(file); - if (value$1.then || value$1.tsconfig) return value$1; - else throw value$1; - } - /** - * @internal - * @private - * @param file - * @param {boolean} isRootFile a flag to check if current file which involking the parse() api, used to distinguish the normal cache which only parsed by parseFile() - * @param {Promise} result - */ - setParseResult(file, result, isRootFile = false) { - Object.defineProperty(result, "_isRootFile_", { - value: isRootFile, - writable: false, - enumerable: false, - configurable: false - }); - this.#parsed.set(file, result); - result.then((parsed) => { - if (this.#parsed.get(file) === result) this.#parsed.set(file, parsed); - }).catch((e$1) => { - if (this.#parsed.get(file) === result) this.#parsed.set(file, e$1); - }); - } - /** - * @internal - * @private - * @param {string} dir - * @param {Promise} configPath - * @param {string} [configName=tsconfig.json] - */ - setConfigPath(dir, configPath, configName = "tsconfig.json") { - const key = `${dir}/${configName}`; - this.#configPaths.set(key, configPath); - configPath.then((path$13) => { - if (this.#configPaths.get(key) === configPath) this.#configPaths.set(key, path$13); - }).catch((e$1) => { - if (this.#configPaths.get(key) === configPath) this.#configPaths.set(key, e$1); - }); - } - /** - * map directories to their closest tsconfig.json - * @internal - * @private - * @type{Map|string|null)>} - */ - #configPaths = /* @__PURE__ */ new Map(); - /** - * map files to their parsed tsconfig result - * @internal - * @private - * @type {Map|T)> } - */ - #parsed = /* @__PURE__ */ new Map(); -}; - -//#endregion -//#region src/node/plugins/esbuild.ts -var import_picocolors$31 = /* @__PURE__ */ __toESM(require_picocolors(), 1); -const debug$17 = createDebugger("vite:esbuild"); -const IIFE_BEGIN_RE = /(?:const|var)\s+\S+\s*=\s*\(?function\([^()]*\)\s*\{\s*"use strict";/; -const validExtensionRE = /\.\w+$/; -const jsxExtensionsRE = /\.(?:j|t)sx\b/; -const defaultEsbuildSupported = { - "dynamic-import": true, - "import-meta": true -}; -async function transformWithEsbuild(code, filename, options$1, inMap, config$2, watcher) { - let loader$1 = options$1?.loader; - if (!loader$1) { - const ext = path.extname(validExtensionRE.test(filename) ? filename : cleanUrl(filename)).slice(1); - if (ext === "cjs" || ext === "mjs") loader$1 = "js"; - else if (ext === "cts" || ext === "mts") loader$1 = "ts"; - else loader$1 = ext; - } - let tsconfigRaw = options$1?.tsconfigRaw; - if (typeof tsconfigRaw !== "string") { - const meaningfulFields = [ - "alwaysStrict", - "experimentalDecorators", - "importsNotUsedAsValues", - "jsx", - "jsxFactory", - "jsxFragmentFactory", - "jsxImportSource", - "preserveValueImports", - "target", - "useDefineForClassFields", - "verbatimModuleSyntax" - ]; - const compilerOptionsForFile = {}; - if (loader$1 === "ts" || loader$1 === "tsx") try { - const { tsconfig: loadedTsconfig, tsconfigFile } = await loadTsconfigJsonForFile(filename, config$2); - if (watcher && tsconfigFile && config$2) ensureWatchedFile(watcher, tsconfigFile, config$2.root); - const loadedCompilerOptions = loadedTsconfig.compilerOptions ?? {}; - for (const field of meaningfulFields) if (field in loadedCompilerOptions) compilerOptionsForFile[field] = loadedCompilerOptions[field]; - } catch (e$1) { - if (e$1 instanceof TSConfckParseError) { - if (watcher && e$1.tsconfigFile && config$2) ensureWatchedFile(watcher, e$1.tsconfigFile, config$2.root); - } - throw e$1; - } - const compilerOptions = { - ...compilerOptionsForFile, - ...tsconfigRaw?.compilerOptions - }; - if (compilerOptions.useDefineForClassFields === void 0 && compilerOptions.target === void 0) compilerOptions.useDefineForClassFields = false; - if (options$1) { - if (options$1.jsx) compilerOptions.jsx = void 0; - if (options$1.jsxFactory) compilerOptions.jsxFactory = void 0; - if (options$1.jsxFragment) compilerOptions.jsxFragmentFactory = void 0; - if (options$1.jsxImportSource) compilerOptions.jsxImportSource = void 0; - } - tsconfigRaw = { - ...tsconfigRaw, - compilerOptions - }; - } - const resolvedOptions = { - sourcemap: true, - sourcefile: filename, - ...options$1, - loader: loader$1, - tsconfigRaw - }; - delete resolvedOptions.include; - delete resolvedOptions.exclude; - delete resolvedOptions.jsxInject; - try { - const result = await transform(code, resolvedOptions); - let map$1; - if (inMap && resolvedOptions.sourcemap) { - const nextMap = JSON.parse(result.map); - nextMap.sourcesContent = []; - map$1 = combineSourcemaps(filename, [nextMap, inMap]); - } else map$1 = resolvedOptions.sourcemap && resolvedOptions.sourcemap !== "inline" ? JSON.parse(result.map) : { mappings: "" }; - return { - ...result, - map: map$1 - }; - } catch (e$1) { - debug$17?.(`esbuild error with options used: `, resolvedOptions); - if (e$1.errors) { - e$1.frame = ""; - e$1.errors.forEach((m) => { - if (m.text === "Experimental decorators are not currently enabled" || m.text === "Parameter decorators only work when experimental decorators are enabled") m.text += ". Vite 5 now uses esbuild 0.18 and you need to enable them by adding \"experimentalDecorators\": true in your \"tsconfig.json\" file."; - e$1.frame += `\n` + prettifyMessage(m, code); - }); - e$1.loc = e$1.errors[0].location; - } - throw e$1; - } -} -function esbuildPlugin(config$2) { - const { jsxInject, include, exclude, ...esbuildTransformOptions } = config$2.esbuild; - const filter$1 = createFilter(include || /\.(m?ts|[jt]sx)$/, exclude || /\.js$/); - const transformOptions = { - target: "esnext", - ...esbuildTransformOptions, - minify: false, - minifyIdentifiers: false, - minifySyntax: false, - minifyWhitespace: false, - treeShaking: false, - keepNames: false, - supported: { - ...defaultEsbuildSupported, - ...esbuildTransformOptions.supported - } - }; - let server; - return { - name: "vite:esbuild", - configureServer(_server) { - server = _server; - }, - async transform(code, id) { - if (filter$1(id) || filter$1(cleanUrl(id))) { - const result = await transformWithEsbuild(code, id, transformOptions, void 0, config$2, server?.watcher); - if (result.warnings.length) result.warnings.forEach((m) => { - this.warn(prettifyMessage(m, code)); - }); - if (jsxInject && jsxExtensionsRE.test(id)) result.code = jsxInject + ";" + result.code; - return { - code: result.code, - map: result.map - }; - } - } - }; -} -const rollupToEsbuildFormatMap = { - es: "esm", - cjs: "cjs", - iife: void 0 -}; -const injectEsbuildHelpers = (esbuildCode, format$3) => { - const contentIndex = format$3 === "iife" ? Math.max(esbuildCode.search(IIFE_BEGIN_RE), 0) : format$3 === "umd" ? esbuildCode.indexOf(`(function(`) : 0; - if (contentIndex > 0) { - const esbuildHelpers = esbuildCode.slice(0, contentIndex); - return esbuildCode.slice(contentIndex).replace("\"use strict\";", (m) => m + esbuildHelpers); - } - return esbuildCode; -}; -const buildEsbuildPlugin = () => { - return { - name: "vite:esbuild-transpile", - applyToEnvironment(environment) { - return environment.config.esbuild !== false; - }, - async renderChunk(code, chunk, opts) { - if (opts.__vite_skip_esbuild__) return null; - const config$2 = this.environment.config; - const options$1 = resolveEsbuildTranspileOptions(config$2, opts.format); - if (!options$1) return null; - const res = await transformWithEsbuild(code, chunk.fileName, options$1, void 0, config$2); - if (config$2.build.lib) res.code = injectEsbuildHelpers(res.code, opts.format); - return res; - } - }; -}; -function resolveEsbuildTranspileOptions(config$2, format$3) { - const target = config$2.build.target; - const minify = config$2.build.minify === "esbuild"; - if ((!target || target === "esnext") && !minify) return null; - const isEsLibBuild = config$2.build.lib && format$3 === "es"; - const esbuildOptions = config$2.esbuild || {}; - const options$1 = { - ...esbuildOptions, - loader: "js", - target: target || void 0, - format: rollupToEsbuildFormatMap[format$3], - supported: { - ...defaultEsbuildSupported, - ...esbuildOptions.supported - } - }; - if (!minify) return { - ...options$1, - minify: false, - minifyIdentifiers: false, - minifySyntax: false, - minifyWhitespace: false, - treeShaking: false - }; - if (options$1.minifyIdentifiers != null || options$1.minifySyntax != null || options$1.minifyWhitespace != null) if (isEsLibBuild) return { - ...options$1, - minify: false, - minifyIdentifiers: options$1.minifyIdentifiers ?? true, - minifySyntax: options$1.minifySyntax ?? true, - minifyWhitespace: false, - treeShaking: true - }; - else return { - ...options$1, - minify: false, - minifyIdentifiers: options$1.minifyIdentifiers ?? true, - minifySyntax: options$1.minifySyntax ?? true, - minifyWhitespace: options$1.minifyWhitespace ?? true, - treeShaking: true - }; - if (isEsLibBuild) return { - ...options$1, - minify: false, - minifyIdentifiers: true, - minifySyntax: true, - minifyWhitespace: false, - treeShaking: true - }; - else return { - ...options$1, - minify: true, - treeShaking: true - }; -} -function prettifyMessage(m, code) { - let res = import_picocolors$31.default.yellow(m.text); - if (m.location) res += `\n` + generateCodeFrame(code, m.location); - return res + `\n`; -} -let globalTSConfckCache; -const tsconfckCacheMap = /* @__PURE__ */ new WeakMap(); -function getTSConfckCache(config$2) { - if (!config$2) return globalTSConfckCache ??= new TSConfckCache(); - let cache$1 = tsconfckCacheMap.get(config$2); - if (!cache$1) { - cache$1 = new TSConfckCache(); - tsconfckCacheMap.set(config$2, cache$1); - } - return cache$1; -} -async function loadTsconfigJsonForFile(filename, config$2) { - const { tsconfig, tsconfigFile } = await parse$13(filename, { - cache: getTSConfckCache(config$2), - ignoreNodeModules: true - }); - return { - tsconfigFile, - tsconfig - }; -} -async function reloadOnTsconfigChange(server, changedFile) { - if (changedFile.endsWith(".json")) { - const cache$1 = getTSConfckCache(server.config); - if (changedFile.endsWith("/tsconfig.json") || cache$1.hasParseResult(changedFile)) { - server.config.logger.info(`changed tsconfig file detected: ${changedFile} - Clearing cache and forcing full-reload to ensure TypeScript is compiled with updated config values.`, { - clear: server.config.clearScreen, - timestamp: true - }); - for (const environment of Object.values(server.environments)) environment.moduleGraph.invalidateAll(); - cache$1.clear(); - for (const environment of Object.values(server.environments)) environment.hot.send({ - type: "full-reload", - path: "*" - }); - } - } -} - -//#endregion -//#region ../../node_modules/.pnpm/artichokie@0.4.2/node_modules/artichokie/dist/index.js -const AsyncFunction = async function() {}.constructor; -const codeToDataUrl = (code) => `data:application/javascript,${encodeURIComponent(code + "\n//# sourceURL=[worker-eval(artichokie)]")}`; -const viteSsrDynamicImport = "__vite_ssr_dynamic_import__"; -const stackBlitzImport = "𝐢𝐦𝐩𝐨𝐫𝐭"; -var Worker$1 = class { - /** @internal */ - _isModule; - /** @internal */ - _code; - /** @internal */ - _parentFunctions; - /** @internal */ - _max; - /** @internal */ - _pool; - /** @internal */ - _idlePool; - /** @internal */ - _queue; - constructor(fn, options$1 = {}) { - this._isModule = options$1.type === "module"; - this._code = genWorkerCode(fn, this._isModule, 5 * 1e3, options$1.parentFunctions ?? {}); - this._parentFunctions = options$1.parentFunctions ?? {}; - const defaultMax = Math.max(1, (os.availableParallelism?.() ?? os.cpus().length) - 1); - this._max = options$1.max || defaultMax; - this._pool = []; - this._idlePool = []; - this._queue = []; - } - async run(...args) { - const worker = await this._getAvailableWorker(); - return new Promise((resolve$4, reject) => { - worker.currentResolve = resolve$4; - worker.currentReject = reject; - worker.postMessage({ args }); - }); - } - stop() { - this._pool.forEach((w) => w.unref()); - this._queue.forEach(([, reject]) => reject(/* @__PURE__ */ new Error("Main worker pool stopped before a worker was available."))); - this._pool = []; - this._idlePool = []; - this._queue = []; - } - /** @internal */ - _createWorker(parentFunctionSyncMessagePort, parentFunctionAsyncMessagePort, lockState) { - const options$1 = { - workerData: [ - parentFunctionSyncMessagePort, - parentFunctionAsyncMessagePort, - lockState - ], - transferList: [parentFunctionSyncMessagePort, parentFunctionAsyncMessagePort] - }; - if (this._isModule) return new Worker(new URL(codeToDataUrl(this._code)), options$1); - return new Worker(this._code, { - ...options$1, - eval: true - }); - } - /** @internal */ - async _getAvailableWorker() { - if (this._idlePool.length) return this._idlePool.shift(); - if (this._pool.length < this._max) { - const parentFunctionResponder = createParentFunctionResponder(this._parentFunctions); - const worker = this._createWorker(parentFunctionResponder.workerPorts.sync, parentFunctionResponder.workerPorts.async, parentFunctionResponder.lockState); - worker.on("message", async (args) => { - if ("result" in args) { - worker.currentResolve?.(args.result); - worker.currentResolve = null; - } else { - if (args.error instanceof ReferenceError) args.error.message += ". Maybe you forgot to pass the function to parentFunction?"; - worker.currentReject?.(args.error); - worker.currentReject = null; - } - this._assignDoneWorker(worker); - }); - worker.on("error", (err$2) => { - worker.currentReject?.(err$2); - worker.currentReject = null; - parentFunctionResponder.close(); - }); - worker.on("exit", (code) => { - const i$1 = this._pool.indexOf(worker); - if (i$1 > -1) this._pool.splice(i$1, 1); - if (code !== 0 && worker.currentReject) { - worker.currentReject(/* @__PURE__ */ new Error(`Worker stopped with non-0 exit code ${code}`)); - worker.currentReject = null; - parentFunctionResponder.close(); - } - }); - this._pool.push(worker); - return worker; - } - let resolve$4; - let reject; - const onWorkerAvailablePromise = new Promise((r$1, rj) => { - resolve$4 = r$1; - reject = rj; - }); - this._queue.push([resolve$4, reject]); - return onWorkerAvailablePromise; - } - /** @internal */ - _assignDoneWorker(worker) { - if (this._queue.length) { - const [resolve$4] = this._queue.shift(); - resolve$4(worker); - return; - } - this._idlePool.push(worker); - } -}; -function createParentFunctionResponder(parentFunctions) { - const lockState = new Int32Array(new SharedArrayBuffer(4)); - const unlock = () => { - Atomics.store(lockState, 0, 0); - Atomics.notify(lockState, 0); - }; - const parentFunctionSyncMessageChannel = new MessageChannel(); - const parentFunctionAsyncMessageChannel = new MessageChannel(); - const parentFunctionSyncMessagePort = parentFunctionSyncMessageChannel.port1; - const parentFunctionAsyncMessagePort = parentFunctionAsyncMessageChannel.port1; - const syncResponse = (data) => { - parentFunctionSyncMessagePort.postMessage(data); - unlock(); - }; - parentFunctionSyncMessagePort.on("message", async (args) => { - let syncResult; - try { - syncResult = parentFunctions[args.name](...args.args); - } catch (error$1) { - syncResponse({ - id: args.id, - error: error$1 - }); - return; - } - if (!(typeof syncResult === "object" && syncResult !== null && "then" in syncResult && typeof syncResult.then === "function")) { - syncResponse({ - id: args.id, - result: syncResult - }); - return; - } - syncResponse({ - id: args.id, - isAsync: true - }); - try { - const result = await syncResult; - parentFunctionAsyncMessagePort.postMessage({ - id: args.id, - result - }); - } catch (error$1) { - parentFunctionAsyncMessagePort.postMessage({ - id: args.id, - error: error$1 - }); - } - }); - parentFunctionSyncMessagePort.unref(); - return { - close: () => { - parentFunctionSyncMessagePort.close(); - parentFunctionAsyncMessagePort.close(); - }, - lockState, - workerPorts: { - sync: parentFunctionSyncMessageChannel.port2, - async: parentFunctionAsyncMessageChannel.port2 - } - }; -} -function genWorkerCode(fn, isModule, waitTimeout, parentFunctions) { - const createLock = (performance$2, lockState) => { - return { - lock: () => { - Atomics.store(lockState, 0, 1); - }, - waitUnlock: () => { - let utilizationBefore; - while (true) { - const status$1 = Atomics.wait(lockState, 0, 1, waitTimeout); - if (status$1 === "timed-out") { - if (utilizationBefore === void 0) { - utilizationBefore = performance$2.eventLoopUtilization(); - continue; - } - utilizationBefore = performance$2.eventLoopUtilization(utilizationBefore); - if (utilizationBefore.utilization > .9) continue; - throw new Error(status$1); - } - break; - } - } - }; - }; - const createParentFunctionRequester = (syncPort, asyncPort, receive, lock) => { - let id = 0; - const resolvers = /* @__PURE__ */ new Map(); - const call$1 = (key) => (...args) => { - id++; - lock.lock(); - syncPort.postMessage({ - id, - name: key, - args - }); - lock.waitUnlock(); - const resArgs = receive(syncPort).message; - if (resArgs.isAsync) { - let resolve$4, reject; - const promise = new Promise((res, rej) => { - resolve$4 = res; - reject = rej; - }); - resolvers.set(id, { - resolve: resolve$4, - reject - }); - return promise; - } - if ("error" in resArgs) throw resArgs.error; - else return resArgs.result; - }; - asyncPort.on("message", (args) => { - const id$1 = args.id; - if (resolvers.has(id$1)) { - const { resolve: resolve$4, reject } = resolvers.get(id$1); - resolvers.delete(id$1); - if ("result" in args) resolve$4(args.result); - else reject(args.error); - } - }); - return { call: call$1 }; - }; - const fnString = fn.toString().replaceAll(stackBlitzImport, "import").replaceAll(viteSsrDynamicImport, "import"); - return ` -${isModule ? "import { parentPort, receiveMessageOnPort, workerData } from 'worker_threads'" : "const { parentPort, receiveMessageOnPort, workerData } = require('worker_threads')"} -${isModule ? "import { performance } from 'node:perf_hooks'" : "const { performance } = require('node:perf_hooks')"} -const [parentFunctionSyncMessagePort, parentFunctionAsyncMessagePort, lockState] = workerData -const waitTimeout = ${waitTimeout} -const createLock = ${createLock.toString()} -const parentFunctionRequester = (${createParentFunctionRequester.toString()})( - parentFunctionSyncMessagePort, - parentFunctionAsyncMessagePort, - receiveMessageOnPort, - createLock(performance, lockState) -) - -const doWorkPromise = (async () => { - ${Object.keys(parentFunctions).map((key) => `const ${key} = parentFunctionRequester.call(${JSON.stringify(key)});`).join("\n")} - return await (${fnString})() -})() -let doWork - -parentPort.on('message', async (args) => { - doWork ||= await doWorkPromise - - try { - const res = await doWork(...args.args) - parentPort.postMessage({ result: res }) - } catch (e) { - parentPort.postMessage({ error: e }) - } -}) - `; -} -const importRe = /\bimport\s*\(/g; -const internalImportName = "__artichokie_local_import__"; -var FakeWorker = class { - /** @internal */ - _fn; - constructor(fn, options$1 = {}) { - const declareRequire = options$1.type !== "module"; - const argsAndCode = genFakeWorkerArgsAndCode(fn, declareRequire, options$1.parentFunctions ?? {}); - const localImport = (specifier) => import(specifier); - const args = [ - ...declareRequire ? [createRequire(import.meta.url)] : [], - localImport, - options$1.parentFunctions - ]; - this._fn = new AsyncFunction(...argsAndCode)(...args); - } - async run(...args) { - try { - return await (await this._fn)(...args); - } catch (err$2) { - if (err$2 instanceof ReferenceError) err$2.message += ". Maybe you forgot to pass the function to parentFunction?"; - throw err$2; - } - } - stop() {} -}; -function genFakeWorkerArgsAndCode(fn, declareRequire, parentFunctions) { - const fnString = fn.toString().replace(importRe, `${internalImportName}(`).replaceAll(stackBlitzImport, internalImportName).replaceAll(viteSsrDynamicImport, internalImportName); - return [ - ...declareRequire ? ["require"] : [], - internalImportName, - "parentFunctions", - ` -${Object.keys(parentFunctions).map((key) => `const ${key} = parentFunctions[${JSON.stringify(key)}];`).join("\n")} -return await (${fnString})() - ` - ]; -} -var WorkerWithFallback = class { - /** @internal */ - _disableReal; - /** @internal */ - _realWorker; - /** @internal */ - _fakeWorker; - /** @internal */ - _shouldUseFake; - constructor(fn, options$1) { - this._disableReal = options$1.max !== void 0 && options$1.max <= 0; - this._realWorker = new Worker$1(fn, options$1); - this._fakeWorker = new FakeWorker(fn, options$1); - this._shouldUseFake = options$1.shouldUseFake; - } - async run(...args) { - const useFake = this._disableReal || this._shouldUseFake(...args); - return this[useFake ? "_fakeWorker" : "_realWorker"].run(...args); - } - stop() { - this._realWorker.stop(); - this._fakeWorker.stop(); - } -}; - -//#endregion -//#region ../../node_modules/.pnpm/resolve.exports@2.0.3/node_modules/resolve.exports/dist/index.mjs -function e(e$1, n$2, r$1) { - throw new Error(r$1 ? `No known conditions for "${n$2}" specifier in "${e$1}" package` : `Missing "${n$2}" specifier in "${e$1}" package`); -} -function n(n$2, i$1, o$1, f$1) { - let s, u, l = r(n$2, o$1), c = function(e$1) { - let n$3 = new Set(["default", ...e$1.conditions || []]); - return e$1.unsafe || n$3.add(e$1.require ? "require" : "import"), e$1.unsafe || n$3.add(e$1.browser ? "browser" : "node"), n$3; - }(f$1 || {}), a = i$1[l]; - if (void 0 === a) { - let e$1, n$3, r$1, t$1; - for (t$1 in i$1) n$3 && t$1.length < n$3.length || ("/" === t$1[t$1.length - 1] && l.startsWith(t$1) ? (u = l.substring(t$1.length), n$3 = t$1) : t$1.length > 1 && (r$1 = t$1.indexOf("*", 1), ~r$1 && (e$1 = RegExp("^" + t$1.substring(0, r$1) + "(.*)" + t$1.substring(1 + r$1) + "$").exec(l), e$1 && e$1[1] && (u = e$1[1], n$3 = t$1)))); - a = i$1[n$3]; - } - return a || e(n$2, l), s = t(a, c), s || e(n$2, l, 1), u && function(e$1, n$3) { - let r$1, t$1 = 0, i$2 = e$1.length, o$2 = /[*]/g, f$2 = /[/]$/; - for (; t$1 < i$2; t$1++) e$1[t$1] = o$2.test(r$1 = e$1[t$1]) ? r$1.replace(o$2, n$3) : f$2.test(r$1) ? r$1 + n$3 : r$1; - }(s, u), s; -} -function r(e$1, n$2, r$1) { - if (e$1 === n$2 || "." === n$2) return "."; - let t$1 = e$1 + "/", i$1 = t$1.length, o$1 = n$2.slice(0, i$1) === t$1, f$1 = o$1 ? n$2.slice(i$1) : n$2; - return "#" === f$1[0] ? f$1 : o$1 || !r$1 ? "./" === f$1.slice(0, 2) ? f$1 : "./" + f$1 : f$1; -} -function t(e$1, n$2, r$1) { - if (e$1) { - if ("string" == typeof e$1) return r$1 && r$1.add(e$1), [e$1]; - let i$1, o$1; - if (Array.isArray(e$1)) { - for (o$1 = r$1 || /* @__PURE__ */ new Set(), i$1 = 0; i$1 < e$1.length; i$1++) t(e$1[i$1], n$2, o$1); - if (!r$1 && o$1.size) return [...o$1]; - } else for (i$1 in e$1) if (n$2.has(i$1)) return t(e$1[i$1], n$2, r$1); - } -} -function o(e$1, r$1, t$1) { - let i$1, o$1 = e$1.exports; - if (o$1) { - if ("string" == typeof o$1) o$1 = { ".": o$1 }; - else for (i$1 in o$1) { - "." !== i$1[0] && (o$1 = { ".": o$1 }); - break; - } - return n(e$1.name, o$1, r$1 || ".", t$1); - } -} -function f(e$1, r$1, t$1) { - if (e$1.imports) return n(e$1.name, e$1.imports, r$1, t$1); -} - -//#endregion -//#region ../../node_modules/.pnpm/ufo@1.6.1/node_modules/ufo/dist/index.mjs -const HASH_RE = /#/g; -const AMPERSAND_RE = /&/g; -const SLASH_RE = /\//g; -const EQUAL_RE = /=/g; -const PLUS_RE = /\+/g; -const ENC_CARET_RE = /%5e/gi; -const ENC_BACKTICK_RE = /%60/gi; -const ENC_PIPE_RE = /%7c/gi; -const ENC_SPACE_RE = /%20/gi; -function encode(text) { - return encodeURI("" + text).replace(ENC_PIPE_RE, "|"); -} -function encodeQueryValue(input) { - return encode(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F"); -} -function encodeQueryKey(text) { - return encodeQueryValue(text).replace(EQUAL_RE, "%3D"); -} -function encodeQueryItem(key, value$1) { - if (typeof value$1 === "number" || typeof value$1 === "boolean") value$1 = String(value$1); - if (!value$1) return encodeQueryKey(key); - if (Array.isArray(value$1)) return value$1.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join("&"); - return `${encodeQueryKey(key)}=${encodeQueryValue(value$1)}`; -} -function stringifyQuery(query) { - return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&"); -} -const protocolRelative = Symbol.for("ufo:protocolRelative"); - -//#endregion -//#region ../../node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs -const BUILTIN_MODULES = new Set(builtinModules); -function clearImports(imports) { - return (imports || "").replace(/\/\/[^\n]*\n|\/\*.*\*\//g, "").replace(/\s+/g, " "); -} -function getImportNames(cleanedImports) { - const topLevelImports = cleanedImports.replace(/{[^}]*}/, ""); - return { - namespacedImport: topLevelImports.match(/\* as \s*(\S*)/)?.[1], - defaultImport: topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0 - }; -} -/** -* @typedef ErrnoExceptionFields -* @property {number | undefined} [errnode] -* @property {string | undefined} [code] -* @property {string | undefined} [path] -* @property {string | undefined} [syscall] -* @property {string | undefined} [url] -* -* @typedef {Error & ErrnoExceptionFields} ErrnoException -*/ -const own$1 = {}.hasOwnProperty; -const classRegExp = /^([A-Z][a-z\d]*)+$/; -const kTypes = new Set([ - "string", - "function", - "number", - "object", - "Function", - "Object", - "boolean", - "bigint", - "symbol" -]); -const codes$1 = {}; -/** -* Create a list string in the form like 'A and B' or 'A, B, ..., and Z'. -* We cannot use Intl.ListFormat because it's not available in -* --without-intl builds. -* -* @param {Array} array -* An array of strings. -* @param {string} [type] -* The list type to be inserted before the last element. -* @returns {string} -*/ -function formatList(array, type = "and") { - return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array[array.length - 1]}`; -} -/** @type {Map} */ -const messages = /* @__PURE__ */ new Map(); -const nodeInternalPrefix = "__node_internal_"; -/** @type {number} */ -let userStackTraceLimit; -codes$1.ERR_INVALID_ARG_TYPE = createError( - "ERR_INVALID_ARG_TYPE", - /** - * @param {string} name - * @param {Array | string} expected - * @param {unknown} actual - */ - (name, expected, actual) => { - assert(typeof name === "string", "'name' must be a string"); - if (!Array.isArray(expected)) expected = [expected]; - let message = "The "; - if (name.endsWith(" argument")) message += `${name} `; - else { - const type = name.includes(".") ? "property" : "argument"; - message += `"${name}" ${type} `; - } - message += "must be "; - /** @type {Array} */ - const types = []; - /** @type {Array} */ - const instances = []; - /** @type {Array} */ - const other = []; - for (const value$1 of expected) { - assert(typeof value$1 === "string", "All expected entries have to be of type string"); - if (kTypes.has(value$1)) types.push(value$1.toLowerCase()); - else if (classRegExp.exec(value$1) === null) { - assert(value$1 !== "object", "The value \"object\" should be written as \"Object\""); - other.push(value$1); - } else instances.push(value$1); - } - if (instances.length > 0) { - const pos = types.indexOf("object"); - if (pos !== -1) { - types.slice(pos, 1); - instances.push("Object"); - } - } - if (types.length > 0) { - message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`; - if (instances.length > 0 || other.length > 0) message += " or "; - } - if (instances.length > 0) { - message += `an instance of ${formatList(instances, "or")}`; - if (other.length > 0) message += " or "; - } - if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`; - else { - if (other[0].toLowerCase() !== other[0]) message += "an "; - message += `${other[0]}`; - } - message += `. Received ${determineSpecificType(actual)}`; - return message; - }, - TypeError -); -codes$1.ERR_INVALID_MODULE_SPECIFIER = createError( - "ERR_INVALID_MODULE_SPECIFIER", - /** - * @param {string} request - * @param {string} reason - * @param {string} [base] - */ - (request, reason, base = void 0) => { - return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`; - }, - TypeError -); -codes$1.ERR_INVALID_PACKAGE_CONFIG = createError( - "ERR_INVALID_PACKAGE_CONFIG", - /** - * @param {string} path - * @param {string} [base] - * @param {string} [message] - */ - (path$13, base, message) => { - return `Invalid package config ${path$13}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; - }, - Error -); -codes$1.ERR_INVALID_PACKAGE_TARGET = createError( - "ERR_INVALID_PACKAGE_TARGET", - /** - * @param {string} packagePath - * @param {string} key - * @param {unknown} target - * @param {boolean} [isImport=false] - * @param {string} [base] - */ - (packagePath, key, target, isImport = false, base = void 0) => { - const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./"); - if (key === ".") { - assert(isImport === false); - return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`; - } - return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`; - }, - Error -); -codes$1.ERR_MODULE_NOT_FOUND = createError( - "ERR_MODULE_NOT_FOUND", - /** - * @param {string} path - * @param {string} base - * @param {boolean} [exactUrl] - */ - (path$13, base, exactUrl = false) => { - return `Cannot find ${exactUrl ? "module" : "package"} '${path$13}' imported from ${base}`; - }, - Error -); -codes$1.ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error); -codes$1.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError( - "ERR_PACKAGE_IMPORT_NOT_DEFINED", - /** - * @param {string} specifier - * @param {string} packagePath - * @param {string} base - */ - (specifier, packagePath, base) => { - return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`; - }, - TypeError -); -codes$1.ERR_PACKAGE_PATH_NOT_EXPORTED = createError( - "ERR_PACKAGE_PATH_NOT_EXPORTED", - /** - * @param {string} packagePath - * @param {string} subpath - * @param {string} [base] - */ - (packagePath, subpath, base = void 0) => { - if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; - return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; - }, - Error -); -codes$1.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error); -codes$1.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError); -codes$1.ERR_UNKNOWN_FILE_EXTENSION = createError( - "ERR_UNKNOWN_FILE_EXTENSION", - /** - * @param {string} extension - * @param {string} path - */ - (extension$1, path$13) => { - return `Unknown file extension "${extension$1}" for ${path$13}`; - }, - TypeError -); -codes$1.ERR_INVALID_ARG_VALUE = createError( - "ERR_INVALID_ARG_VALUE", - /** - * @param {string} name - * @param {unknown} value - * @param {string} [reason='is invalid'] - */ - (name, value$1, reason = "is invalid") => { - let inspected = inspect(value$1); - if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`; - return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`; - }, - TypeError -); -/** -* Utility function for registering the error codes. Only used here. Exported -* *only* to allow for testing. -* @param {string} sym -* @param {MessageFunction | string} value -* @param {ErrorConstructor} constructor -* @returns {new (...parameters: Array) => Error} -*/ -function createError(sym, value$1, constructor) { - messages.set(sym, value$1); - return makeNodeErrorWithCode(constructor, sym); -} -/** -* @param {ErrorConstructor} Base -* @param {string} key -* @returns {ErrorConstructor} -*/ -function makeNodeErrorWithCode(Base, key) { - return NodeError; - /** - * @param {Array} parameters - */ - function NodeError(...parameters) { - const limit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; - const error$1 = new Base(); - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; - const message = getMessage(key, parameters, error$1); - Object.defineProperties(error$1, { - message: { - value: message, - enumerable: false, - writable: true, - configurable: true - }, - toString: { - value() { - return `${this.name} [${key}]: ${this.message}`; - }, - enumerable: false, - writable: true, - configurable: true - } - }); - captureLargerStackTrace(error$1); - error$1.code = key; - return error$1; - } -} -/** -* @returns {boolean} -*/ -function isErrorStackTraceLimitWritable() { - try { - if (v8.startupSnapshot.isBuildingSnapshot()) return false; - } catch {} - const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); - if (desc === void 0) return Object.isExtensible(Error); - return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; -} -/** -* This function removes unnecessary frames from Node.js core errors. -* @template {(...parameters: unknown[]) => unknown} T -* @param {T} wrappedFunction -* @returns {T} -*/ -function hideStackFrames(wrappedFunction) { - const hidden = nodeInternalPrefix + wrappedFunction.name; - Object.defineProperty(wrappedFunction, "name", { value: hidden }); - return wrappedFunction; -} -const captureLargerStackTrace = hideStackFrames( - /** - * @param {Error} error - * @returns {Error} - */ - function(error$1) { - const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); - if (stackTraceLimitIsWritable) { - userStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Number.POSITIVE_INFINITY; - } - Error.captureStackTrace(error$1); - if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; - return error$1; - } -); -/** -* @param {string} key -* @param {Array} parameters -* @param {Error} self -* @returns {string} -*/ -function getMessage(key, parameters, self$1) { - const message = messages.get(key); - assert(message !== void 0, "expected `message` to be found"); - if (typeof message === "function") { - assert(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`); - return Reflect.apply(message, self$1, parameters); - } - const regex = /%[dfijoOs]/g; - let expectedLength = 0; - while (regex.exec(message) !== null) expectedLength++; - assert(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`); - if (parameters.length === 0) return message; - parameters.unshift(message); - return Reflect.apply(format, null, parameters); -} -/** -* Determine the specific type of a value for type-mismatch errors. -* @param {unknown} value -* @returns {string} -*/ -function determineSpecificType(value$1) { - if (value$1 === null || value$1 === void 0) return String(value$1); - if (typeof value$1 === "function" && value$1.name) return `function ${value$1.name}`; - if (typeof value$1 === "object") { - if (value$1.constructor && value$1.constructor.name) return `an instance of ${value$1.constructor.name}`; - return `${inspect(value$1, { depth: -1 })}`; - } - let inspected = inspect(value$1, { colors: false }); - if (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`; - return `type ${typeof value$1} (${inspected})`; -} -const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*(?:[\s"']*(?[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu; -const TYPE_RE = /^\s*?type\s/; -function parseStaticImport(matched) { - const cleanedImports = clearImports(matched.imports); - const namedImports = {}; - const _matches = cleanedImports.match(/{([^}]*)}/)?.[1]?.split(",") || []; - for (const namedImport of _matches) { - const _match = namedImport.match(/^\s*(\S*) as (\S*)\s*$/); - const source = _match?.[1] || namedImport.trim(); - const importName = _match?.[2] || source; - if (source && !TYPE_RE.test(source)) namedImports[source] = importName; - } - const { namespacedImport, defaultImport } = getImportNames(cleanedImports); - return { - ...matched, - defaultImport, - namespacedImport, - namedImports - }; -} -const ESM_RE = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m; -const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g; -function hasESMSyntax(code, opts = {}) { - if (opts.stripComments) code = code.replace(COMMENT_RE, ""); - return ESM_RE.test(code); -} - -//#endregion -//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.52/node_modules/@rolldown/pluginutils/dist/simple-filters.js -/** -* Constructs a RegExp that matches the exact string specified. -* -* This is useful for plugin hook filters. -* -* @param str the string to match. -* @param flags flags for the RegExp. -* -* @example -* ```ts -* import { exactRegex } from '@rolldown/pluginutils'; -* const plugin = { -* name: 'plugin', -* resolveId: { -* filter: { id: exactRegex('foo') }, -* handler(id) {} // will only be called for `foo` -* } -* } -* ``` -*/ -function exactRegex(str, flags) { - return new RegExp(`^${escapeRegex$1(str)}$`, flags); -} -/** -* Constructs a RegExp that matches a value that has the specified prefix. -* -* This is useful for plugin hook filters. -* -* @param str the string to match. -* @param flags flags for the RegExp. -* -* @example -* ```ts -* import { prefixRegex } from '@rolldown/pluginutils'; -* const plugin = { -* name: 'plugin', -* resolveId: { -* filter: { id: prefixRegex('foo') }, -* handler(id) {} // will only be called for IDs starting with `foo` -* } -* } -* ``` -*/ -function prefixRegex(str, flags) { - return new RegExp(`^${escapeRegex$1(str)}`, flags); -} -const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g; -function escapeRegex$1(str) { - return str.replace(escapeRegexRE, "\\$&"); -} - -//#endregion -//#region ../../node_modules/.pnpm/es-module-lexer@1.7.0/node_modules/es-module-lexer/dist/lexer.js -var ImportType; -(function(A$1) { - A$1[A$1.Static = 1] = "Static", A$1[A$1.Dynamic = 2] = "Dynamic", A$1[A$1.ImportMeta = 3] = "ImportMeta", A$1[A$1.StaticSourcePhase = 4] = "StaticSourcePhase", A$1[A$1.DynamicSourcePhase = 5] = "DynamicSourcePhase", A$1[A$1.StaticDeferPhase = 6] = "StaticDeferPhase", A$1[A$1.DynamicDeferPhase = 7] = "DynamicDeferPhase"; -})(ImportType || (ImportType = {})); -const A = 1 === new Uint8Array(new Uint16Array([1]).buffer)[0]; -function parse(E$1, g = "@") { - if (!C) return init.then((() => parse(E$1))); - const I = E$1.length + 1, w = (C.__heap_base.value || C.__heap_base) + 4 * I - C.memory.buffer.byteLength; - w > 0 && C.memory.grow(Math.ceil(w / 65536)); - const K = C.sa(I - 1); - if ((A ? B : Q)(E$1, new Uint16Array(C.memory.buffer, K, I)), !C.parse()) throw Object.assign(/* @__PURE__ */ new Error(`Parse error ${g}:${E$1.slice(0, C.e()).split("\n").length}:${C.e() - E$1.lastIndexOf("\n", C.e() - 1)}`), { idx: C.e() }); - const o$1 = [], D = []; - for (; C.ri();) { - const A$1 = C.is(), Q$1 = C.ie(), B$1 = C.it(), g$1 = C.ai(), I$1 = C.id(), w$1 = C.ss(), K$1 = C.se(); - let D$1; - C.ip() && (D$1 = k(E$1.slice(-1 === I$1 ? A$1 - 1 : A$1, -1 === I$1 ? Q$1 + 1 : Q$1))), o$1.push({ - n: D$1, - t: B$1, - s: A$1, - e: Q$1, - ss: w$1, - se: K$1, - d: I$1, - a: g$1 - }); - } - for (; C.re();) { - const A$1 = C.es(), Q$1 = C.ee(), B$1 = C.els(), g$1 = C.ele(), I$1 = E$1.slice(A$1, Q$1), w$1 = I$1[0], K$1 = B$1 < 0 ? void 0 : E$1.slice(B$1, g$1), o$2 = K$1 ? K$1[0] : ""; - D.push({ - s: A$1, - e: Q$1, - ls: B$1, - le: g$1, - n: "\"" === w$1 || "'" === w$1 ? k(I$1) : I$1, - ln: "\"" === o$2 || "'" === o$2 ? k(K$1) : K$1 - }); - } - function k(A$1) { - try { - return (0, eval)(A$1); - } catch (A$2) {} - } - return [ - o$1, - D, - !!C.f(), - !!C.ms() - ]; -} -function Q(A$1, Q$1) { - const B$1 = A$1.length; - let C$1 = 0; - for (; C$1 < B$1;) { - const B$2 = A$1.charCodeAt(C$1); - Q$1[C$1++] = (255 & B$2) << 8 | B$2 >>> 8; - } -} -function B(A$1, Q$1) { - const B$1 = A$1.length; - let C$1 = 0; - for (; C$1 < B$1;) Q$1[C$1] = A$1.charCodeAt(C$1++); -} -let C; -const E = () => { - return A$1 = "AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJzZQAUC19faGVhcF9iYXNlAwEKzkQwaAEBf0EAIAA2AoAKQQAoAtwJIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgKECkEAIAA2AogKQQBBADYC4AlBAEEANgLwCUEAQQA2AugJQQBBADYC5AlBAEEANgL4CUEAQQA2AuwJIAEL0wEBA39BACgC8AkhBEEAQQAoAogKIgU2AvAJQQAgBDYC9AlBACAFQSRqNgKICiAEQSBqQeAJIAQbIAU2AgBBACgC1AkhBEEAKALQCSEGIAUgATY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QAgASEEIAAhBQwBC0EAIAJBBGo2ArAKQQEQKSECQQAoArAKIQUCQAJAIAJBIkYNACACQSdGDQAgAhAsGkEAKAKwCiEEDAELIAIQGkEAQQAoArAKQQJqIgQ2ArAKC0EBECkhA0EAKAKwCiECCwJAIAIgBUYNACAFIARBACAAIAAgAUYiAhtBACABIAIbEAILIAMLcgEEf0EAKAKwCiEAQQAoArQKIQECQAJAA0AgAEECaiECIAAgAU8NAQJAAkAgAi8BACIDQaR/ag4CAQQACyACIQAgA0F2ag4EAgEBAgELIABBBGohAAwACwtBACACNgKwChAlQQAPC0EAIAI2ArAKQd0AC0kBA39BACEDAkAgAkUNAAJAA0AgAC0AACIEIAEtAAAiBUcNASABQQFqIQEgAEEBaiEAIAJBf2oiAg0ADAILCyAEIAVrIQMLIAMLC+wBAgBBgAgLzgEAAHgAcABvAHIAdABtAHAAbwByAHQAZgBvAHIAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AcwBzAGUAcgB0AHYAbwB5AGkAZQBkAGUAbABlAGMAbwBuAHQAaQBuAGkAbgBzAHQAYQBuAHQAeQBiAHIAZQBhAHIAZQB0AHUAcgBkAGUAYgB1AGcAZwBlAGEAdwBhAGkAdABoAHIAdwBoAGkAbABlAGkAZgBjAGEAdABjAGYAaQBuAGEAbABsAGUAbABzAABB0AkLEAEAAAACAAAAAAQAAEA5AAA=", "undefined" != typeof Buffer ? Buffer.from(A$1, "base64") : Uint8Array.from(atob(A$1), ((A$2) => A$2.charCodeAt(0))); - var A$1; -}; -const init = WebAssembly.compile(E()).then(WebAssembly.instantiate).then((({ exports: A$1 }) => { - C = A$1; -})); - -//#endregion -//#region ../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js -var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const path$11 = __require("path"); - const fs$11 = __require("fs"); - const os$4 = __require("os"); - const url$2 = __require("url"); - const fsReadFileAsync = fs$11.promises.readFile; - /** @type {(name: string, sync: boolean) => string[]} */ - function getDefaultSearchPlaces(name, sync$3) { - return [ - "package.json", - `.${name}rc.json`, - `.${name}rc.js`, - `.${name}rc.cjs`, - ...sync$3 ? [] : [`.${name}rc.mjs`], - `.config/${name}rc`, - `.config/${name}rc.json`, - `.config/${name}rc.js`, - `.config/${name}rc.cjs`, - ...sync$3 ? [] : [`.config/${name}rc.mjs`], - `${name}.config.js`, - `${name}.config.cjs`, - ...sync$3 ? [] : [`${name}.config.mjs`] - ]; - } - /** - * @type {(p: string) => string} - * - * see #17 - * On *nix, if cwd is not under homedir, - * the last path will be '', ('/build' -> '') - * but it should be '/' actually. - * And on Windows, this will never happen. ('C:\build' -> 'C:') - */ - function parentDir(p) { - return path$11.dirname(p) || path$11.sep; - } - /** @type {import('./index').LoaderSync} */ - const jsonLoader = (_, content) => JSON.parse(content); - const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require; - /** @type {import('./index').LoadersSync} */ - const defaultLoadersSync = Object.freeze({ - ".js": requireFunc, - ".json": requireFunc, - ".cjs": requireFunc, - noExt: jsonLoader - }); - module.exports.defaultLoadersSync = defaultLoadersSync; - /** @type {import('./index').Loader} */ - const dynamicImport = async (id) => { - try { - return (await import(url$2.pathToFileURL(id).href)).default; - } catch (e$1) { - try { - return requireFunc(id); - } catch (requireE) { - if (requireE.code === "ERR_REQUIRE_ESM" || requireE instanceof SyntaxError && requireE.toString().includes("Cannot use import statement outside a module")) throw e$1; - throw requireE; - } - } - }; - /** @type {import('./index').Loaders} */ - const defaultLoaders = Object.freeze({ - ".js": dynamicImport, - ".mjs": dynamicImport, - ".cjs": dynamicImport, - ".json": jsonLoader, - noExt: jsonLoader - }); - module.exports.defaultLoaders = defaultLoaders; - /** - * @param {string} name - * @param {import('./index').Options | import('./index').OptionsSync} options - * @param {boolean} sync - * @returns {Required} - */ - function getOptions(name, options$1, sync$3) { - /** @type {Required} */ - const conf = { - stopDir: os$4.homedir(), - searchPlaces: getDefaultSearchPlaces(name, sync$3), - ignoreEmptySearchPlaces: true, - cache: true, - transform: (x) => x, - packageProp: [name], - ...options$1, - loaders: { - ...sync$3 ? defaultLoadersSync : defaultLoaders, - ...options$1.loaders - } - }; - conf.searchPlaces.forEach((place) => { - const key = path$11.extname(place) || "noExt"; - const loader$1 = conf.loaders[key]; - if (!loader$1) throw new Error(`Missing loader for extension "${place}"`); - if (typeof loader$1 !== "function") throw new Error(`Loader for extension "${place}" is not a function: Received ${typeof loader$1}.`); - }); - return conf; - } - /** @type {(props: string | string[], obj: Record) => unknown} */ - function getPackageProp(props, obj) { - if (typeof props === "string" && props in obj) return obj[props]; - return (Array.isArray(props) ? props : props.split(".")).reduce((acc, prop) => acc === void 0 ? acc : acc[prop], obj) || null; - } - /** @param {string} filepath */ - function validateFilePath(filepath) { - if (!filepath) throw new Error("load must pass a non-empty string"); - } - /** @type {(loader: import('./index').Loader, ext: string) => void} */ - function validateLoader(loader$1, ext) { - if (!loader$1) throw new Error(`No loader specified for extension "${ext}"`); - if (typeof loader$1 !== "function") throw new Error("loader is not a function"); - } - /** @type {(enableCache: boolean) => (c: Map, filepath: string, res: T) => T} */ - const makeEmplace = (enableCache) => (c, filepath, res) => { - if (enableCache) c.set(filepath, res); - return res; - }; - /** @type {import('./index').lilconfig} */ - module.exports.lilconfig = function lilconfig(name, options$1) { - const { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform: transform$2, cache: cache$1 } = getOptions(name, options$1 ?? {}, false); - const searchCache = /* @__PURE__ */ new Map(); - const loadCache = /* @__PURE__ */ new Map(); - const emplace = makeEmplace(cache$1); - return { - async search(searchFrom = process.cwd()) { - /** @type {import('./index').LilconfigResult} */ - const result = { - config: null, - filepath: "" - }; - /** @type {Set} */ - const visited = /* @__PURE__ */ new Set(); - let dir = searchFrom; - dirLoop: while (true) { - if (cache$1) { - const r$1 = searchCache.get(dir); - if (r$1 !== void 0) { - for (const p of visited) searchCache.set(p, r$1); - return r$1; - } - visited.add(dir); - } - for (const searchPlace of searchPlaces) { - const filepath = path$11.join(dir, searchPlace); - try { - await fs$11.promises.access(filepath); - } catch { - continue; - } - const content = String(await fsReadFileAsync(filepath)); - const loaderKey = path$11.extname(searchPlace) || "noExt"; - const loader$1 = loaders[loaderKey]; - if (searchPlace === "package.json") { - const maybeConfig = getPackageProp(packageProp, await loader$1(filepath, content)); - if (maybeConfig != null) { - result.config = maybeConfig; - result.filepath = filepath; - break dirLoop; - } - continue; - } - const isEmpty = content.trim() === ""; - if (isEmpty && ignoreEmptySearchPlaces) continue; - if (isEmpty) { - result.isEmpty = true; - result.config = void 0; - } else { - validateLoader(loader$1, loaderKey); - result.config = await loader$1(filepath, content); - } - result.filepath = filepath; - break dirLoop; - } - if (dir === stopDir || dir === parentDir(dir)) break dirLoop; - dir = parentDir(dir); - } - const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result); - if (cache$1) for (const p of visited) searchCache.set(p, transformed); - return transformed; - }, - async load(filepath) { - validateFilePath(filepath); - const absPath = path$11.resolve(process.cwd(), filepath); - if (cache$1 && loadCache.has(absPath)) return loadCache.get(absPath); - const { base, ext } = path$11.parse(absPath); - const loaderKey = ext || "noExt"; - const loader$1 = loaders[loaderKey]; - validateLoader(loader$1, loaderKey); - const content = String(await fsReadFileAsync(absPath)); - if (base === "package.json") return emplace(loadCache, absPath, transform$2({ - config: getPackageProp(packageProp, await loader$1(absPath, content)), - filepath: absPath - })); - /** @type {import('./index').LilconfigResult} */ - const result = { - config: null, - filepath: absPath - }; - const isEmpty = content.trim() === ""; - if (isEmpty && ignoreEmptySearchPlaces) return emplace(loadCache, absPath, transform$2({ - config: void 0, - filepath: absPath, - isEmpty: true - })); - result.config = isEmpty ? void 0 : await loader$1(absPath, content); - return emplace(loadCache, absPath, transform$2(isEmpty ? { - ...result, - isEmpty, - config: void 0 - } : result)); - }, - clearLoadCache() { - if (cache$1) loadCache.clear(); - }, - clearSearchCache() { - if (cache$1) searchCache.clear(); - }, - clearCaches() { - if (cache$1) { - loadCache.clear(); - searchCache.clear(); - } - } - }; - }; - /** @type {import('./index').lilconfigSync} */ - module.exports.lilconfigSync = function lilconfigSync(name, options$1) { - const { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform: transform$2, cache: cache$1 } = getOptions(name, options$1 ?? {}, true); - const searchCache = /* @__PURE__ */ new Map(); - const loadCache = /* @__PURE__ */ new Map(); - const emplace = makeEmplace(cache$1); - return { - search(searchFrom = process.cwd()) { - /** @type {import('./index').LilconfigResult} */ - const result = { - config: null, - filepath: "" - }; - /** @type {Set} */ - const visited = /* @__PURE__ */ new Set(); - let dir = searchFrom; - dirLoop: while (true) { - if (cache$1) { - const r$1 = searchCache.get(dir); - if (r$1 !== void 0) { - for (const p of visited) searchCache.set(p, r$1); - return r$1; - } - visited.add(dir); - } - for (const searchPlace of searchPlaces) { - const filepath = path$11.join(dir, searchPlace); - try { - fs$11.accessSync(filepath); - } catch { - continue; - } - const loaderKey = path$11.extname(searchPlace) || "noExt"; - const loader$1 = loaders[loaderKey]; - const content = String(fs$11.readFileSync(filepath)); - if (searchPlace === "package.json") { - const maybeConfig = getPackageProp(packageProp, loader$1(filepath, content)); - if (maybeConfig != null) { - result.config = maybeConfig; - result.filepath = filepath; - break dirLoop; - } - continue; - } - const isEmpty = content.trim() === ""; - if (isEmpty && ignoreEmptySearchPlaces) continue; - if (isEmpty) { - result.isEmpty = true; - result.config = void 0; - } else { - validateLoader(loader$1, loaderKey); - result.config = loader$1(filepath, content); - } - result.filepath = filepath; - break dirLoop; - } - if (dir === stopDir || dir === parentDir(dir)) break dirLoop; - dir = parentDir(dir); - } - const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result); - if (cache$1) for (const p of visited) searchCache.set(p, transformed); - return transformed; - }, - load(filepath) { - validateFilePath(filepath); - const absPath = path$11.resolve(process.cwd(), filepath); - if (cache$1 && loadCache.has(absPath)) return loadCache.get(absPath); - const { base, ext } = path$11.parse(absPath); - const loaderKey = ext || "noExt"; - const loader$1 = loaders[loaderKey]; - validateLoader(loader$1, loaderKey); - const content = String(fs$11.readFileSync(absPath)); - if (base === "package.json") return transform$2({ - config: getPackageProp(packageProp, loader$1(absPath, content)), - filepath: absPath - }); - const result = { - config: null, - filepath: absPath - }; - const isEmpty = content.trim() === ""; - if (isEmpty && ignoreEmptySearchPlaces) return emplace(loadCache, absPath, transform$2({ - filepath: absPath, - config: void 0, - isEmpty: true - })); - result.config = isEmpty ? void 0 : loader$1(absPath, content); - return emplace(loadCache, absPath, transform$2(isEmpty ? { - ...result, - isEmpty, - config: void 0 - } : result)); - }, - clearLoadCache() { - if (cache$1) loadCache.clear(); - }, - clearSearchCache() { - if (cache$1) searchCache.clear(); - }, - clearCaches() { - if (cache$1) { - loadCache.clear(); - searchCache.clear(); - } - } - }; - }; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/req.js -var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { createRequire: createRequire$2 } = __require("node:module"); - const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url"); - const TS_EXT_RE = /\.[mc]?ts$/; - let tsx; - let jiti; - let importError = []; - /** - * @param {string} name - * @param {string} rootFile - * @returns {Promise} - */ - async function req$3(name, rootFile = fileURLToPath$1(import.meta.url)) { - let url$3 = createRequire$2(rootFile).resolve(name); - try { - return (await import(`${pathToFileURL$1(url$3)}?t=${Date.now()}`)).default; - } catch (err$2) { - if (!TS_EXT_RE.test(url$3)) - /* c8 ignore start */ - throw err$2; - } - if (tsx === void 0) try { - tsx = await import("tsx/cjs/api"); - } catch (error$1) { - importError.push(error$1); - } - if (tsx) { - let loaded = tsx.require(name, rootFile); - return loaded && "__esModule" in loaded ? loaded.default : loaded; - } - if (jiti === void 0) try { - jiti = (await import("jiti")).default; - } catch (error$1) { - importError.push(error$1); - } - if (jiti) return jiti(rootFile, { interopDefault: true })(name); - throw new Error(`'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${importError.map((error$1) => error$1.message).join("\n")}`); - } - module.exports = req$3; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/options.js -var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const req$2 = require_req(); - /** - * Load Options - * - * @private - * @method options - * - * @param {Object} config PostCSS Config - * - * @return {Promise} options PostCSS Options - */ - async function options(config$2, file) { - if (config$2.parser && typeof config$2.parser === "string") try { - config$2.parser = await req$2(config$2.parser, file); - } catch (err$2) { - throw new Error(`Loading PostCSS Parser failed: ${err$2.message}\n\n(@${file})`); - } - if (config$2.syntax && typeof config$2.syntax === "string") try { - config$2.syntax = await req$2(config$2.syntax, file); - } catch (err$2) { - throw new Error(`Loading PostCSS Syntax failed: ${err$2.message}\n\n(@${file})`); - } - if (config$2.stringifier && typeof config$2.stringifier === "string") try { - config$2.stringifier = await req$2(config$2.stringifier, file); - } catch (err$2) { - throw new Error(`Loading PostCSS Stringifier failed: ${err$2.message}\n\n(@${file})`); - } - return config$2; - } - module.exports = options; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js -var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const req$1 = require_req(); - /** - * Plugin Loader - * - * @private - * @method load - * - * @param {String} plugin PostCSS Plugin Name - * @param {Object} options PostCSS Plugin Options - * - * @return {Promise} PostCSS Plugin - */ - async function load(plugin, options$1, file) { - try { - if (options$1 === null || options$1 === void 0 || Object.keys(options$1).length === 0) return await req$1(plugin, file); - else return (await req$1(plugin, file))(options$1); - } catch (err$2) { - throw new Error(`Loading PostCSS Plugin failed: ${err$2.message}\n\n(@${file})`); - } - } - /** - * Load Plugins - * - * @private - * @method plugins - * - * @param {Object} config PostCSS Config Plugins - * - * @return {Promise} plugins PostCSS Plugins - */ - async function plugins(config$2, file) { - let list = []; - if (Array.isArray(config$2.plugins)) list = config$2.plugins.filter(Boolean); - else { - list = Object.entries(config$2.plugins).filter(([, options$1]) => { - return options$1 !== false; - }).map(([plugin, options$1]) => { - return load(plugin, options$1, file); - }); - list = await Promise.all(list); - } - if (list.length && list.length > 0) list.forEach((plugin, i$1) => { - if (plugin.default) plugin = plugin.default; - if (plugin.postcss === true) plugin = plugin(); - else if (plugin.postcss) plugin = plugin.postcss; - if (!(typeof plugin === "object" && Array.isArray(plugin.plugins) || typeof plugin === "object" && plugin.postcssPlugin || typeof plugin === "function")) throw new TypeError(`Invalid PostCSS Plugin found at: plugins[${i$1}]\n\n(@${file})`); - }); - return list; - } - module.exports = plugins; -})); - -//#endregion -//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_yaml@2.8.1/node_modules/postcss-load-config/src/index.js -var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const { resolve: resolve$2 } = __require("node:path"); - const config$1 = require_src$1(); - const loadOptions = require_options(); - const loadPlugins = require_plugins(); - const req = require_req(); - const interopRequireDefault = (obj) => obj && obj.__esModule ? obj : { default: obj }; - /** - * Process the result from cosmiconfig - * - * @param {Object} ctx Config Context - * @param {Object} result Cosmiconfig result - * - * @return {Promise} PostCSS Config - */ - async function processResult(ctx, result) { - let file = result.filepath || ""; - let projectConfig = interopRequireDefault(result.config).default || {}; - if (typeof projectConfig === "function") projectConfig = projectConfig(ctx); - else projectConfig = Object.assign({}, projectConfig, ctx); - if (!projectConfig.plugins) projectConfig.plugins = []; - let res = { - file, - options: await loadOptions(projectConfig, file), - plugins: await loadPlugins(projectConfig, file) - }; - delete projectConfig.plugins; - return res; - } - /** - * Builds the Config Context - * - * @param {Object} ctx Config Context - * - * @return {Object} Config Context - */ - function createContext(ctx) { - /** - * @type {Object} - * - * @prop {String} cwd=process.cwd() Config search start location - * @prop {String} env=process.env.NODE_ENV Config Enviroment, will be set to `development` by `postcss-load-config` if `process.env.NODE_ENV` is `undefined` - */ - ctx = Object.assign({ - cwd: process.cwd(), - env: process.env.NODE_ENV - }, ctx); - if (!ctx.env) process.env.NODE_ENV = "development"; - return ctx; - } - async function loader(filepath) { - return req(filepath); - } - let yaml; - async function yamlLoader(_, content) { - if (!yaml) try { - yaml = await import("yaml"); - } catch (e$1) { - /* c8 ignore start */ - throw new Error(`'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e$1.message}`); - } - return yaml.parse(content); - } - /** @return {import('lilconfig').Options} */ - const withLoaders = (options$1 = {}) => { - let moduleName = "postcss"; - return { - ...options$1, - loaders: { - ...options$1.loaders, - ".cjs": loader, - ".cts": loader, - ".js": loader, - ".mjs": loader, - ".mts": loader, - ".ts": loader, - ".yaml": yamlLoader, - ".yml": yamlLoader - }, - searchPlaces: [ - ...options$1.searchPlaces || [], - "package.json", - `.${moduleName}rc`, - `.${moduleName}rc.json`, - `.${moduleName}rc.yaml`, - `.${moduleName}rc.yml`, - `.${moduleName}rc.ts`, - `.${moduleName}rc.cts`, - `.${moduleName}rc.mts`, - `.${moduleName}rc.js`, - `.${moduleName}rc.cjs`, - `.${moduleName}rc.mjs`, - `${moduleName}.config.ts`, - `${moduleName}.config.cts`, - `${moduleName}.config.mts`, - `${moduleName}.config.js`, - `${moduleName}.config.cjs`, - `${moduleName}.config.mjs` - ] - }; - }; - /** - * Load Config - * - * @method rc - * - * @param {Object} ctx Config Context - * @param {String} path Config Path - * @param {Object} options Config Options - * - * @return {Promise} config PostCSS Config - */ - function rc(ctx, path$13, options$1) { - /** - * @type {Object} The full Config Context - */ - ctx = createContext(ctx); - /** - * @type {String} `process.cwd()` - */ - path$13 = path$13 ? resolve$2(path$13) : process.cwd(); - return config$1.lilconfig("postcss", withLoaders(options$1)).search(path$13).then((result) => { - if (!result) throw new Error(`No PostCSS Config found in: ${path$13}`); - return processResult(ctx, result); - }); - } - /** - * Autoload Config for PostCSS - * - * @author Michael Ciniawsky @michael-ciniawsky - * @license MIT - * - * @module postcss-load-config - * @version 2.1.0 - * - * @requires comsiconfig - * @requires ./options - * @requires ./plugins - */ - module.exports = rc; -})); - -//#endregion -//#region ../../node_modules/.pnpm/convert-source-map@2.0.0/node_modules/convert-source-map/index.js -var require_convert_source_map = /* @__PURE__ */ __commonJSMin(((exports) => { - Object.defineProperty(exports, "commentRegex", { get: function getCommentRegex() { - return /^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/gm; - } }); - Object.defineProperty(exports, "mapFileCommentRegex", { get: function getMapFileCommentRegex() { - return /(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/gm; - } }); - var decodeBase64; - if (typeof Buffer !== "undefined") if (typeof Buffer.from === "function") decodeBase64 = decodeBase64WithBufferFrom; - else decodeBase64 = decodeBase64WithNewBuffer; - else decodeBase64 = decodeBase64WithAtob; - function decodeBase64WithBufferFrom(base64) { - return Buffer.from(base64, "base64").toString(); - } - function decodeBase64WithNewBuffer(base64) { - if (typeof value === "number") throw new TypeError("The value to decode must not be of type number."); - return new Buffer(base64, "base64").toString(); - } - function decodeBase64WithAtob(base64) { - return decodeURIComponent(escape(atob(base64))); - } - function stripComment(sm) { - return sm.split(",").pop(); - } - function readFromFileMap(sm, read) { - var r$1 = exports.mapFileCommentRegex.exec(sm); - var filename = r$1[1] || r$1[2]; - try { - var sm = read(filename); - if (sm != null && typeof sm.catch === "function") return sm.catch(throwError); - else return sm; - } catch (e$1) { - throwError(e$1); - } - function throwError(e$1) { - throw new Error("An error occurred while trying to read the map file at " + filename + "\n" + e$1.stack); - } - } - function Converter(sm, opts) { - opts = opts || {}; - if (opts.hasComment) sm = stripComment(sm); - if (opts.encoding === "base64") sm = decodeBase64(sm); - else if (opts.encoding === "uri") sm = decodeURIComponent(sm); - if (opts.isJSON || opts.encoding) sm = JSON.parse(sm); - this.sourcemap = sm; - } - Converter.prototype.toJSON = function(space) { - return JSON.stringify(this.sourcemap, null, space); - }; - if (typeof Buffer !== "undefined") if (typeof Buffer.from === "function") Converter.prototype.toBase64 = encodeBase64WithBufferFrom; - else Converter.prototype.toBase64 = encodeBase64WithNewBuffer; - else Converter.prototype.toBase64 = encodeBase64WithBtoa; - function encodeBase64WithBufferFrom() { - var json = this.toJSON(); - return Buffer.from(json, "utf8").toString("base64"); - } - function encodeBase64WithNewBuffer() { - var json = this.toJSON(); - if (typeof json === "number") throw new TypeError("The json to encode must not be of type number."); - return new Buffer(json, "utf8").toString("base64"); - } - function encodeBase64WithBtoa() { - var json = this.toJSON(); - return btoa(unescape(encodeURIComponent(json))); - } - Converter.prototype.toURI = function() { - var json = this.toJSON(); - return encodeURIComponent(json); - }; - Converter.prototype.toComment = function(options$1) { - var encoding, content, data; - if (options$1 != null && options$1.encoding === "uri") { - encoding = ""; - content = this.toURI(); - } else { - encoding = ";base64"; - content = this.toBase64(); - } - data = "sourceMappingURL=data:application/json;charset=utf-8" + encoding + "," + content; - return options$1 != null && options$1.multiline ? "/*# " + data + " */" : "//# " + data; - }; - Converter.prototype.toObject = function() { - return JSON.parse(this.toJSON()); - }; - Converter.prototype.addProperty = function(key, value$1) { - if (this.sourcemap.hasOwnProperty(key)) throw new Error("property \"" + key + "\" already exists on the sourcemap, use set property instead"); - return this.setProperty(key, value$1); - }; - Converter.prototype.setProperty = function(key, value$1) { - this.sourcemap[key] = value$1; - return this; - }; - Converter.prototype.getProperty = function(key) { - return this.sourcemap[key]; - }; - exports.fromObject = function(obj) { - return new Converter(obj); - }; - exports.fromJSON = function(json) { - return new Converter(json, { isJSON: true }); - }; - exports.fromURI = function(uri) { - return new Converter(uri, { encoding: "uri" }); - }; - exports.fromBase64 = function(base64) { - return new Converter(base64, { encoding: "base64" }); - }; - exports.fromComment = function(comment) { - var m, encoding; - comment = comment.replace(/^\/\*/g, "//").replace(/\*\/$/g, ""); - m = exports.commentRegex.exec(comment); - encoding = m && m[4] || "uri"; - return new Converter(comment, { - encoding, - hasComment: true - }); - }; - function makeConverter(sm) { - return new Converter(sm, { isJSON: true }); - } - exports.fromMapFileComment = function(comment, read) { - if (typeof read === "string") throw new Error("String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading"); - var sm = readFromFileMap(comment, read); - if (sm != null && typeof sm.then === "function") return sm.then(makeConverter); - else return makeConverter(sm); - }; - exports.fromSource = function(content) { - var m = content.match(exports.commentRegex); - return m ? exports.fromComment(m.pop()) : null; - }; - exports.fromMapFileSource = function(content, read) { - if (typeof read === "string") throw new Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading"); - var m = content.match(exports.mapFileCommentRegex); - return m ? exports.fromMapFileComment(m.pop(), read) : null; - }; - exports.removeComments = function(src) { - return src.replace(exports.commentRegex, ""); - }; - exports.removeMapFileComments = function(src) { - return src.replace(exports.mapFileCommentRegex, ""); - }; - exports.generateMapFileComment = function(file, options$1) { - var data = "sourceMappingURL=" + file; - return options$1 && options$1.multiline ? "/*# " + data + " */" : "//# " + data; - }; -})); - -//#endregion -//#region src/node/server/sourcemap.ts -var import_convert_source_map$2 = /* @__PURE__ */ __toESM(require_convert_source_map(), 1); -const debug$16 = createDebugger("vite:sourcemap", { onlyWhenFocused: true }); -const virtualSourceRE = /^(?:dep:|browser-external:|virtual:)|\0/; -async function computeSourceRoute(map$1, file) { - let sourceRoot; - try { - sourceRoot = await fsp.realpath(path.resolve(path.dirname(file), map$1.sourceRoot || "")); - } catch {} - return sourceRoot; -} -async function injectSourcesContent(map$1, file, logger) { - let sourceRootPromise; - const missingSources = []; - const sourcesContent = map$1.sourcesContent || []; - const sourcesContentPromises = []; - for (let index = 0; index < map$1.sources.length; index++) { - const sourcePath = map$1.sources[index]; - if (sourcesContent[index] == null && sourcePath && !virtualSourceRE.test(sourcePath)) sourcesContentPromises.push((async () => { - sourceRootPromise ??= computeSourceRoute(map$1, file); - const sourceRoot = await sourceRootPromise; - let resolvedSourcePath = cleanUrl(decodeURI(sourcePath)); - if (sourceRoot) resolvedSourcePath = path.resolve(sourceRoot, resolvedSourcePath); - sourcesContent[index] = await fsp.readFile(resolvedSourcePath, "utf-8").catch(() => { - missingSources.push(resolvedSourcePath); - return null; - }); - })()); - } - await Promise.all(sourcesContentPromises); - map$1.sourcesContent = sourcesContent; - if (missingSources.length) { - logger.warnOnce(`Sourcemap for "${file}" points to missing source files`); - debug$16?.(`Missing sources:\n ` + missingSources.join(`\n `)); - } -} -function genSourceMapUrl(map$1) { - if (typeof map$1 !== "string") map$1 = JSON.stringify(map$1); - return `data:application/json;base64,${Buffer.from(map$1).toString("base64")}`; -} -function getCodeWithSourcemap(type, code, map$1) { - if (debug$16) code += `\n/*${JSON.stringify(map$1, null, 2).replace(/\*\//g, "*\\/")}*/\n`; - if (type === "js") code += `\n//# sourceMappingURL=${genSourceMapUrl(map$1)}`; - else if (type === "css") code += `\n/*# sourceMappingURL=${genSourceMapUrl(map$1)} */`; - return code; -} -function applySourcemapIgnoreList(map$1, sourcemapPath, sourcemapIgnoreList, logger) { - let { x_google_ignoreList } = map$1; - if (x_google_ignoreList === void 0) x_google_ignoreList = []; - for (let sourcesIndex = 0; sourcesIndex < map$1.sources.length; ++sourcesIndex) { - const sourcePath = map$1.sources[sourcesIndex]; - if (!sourcePath) continue; - const ignoreList = sourcemapIgnoreList(path.isAbsolute(sourcePath) ? sourcePath : path.resolve(path.dirname(sourcemapPath), sourcePath), sourcemapPath); - if (logger && typeof ignoreList !== "boolean") logger.warn("sourcemapIgnoreList function must return a boolean."); - if (ignoreList && !x_google_ignoreList.includes(sourcesIndex)) x_google_ignoreList.push(sourcesIndex); - } - if (x_google_ignoreList.length > 0) { - if (!map$1.x_google_ignoreList) map$1.x_google_ignoreList = x_google_ignoreList; - } -} -async function extractSourcemapFromFile(code, filePath) { - const map$1 = (import_convert_source_map$2.fromSource(code) || await import_convert_source_map$2.fromMapFileSource(code, createConvertSourceMapReadMap(filePath)))?.toObject(); - if (map$1) return { - code: code.replace(import_convert_source_map$2.default.mapFileCommentRegex, blankReplacer), - map: map$1 - }; -} -function createConvertSourceMapReadMap(originalFileName) { - return (filename) => { - return fsp.readFile(path.resolve(path.dirname(originalFileName), filename), "utf-8"); - }; -} - -//#endregion -//#region src/node/publicDir.ts -const publicFilesMap = /* @__PURE__ */ new WeakMap(); -async function initPublicFiles(config$2) { - let fileNames; - try { - fileNames = await recursiveReaddir(config$2.publicDir); - } catch (e$1) { - if (e$1.code === ERR_SYMLINK_IN_RECURSIVE_READDIR) return; - throw e$1; - } - const publicFiles = new Set(fileNames.map((fileName) => fileName.slice(config$2.publicDir.length))); - publicFilesMap.set(config$2, publicFiles); - return publicFiles; -} -function getPublicFiles(config$2) { - return publicFilesMap.get(config$2); -} -function checkPublicFile(url$3, config$2) { - const { publicDir } = config$2; - if (!publicDir || url$3[0] !== "/") return; - const fileName = cleanUrl(url$3); - const publicFiles = getPublicFiles(config$2); - if (publicFiles) return publicFiles.has(fileName) ? normalizePath(path.join(publicDir, fileName)) : void 0; - const publicFile = normalizePath(path.join(publicDir, fileName)); - if (!publicFile.startsWith(withTrailingSlash(publicDir))) return; - return tryStatSync(publicFile)?.isFile() ? publicFile : void 0; -} - -//#endregion -//#region ../../node_modules/.pnpm/@rollup+plugin-alias@5.1.1_rollup@4.43.0/node_modules/@rollup/plugin-alias/dist/es/index.js -function matches$1(pattern, importee) { - if (pattern instanceof RegExp) return pattern.test(importee); - if (importee.length < pattern.length) return false; - if (importee === pattern) return true; - return importee.startsWith(pattern + "/"); -} -function getEntries({ entries, customResolver }) { - if (!entries) return []; - const resolverFunctionFromOptions = resolveCustomResolver(customResolver); - if (Array.isArray(entries)) return entries.map((entry) => { - return { - find: entry.find, - replacement: entry.replacement, - resolverFunction: resolveCustomResolver(entry.customResolver) || resolverFunctionFromOptions - }; - }); - return Object.entries(entries).map(([key, value$1]) => { - return { - find: key, - replacement: value$1, - resolverFunction: resolverFunctionFromOptions - }; - }); -} -function getHookFunction(hook) { - if (typeof hook === "function") return hook; - if (hook && "handler" in hook && typeof hook.handler === "function") return hook.handler; - return null; -} -function resolveCustomResolver(customResolver) { - if (typeof customResolver === "function") return customResolver; - if (customResolver) return getHookFunction(customResolver.resolveId); - return null; -} -function alias(options$1 = {}) { - const entries = getEntries(options$1); - if (entries.length === 0) return { - name: "alias", - resolveId: () => null - }; - return { - name: "alias", - async buildStart(inputOptions) { - await Promise.all([...Array.isArray(options$1.entries) ? options$1.entries : [], options$1].map(({ customResolver }) => { - var _a; - return customResolver && ((_a = getHookFunction(customResolver.buildStart)) === null || _a === void 0 ? void 0 : _a.call(this, inputOptions)); - })); - }, - resolveId(importee, importer, resolveOptions) { - const matchedEntry = entries.find((entry) => matches$1(entry.find, importee)); - if (!matchedEntry) return null; - const updatedId = importee.replace(matchedEntry.find, matchedEntry.replacement); - if (matchedEntry.resolverFunction) return matchedEntry.resolverFunction.call(this, updatedId, importer, resolveOptions); - return this.resolve(updatedId, importer, Object.assign({ skipSelf: true }, resolveOptions)).then((resolved) => { - if (resolved) return resolved; - if (!path$1.isAbsolute(updatedId)) this.warn(`rewrote ${importee} to ${updatedId} but was not an abolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path.`); - return { id: updatedId }; - }); - } - }; -} - -//#endregion -//#region ../../node_modules/.pnpm/mrmime@2.0.1/node_modules/mrmime/index.mjs -const mimes = { - "3g2": "video/3gpp2", - "3gp": "video/3gpp", - "3gpp": "video/3gpp", - "3mf": "model/3mf", - "aac": "audio/aac", - "ac": "application/pkix-attr-cert", - "adp": "audio/adpcm", - "adts": "audio/aac", - "ai": "application/postscript", - "aml": "application/automationml-aml+xml", - "amlx": "application/automationml-amlx+zip", - "amr": "audio/amr", - "apng": "image/apng", - "appcache": "text/cache-manifest", - "appinstaller": "application/appinstaller", - "appx": "application/appx", - "appxbundle": "application/appxbundle", - "asc": "application/pgp-keys", - "atom": "application/atom+xml", - "atomcat": "application/atomcat+xml", - "atomdeleted": "application/atomdeleted+xml", - "atomsvc": "application/atomsvc+xml", - "au": "audio/basic", - "avci": "image/avci", - "avcs": "image/avcs", - "avif": "image/avif", - "aw": "application/applixware", - "bdoc": "application/bdoc", - "bin": "application/octet-stream", - "bmp": "image/bmp", - "bpk": "application/octet-stream", - "btf": "image/prs.btif", - "btif": "image/prs.btif", - "buffer": "application/octet-stream", - "ccxml": "application/ccxml+xml", - "cdfx": "application/cdfx+xml", - "cdmia": "application/cdmi-capability", - "cdmic": "application/cdmi-container", - "cdmid": "application/cdmi-domain", - "cdmio": "application/cdmi-object", - "cdmiq": "application/cdmi-queue", - "cer": "application/pkix-cert", - "cgm": "image/cgm", - "cjs": "application/node", - "class": "application/java-vm", - "coffee": "text/coffeescript", - "conf": "text/plain", - "cpl": "application/cpl+xml", - "cpt": "application/mac-compactpro", - "crl": "application/pkix-crl", - "css": "text/css", - "csv": "text/csv", - "cu": "application/cu-seeme", - "cwl": "application/cwl", - "cww": "application/prs.cww", - "davmount": "application/davmount+xml", - "dbk": "application/docbook+xml", - "deb": "application/octet-stream", - "def": "text/plain", - "deploy": "application/octet-stream", - "dib": "image/bmp", - "disposition-notification": "message/disposition-notification", - "dist": "application/octet-stream", - "distz": "application/octet-stream", - "dll": "application/octet-stream", - "dmg": "application/octet-stream", - "dms": "application/octet-stream", - "doc": "application/msword", - "dot": "application/msword", - "dpx": "image/dpx", - "drle": "image/dicom-rle", - "dsc": "text/prs.lines.tag", - "dssc": "application/dssc+der", - "dtd": "application/xml-dtd", - "dump": "application/octet-stream", - "dwd": "application/atsc-dwd+xml", - "ear": "application/java-archive", - "ecma": "application/ecmascript", - "elc": "application/octet-stream", - "emf": "image/emf", - "eml": "message/rfc822", - "emma": "application/emma+xml", - "emotionml": "application/emotionml+xml", - "eps": "application/postscript", - "epub": "application/epub+zip", - "exe": "application/octet-stream", - "exi": "application/exi", - "exp": "application/express", - "exr": "image/aces", - "ez": "application/andrew-inset", - "fdf": "application/fdf", - "fdt": "application/fdt+xml", - "fits": "image/fits", - "g3": "image/g3fax", - "gbr": "application/rpki-ghostbusters", - "geojson": "application/geo+json", - "gif": "image/gif", - "glb": "model/gltf-binary", - "gltf": "model/gltf+json", - "gml": "application/gml+xml", - "gpx": "application/gpx+xml", - "gram": "application/srgs", - "grxml": "application/srgs+xml", - "gxf": "application/gxf", - "gz": "application/gzip", - "h261": "video/h261", - "h263": "video/h263", - "h264": "video/h264", - "heic": "image/heic", - "heics": "image/heic-sequence", - "heif": "image/heif", - "heifs": "image/heif-sequence", - "hej2": "image/hej2k", - "held": "application/atsc-held+xml", - "hjson": "application/hjson", - "hlp": "application/winhlp", - "hqx": "application/mac-binhex40", - "hsj2": "image/hsj2", - "htm": "text/html", - "html": "text/html", - "ics": "text/calendar", - "ief": "image/ief", - "ifb": "text/calendar", - "iges": "model/iges", - "igs": "model/iges", - "img": "application/octet-stream", - "in": "text/plain", - "ini": "text/plain", - "ink": "application/inkml+xml", - "inkml": "application/inkml+xml", - "ipfix": "application/ipfix", - "iso": "application/octet-stream", - "its": "application/its+xml", - "jade": "text/jade", - "jar": "application/java-archive", - "jhc": "image/jphc", - "jls": "image/jls", - "jp2": "image/jp2", - "jpe": "image/jpeg", - "jpeg": "image/jpeg", - "jpf": "image/jpx", - "jpg": "image/jpeg", - "jpg2": "image/jp2", - "jpgm": "image/jpm", - "jpgv": "video/jpeg", - "jph": "image/jph", - "jpm": "image/jpm", - "jpx": "image/jpx", - "js": "text/javascript", - "json": "application/json", - "json5": "application/json5", - "jsonld": "application/ld+json", - "jsonml": "application/jsonml+json", - "jsx": "text/jsx", - "jt": "model/jt", - "jxl": "image/jxl", - "jxr": "image/jxr", - "jxra": "image/jxra", - "jxrs": "image/jxrs", - "jxs": "image/jxs", - "jxsc": "image/jxsc", - "jxsi": "image/jxsi", - "jxss": "image/jxss", - "kar": "audio/midi", - "ktx": "image/ktx", - "ktx2": "image/ktx2", - "less": "text/less", - "lgr": "application/lgr+xml", - "list": "text/plain", - "litcoffee": "text/coffeescript", - "log": "text/plain", - "lostxml": "application/lost+xml", - "lrf": "application/octet-stream", - "m1v": "video/mpeg", - "m21": "application/mp21", - "m2a": "audio/mpeg", - "m2t": "video/mp2t", - "m2ts": "video/mp2t", - "m2v": "video/mpeg", - "m3a": "audio/mpeg", - "m4a": "audio/mp4", - "m4p": "application/mp4", - "m4s": "video/iso.segment", - "ma": "application/mathematica", - "mads": "application/mads+xml", - "maei": "application/mmt-aei+xml", - "man": "text/troff", - "manifest": "text/cache-manifest", - "map": "application/json", - "mar": "application/octet-stream", - "markdown": "text/markdown", - "mathml": "application/mathml+xml", - "mb": "application/mathematica", - "mbox": "application/mbox", - "md": "text/markdown", - "mdx": "text/mdx", - "me": "text/troff", - "mesh": "model/mesh", - "meta4": "application/metalink4+xml", - "metalink": "application/metalink+xml", - "mets": "application/mets+xml", - "mft": "application/rpki-manifest", - "mid": "audio/midi", - "midi": "audio/midi", - "mime": "message/rfc822", - "mj2": "video/mj2", - "mjp2": "video/mj2", - "mjs": "text/javascript", - "mml": "text/mathml", - "mods": "application/mods+xml", - "mov": "video/quicktime", - "mp2": "audio/mpeg", - "mp21": "application/mp21", - "mp2a": "audio/mpeg", - "mp3": "audio/mpeg", - "mp4": "video/mp4", - "mp4a": "audio/mp4", - "mp4s": "application/mp4", - "mp4v": "video/mp4", - "mpd": "application/dash+xml", - "mpe": "video/mpeg", - "mpeg": "video/mpeg", - "mpf": "application/media-policy-dataset+xml", - "mpg": "video/mpeg", - "mpg4": "video/mp4", - "mpga": "audio/mpeg", - "mpp": "application/dash-patch+xml", - "mrc": "application/marc", - "mrcx": "application/marcxml+xml", - "ms": "text/troff", - "mscml": "application/mediaservercontrol+xml", - "msh": "model/mesh", - "msi": "application/octet-stream", - "msix": "application/msix", - "msixbundle": "application/msixbundle", - "msm": "application/octet-stream", - "msp": "application/octet-stream", - "mtl": "model/mtl", - "mts": "video/mp2t", - "musd": "application/mmt-usd+xml", - "mxf": "application/mxf", - "mxmf": "audio/mobile-xmf", - "mxml": "application/xv+xml", - "n3": "text/n3", - "nb": "application/mathematica", - "nq": "application/n-quads", - "nt": "application/n-triples", - "obj": "model/obj", - "oda": "application/oda", - "oga": "audio/ogg", - "ogg": "audio/ogg", - "ogv": "video/ogg", - "ogx": "application/ogg", - "omdoc": "application/omdoc+xml", - "onepkg": "application/onenote", - "onetmp": "application/onenote", - "onetoc": "application/onenote", - "onetoc2": "application/onenote", - "opf": "application/oebps-package+xml", - "opus": "audio/ogg", - "otf": "font/otf", - "owl": "application/rdf+xml", - "oxps": "application/oxps", - "p10": "application/pkcs10", - "p7c": "application/pkcs7-mime", - "p7m": "application/pkcs7-mime", - "p7s": "application/pkcs7-signature", - "p8": "application/pkcs8", - "pdf": "application/pdf", - "pfr": "application/font-tdpfr", - "pgp": "application/pgp-encrypted", - "pkg": "application/octet-stream", - "pki": "application/pkixcmp", - "pkipath": "application/pkix-pkipath", - "pls": "application/pls+xml", - "png": "image/png", - "prc": "model/prc", - "prf": "application/pics-rules", - "provx": "application/provenance+xml", - "ps": "application/postscript", - "pskcxml": "application/pskc+xml", - "pti": "image/prs.pti", - "qt": "video/quicktime", - "raml": "application/raml+yaml", - "rapd": "application/route-apd+xml", - "rdf": "application/rdf+xml", - "relo": "application/p2p-overlay+xml", - "rif": "application/reginfo+xml", - "rl": "application/resource-lists+xml", - "rld": "application/resource-lists-diff+xml", - "rmi": "audio/midi", - "rnc": "application/relax-ng-compact-syntax", - "rng": "application/xml", - "roa": "application/rpki-roa", - "roff": "text/troff", - "rq": "application/sparql-query", - "rs": "application/rls-services+xml", - "rsat": "application/atsc-rsat+xml", - "rsd": "application/rsd+xml", - "rsheet": "application/urc-ressheet+xml", - "rss": "application/rss+xml", - "rtf": "text/rtf", - "rtx": "text/richtext", - "rusd": "application/route-usd+xml", - "s3m": "audio/s3m", - "sbml": "application/sbml+xml", - "scq": "application/scvp-cv-request", - "scs": "application/scvp-cv-response", - "sdp": "application/sdp", - "senmlx": "application/senml+xml", - "sensmlx": "application/sensml+xml", - "ser": "application/java-serialized-object", - "setpay": "application/set-payment-initiation", - "setreg": "application/set-registration-initiation", - "sgi": "image/sgi", - "sgm": "text/sgml", - "sgml": "text/sgml", - "shex": "text/shex", - "shf": "application/shf+xml", - "shtml": "text/html", - "sieve": "application/sieve", - "sig": "application/pgp-signature", - "sil": "audio/silk", - "silo": "model/mesh", - "siv": "application/sieve", - "slim": "text/slim", - "slm": "text/slim", - "sls": "application/route-s-tsid+xml", - "smi": "application/smil+xml", - "smil": "application/smil+xml", - "snd": "audio/basic", - "so": "application/octet-stream", - "spdx": "text/spdx", - "spp": "application/scvp-vp-response", - "spq": "application/scvp-vp-request", - "spx": "audio/ogg", - "sql": "application/sql", - "sru": "application/sru+xml", - "srx": "application/sparql-results+xml", - "ssdl": "application/ssdl+xml", - "ssml": "application/ssml+xml", - "stk": "application/hyperstudio", - "stl": "model/stl", - "stpx": "model/step+xml", - "stpxz": "model/step-xml+zip", - "stpz": "model/step+zip", - "styl": "text/stylus", - "stylus": "text/stylus", - "svg": "image/svg+xml", - "svgz": "image/svg+xml", - "swidtag": "application/swid+xml", - "t": "text/troff", - "t38": "image/t38", - "td": "application/urc-targetdesc+xml", - "tei": "application/tei+xml", - "teicorpus": "application/tei+xml", - "text": "text/plain", - "tfi": "application/thraud+xml", - "tfx": "image/tiff-fx", - "tif": "image/tiff", - "tiff": "image/tiff", - "toml": "application/toml", - "tr": "text/troff", - "trig": "application/trig", - "ts": "video/mp2t", - "tsd": "application/timestamped-data", - "tsv": "text/tab-separated-values", - "ttc": "font/collection", - "ttf": "font/ttf", - "ttl": "text/turtle", - "ttml": "application/ttml+xml", - "txt": "text/plain", - "u3d": "model/u3d", - "u8dsn": "message/global-delivery-status", - "u8hdr": "message/global-headers", - "u8mdn": "message/global-disposition-notification", - "u8msg": "message/global", - "ubj": "application/ubjson", - "uri": "text/uri-list", - "uris": "text/uri-list", - "urls": "text/uri-list", - "vcard": "text/vcard", - "vrml": "model/vrml", - "vtt": "text/vtt", - "vxml": "application/voicexml+xml", - "war": "application/java-archive", - "wasm": "application/wasm", - "wav": "audio/wav", - "weba": "audio/webm", - "webm": "video/webm", - "webmanifest": "application/manifest+json", - "webp": "image/webp", - "wgsl": "text/wgsl", - "wgt": "application/widget", - "wif": "application/watcherinfo+xml", - "wmf": "image/wmf", - "woff": "font/woff", - "woff2": "font/woff2", - "wrl": "model/vrml", - "wsdl": "application/wsdl+xml", - "wspolicy": "application/wspolicy+xml", - "x3d": "model/x3d+xml", - "x3db": "model/x3d+fastinfoset", - "x3dbz": "model/x3d+binary", - "x3dv": "model/x3d-vrml", - "x3dvz": "model/x3d+vrml", - "x3dz": "model/x3d+xml", - "xaml": "application/xaml+xml", - "xav": "application/xcap-att+xml", - "xca": "application/xcap-caps+xml", - "xcs": "application/calendar+xml", - "xdf": "application/xcap-diff+xml", - "xdssc": "application/dssc+xml", - "xel": "application/xcap-el+xml", - "xenc": "application/xenc+xml", - "xer": "application/patch-ops-error+xml", - "xfdf": "application/xfdf", - "xht": "application/xhtml+xml", - "xhtml": "application/xhtml+xml", - "xhvml": "application/xv+xml", - "xlf": "application/xliff+xml", - "xm": "audio/xm", - "xml": "text/xml", - "xns": "application/xcap-ns+xml", - "xop": "application/xop+xml", - "xpl": "application/xproc+xml", - "xsd": "application/xml", - "xsf": "application/prs.xsf+xml", - "xsl": "application/xml", - "xslt": "application/xml", - "xspf": "application/xspf+xml", - "xvm": "application/xv+xml", - "xvml": "application/xv+xml", - "yaml": "text/yaml", - "yang": "application/yang", - "yin": "application/yin+xml", - "yml": "text/yaml", - "zip": "application/zip" -}; -function lookup(extn) { - let tmp = ("" + extn).trim().toLowerCase(); - let idx = tmp.lastIndexOf("."); - return mimes[!~idx ? tmp : tmp.substring(++idx)]; -} - -//#endregion -//#region src/node/plugins/asset.ts -var import_picocolors$30 = /* @__PURE__ */ __toESM(require_picocolors(), 1); -const assetUrlRE = /__VITE_ASSET__([\w$]+)__(?:\$_(.*?)__)?/g; -const jsSourceMapRE = /\.[cm]?js\.map$/; -const noInlineRE = /[?&]no-inline\b/; -const inlineRE$3 = /[?&]inline\b/; -const assetCache = /* @__PURE__ */ new WeakMap(); -/** a set of referenceId for entry CSS assets for each environment */ -const cssEntriesMap = /* @__PURE__ */ new WeakMap(); -function registerCustomMime() { - mimes.ico = "image/x-icon"; - mimes.cur = "image/x-icon"; - mimes.flac = "audio/flac"; - mimes.eot = "application/vnd.ms-fontobject"; -} -function renderAssetUrlInJS(pluginContext, chunk, opts, code) { - const { environment } = pluginContext; - const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, environment.config.isWorker); - let match; - let s; - assetUrlRE.lastIndex = 0; - while (match = assetUrlRE.exec(code)) { - s ||= new MagicString(code); - const [full, referenceId, postfix = ""] = match; - const file = pluginContext.getFileName(referenceId); - chunk.viteMetadata.importedAssets.add(cleanUrl(file)); - const replacement = toOutputFilePathInJS(environment, file + postfix, "asset", chunk.fileName, "js", toRelativeRuntime); - const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`; - s.update(match.index, match.index + full.length, replacementString); - } - const publicAssetUrlMap = publicAssetUrlCache.get(environment.getTopLevelConfig()); - publicAssetUrlRE.lastIndex = 0; - while (match = publicAssetUrlRE.exec(code)) { - s ||= new MagicString(code); - const [full, hash$1] = match; - const replacement = toOutputFilePathInJS(environment, publicAssetUrlMap.get(hash$1).slice(1), "public", chunk.fileName, "js", toRelativeRuntime); - const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`; - s.update(match.index, match.index + full.length, replacementString); - } - return s; -} -/** -* Also supports loading plain strings with import text from './foo.txt?raw' -*/ -function assetPlugin(config$2) { - registerCustomMime(); - return { - name: "vite:asset", - perEnvironmentStartEndDuringDev: true, - buildStart() { - assetCache.set(this.environment, /* @__PURE__ */ new Map()); - cssEntriesMap.set(this.environment, /* @__PURE__ */ new Map()); - }, - resolveId: { handler(id) { - if (!config$2.assetsInclude(cleanUrl(id)) && !urlRE.test(id)) return; - if (checkPublicFile(id, config$2)) return id; - } }, - load: { - filter: { id: { exclude: /^\0/ } }, - async handler(id) { - if (rawRE.test(id)) { - const file = checkPublicFile(id, config$2) || cleanUrl(id); - this.addWatchFile(file); - return `export default ${JSON.stringify(await fsp.readFile(file, "utf-8"))}`; - } - if (!urlRE.test(id) && !config$2.assetsInclude(cleanUrl(id))) return; - id = removeUrlQuery(id); - let url$3 = await fileToUrl$1(this, id); - if (!url$3.startsWith("data:") && this.environment.mode === "dev") { - const mod = this.environment.moduleGraph.getModuleById(id); - if (mod && mod.lastHMRTimestamp > 0) url$3 = injectQuery(url$3, `t=${mod.lastHMRTimestamp}`); - } - return { - code: `export default ${JSON.stringify(encodeURIPath(url$3))}`, - moduleSideEffects: config$2.command === "build" && this.getModuleInfo(id)?.isEntry ? "no-treeshake" : false, - meta: config$2.command === "build" ? { "vite:asset": true } : void 0 - }; - } - }, - renderChunk(code, chunk, opts) { - const s = renderAssetUrlInJS(this, chunk, opts, code); - if (s) return { - code: s.toString(), - map: this.environment.config.build.sourcemap ? s.generateMap({ hires: "boundary" }) : null - }; - else return null; - }, - generateBundle(_, bundle) { - let importedFiles; - for (const file in bundle) { - const chunk = bundle[file]; - if (chunk.type === "chunk" && chunk.isEntry && chunk.moduleIds.length === 1 && config$2.assetsInclude(chunk.moduleIds[0]) && this.getModuleInfo(chunk.moduleIds[0])?.meta["vite:asset"]) { - if (!importedFiles) { - importedFiles = /* @__PURE__ */ new Set(); - for (const file$1 in bundle) { - const chunk$1 = bundle[file$1]; - if (chunk$1.type === "chunk") { - for (const importedFile of chunk$1.imports) importedFiles.add(importedFile); - for (const importedFile of chunk$1.dynamicImports) importedFiles.add(importedFile); - } - } - } - if (!importedFiles.has(file)) delete bundle[file]; - } - } - if (config$2.command === "build" && !this.environment.config.build.emitAssets) { - for (const file in bundle) if (bundle[file].type === "asset" && !file.endsWith("ssr-manifest.json") && !jsSourceMapRE.test(file)) delete bundle[file]; - } - } - }; -} -async function fileToUrl$1(pluginContext, id) { - const { environment } = pluginContext; - if (environment.config.command === "serve") return fileToDevUrl(environment, id); - else return fileToBuiltUrl(pluginContext, id); -} -async function fileToDevUrl(environment, id, skipBase = false) { - const config$2 = environment.getTopLevelConfig(); - const publicFile = checkPublicFile(id, config$2); - if (inlineRE$3.test(id)) { - const file = publicFile || cleanUrl(id); - return assetToDataURL(environment, file, await fsp.readFile(file)); - } - const cleanedId = cleanUrl(id); - if (cleanedId.endsWith(".svg")) { - const file = publicFile || cleanedId; - const content = await fsp.readFile(file); - if (shouldInline(environment, file, id, content, void 0, void 0)) return assetToDataURL(environment, file, content); - } - let rtn; - if (publicFile) rtn = id; - else if (id.startsWith(withTrailingSlash(config$2.root))) rtn = "/" + path.posix.relative(config$2.root, id); - else rtn = path.posix.join(FS_PREFIX, id); - if (skipBase) return rtn; - return joinUrlSegments(joinUrlSegments(config$2.server.origin ?? "", config$2.decodedBase), removeLeadingSlash(rtn)); -} -function getPublicAssetFilename(hash$1, config$2) { - return publicAssetUrlCache.get(config$2)?.get(hash$1); -} -const publicAssetUrlCache = /* @__PURE__ */ new WeakMap(); -const publicAssetUrlRE = /__VITE_PUBLIC_ASSET__([a-z\d]{8})__/g; -function publicFileToBuiltUrl(url$3, config$2) { - if (config$2.command !== "build") return joinUrlSegments(config$2.decodedBase, url$3); - const hash$1 = getHash(url$3); - let cache$1 = publicAssetUrlCache.get(config$2); - if (!cache$1) { - cache$1 = /* @__PURE__ */ new Map(); - publicAssetUrlCache.set(config$2, cache$1); - } - if (!cache$1.get(hash$1)) cache$1.set(hash$1, url$3); - return `__VITE_PUBLIC_ASSET__${hash$1}__`; -} -const GIT_LFS_PREFIX = Buffer$1.from("version https://git-lfs.github.com"); -function isGitLfsPlaceholder(content) { - if (content.length < GIT_LFS_PREFIX.length) return false; - return GIT_LFS_PREFIX.compare(content, 0, GIT_LFS_PREFIX.length) === 0; -} -/** -* Register an asset to be emitted as part of the bundle (if necessary) -* and returns the resolved public URL -*/ -async function fileToBuiltUrl(pluginContext, id, skipPublicCheck = false, forceInline) { - const environment = pluginContext.environment; - const topLevelConfig = environment.getTopLevelConfig(); - if (!skipPublicCheck) { - const publicFile = checkPublicFile(id, topLevelConfig); - if (publicFile) if (inlineRE$3.test(id)) id = publicFile; - else return publicFileToBuiltUrl(id, topLevelConfig); - } - const cache$1 = assetCache.get(environment); - const cached = cache$1.get(id); - if (cached) return cached; - let { file, postfix } = splitFileAndPostfix(id); - const content = await fsp.readFile(file); - let url$3; - if (shouldInline(environment, file, id, content, pluginContext, forceInline)) url$3 = assetToDataURL(environment, file, content); - else { - const originalFileName = normalizePath(path.relative(environment.config.root, file)); - const referenceId = pluginContext.emitFile({ - type: "asset", - name: path.basename(file), - originalFileName, - source: content - }); - if (environment.config.command === "build" && noInlineRE.test(postfix)) postfix = postfix.replace(noInlineRE, "").replace(/^&/, "?"); - url$3 = `__VITE_ASSET__${referenceId}__${postfix ? `$_${postfix}__` : ``}`; - } - cache$1.set(id, url$3); - return url$3; -} -async function urlToBuiltUrl(pluginContext, url$3, importer, forceInline) { - const topLevelConfig = pluginContext.environment.getTopLevelConfig(); - if (checkPublicFile(url$3, topLevelConfig)) return publicFileToBuiltUrl(url$3, topLevelConfig); - return fileToBuiltUrl(pluginContext, normalizePath(url$3[0] === "/" ? path.join(topLevelConfig.root, url$3) : path.join(path.dirname(importer), url$3)), true, forceInline); -} -function shouldInline(environment, file, id, content, buildPluginContext, forceInline) { - if (noInlineRE.test(id)) return false; - if (inlineRE$3.test(id)) return true; - if (buildPluginContext) { - if (environment.config.build.lib) return true; - if (buildPluginContext.getModuleInfo(id)?.isEntry) return false; - } - if (forceInline !== void 0) return forceInline; - if (file.endsWith(".html")) return false; - if (file.endsWith(".svg") && id.includes("#")) return false; - let limit; - const { assetsInlineLimit } = environment.config.build; - if (typeof assetsInlineLimit === "function") { - const userShouldInline = assetsInlineLimit(file, content); - if (userShouldInline != null) return userShouldInline; - limit = DEFAULT_ASSETS_INLINE_LIMIT; - } else limit = Number(assetsInlineLimit); - return content.length < limit && !isGitLfsPlaceholder(content); -} -function assetToDataURL(environment, file, content) { - if (environment.config.build.lib && isGitLfsPlaceholder(content)) environment.logger.warn(import_picocolors$30.default.yellow(`Inlined file ${file} was not downloaded via Git LFS`)); - if (file.endsWith(".svg")) return svgToDataURL(content); - else return `data:${lookup(file) ?? "application/octet-stream"};base64,${content.toString("base64")}`; -} -const nestedQuotesRE = /"[^"']*'[^"]*"|'[^'"]*"[^']*'/; -function svgToDataURL(content) { - const stringContent = content.toString(); - if (stringContent.includes("\s+<").replaceAll("\"", "'").replaceAll("%", "%25").replaceAll("#", "%23").replaceAll("<", "%3c").replaceAll(">", "%3e").replaceAll(/\s+/g, "%20"); -} - -//#endregion -//#region src/node/plugins/json.ts -/** -* https://github.com/rollup/plugins/blob/master/packages/json/src/index.js -* -* This source code is licensed under the MIT license found in the -* LICENSE file at -* https://github.com/rollup/plugins/blob/master/LICENSE -*/ -const jsonExtRE = /\.json(?:$|\?)(?!commonjs-(?:proxy|external))/; -const jsonObjRE = /^\s*\{/; -const jsonLangRE = new RegExp(`\\.(?:json|json5)(?:$|\\?)`); -const isJSONRequest = (request) => jsonLangRE.test(request); -function jsonPlugin(options$1, isBuild) { - return { - name: "vite:json", - transform: { - filter: { id: { - include: jsonExtRE, - exclude: SPECIAL_QUERY_RE - } }, - handler(json, id) { - if (inlineRE$3.test(id) || noInlineRE.test(id)) this.warn("\nUsing ?inline or ?no-inline for JSON imports will have no effect.\nPlease use ?url&inline or ?url&no-inline to control JSON file inlining behavior.\n"); - json = stripBomTag(json); - try { - if (options$1.stringify !== false) { - if (options$1.namedExports && jsonObjRE.test(json)) { - const parsed = JSON.parse(json); - const keys = Object.keys(parsed); - let code = ""; - let defaultObjectCode = "{\n"; - for (const key of keys) if (key === makeLegalIdentifier(key)) { - code += `export const ${key} = ${serializeValue(parsed[key])};\n`; - defaultObjectCode += ` ${key},\n`; - } else defaultObjectCode += ` ${JSON.stringify(key)}: ${serializeValue(parsed[key])},\n`; - defaultObjectCode += "}"; - code += `export default ${defaultObjectCode};\n`; - return { - code, - map: { mappings: "" } - }; - } - if (options$1.stringify === true || json.length > 10 * 1e3) { - if (isBuild) json = JSON.stringify(JSON.parse(json)); - return { - code: `export default /* #__PURE__ */ JSON.parse(${JSON.stringify(json)})`, - map: { mappings: "" } - }; - } - } - return { - code: dataToEsm(JSON.parse(json), { - preferConst: true, - namedExports: options$1.namedExports - }), - map: { mappings: "" } - }; - } catch (e$1) { - const position = extractJsonErrorPosition(e$1.message, json.length); - const msg = position ? `, invalid JSON syntax found at position ${position}` : `.`; - this.error(`Failed to parse JSON file` + msg, position); - } - } - } - }; -} -function serializeValue(value$1) { - const valueAsString = JSON.stringify(value$1); - if (typeof value$1 === "object" && value$1 != null && valueAsString.length > 10 * 1e3) return `/* #__PURE__ */ JSON.parse(${JSON.stringify(valueAsString)})`; - return valueAsString; -} -function extractJsonErrorPosition(errorMessage, inputLength) { - if (errorMessage.startsWith("Unexpected end of JSON input")) return inputLength - 1; - const errorMessageList = /at position (\d+)/.exec(errorMessage); - return errorMessageList ? Math.max(parseInt(errorMessageList[1], 10) - 1, 0) : void 0; -} - -//#endregion -//#region src/node/plugins/optimizedDeps.ts -var import_picocolors$29 = /* @__PURE__ */ __toESM(require_picocolors(), 1); -const debug$15 = createDebugger("vite:optimize-deps"); -function optimizedDepsPlugin() { - return { - name: "vite:optimized-deps", - applyToEnvironment(environment) { - return !isDepOptimizationDisabled(environment.config.optimizeDeps); - }, - resolveId(id) { - if (this.environment.depsOptimizer?.isOptimizedDepFile(id)) return id; - }, - async load(id) { - const environment = this.environment; - const depsOptimizer = environment.depsOptimizer; - if (depsOptimizer?.isOptimizedDepFile(id)) { - const metadata = depsOptimizer.metadata; - const file = cleanUrl(id); - const versionMatch = DEP_VERSION_RE.exec(id); - const browserHash = versionMatch ? versionMatch[1].split("=")[1] : void 0; - const info = optimizedDepInfoFromFile(metadata, file); - if (info) { - if (browserHash && info.browserHash !== browserHash && !environment.config.optimizeDeps.ignoreOutdatedRequests) throwOutdatedRequest(id); - try { - await info.processing; - } catch { - throwProcessingError(id); - } - const newMetadata = depsOptimizer.metadata; - if (metadata !== newMetadata) { - const currentInfo = optimizedDepInfoFromFile(newMetadata, file); - if (info.browserHash !== currentInfo?.browserHash && !environment.config.optimizeDeps.ignoreOutdatedRequests) throwOutdatedRequest(id); - } - } - debug$15?.(`load ${import_picocolors$29.default.cyan(file)}`); - try { - return await fsp.readFile(file, "utf-8"); - } catch { - if (browserHash && !environment.config.optimizeDeps.ignoreOutdatedRequests) throwOutdatedRequest(id); - throwFileNotFoundInOptimizedDep(id); - } - } - } - }; -} -function throwProcessingError(id) { - const err$2 = /* @__PURE__ */ new Error(`Something unexpected happened while optimizing "${id}". The current page should have reloaded by now`); - err$2.code = ERR_OPTIMIZE_DEPS_PROCESSING_ERROR; - throw err$2; -} -function throwOutdatedRequest(id) { - const err$2 = /* @__PURE__ */ new Error(`There is a new version of the pre-bundle for "${id}", a page reload is going to ask for it.`); - err$2.code = ERR_OUTDATED_OPTIMIZED_DEP; - throw err$2; -} -function throwFileNotFoundInOptimizedDep(id) { - const err$2 = /* @__PURE__ */ new Error(`The file does not exist at "${id}" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to \`optimizeDeps.exclude\`.`); - err$2.code = ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR; - throw err$2; -} - -//#endregion -//#region ../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.json -var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => { - module.exports = { - "name": "dotenv", - "version": "17.2.3", - "description": "Loads environment variables from .env file", - "main": "lib/main.js", - "types": "lib/main.d.ts", - "exports": { - ".": { - "types": "./lib/main.d.ts", - "require": "./lib/main.js", - "default": "./lib/main.js" - }, - "./config": "./config.js", - "./config.js": "./config.js", - "./lib/env-options": "./lib/env-options.js", - "./lib/env-options.js": "./lib/env-options.js", - "./lib/cli-options": "./lib/cli-options.js", - "./lib/cli-options.js": "./lib/cli-options.js", - "./package.json": "./package.json" - }, - "scripts": { - "dts-check": "tsc --project tests/types/tsconfig.json", - "lint": "standard", - "pretest": "npm run lint && npm run dts-check", - "test": "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000", - "test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov", - "prerelease": "npm test", - "release": "standard-version" - }, - "repository": { - "type": "git", - "url": "git://github.com/motdotla/dotenv.git" - }, - "homepage": "https://github.com/motdotla/dotenv#readme", - "funding": "https://dotenvx.com", - "keywords": [ - "dotenv", - "env", - ".env", - "environment", - "variables", - "config", - "settings" - ], - "readmeFilename": "README.md", - "license": "BSD-2-Clause", - "devDependencies": { - "@types/node": "^18.11.3", - "decache": "^4.6.2", - "sinon": "^14.0.1", - "standard": "^17.0.0", - "standard-version": "^9.5.0", - "tap": "^19.2.0", - "typescript": "^4.8.4" - }, - "engines": { "node": ">=12" }, - "browser": { "fs": false } - }; -})); - -//#endregion -//#region ../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js -var require_main$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const fs$10 = __require("fs"); - const path$10 = __require("path"); - const os$3 = __require("os"); - const crypto$2 = __require("crypto"); - const version = require_package().version; - const TIPS = [ - "🔐 encrypt with Dotenvx: https://dotenvx.com", - "🔐 prevent committing .env to code: https://dotenvx.com/precommit", - "🔐 prevent building .env in docker: https://dotenvx.com/prebuild", - "📡 add observability to secrets: https://dotenvx.com/ops", - "👥 sync secrets across teammates & machines: https://dotenvx.com/ops", - "🗂️ backup and recover secrets: https://dotenvx.com/ops", - "✅ audit secrets and track compliance: https://dotenvx.com/ops", - "🔄 add secrets lifecycle management: https://dotenvx.com/ops", - "🔑 add access controls to secrets: https://dotenvx.com/ops", - "🛠️ run anywhere with `dotenvx run -- yourcommand`", - "⚙️ specify custom .env file path with { path: '/custom/path/.env' }", - "⚙️ enable debug logging with { debug: true }", - "⚙️ override existing env vars with { override: true }", - "⚙️ suppress all logs with { quiet: true }", - "⚙️ write to custom object with { processEnv: myObject }", - "⚙️ load multiple .env files with { path: ['.env.local', '.env'] }" - ]; - function _getRandomTip() { - return TIPS[Math.floor(Math.random() * TIPS.length)]; - } - function parseBoolean(value$1) { - if (typeof value$1 === "string") return ![ - "false", - "0", - "no", - "off", - "" - ].includes(value$1.toLowerCase()); - return Boolean(value$1); - } - function supportsAnsi() { - return process.stdout.isTTY; - } - function dim(text) { - return supportsAnsi() ? `\x1b[2m${text}\x1b[0m` : text; - } - const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm; - function parse$12(src) { - const obj = {}; - let lines = src.toString(); - lines = lines.replace(/\r\n?/gm, "\n"); - let match; - while ((match = LINE.exec(lines)) != null) { - const key = match[1]; - let value$1 = match[2] || ""; - value$1 = value$1.trim(); - const maybeQuote = value$1[0]; - value$1 = value$1.replace(/^(['"`])([\s\S]*)\1$/gm, "$2"); - if (maybeQuote === "\"") { - value$1 = value$1.replace(/\\n/g, "\n"); - value$1 = value$1.replace(/\\r/g, "\r"); - } - obj[key] = value$1; - } - return obj; - } - function _parseVault(options$1) { - options$1 = options$1 || {}; - const vaultPath = _vaultPath(options$1); - options$1.path = vaultPath; - const result = DotenvModule.configDotenv(options$1); - if (!result.parsed) { - const err$2 = /* @__PURE__ */ new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); - err$2.code = "MISSING_DATA"; - throw err$2; - } - const keys = _dotenvKey(options$1).split(","); - const length = keys.length; - let decrypted; - for (let i$1 = 0; i$1 < length; i$1++) try { - const attrs = _instructions(result, keys[i$1].trim()); - decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); - break; - } catch (error$1) { - if (i$1 + 1 >= length) throw error$1; - } - return DotenvModule.parse(decrypted); - } - function _warn(message) { - console.error(`[dotenv@${version}][WARN] ${message}`); - } - function _debug(message) { - console.log(`[dotenv@${version}][DEBUG] ${message}`); - } - function _log(message) { - console.log(`[dotenv@${version}] ${message}`); - } - function _dotenvKey(options$1) { - if (options$1 && options$1.DOTENV_KEY && options$1.DOTENV_KEY.length > 0) return options$1.DOTENV_KEY; - if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) return process.env.DOTENV_KEY; - return ""; - } - function _instructions(result, dotenvKey) { - let uri; - try { - uri = new URL(dotenvKey); - } catch (error$1) { - if (error$1.code === "ERR_INVALID_URL") { - const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development"); - err$2.code = "INVALID_DOTENV_KEY"; - throw err$2; - } - throw error$1; - } - const key = uri.password; - if (!key) { - const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing key part"); - err$2.code = "INVALID_DOTENV_KEY"; - throw err$2; - } - const environment = uri.searchParams.get("environment"); - if (!environment) { - const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing environment part"); - err$2.code = "INVALID_DOTENV_KEY"; - throw err$2; - } - const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`; - const ciphertext = result.parsed[environmentKey]; - if (!ciphertext) { - const err$2 = /* @__PURE__ */ new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`); - err$2.code = "NOT_FOUND_DOTENV_ENVIRONMENT"; - throw err$2; - } - return { - ciphertext, - key - }; - } - function _vaultPath(options$1) { - let possibleVaultPath = null; - if (options$1 && options$1.path && options$1.path.length > 0) if (Array.isArray(options$1.path)) { - for (const filepath of options$1.path) if (fs$10.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`; - } else possibleVaultPath = options$1.path.endsWith(".vault") ? options$1.path : `${options$1.path}.vault`; - else possibleVaultPath = path$10.resolve(process.cwd(), ".env.vault"); - if (fs$10.existsSync(possibleVaultPath)) return possibleVaultPath; - return null; - } - function _resolveHome(envPath) { - return envPath[0] === "~" ? path$10.join(os$3.homedir(), envPath.slice(1)) : envPath; - } - function _configVault(options$1) { - const debug$18 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug); - const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet); - if (debug$18 || !quiet) _log("Loading env from encrypted .env.vault"); - const parsed = DotenvModule._parseVault(options$1); - let processEnv = process.env; - if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv; - DotenvModule.populate(processEnv, parsed, options$1); - return { parsed }; - } - function configDotenv(options$1) { - const dotenvPath = path$10.resolve(process.cwd(), ".env"); - let encoding = "utf8"; - let processEnv = process.env; - if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv; - let debug$18 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug); - let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet); - if (options$1 && options$1.encoding) encoding = options$1.encoding; - else if (debug$18) _debug("No encoding is specified. UTF-8 is used by default"); - let optionPaths = [dotenvPath]; - if (options$1 && options$1.path) if (!Array.isArray(options$1.path)) optionPaths = [_resolveHome(options$1.path)]; - else { - optionPaths = []; - for (const filepath of options$1.path) optionPaths.push(_resolveHome(filepath)); - } - let lastError; - const parsedAll = {}; - for (const path$13 of optionPaths) try { - const parsed = DotenvModule.parse(fs$10.readFileSync(path$13, { encoding })); - DotenvModule.populate(parsedAll, parsed, options$1); - } catch (e$1) { - if (debug$18) _debug(`Failed to load ${path$13} ${e$1.message}`); - lastError = e$1; - } - const populated = DotenvModule.populate(processEnv, parsedAll, options$1); - debug$18 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug$18); - quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet); - if (debug$18 || !quiet) { - const keysCount = Object.keys(populated).length; - const shortPaths = []; - for (const filePath of optionPaths) try { - const relative$3 = path$10.relative(process.cwd(), filePath); - shortPaths.push(relative$3); - } catch (e$1) { - if (debug$18) _debug(`Failed to load ${filePath} ${e$1.message}`); - lastError = e$1; - } - _log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`); - } - if (lastError) return { - parsed: parsedAll, - error: lastError - }; - else return { parsed: parsedAll }; - } - function config(options$1) { - if (_dotenvKey(options$1).length === 0) return DotenvModule.configDotenv(options$1); - const vaultPath = _vaultPath(options$1); - if (!vaultPath) { - _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`); - return DotenvModule.configDotenv(options$1); - } - return DotenvModule._configVault(options$1); - } - function decrypt(encrypted, keyStr) { - const key = Buffer.from(keyStr.slice(-64), "hex"); - let ciphertext = Buffer.from(encrypted, "base64"); - const nonce = ciphertext.subarray(0, 12); - const authTag = ciphertext.subarray(-16); - ciphertext = ciphertext.subarray(12, -16); - try { - const aesgcm = crypto$2.createDecipheriv("aes-256-gcm", key, nonce); - aesgcm.setAuthTag(authTag); - return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; - } catch (error$1) { - const isRange = error$1 instanceof RangeError; - const invalidKeyLength = error$1.message === "Invalid key length"; - const decryptionFailed = error$1.message === "Unsupported state or unable to authenticate data"; - if (isRange || invalidKeyLength) { - const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)"); - err$2.code = "INVALID_DOTENV_KEY"; - throw err$2; - } else if (decryptionFailed) { - const err$2 = /* @__PURE__ */ new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY"); - err$2.code = "DECRYPTION_FAILED"; - throw err$2; - } else throw error$1; - } - } - function populate(processEnv, parsed, options$1 = {}) { - const debug$18 = Boolean(options$1 && options$1.debug); - const override = Boolean(options$1 && options$1.override); - const populated = {}; - if (typeof parsed !== "object") { - const err$2 = /* @__PURE__ */ new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate"); - err$2.code = "OBJECT_REQUIRED"; - throw err$2; - } - for (const key of Object.keys(parsed)) if (Object.prototype.hasOwnProperty.call(processEnv, key)) { - if (override === true) { - processEnv[key] = parsed[key]; - populated[key] = parsed[key]; - } - if (debug$18) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`); - else _debug(`"${key}" is already defined and was NOT overwritten`); - } else { - processEnv[key] = parsed[key]; - populated[key] = parsed[key]; - } - return populated; - } - const DotenvModule = { - configDotenv, - _configVault, - _parseVault, - config, - decrypt, - parse: parse$12, - populate - }; - module.exports.configDotenv = DotenvModule.configDotenv; - module.exports._configVault = DotenvModule._configVault; - module.exports._parseVault = DotenvModule._parseVault; - module.exports.config = DotenvModule.config; - module.exports.decrypt = DotenvModule.decrypt; - module.exports.parse = DotenvModule.parse; - module.exports.populate = DotenvModule.populate; - module.exports = DotenvModule; -})); - -//#endregion -//#region ../../node_modules/.pnpm/dotenv-expand@12.0.3_patch_hash=49330a663821151418e003e822a82a6a61d2f0f8a6e3cab00c1c94815a112889/node_modules/dotenv-expand/lib/main.js -var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => { - function _resolveEscapeSequences(value$1) { - return value$1.replace(/\\\$/g, "$"); - } - function expandValue(value$1, processEnv, runningParsed) { - const env$1 = { - ...runningParsed, - ...processEnv - }; - const regex = /(? normalizePath(path.join(envDir, file))); - return []; -} -function loadEnv(mode, envDir, prefixes = "VITE_") { - const start = performance.now(); - const getTime = () => `${(performance.now() - start).toFixed(2)}ms`; - if (mode === "local") throw new Error("\"local\" cannot be used as a mode name because it conflicts with the .local postfix for .env files."); - prefixes = arraify(prefixes); - const env$1 = {}; - const envFiles = getEnvFilesForMode(mode, envDir); - debug$14?.(`loading env files: %O`, envFiles); - const parsed = Object.fromEntries(envFiles.flatMap((filePath) => { - if (!tryStatSync(filePath)?.isFile()) return []; - return Object.entries((0, import_main.parse)(fs.readFileSync(filePath))); - })); - debug$14?.(`env files loaded in ${getTime()}`); - if (parsed.NODE_ENV && process.env.VITE_USER_NODE_ENV === void 0) process.env.VITE_USER_NODE_ENV = parsed.NODE_ENV; - if (parsed.BROWSER && process.env.BROWSER === void 0) process.env.BROWSER = parsed.BROWSER; - if (parsed.BROWSER_ARGS && process.env.BROWSER_ARGS === void 0) process.env.BROWSER_ARGS = parsed.BROWSER_ARGS; - (0, import_main$1.expand)({ - parsed, - processEnv: { ...process.env } - }); - for (const [key, value$1] of Object.entries(parsed)) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = value$1; - for (const key in process.env) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = process.env[key]; - debug$14?.(`using resolved env: %O`, env$1); - return env$1; -} -function resolveEnvPrefix({ envPrefix = "VITE_" }) { - envPrefix = arraify(envPrefix); - if (envPrefix.includes("")) throw new Error(`envPrefix option contains value '', which could lead unexpected exposure of sensitive information.`); - return envPrefix; -} - -//#endregion -//#region src/node/deprecations.ts -var import_picocolors$28 = /* @__PURE__ */ __toESM(require_picocolors(), 1); -const docsURL = "https://vite.dev"; -const deprecationCode = { - removePluginHookSsrArgument: "changes/this-environment-in-hooks", - removePluginHookHandleHotUpdate: "changes/hotupdate-hook", - removeServerModuleGraph: "changes/per-environment-apis", - removeServerReloadModule: "changes/per-environment-apis", - removeServerPluginContainer: "changes/per-environment-apis", - removeServerHot: "changes/per-environment-apis", - removeServerTransformRequest: "changes/per-environment-apis", - removeServerWarmupRequest: "changes/per-environment-apis", - removeSsrLoadModule: "changes/ssr-using-modulerunner" -}; -const deprecationMessages = { - removePluginHookSsrArgument: "Plugin hook `options.ssr` is replaced with `this.environment.config.consumer === 'server'`.", - removePluginHookHandleHotUpdate: "Plugin hook `handleHotUpdate()` is replaced with `hotUpdate()`.", - removeServerModuleGraph: "The `server.moduleGraph` is replaced with `this.environment.moduleGraph`.", - removeServerReloadModule: "The `server.reloadModule` is replaced with `environment.reloadModule`.", - removeServerPluginContainer: "The `server.pluginContainer` is replaced with `this.environment.pluginContainer`.", - removeServerHot: "The `server.hot` is replaced with `this.environment.hot`.", - removeServerTransformRequest: "The `server.transformRequest` is replaced with `this.environment.transformRequest`.", - removeServerWarmupRequest: "The `server.warmupRequest` is replaced with `this.environment.warmupRequest`.", - removeSsrLoadModule: "The `server.ssrLoadModule` is replaced with Environment Runner." -}; -let _ignoreDeprecationWarnings = false; -function isFutureDeprecationEnabled(config$2, type) { - return !!config$2.future?.[type]; -} -/** -* Warn about future deprecations. -*/ -function warnFutureDeprecation(config$2, type, extraMessage, stacktrace = true) { - if (_ignoreDeprecationWarnings || !config$2.future || config$2.future[type] !== "warn") return; - let msg = `[vite future] ${deprecationMessages[type]}`; - if (extraMessage) msg += ` ${extraMessage}`; - msg = import_picocolors$28.default.yellow(msg); - const docs = `${docsURL}/changes/${deprecationCode[type].toLowerCase()}`; - msg += import_picocolors$28.default.gray(`\n ${stacktrace ? "├" : "└"}─── `) + import_picocolors$28.default.underline(docs) + "\n"; - if (stacktrace) { - const stack = (/* @__PURE__ */ new Error()).stack; - if (stack) { - let stacks = stack.split("\n").slice(3).filter((i$1) => !i$1.includes("/node_modules/vite/dist/")); - if (stacks.length === 0) stacks.push("No stack trace found."); - stacks = stacks.map((i$1, idx) => ` ${idx === stacks.length - 1 ? "└" : "│"} ${i$1.trim()}`); - msg += import_picocolors$28.default.dim(stacks.join("\n")) + "\n"; - } - } - config$2.logger.warnOnce(msg); -} -function ignoreDeprecationWarnings(fn) { - const before = _ignoreDeprecationWarnings; - _ignoreDeprecationWarnings = true; - const ret = fn(); - _ignoreDeprecationWarnings = before; - return ret; -} - -//#endregion -//#region src/node/server/middlewares/error.ts -var import_picocolors$27 = /* @__PURE__ */ __toESM(require_picocolors(), 1); -function prepareError(err$2) { - return { - message: stripVTControlCharacters(err$2.message), - stack: stripVTControlCharacters(cleanStack(err$2.stack || "")), - id: err$2.id, - frame: stripVTControlCharacters(err$2.frame || ""), - plugin: err$2.plugin, - pluginCode: err$2.pluginCode?.toString(), - loc: err$2.loc - }; -} -function buildErrorMessage(err$2, args = [], includeStack = true) { - if (err$2.plugin) args.push(` Plugin: ${import_picocolors$27.default.magenta(err$2.plugin)}`); - const loc = err$2.loc ? `:${err$2.loc.line}:${err$2.loc.column}` : ""; - if (err$2.id) args.push(` File: ${import_picocolors$27.default.cyan(err$2.id)}${loc}`); - if (err$2.frame) args.push(import_picocolors$27.default.yellow(pad$1(err$2.frame))); - if (includeStack && err$2.stack) args.push(pad$1(cleanStack(err$2.stack))); - return args.join("\n"); -} -function cleanStack(stack) { - return stack.split(/\n/).filter((l) => /^\s*at/.test(l)).join("\n"); -} -function logError(server, err$2) { - const msg = buildErrorMessage(err$2, [import_picocolors$27.default.red(`Internal server error: ${err$2.message}`)]); - server.config.logger.error(msg, { - clear: true, - timestamp: true, - error: err$2 - }); - server.environments.client.hot.send({ - type: "error", - err: prepareError(err$2) - }); -} -function errorMiddleware(server, allowNext = false) { - return function viteErrorMiddleware(err$2, _req, res, next) { - logError(server, err$2); - if (allowNext) next(); - else { - res.statusCode = 500; - res.end(` - - - - - Error -